/* ============================================================================
   Manuel2Fix Provider Dashboard - Styles
   ============================================================================ */

:root {
    --primary-color: #0EA5E9;
    --primary-hover: #0284C7;
    --success-color: #00D924;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
    color: var(--text-primary);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Section */
.section {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

/* Status Card */
.status-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
    margin-bottom: 2rem;
}

.status-card.verified {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-color: var(--success-color);
}

.status-card.pending {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: var(--warning-color);
}

.status-icon {
    font-size: 3rem;
    line-height: 1;
}

.status-content h3 {
    margin-bottom: 0.5rem;
}

.status-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    /* Touch optimization */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 44px; /* iOS empfohlene Touch-Größe */
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:active {
    background-color: var(--bg-light);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Mobile Button Optimierungen */
@media (max-width: 768px) {
    .btn {
        min-height: 48px; /* Größere Touch-Targets auf Mobile */
        padding: 0.875rem 1.5rem;
        font-size: 1.0625rem;
    }
}

/* Verification Steps */
.verification-steps {
    margin-top: 2rem;
}

.verification-steps h3 {
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Requirements Box */
.requirements-box {
    background-color: #FEF3C7;
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.requirements-box h3 {
    color: #92400E;
    margin-bottom: 1rem;
}

.requirements-box ul {
    list-style: none;
    padding: 0;
}

.requirements-box li {
    padding: 0.5rem 0;
    color: #92400E;
    font-weight: 500;
}

.requirements-box li:before {
    content: "⚠️ ";
    margin-right: 0.5rem;
}

/* Balance Section */
.balance-card {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.balance-card h3 {
    color: white;
    opacity: 0.9;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
}

.balance-subtitle {
    opacity: 0.9;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Bank Transfer */
.bank-transfer {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.bank-transfer h3 {
    margin-bottom: 1.5rem;
}

.account-details {
    display: grid;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.detail-row label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-row span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay p {
    color: white;
    margin-top: 1rem;
    font-size: 1.125rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Embedded Onboarding Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(50px);
        opacity: 0;
    }
}

@keyframes slideDownMobile {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    /* Touch-optimiert */
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#stripe-connect-onboarding {
    min-height: 400px;
}

/* Mobile-optimierte Anpassungen */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        animation: slideUpMobile 0.3s ease-out;
        /* Safe Area für iPhone Notch */
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        /* Drag indicator */
    }
    
    .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: var(--border-color);
        border-radius: 2px;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
        margin-top: 8px;
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
        /* Größerer Touch Target */
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    #stripe-connect-onboarding {
        min-height: 300px;
    }
}

/* Extra kleine Geräte */
@media (max-width: 480px) {
    .modal-container {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Landscape Modus für Smartphones */
@media (max-height: 600px) and (orientation: landscape) {
    .modal-container {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .tabs {
        gap: 0.25rem;
    }

    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .section {
        padding: 1.5rem;
    }

    .status-card {
        flex-direction: column;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .balance-amount {
        font-size: 2rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }
}
