/* ============================================
   ONEflight Wiki - Authentication Styles
   ============================================ */

/* --- Navbar User Avatar --- */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    vertical-align: middle;
}

.user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--card-border);
}

.user-menu {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Login Page --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    max-width: 440px;
    width: 100%;
    padding: 50px 40px;
    text-align: center;
}

.login-logo {
    margin-bottom: 24px;
}

.login-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin: 0 0 36px 0;
    font-size: 15px;
    line-height: 1.5;
}

.btn-microsoft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #5e5e5e;
    border: 1px solid #8c8c8c;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.btn-microsoft:hover {
    background: #f3f3f3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-microsoft svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

.login-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid var(--card-border);
}

.login-footer {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.login-footer p {
    margin: 4px 0;
}

/* --- Profile Page --- */
.profile-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 30px;
}

.profile-card {
    padding: 40px;
    text-align: center;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin: 0 auto;
    display: block;
}

.profile-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto;
    border: 3px solid var(--card-border);
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 8px;
}

.profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
    text-align: left;
}

.profile-field-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.profile-field-value {
    font-size: 16px;
    color: var(--text-primary);
    margin-top: 4px;
}

.btn-signout {
    margin-top: 32px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-signout:hover {
    background: var(--accent);
    color: white;
}

.profile-edit-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.profile-edit-link:hover {
    opacity: 0.8;
}

/* --- Loading State --- */
.auth-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .login-container {
        padding: 40px 24px;
    }

    .profile-details {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 30px 20px;
    }
}

/* --- User Profile Dropdown --- */
.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: var(--bg-secondary, #252525);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-dropdown-item:hover {
    background: rgba(128, 128, 128, 0.12);
}

.user-dropdown-signout {
    color: #ff6b6b;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 4px 0;
}

.udrop-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* --- Notification Bell --- */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    margin-right: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bell-icon {
    font-size: 18px;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #c0392b;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    color: var(--text-secondary, #888);
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.05));
    transition: background 0.15s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notif-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text, #e0e0e0);
}

.notif-sub {
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.notification-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-secondary, #888);
    font-size: 13px;
    margin: 0;
}
