    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #f4f6fb;
      --card: #ffffff;
      --border: #e8ecf4;
      --text: #1a1d2e;
      --text-secondary: #6b7280;
      --text-muted: #9ca3af;
      --blue: #2563eb;
      --blue-light: #eff6ff;
      --sidebar-w: 220px;
      --topbar-h: 52px;
      --radius: 12px;
    }

    html, body {
      height: 100%;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      background: var(--bg);
      color: var(--text);
      overflow: hidden;
    }

    /* ══════════════════════════════
       LAYOUT SHELL
    ══════════════════════════════ */
    .layout {
      display: flex;
      height: 100vh;
      width: 100vw;
      overflow: hidden;
    }

    /* ══════════════════════════════
       SIDEBAR
    ══════════════════════════════ */
    .sidebar {
      width: var(--sidebar-w);
      background: var(--card);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      overflow-y: auto;
      overflow-x: hidden;
      transition: transform .25s ease, width .25s ease;
      z-index: 200;
    }

    .sidebar-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 18px 16px;
      border-bottom: 1px solid var(--border);
      text-decoration: none;
      flex-shrink: 0;
    }

    .sidebar-logo-icon img {
      width: 50px;
      height: 28px;
      object-fit: contain;
    }

    .sidebar-logo-text strong {
      font-size: 14px;
      font-weight: 700;
      display: block;
      color: var(--text);
    }

    .sidebar-logo-text span {
      font-size: 11px;
      color: var(--text-secondary);
    }

    .sidebar-nav {
      flex: 1;
      padding: 12px 0;
      overflow-y: auto;
    }

    .nav-section {
      padding: 10px 16px 4px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 16px;
      cursor: pointer;
      color: var(--text-secondary);
      font-size: 13.5px;
      font-weight: 500;
      transition: background .15s, color .15s;
      position: relative;
      text-decoration: none;
      white-space: nowrap;
    }

    .nav-link:hover {
      background: var(--bg);
      color: var(--text);
      text-decoration: none;
    }

    .nav-link.active {
      background: var(--blue-light);
      color: var(--blue);
      font-weight: 600;
    }

    .nav-link.active::before {
      content: '';
      position: absolute;
      left: 0; top: 4px; bottom: 4px;
      width: 3px;
      background: var(--blue);
      border-radius: 0 3px 3px 0;
    }

    .sidebar-user {
      padding: 14px 16px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .user-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, #667eea, #764ba2);
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-weight: 700; font-size: 13px;
      flex-shrink: 0;
    }

    .user-info { flex: 1; min-width: 0; }
    .user-info strong { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .user-info span   { font-size: 11px; color: var(--text-muted); }

    /* ══════════════════════════════
       MAIN AREA
    ══════════════════════════════ */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;        /* prevents flex child from overflowing */
      overflow: hidden;
      background: var(--bg);
    }

    /* Mobile topbar (hidden on desktop) */
    .mobile-topbar {
      display: none;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: var(--card);
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      z-index: 100;
    }

    .mobile-topbar-title {
      font-size: 15px;
      font-weight: 600;
      flex: 1;
    }

    .hamburger {
      width: 36px; height: 36px;
      border: 1px solid var(--border);
      background: var(--card);
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      font-size: 17px;
      color: var(--text);
      flex-shrink: 0;
      touch-action: manipulation;
    }

    .logout-btn-mobile {
      display: flex; align-items: center; gap: 6px;
      padding: 6px 12px;
      background: var(--blue); color: #fff;
      border: none; border-radius: 8px;
      font-size: 13px; font-weight: 600;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      touch-action: manipulation;
    }

    /* Pane */
    .pane-wrap {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      /* no padding here — each sub-page manages its own */
    }

    .pane-loader {
      display: none;
      align-items: center;
      gap: 8px;
      color: var(--text-muted);
      font-size: 13px;
      padding: 20px 24px;
    }

    .pane-loader.show { display: flex; }

    .spinner {
      width: 16px; height: 16px;
      border: 2px solid var(--border);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: spin .6s linear infinite;
      flex-shrink: 0;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    /* ══════════════════════════════
       DRAWER OVERLAY (mobile)
    ══════════════════════════════ */
    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.35);
      z-index: 199;
      backdrop-filter: blur(2px);
    }

    /* ══════════════════════════════
       SCROLLBAR
    ══════════════════════════════ */
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

    /* ══════════════════════════════
       RESPONSIVE — Tablet (≤900px)
       Sidebar becomes off-canvas drawer
    ══════════════════════════════ */
    @media (max-width: 900px) {
      html, body { overflow: hidden; }

      .sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,.12);
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .sidebar-overlay.open {
        display: block;
      }

      .mobile-topbar {
        display: flex;
      }

      .main-content {
        width: 100%;
      }
    }

    /* ══════════════════════════════
       RESPONSIVE — Phone (≤480px)
    ══════════════════════════════ */
    @media (max-width: 480px) {
      .sidebar { width: 85vw; max-width: 300px; }
      .mobile-topbar { padding: 10px 14px; }
      .mobile-topbar-title { font-size: 14px; }
    }
    .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-logo-icon img {
    max-width: 44px;
    height: auto;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sidebar-logo-title {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.sidebar-logo-title strong {
    font-size: 16px;
    line-height: 1.1;
}

.sidebar-logo-title span {
    font-size: 12px;
    color: var(--text-muted);
}

.language-form {
    margin: 0;
    padding: 0;
}

.language-dropdown {
    position: relative;
    width: fit-content;
}

.language-dropdown-toggle {
    height: 28px;
    min-width: 72px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: #ffffff;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.language-dropdown-toggle:hover {
    background: #004aad;
    border-color: #004aad;
    color: #ffffff;
}

.language-dropdown-menu {
    position: absolute;
    top: 34px;
    left: 0;
    min-width: 72px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: none;
    z-index: 99999;
}

.language-dropdown.open .language-dropdown-menu {
    display: block;
}

.language-dropdown-menu button {
    width: 100%;
    border: none;
    background: transparent;
    color: #222;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.language-dropdown-menu button:hover {
    background: #004aad;
    color: #ffffff;
}

.mobile-language-form {
    margin-left: auto;
    margin-right: 8px;
}

.mobile-language-form .language-dropdown-toggle {
    height: 32px;
    min-width: 72px;
}

.mobile-language-form .language-dropdown-menu {
    top: 38px;
    right: 0;
    left: auto;
}