/* ============================================================
   AUTH PAGES — Google Drive Inspired flat design
   ============================================================ */

/* Auth top brand bar */
.auth-topbar {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 10;
}

[data-theme="dark"] .auth-topbar {
    background: var(--card-bg);
    border-bottom-color: var(--border-color);
}

.auth-brand {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

/* Main content — flex row for split layout */
.auth-main {
    display: flex !important;
    flex: 1;
    overflow: hidden;
}

/* Left decorative blue panel (desktop only) */
.auth-panel-left {
    flex: 1;
    background: var(--sidebar-bg, #1A56C4);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

/* Abstract blob decoration */
.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.07);
    border-radius: 50% 30% 60% 40% / 40% 60% 30% 50%;
    top: -80px;
    right: -80px;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.05);
    border-radius: 30% 60% 40% 50% / 50% 30% 60% 40%;
    bottom: -60px;
    left: -40px;
}

.auth-panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #FFFFFF;
}

.auth-panel-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.auth-panel-content p {
    font-size: 1.05rem;
    opacity: 0.85;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .auth-panel-left {
        display: flex;
    }
}

/* Auth container (right side) */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    overflow-y: auto;
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .auth-container {
        flex: 1;
        width: auto;
    }
}

/* Auth card — flat white */
.auth-card {
    background: var(--card-bg);
    padding: 40px 36px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 380px;
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .auth-card {
    background: var(--dm-surface, #1A1D27);
    border-color: var(--border-color);
}

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

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Form elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .form-control {
    background: var(--dm-surface-2, #22263A);
    border-color: var(--border-color);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(77, 142, 240, 0.15);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 22px;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--light-text);
    line-height: 1.8;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Error message */
.error-message {
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    display: none;
    text-align: center;
    line-height: 1.5;
}

/* Password toggle */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: var(--light-text);
}

.password-toggle-btn:hover {
    background: var(--primary-light, #E8F0FE);
    color: var(--primary-color);
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    font-size: 16px;
    user-select: none;
}

.password-input-container .form-control {
    padding-right: 48px;
}

/* ============================================================
   DOWNLOAD DESKTOP APP BANNER
   ============================================================ */
.download-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(26, 115, 232, 0.25);
    animation: slideUpBanner 0.5s ease-out;
}

[data-theme="dark"] .download-banner {
    background: var(--primary-dark, #1557B0);
}

@keyframes slideUpBanner {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.download-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.download-content span {
    font-size: 0.92rem;
    font-weight: 500;
}

.download-btn {
    background: white !important;
    color: var(--primary-color) !important;
    padding: 8px 20px !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.download-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.dismiss-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.dismiss-btn:hover {
    color: white;
}

@media (max-width: 600px) {
    .download-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .dismiss-btn {
        position: absolute;
        top: 6px;
        right: 10px;
    }

    .download-banner {
        padding: 14px 20px;
    }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 420px;
    border-radius: var(--radius-card);
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-content {
    background: var(--dm-surface, #1A1D27);
    border-color: var(--border-color);
}

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

.modal-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.close-btn:hover {
    background: var(--inner-bg);
    color: var(--text-color);
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

/* ============================================================
   INACTIVITY WARNING OVERLAY
   ============================================================ */
#inactivity-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.inactivity-warning-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 40px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .inactivity-warning-card {
    background: var(--dm-surface, #1A1D27);
}

.inactivity-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

.inactivity-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 10px;
}

.inactivity-message {
    font-size: 0.92rem;
    color: var(--light-text);
    margin: 0 0 18px;
    line-height: 1.5;
}

.inactivity-message span {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.05rem;
}

.inactivity-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.inactivity-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--warning-color, #F9AB00));
    border-radius: 3px;
    transition: width 1s linear;
}

.inactivity-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-family: var(--font-family);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.3);
}

.inactivity-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.inactivity-btn:active {
    transform: translateY(0);
}

/* ============================================================
   FORGOT PASSWORD / USERNAME TAB SWITCHER
   ============================================================ */
.forgot-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--inner-bg);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.forgot-tab-btn {
    flex: 1;
    padding: 9px 10px;
    border: none;
    background: transparent;
    color: var(--light-text);
    font-size: 0.83rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.forgot-tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.forgot-tab-btn:hover:not(.active) {
    color: var(--text-color);
}

.forgot-tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
}

.forgot-tab-content.active {
    display: block;
}

/* Info callout */
.info-callout {
    background: var(--primary-light, #E8F0FE);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-color);
}

[data-theme="dark"] .info-callout {
    background: var(--primary-light, #1E2D4A);
}

.info-callout strong {
    color: var(--primary-color);
}

/* Success result box */
.username-result-box {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 14px;
    animation: slideUp 0.3s ease-out;
}

.username-result-box .found-label {
    font-size: 0.82rem;
    color: var(--light-text);
    margin-bottom: 8px;
}

.username-result-box .found-username {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 10px;
    word-break: break-all;
}

.username-result-box .found-hint {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* ============================================================
   MAIN LAYOUT OVERRIDES FOR AUTH PAGES
   ============================================================ */
.main-footer {
    text-align: center;
    padding: 12px;
    font-size: 0.78rem;
    color: var(--light-text);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Override body overflow for auth pages */
.app-container.no-sidebar {
    flex-direction: column;
    overflow-y: auto;
}

.app-container.no-sidebar .main-content {
    flex: 1;
    overflow: hidden;
    padding: 0 !important;
    max-width: none !important;
}
