/* GLASS THEME - MODERN FLOATING DOCK UI v2 */
:root {
    --sidebar-bg: #111111;
    --sidebar-text: #ffffff;
    --sidebar-text-muted: #a1a1aa;
    --accent-color: #fbbf24;
    /* Yellow for logo */
    --accent-hover: rgba(251, 191, 36, 0.15);
    --sidebar-width: 320px;
    /* Wider sidebar */
    --content-gap: 10px;
    /* Closer to sidebar */
}

/* Base Layout Wrapper */
.glass-layout {
    display: flex;
    min-height: 100vh;
    background: #f0f4f8;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================
   BLACK SIDEBAR (DESKTOP)
   ============================================ */
.glass-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    /* Hidden by default for login page */
}

/* Yellow Logo at Top */
.glass-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    position: relative;
}

.glass-brand img {
    height: 40px;
    filter: brightness(0) saturate(100%) invert(78%) sepia(60%) saturate(500%) hue-rotate(359deg) brightness(104%) contrast(97%);
}

.glass-brand span {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 1px;
}

/* Mini Bildirim Butonları - Logo Yanında */
.brand-notification-btns {
    display: flex;
    gap: 6px;
    margin-left: auto;
    z-index: 1000;
    position: relative;
}

.brand-notification-btns button {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    z-index: 1001;
}

.brand-notification-btns button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.brand-notification-btns button#btnNotifMini:hover {
    background: rgba(255, 193, 7, 0.3);
}

.brand-notification-btns button#btnSyncMini:hover {
    background: rgba(76, 175, 80, 0.3);
}

.mini-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    min-width: 14px;
    height: 14px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.mini-badge.show {
    display: flex !important;
}

#btnSyncMini .mini-badge {
    background: #4CAF50;
}

/* Sidebar İçi Dropdown */
/* Bildirim Dropdown - Global (Body'de, glass menü dışında) */
.notification-dropdown-global {
    position: fixed;
    top: 70px;
    left: 280px;
    width: 450px;
    max-width: calc(100vw - 300px);
    max-height: 600px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Mobilde ortala */
@media (max-width: 768px) {
    .notification-dropdown-global {
        left: 50%;
        transform: translateX(-50%);
        width: 90vw;
        max-width: 90vw;
        top: 65px;
        z-index: 10100;
    }
}

.notification-dropdown.sidebar-dropdown {
    position: absolute;
    top: 70px;
    left: 10px;
    right: 10px;
    width: 420px;
    max-width: 95vw;
    max-height: 600px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1100;
    flex-direction: column;
    overflow: hidden;
}

/* Notification header - Hem global hem sidebar için */
.notification-dropdown-global .notification-header,
.notification-dropdown.sidebar-dropdown .notification-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-global .notification-header h3,
.notification-dropdown.sidebar-dropdown .notification-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.notification-dropdown-global .notification-header .btn-link,
.notification-dropdown.sidebar-dropdown .notification-header .btn-link {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

/* Notification list - Hem global hem sidebar */
.notification-dropdown-global .notification-list,
.notification-dropdown.sidebar-dropdown .notification-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 8px;
}

/* Notification item - Hem global hem sidebar */
.notification-dropdown-global .notification-item,
.notification-dropdown.sidebar-dropdown .notification-item {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-dropdown-global .notification-item:hover,
.notification-dropdown.sidebar-dropdown .notification-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-dropdown-global .notification-item.unread,
.notification-dropdown.sidebar-dropdown .notification-item.unread {
    background: rgba(251, 191, 36, 0.15);
    border-left: 3px solid #fbbf24;
}

.notification-dropdown-global .notification-item-header,
.notification-dropdown.sidebar-dropdown .notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.notification-dropdown-global .notification-title,
.notification-dropdown.sidebar-dropdown .notification-title {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.notification-dropdown-global .notification-time,
.notification-dropdown.sidebar-dropdown .notification-time {
    color: #9ca3af;
    font-size: 10px;
    white-space: nowrap;
}

.notification-dropdown-global .notification-message,
.notification-dropdown.sidebar-dropdown .notification-message {
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-dropdown-global .notification-empty,
.notification-dropdown.sidebar-dropdown .notification-empty {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
    font-size: 13px;
}

.glass-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
}

.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sidebar-text-muted);
    font-weight: 700;
    margin: 16px 0 8px 12px;
}

/* Dock Item Styling */
.glass-dock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
}

.glass-dock-item:hover {
    background: var(--accent-hover);
    color: var(--accent-color);
}

.glass-dock-item.active {
    background: var(--accent-color);
    color: #111111;
    font-weight: 600;
}

.glass-dock-item .icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

/* Main Content Area Adjustment - Closer to sidebar */
.glass-main {
    flex: 1;
    margin-left: calc(var(--sidebar-width) + var(--content-gap));
    padding: 10px 15px;
    min-height: 100vh;
}

/* Old Navigation Elements Hide */
/* .topbar, */
.brand,
.menuHead,
.subbar,
.tabs-modern-sticky {
    display: none !important;
}

/* SHOW MOBILE HEADER ON MOBILE ONLY */
.mobile-glass-header {
    display: none;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #FF8F00, #FFA726);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10005;
}

@media (max-width: 900px) {
    .mobile-glass-header {
        display: flex !important;
    }
}

/* HIDE PERF MONITOR COMPLETELY */
#perf-monitor-container,
.perf-monitor,
[id*="perfMonitor"],
[class*="perf-monitor"],
div[style*="PERF MONITOR"] {
    display: none !important;
}

/* ⚠️ CRITICAL VISIBILITY FIX ⚠️ */
.page-container.tabPanel {
    display: none;
    /* Default hidden */
}

.page-container.tabPanel[style*="display: block"],
.page-container.tabPanel[style*="display:block"],
.page-container.tabPanel:not([style*="display: none"]) {
    display: block !important;
    /* Force show when JS removes none */
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MOBILE HAMBURGER BUTTON
   ============================================ */
.mobile-hamburger {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10002;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #FF8F00, #FFA726);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(255, 143, 0, 0.4);
}

.mobile-hamburger span {
    display: block;
    width: 22px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn {
    display: none;
    background: linear-gradient(135deg, #FF8F00, #FFA726);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-icon-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    padding: 8px;
    z-index: 10011;
}

.mobile-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10012;
}

/* ============================================
   MOBILE GLASS NAV (BOTTOM)
   ============================================ */
.mobile-glass-nav {
    display: none;
}

@media (max-width: 900px) {
    .glass-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 10001;
        /* Above almost everything */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        /* Override previous none */
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
    }

    .glass-sidebar.open {
        transform: translateX(0);
    }

    /* Backdrop Overlay */
    .glass-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 10000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .glass-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .mobile-hamburger {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .glass-main {
        margin-left: 0;
        padding: 10px;
        padding-bottom: 100px;
    }

    .mobile-glass-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        height: 65px;
        background: rgba(17, 17, 17, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: #a1a1aa;
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        padding: 8px 12px;
        border-radius: 10px;
        transition: all 0.2s;
    }

    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
    }

    .mobile-nav-item.active {
        color: #fbbf24;
        background: rgba(251, 191, 36, 0.15);
    }

    .mobile-nav-item.active svg {
        stroke: #fbbf24;
    }
}

/* Safety rule to ensure login card is visible when requested by JS */
#loginCard[style*="display: flex"] {
    display: flex !important;
}

/* ============================================
   PREMIUM LOGIN SCREEN (GLASSMORPHIC)
   ============================================ */
.glass-login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, #fbbf24, transparent 40%),
        radial-gradient(circle at top right, #f59e0b, transparent 40%),
        radial-gradient(circle at bottom left, #d97706, transparent 40%),
        radial-gradient(circle at bottom right, #b45309, transparent 40%),
        #fefce8;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.glass-login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: slideUp 0.6s ease-out;
}

.login-brand-area {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand-area img {
    height: 60px;
    margin-bottom: 16px;
}

.login-brand-area h1 {
    font-size: 28px;
    font-weight: 900;
    color: #111;
    margin: 0;
    letter-spacing: -0.5px;
}

.login-brand-area p {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.glass-field {
    margin-bottom: 20px;
}

.glass-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    margin-left: 4px;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    color: #111 !important;
    transition: all 0.3s ease !important;
}

.glass-input:focus {
    background: white !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15) !important;
}

.glass-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #000 !important;
    font-weight: 800 !important;
    padding: 16px !important;
    border-radius: 14px !important;
    border: none !important;
    font-size: 16px !important;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(251, 191, 36, 0.4) !important;
    transition: all 0.3s ease !important;
}

.glass-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(251, 191, 36, 0.5) !important;
    filter: brightness(1.05);
}

.glass-btn-secondary {
    width: 100%;
    background: transparent !important;
    color: #555 !important;
    padding: 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    font-size: 14px !important;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.glass-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #111 !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   2FA SCREEN (GLASSMORPHIC)
   ============================================ */
.glass-2fa-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, #667eea, transparent 50%),
        radial-gradient(circle at bottom right, #764ba2, transparent 50%),
        #f3f4f6;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.glass-2fa-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-2fa-icon-area {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.3);
}

.glass-2fa-icon-area span {
    font-size: 48px;
}

.glass-2fa-card h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
    background: none;
    -webkit-text-fill-color: initial;
}

.glass-2fa-card p {
    color: #6b7280;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.glass-2fa-input-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-2fa-input {
    font-size: 34px !important;
    font-weight: 800 !important;
    letter-spacing: 14px !important;
    text-align: center !important;
    padding: 16px !important;
    width: 100% !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 14px !important;
    color: #111 !important;
    transition: all 0.3s ease !important;
}

.glass-2fa-input:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
    transform: scale(1.02);
}

.glass-2fa-btn {
    width: 100%;
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 18px !important;
    font-size: 17px !important;
    border-radius: 16px !important;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4) !important;
    transition: all 0.3s ease !important;
}

.glass-2fa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.5) !important;
    filter: brightness(1.1);
}

.glass-2fa-alert {
    text-align: center;
    margin-top: 28px;
    padding: 16px;
    background: rgba(254, 243, 199, 0.6);
    border-radius: 14px;
    border-left: 5px solid #f59e0b;
    backdrop-filter: blur(5px);
}

.glass-2fa-alert p {
    color: #92400e;
    font-size: 13px;
    margin: 0;
    font-weight: 600;
}