/* DocuSort Homepage - Account Dashboard Styles */

/* CSS Variables for Dashboard */
:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --gradient-primary: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --dark-gray: #282828;
    --medium-gray: #404040;
    --warm-orange: #FFB852;
    --bright-orange: #FF9800;
    --accent-orange: #FF5926;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e1e5e9;
    --transition-normal: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* =============================================
   ACCOUNT OVERLAY
   ============================================= */
.account-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.account-overlay.active {
    opacity: 1;
    visibility: visible;
}

.account-panel {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(50px) scale(0.9);
    transition: var(--transition-normal);
}

.account-overlay.active .account-panel {
    transform: translateY(0) scale(1);
}

/* =============================================
   ACCOUNT HEADER
   ============================================= */
.account-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: relative;
    text-align: center;
}

.account-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    font-size: 1.2rem;
}

.account-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.account-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.account-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.account-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* =============================================
   ACCOUNT BODY
   ============================================= */
.account-body {
    padding: 2rem;
}

.account-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.account-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.account-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-section h3 i {
    font-size: 1rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    overflow: hidden;
}

.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.account-item:last-child {
    border-bottom: none;
}

.account-item label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.account-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
}

/* =============================================
   SUBSCRIPTION STATUS STYLES
   ============================================= */
.subscription-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.subscription-status.active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.subscription-status.cancelled,
.subscription-status.expired {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.subscription-status.trialing {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.subscription-status.past_due {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.subscription-status.inactive {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.subscription-status i {
    font-size: 0.8rem;
}

/* No Subscription State */
.no-subscription {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    text-align: center;
}

.no-subscription span {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 1rem;
}

.no-subscription .btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.no-subscription .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Trial Information */
.trial-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.trial-info.expiring {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border-left-color: #f59e0b;
}

.trial-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.trial-warning {
    background: #fbbf24;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* License Warnings */
.license-warning {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    color: #dc2626;
    font-weight: 600;
}

.license-warning i {
    margin-right: 0.5rem;
    color: #ef4444;
}

.text-warning {
    color: #f59e0b;
    font-weight: 600;
}

/* =============================================
   ACCOUNT ACTIONS
   ============================================= */
.account-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.account-actions .btn-primary,
.account-actions .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.account-actions .btn-logout {
    background: #dc2626;
    color: white;
    border: 2px solid #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.account-actions .btn-logout span {
    display: flex;
    align-items: center;
}

/* Loading Spinner für Buttons */
.btn-secondary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #9ca3af;
    border-color: #9ca3af;
}

.btn-secondary:disabled:hover {
    background: #9ca3af;
    border-color: #9ca3af;
    transform: none;
    box-shadow: none;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.account-actions .btn-logout:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-download i {
    font-size: 1.1rem;
}

.btn-download-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #9ca3af;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: not-allowed;
    font-size: 0.95rem;
}

/* =============================================
   USER DASHBOARD SECTION
   ============================================= */
.user-dashboard {
    background: var(--gradient-primary);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.user-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details .fas {
    font-size: 2rem;
    opacity: 0.8;
}

.user-text {
    display: flex;
    flex-direction: column;
}

.user-greeting {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-email {
    font-size: 0.9rem;
    opacity: 0.8;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn-dashboard,
.btn-logout {
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
}

.btn-dashboard {
    background: #10b981;
    color: white;
}

.btn-dashboard:hover {
    background: #059669;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =============================================
   RESPONSIVE DESIGN FOR DASHBOARD
   ============================================= */
@media (max-width: 768px) {
    .account-panel {
        width: 95%;
        margin: 1rem;
    }

    .account-header,
    .account-body {
        padding: 1.5rem;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-actions {
        flex-direction: column;
    }

    .account-actions .btn-primary,
    .account-actions .btn-secondary,
    .account-actions .btn-logout {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .user-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-actions {
        justify-content: center;
    }

    .btn-dashboard,
    .btn-logout {
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .account-header {
        padding: 1rem;
    }

    .account-body {
        padding: 1rem;
    }

    .account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .account-item span {
        text-align: left;
    }
}
