:root {
      --bg: #09090b;
      --panel: rgba(24, 24, 27, 0.85);
      --panel-light: rgba(39, 39, 42, 0.9);
      --text: #f4f4f5;
      --muted: #a1a1aa;
      --line: rgba(255, 255, 255, 0.08);
      --accent: #ffffff;
      --accent-dim: rgba(255, 255, 255, 0.08);
      --green: #10b981;
      --gold: #f59e0b;
      --danger: #ef4444;
      --radius: 12px;
      --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; }

    /* Фон страницы. Раньше здесь лежал снимок машины (body::before с картинкой BMW) —
       убран по просьбе владельца 26.07. Файл на диске остался, показывать перестали.
       Фон главного экрана теперь делает слой .gc-scene-bg (см. css/gc-scene-bg.css). */

    /* Neon glow effect for Vladimir badge */
    .topbar-user {
      font-size: 13px;
      color: #fff;
      background: rgba(0, 0, 0, 0.7);
      padding: 6px 14px;
      border-radius: 20px;
      border: 1px solid #00ffd6;
      box-shadow: 0 0 12px rgba(0, 255, 214, 0.3), inset 0 0 6px rgba(0, 255, 214, 0.15);
      animation: neonPulse 2s infinite alternate;
      font-weight: 600;
    }
    @keyframes neonPulse {
      0% { box-shadow: 0 0 8px rgba(0, 255, 214, 0.3), inset 0 0 4px rgba(0, 255, 214, 0.1); border-color: rgba(0, 255, 214, 0.5); }
      100% { box-shadow: 0 0 16px rgba(0, 255, 214, 0.6), inset 0 0 8px rgba(0, 255, 214, 0.35); border-color: rgba(0, 255, 214, 1); }
    }

    /* Login Screen */
    #auth-screen {
      position: fixed;
      inset: 0;
      z-index: 1000;
      isolation: isolate;
      overflow: hidden;
      background: #07080a;
      display: grid;
      place-items: center;
      padding: 24px;
      transition: opacity 0.4s ease, visibility 0.4s ease;
    }
    .auth-scene-bg {
      position: absolute;
      inset: 0;
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
      background:
        radial-gradient(70% 58% at 68% 62%, rgba(112, 86, 68, 0.16), transparent 72%),
        radial-gradient(46% 42% at 18% 10%, rgba(41, 55, 52, 0.18), transparent 76%),
        linear-gradient(145deg, #090b0d 0%, #07080a 50%, #101011 100%);
    }
    .auth-scene-frame {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 0;
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, -50%) scale(1.26);
      transform-origin: 50% 50%;
      transition: opacity 0.8s ease;
    }
    .auth-scene-bg[data-scene="ready"] .auth-scene-frame { opacity: 1; }
    .auth-scene-veil {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        radial-gradient(46% 55% at 50% 50%, rgba(5, 6, 8, 0.08), rgba(5, 6, 8, 0.42) 100%),
        linear-gradient(90deg, rgba(5, 6, 8, 0.28), rgba(5, 6, 8, 0.08) 50%, rgba(5, 6, 8, 0.32));
    }
    .auth-card {
      position: relative;
      z-index: 2;
      width: min(420px, 100%);
      background: rgba(19, 20, 23, 0.91);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 20px;
      padding: 32px;
      text-align: center;
      box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.04);
      backdrop-filter: blur(18px) saturate(118%);
      -webkit-backdrop-filter: blur(18px) saturate(118%);
    }
    .auth-logo {
      position: relative;
      isolation: isolate;
      width: 118px;
      height: 118px;
      margin: 0 auto 14px;
      border-radius: 50%;
      display: grid;
      place-items: center;
    }
    .auth-logo::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      border-radius: 50%;
      background: conic-gradient(
        from 0deg,
        transparent 0 10%,
        #a8cf36 17%,
        #f4ffd0 24%,
        transparent 32% 58%,
        #10b981 67%,
        #d9ff6a 75%,
        transparent 84% 100%
      );
      filter: drop-shadow(0 0 8px rgba(168, 207, 54, 0.38));
      animation: authLogoOrbit 5.5s linear infinite;
    }
    .auth-logo::after {
      content: "";
      position: absolute;
      inset: 18px;
      z-index: -1;
      border-radius: 50%;
      background: rgba(168, 207, 54, 0.24);
      filter: blur(15px);
    }
    .auth-logo__crop {
      position: relative;
      z-index: 1;
      width: 104px;
      height: 104px;
      border: 2px solid rgba(255, 255, 255, 0.86);
      border-radius: 50%;
      overflow: hidden;
      display: grid;
      place-items: center;
      background: #fff;
      box-shadow: 0 0 0 2px rgba(8, 9, 11, 0.82), 0 8px 24px rgba(0, 0, 0, 0.42);
    }
    .auth-logo__crop img {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 190%;
      height: auto;
      max-width: none;
      display: block;
      transform: translate(-50%, -39.5%);
    }
    @keyframes authLogoOrbit {
      to { transform: rotate(360deg); }
    }
    .auth-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
    .auth-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
    .auth-form { display: grid; gap: 16px; text-align: left; }
    .auth-form label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
    .auth-form input {
      height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel-light);
      color: var(--text);
      padding: 0 16px;
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s;
    }
    .auth-form input:focus { border-color: var(--accent); }
    .auth-btn {
      height: 48px;
      background: #fff;
      color: #000;
      border: none;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 8px;
      transition: opacity 0.2s;
    }
    .auth-btn:hover { opacity: 0.9; }
    .auth-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 18px; margin-top: 8px; }

    @media (max-width: 640px) {
      #auth-screen { padding: 18px; }
      .auth-card { width: min(390px, 100%); padding: 28px 22px; }
      .auth-scene-frame {
        width: 178vh;
        min-width: 100%;
        height: 100%;
        transform: translate(-52%, -50%) scale(1.18);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .auth-scene-frame { display: none; transition: none; }
      .auth-logo::before { animation: none; transform: rotate(18deg); }
    }

    /* App Shell Layout */
    .app-shell { display: grid; grid-template-columns: 80px 1fr; height: 100%; transition: all 0.3s; }
    
    /* Navigation Sidebar - Brutal Neon Turquoise Carbon Style for Vladimir */
    .app-sidebar {
      background: linear-gradient(180deg, #111115 0%, #08080a 100%);
      border-right: 1px solid rgba(0, 255, 214, 0.15);
      box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 24px 0;
      gap: 16px;
    }
    .sidebar-logo {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, #00ffd6 0%, #00b0ff 100%);
      display: grid;
      place-items: center;
      font-weight: 900;
      color: #000;
      font-size: 18px;
      margin-bottom: 12px;
      box-shadow: 0 0 16px rgba(0, 255, 214, 0.4);
    }
    .sidebar-btn {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: linear-gradient(145deg, rgba(28, 28, 35, 0.8), rgba(15, 15, 20, 0.9));
      color: #64748b;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
    }
    .sidebar-btn svg {
      transition: all 0.25s ease;
      stroke: #71717a;
    }
    .sidebar-btn:hover {
      color: #00ffd6;
      border-color: rgba(0, 255, 214, 0.4);
      background: linear-gradient(145deg, rgba(0, 255, 214, 0.12), rgba(18, 18, 24, 0.95));
      box-shadow: 0 0 15px rgba(0, 255, 214, 0.25), inset 0 0 10px rgba(0, 255, 214, 0.1);
      transform: translateY(-2px);
    }
    .sidebar-btn:hover svg {
      stroke: #00ffd6;
      filter: drop-shadow(0 0 6px rgba(0, 255, 214, 0.6));
    }
    .sidebar-btn.active {
      color: #00ffd6;
      border-color: #00ffd6;
      background: linear-gradient(145deg, rgba(0, 255, 214, 0.2), rgba(10, 10, 15, 0.98));
      box-shadow: 0 0 20px rgba(0, 255, 214, 0.4), inset 0 0 12px rgba(0, 255, 214, 0.2);
    }
    .sidebar-btn.active svg {
      stroke: #00ffd6;
      filter: drop-shadow(0 0 8px rgba(0, 255, 214, 0.9));
    }
    .sidebar-logout {
      margin-top: auto;
      color: #ef4444;
      border-color: rgba(239, 68, 68, 0.2);
    }
    .sidebar-logout svg {
      stroke: #ef4444;
    }
    .sidebar-logout:hover {
      color: #ff4d4d;
      border-color: #ef4444;
      background: rgba(239, 68, 68, 0.15);
      box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    }
    .sidebar-logout:hover svg {
      stroke: #ff4d4d;
      filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6));
    }

    /* Main Area */
    .app-main { display: flex; flex-direction: column; overflow: hidden; height: 100%; background: transparent; backdrop-filter: blur(8px); }
    .app-topbar {
      height: 64px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
    }
    .topbar-title { font-size: 18px; font-weight: 600; }

    .app-view { display: none; flex: 1; overflow: hidden; padding: 24px; position: relative; }
    .app-view.active { display: flex; flex-direction: column; }

    /* Frosted glass overlay when shift is locked */
    .shift-lock-overlay {
      position: absolute;
      inset: 0;
      z-index: 100;
      background: rgba(9, 9, 11, 0.7);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 16px;
      border-radius: 16px;
      color: #fff;
    }
    .lock-banner {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 24px 32px;
      text-align: center;
      max-width: 400px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    }
    .lock-icon { font-size: 32px; margin-bottom: 12px; }

    /* Apple Modal Dialogs */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 500;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
    }
    .apple-modal {
      width: min(440px, 90vw);
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      box-shadow: 0 12px 50px rgba(0,0,0,0.6);
    }
    .modal-title { font-size: 18px; font-weight: 600; }
    .modal-fields { display: grid; gap: 12px; }
    .modal-fields label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
    .modal-fields input, .modal-fields select {
      height: 38px;
      background: var(--panel-light);
      border: 1px solid var(--line);
      border-radius: 8px;
      color: #fff;
      padding: 0 12px;
      outline: none;
      font-size: 13px;
    }
    .modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }
    .modal-btn-cancel { background: transparent; color: var(--muted); border: 1px solid var(--line); height: 38px; padding: 0 16px; border-radius: 8px; cursor: pointer; }
    .modal-btn-action { background: #fff; color: #000; border: none; height: 38px; padding: 0 16px; border-radius: 8px; font-weight: 600; cursor: pointer; }

    /* View: Overview */
    .overview-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; height: 100%; overflow-y: auto; }
    .overview-left { display: flex; flex-direction: column; gap: 24px; }
    .overview-hero {
      position: relative;
      height: 280px;
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid var(--line);
      /* Шапка главного экрана — ГЛАВНОЕ ОКНО в фоновую анимацию. Подложка почти прозрачная,
         поэтому нейросеть здесь видно в полную силу: это большая пустая полоса наверху,
         куда владелец смотрит первым делом. Подпись читается за счёт своей тени
         (.hero-title text-shadow) и тёмной плашки .hero-tag. Блюр убран: он размывал
         линии сети и превращал её в мутное пятно. */
      background:
        linear-gradient(135deg, rgba(16,185,129,0.07), rgba(9,9,11,0.14) 50%, rgba(0,255,214,0.06));
      box-shadow: inset 0 0 60px rgba(0,0,0,0.35);
    }
    /* .hero-img больше не используется (снимок машины убран), правило оставлено на случай
       другой картинки в шапке. */
    .hero-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.65;
    }
    .hero-text {
      position: absolute;
      bottom: 24px;
      left: 24px;
      z-index: 10;
    }
    .hero-tag { background: #fff; color: #000; font-size: 11px; font-weight: bold; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; margin-bottom: 8px; display: inline-block; }
    .hero-title { font-size: 28px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }

    .metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
    .metric-card {
      background: var(--panel);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .metric-num { font-size: 32px; font-weight: 700; color: #fff; }
    .metric-label { font-size: 13px; color: var(--muted); }

    .overview-right {
      background: var(--panel);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    /* iiko Style Shift Control styles */
    .shift-widget-card {
      background: var(--panel);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .shift-header { display: flex; justify-content: space-between; align-items: center; }
    .shift-status-badge { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; text-transform: uppercase; }
    .shift-badge-closed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
    .shift-badge-opened { background: rgba(16, 185, 129, 0.15); color: var(--green); }
    .shift-btn {
      height: 38px;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .shift-btn-open { background: #fff; color: #000; }
    .shift-btn-close { background: var(--danger); color: #fff; }
    .shift-logs-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
      margin-top: 8px;
      text-align: left;
    }
    .shift-logs-table th, .shift-logs-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
    .shift-logs-table th { color: var(--muted); font-weight: 500; }

    /* Sync Modal/Toast styles */
    .sync-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #18181b;
      border: 1px solid var(--green);
      color: #fff;
      padding: 12px 20px;
      border-radius: 10px;
      font-size: 13px;
      z-index: 2000;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      gap: 10px;
      transform: translateY(100px);
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .sync-toast.active { transform: translateY(0); opacity: 1; }

    /* View: Calendar (График питания) */
    .calendar-container { display: grid; grid-template-columns: 280px 1fr 380px; gap: 20px; height: 100%; overflow: hidden; }
    .client-details-sidebar {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      overflow-y: auto;
      backdrop-filter: blur(10px);
    }
    .details-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--green);
      border-bottom: 1px solid var(--line);
      padding-bottom: 6px;
      margin-top: 10px;
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    .details-title:first-of-type { margin-top: 0; }
    .details-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      font-size: 13px;
    }
    .details-item {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .details-label {
      color: var(--muted);
      font-size: 11px;
    }
    .details-value {
      font-weight: 500;
      color: #fff;
    }
    .details-full-width {
      grid-column: span 2;
    }
    .details-avatar-row {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 8px;
      border-bottom: 1px solid var(--line);
      padding-bottom: 14px;
    }
    .details-avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: var(--green);
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 16px;
      font-weight: 700;
      border: 2.5px solid rgba(255,255,255,0.15);
      flex-shrink: 0;
    }
    .client-list { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
    .client-card {
      width: 100%;
      padding: 14px;
      border-radius: var(--radius);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--line);
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      margin-bottom: 4px;
      color: inherit;
      font-family: inherit;
      text-align: left;
    }
    .client-card:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.2);
      transform: translateY(-2px);
    }
    .client-card.active {
      background: rgba(16, 185, 129, 0.12);
      border-color: var(--green);
      box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
    }
    .client-avatar-circle {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--panel-light);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      border: 1.5px solid var(--line);
      flex-shrink: 0;
      transition: all 0.2s;
    }
    .client-card.active .client-avatar-circle {
      background: var(--green);
      border-color: #fff;
    }
    .client-card-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      overflow: hidden;
    }
    .client-name {
      font-size: 14px;
      font-weight: 600;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .client-program-tag {
      font-size: 10.5px;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.05);
      padding: 2px 6px;
      border-radius: 4px;
      align-self: flex-start;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
    }
    .client-card.active .client-program-tag {
      background: rgba(16, 185, 129, 0.2);
      color: #fff;
    }
    .client-phone-sub {
      font-size: 11px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .calendar-workspace { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; position: relative; }
    .calendar-workspace-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
    .calendar-workspace-header > div { min-width: 0; }
    .calendar-header-controls {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 16px;
    }
    .calendar-period-control {
      display: grid;
      grid-template-columns: 30px minmax(120px, auto) 30px;
      align-items: center;
      gap: 4px;
      min-height: 32px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-light);
      overflow: hidden;
    }
    .calendar-period-control span {
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
    }
    .calendar-period-btn {
      width: 30px;
      height: 30px;
      border: 0;
      background: transparent;
      color: #fff;
      cursor: pointer;
      font: inherit;
      font-size: 22px;
      line-height: 1;
    }
    .calendar-period-btn:hover { background: rgba(255,255,255,0.08); }

    .calendar-grid-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
    .calendar-weekday {
      min-width: 0;
      padding: 4px 2px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      text-align: center;
      text-transform: uppercase;
    }
    .calendar-day-cell {
      aspect-ratio: 1.2;
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 8px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      cursor: default;
      background: rgba(255,255,255,0.02);
      transition: all 0.2s;
      position: relative;
      overflow: hidden;
    }
    .calendar-day-cell:hover { background: rgba(255,255,255,0.06); }
    .calendar-day-cell.is-empty {
      opacity: 0.45;
      background: rgba(255,255,255,0.01);
    }
    .calendar-day-cell.is-outside {
      visibility: hidden;
      pointer-events: none;
    }
    
    /* Today highlight: July 20 */
    .calendar-day-cell.today {
      border: 1px solid var(--gold);
      box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    }
    .today-tag {
      position: absolute;
      top: 4px;
      right: 4px;
      font-size: 8px;
      background: var(--gold);
      color: #000;
      font-weight: bold;
      padding: 1px 3px;
      border-radius: 3px;
      text-transform: uppercase;
    }

    .calendar-day-num { font-size: 14px; font-weight: 600; }
    .calendar-day-status { font-size: 9px; font-weight: 700; padding: 2px 4px; border-radius: 4px; text-align: center; overflow-wrap: anywhere; }
    .calendar-day-kitchen { color: var(--muted); font-size: 8.5px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }

    @media (max-width: 1350px) {
      .calendar-workspace-header {
        align-items: flex-start;
        flex-direction: column;
      }
      .calendar-header-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
      }
      .calendar-grid-days { gap: 6px; }
      .calendar-day-cell {
        min-height: 72px;
        padding: 6px 4px;
        aspect-ratio: auto;
      }
    }
    
    .status-eat { background: rgba(16, 185, 129, 0.15); color: var(--green); }
    .status-skip { background: rgba(239, 68, 68, 0.15); color: var(--danger); text-decoration: line-through; }
    .status-freeze { background: rgba(245, 158, 11, 0.15); color: var(--gold); }
    .status-planned { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }

    .calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 12px; }
    .legend-item { display: flex; align-items: center; gap: 6px; }
    .legend-color { width: 12px; height: 12px; border-radius: 3px; }
    .calendar-state-block {
      width: 100%;
      min-height: 120px;
      display: grid;
      place-items: center;
      padding: 20px;
      color: var(--muted);
      font-size: 12.5px;
      line-height: 1.5;
      text-align: center;
    }
    .calendar-state-block[data-state="error"],
    .calendar-state-block[data-state="unavailable"] {
      color: #fca5a5;
      border: 1px solid rgba(239,68,68,0.28);
      border-radius: 8px;
      background: rgba(239,68,68,0.08);
    }
    .calendar-detail-section {
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .calendar-detail-section:last-child { border-bottom: 0; }
    .calendar-detail-section h4 {
      margin: 0 0 8px;
      color: var(--green);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .calendar-detail-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 12px;
    }
    .calendar-detail-field {
      min-width: 0;
      color: #fff;
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .calendar-detail-field span {
      display: block;
      margin-bottom: 2px;
      color: var(--muted);
      font-size: 10px;
    }

    /* Client Popover Tooltip styles */
    .client-popover {
      position: absolute;
      z-index: 300;
      background: #1c1c1e;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px;
      width: 220px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.6);
      display: none;
      flex-direction: column;
      gap: 8px;
      font-size: 12px;
    }
    .popover-title { font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
    .popover-detail { color: var(--muted); line-height: 1.4; }
    .popover-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
    .popover-btn {
      border: none;
      height: 24px;
      border-radius: 4px;
      font-size: 9px;
      font-weight: 600;
      cursor: pointer;
      text-align: center;
    }
    .popover-btn.eat { background: var(--green); color: #fff; }
    .popover-btn.skip { background: var(--danger); color: #fff; }
    .popover-btn.freeze { background: var(--gold); color: #000; }

    /* Progress Bar styles */
    .progress-wrap {
      background: var(--panel-light);
      border-radius: 8px;
      height: 8px;
      overflow: hidden;
      margin-top: 6px;
      border: 1px solid var(--line);
    }
    .progress-bar {
      background: var(--green);
      height: 100%;
      width: 0%;
      transition: width 0.3s ease;
    }

    /* View: Courier Map */
    .map-container { display: grid; grid-template-columns: 1fr 340px; gap: 24px; height: 100%; overflow: hidden; }
    .map-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; height: 100%; min-height: 400px; z-index: 10; }
    .map-sidebar { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
    
    .courier-route-card {
      background: var(--panel-light);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .courier-route-card:hover, .courier-route-card.active { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.08); }
    .courier-name { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; }
    .route-details { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
    
    .optimize-route-btn {
      height: 28px;
      background: #fff;
      color: #000;
      border: none;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 4px;
      width: 100%;
    }
    .optimize-route-btn:hover { background: #e4e4e7; }

    /* View: Chat (Gemini Style) */
    .gemini-chat-container { display: grid; grid-template-columns: 260px 1fr; gap: 24px; height: 100%; overflow: hidden; }
    .chat-threads { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
    .thread-card {
      padding: 12px;
      border-radius: 10px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      border: 1px solid transparent;
      transition: all 0.2s;
    }
    .thread-card:hover, .thread-card.active { background: var(--panel-light); border-color: var(--line); }
    .thread-name { font-size: 14px; font-weight: 600; }
    .thread-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .chat-area { display: flex; flex-direction: column; height: 100%; position: relative; }
    .chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; padding-bottom: 100px; }
    
    .chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 85%; }
    .chat-msg.client { align-self: flex-end; }
    .chat-msg.bot { align-self: flex-start; }
    
    .chat-bubble {
      padding: 14px 18px;
      border-radius: 16px;
      font-size: 14.5px;
      line-height: 1.5;
    }
    .chat-msg.client .chat-bubble { background: var(--panel-light); color: #fff; border-bottom-right-radius: 4px; }
    .chat-msg.bot .chat-bubble { background: var(--panel); color: #e4e4e7; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
    .chat-meta { font-size: 11px; color: var(--muted); margin: 0 4px; }

    /* File Attachment Cards in Chat */
    .file-attachment {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--line);
      padding: 10px 14px;
      border-radius: 8px;
      margin-top: 6px;
      width: min(280px, 100%);
    }
    .file-icon { font-size: 24px; }
    .file-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
    .file-name { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .file-size { font-size: 11px; color: var(--muted); }
    .file-download-btn { font-size: 16px; color: #fff; cursor: pointer; text-decoration: none; }

    /* Gemini Input Pill */
    .gemini-input-wrap {
      position: absolute;
      bottom: 16px;
      left: 16px;
      right: 16px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 28px;
      padding: 8px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.4);
      backdrop-filter: blur(10px);
    }
    .gemini-input-wrap input {
      flex: 1;
      height: 40px;
      background: transparent;
      border: none;
      color: #fff;
      outline: none;
      font-size: 14px;
    }
    .gemini-actions { display: flex; gap: 8px; }
    .gemini-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: all 0.2s;
    }
    .gemini-btn:hover { color: #fff; background: var(--accent-dim); }
    .gemini-send-btn { background: #fff; color: #000; }
    .gemini-send-btn:hover { background: #e4e4e7; }

    /* View: Tasks (Kanban Board) */
    .task-composer { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
    .composer-form { display: flex; flex-direction: column; gap: 16px; }
    .composer-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; width: 100%; }
    .composer-form label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
    .composer-form input, .composer-form select {
      height: 38px;
      background: var(--panel-light);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      color: #fff;
      padding: 0 12px;
      outline: none;
      font-size: 13px;
    }
    .composer-form button {
      height: 38px;
      background: #fff;
      color: #000;
      border: none;
      border-radius: var(--radius);
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
      padding: 0 24px;
      align-self: flex-end;
    }

    .task-board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .dept-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
    .dept-tab-btn {
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--muted);
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 12.5px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }
    .dept-tab-btn:hover, .dept-tab-btn.active { color: #000; background: #fff; border-color: #fff; }

    .kanban-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; flex: 1; overflow-y: auto; }
    .kanban-col { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
    .col-header { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
    
    /* Color-coded tasks */
    .task-card {
      position: relative;
      background: var(--panel-light);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .task-card.warning {
      border-left: 5px solid var(--gold);
      box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    }
    .task-card.critical {
      border-left: 5px solid var(--danger);
      box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
    }
    .task-card.success {
      border-left: 5px solid var(--green);
      box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    }

    .task-card:hover { border-color: rgba(255,255,255,0.2); }
    .task-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; padding-right: 20px; }
    
    .card-controls { display: flex; flex-direction: column; gap: 8px; }
    .card-controls label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
    .card-controls select {
      height: 28px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 6px;
      color: #fff;
      font-size: 12px;
      padding: 0 6px;
      outline: none;
    }

    .task-badges { display: flex; gap: 6px; flex-wrap: wrap; }
    .task-badge { font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; color: var(--muted); }
    
    .delete-task-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      background: transparent;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 12px;
      padding: 4px;
      transition: color 0.2s;
    }
    .delete-task-btn:hover { color: var(--danger); }

    /* View: Team Chat */
    .team-chat-wrap { display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
    .team-chat-header { padding: 16px 24px; border-bottom: 1px solid var(--line); font-weight: 600; }
    .team-chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
    .team-chat-msg { display: flex; gap: 12px; }
    .team-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-light); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
    .team-msg-body { display: flex; flex-direction: column; gap: 4px; }
    .team-msg-author { font-size: 13px; font-weight: 600; }
    .team-msg-text { background: var(--panel-light); padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; max-width: 600px; }

    /* View: Access Management */
    .access-grid-staff { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .access-card-staff {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .access-staff-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
    .access-staff-name { font-size: 15px; font-weight: 600; }
    
    /* Apple Sliding Switches */
    .apple-switch {
      position: relative;
      display: inline-block;
      width: 40px;
      height: 22px;
    }
    .apple-switch input { opacity: 0; width: 0; height: 0; }
    .slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background-color: #3f3f46;
      transition: .3s;
      border-radius: 34px;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .3s;
      border-radius: 50%;
    }
    input:checked + .slider { background-color: var(--green); }
    input:checked + .slider:before { transform: translateX(18px); }

    .access-checkbox-list { display: flex; flex-direction: column; gap: 10px; }
    .access-checkbox-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }

    /* View: Settings */
    .settings-container { display: flex; flex-direction: column; gap: 24px; max-width: 600px; }
    .settings-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
    .settings-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
    .settings-row:last-child { border: none; }
    .settings-label { font-size: 14px; font-weight: 500; }
    
    /* Monitor / active client styles */
    .system-monitor-card {
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      font-size: 12.5px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .monitor-row { display: flex; justify-content: space-between; }
    
    /* Responsive Design */
    @media (max-width: 820px) {
      .app-shell { grid-template-columns: 1fr; grid-template-rows: 1fr 60px; }
      .app-sidebar {
        grid-row: 2;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 16px;
        height: 60px;
        border-right: none;
        border-top: 1px solid var(--line);
      }
      .sidebar-logo { display: none; }
      .sidebar-logout { margin-top: 0; }
      .kanban-grid { grid-template-columns: 1fr; }
      .overview-grid { grid-template-columns: 1fr; }
      .gemini-chat-container { grid-template-columns: 1fr; }
      .chat-threads { display: none; }
      .map-container { grid-template-columns: 1fr; }
      .map-sidebar { display: none; }
      .calendar-container { grid-template-columns: 1fr; }
      .client-details-sidebar { display: none; }
    }

    /* GCityAi streaming cursor */
    .streaming-dot {
      display: inline-block;
      color: var(--green);
      font-size: 14px;
      animation: streamBlink 0.8s infinite;
      margin-left: 2px;
    }
    @keyframes streamBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.2; }
    }

    /* Kitchen styles & Print layout */
    .allergen-highlight { background: rgba(239, 68, 68, 0.15) !important; }
    .allergen-tag { background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: 700; font-size: 11px; }
    .badge-green { background: rgba(16, 185, 129, 0.15); color: var(--green); }
    .badge-red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
    .delivery-time-tag { background: var(--panel-light); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; font-weight: 600; font-size: 11.5px; }

    @media print {
      body * { visibility: hidden; }
      #view-kitchen, #view-kitchen * { visibility: visible; }
      #view-kitchen { position: absolute; left: 0; top: 0; width: 100%; height: auto; overflow: visible; padding: 0; }
      .no-print { display: none !important; }
      .kitchen-header { border: none !important; padding: 0 !important; margin-bottom: 20px !important; }
      .kitchen-controls { display: none !important; }
      .kitchen-workspace-layout { display: block !important; }
      .kitchen-table-wrapper { border: none !important; border-radius: 0 !important; }
      .kitchen-print-table th, .kitchen-print-table td { border: 1px solid #000 !important; color: #000 !important; padding: 8px !important; }
      .kitchen-print-table { width: 100% !important; border: 1px solid #000 !important; }
      .allergen-highlight { background: #ffcccc !important; color: #000 !important; }
      .allergen-tag { background: #ef4444 !important; color: #fff !important; }
    }

    /* Modal pop-up & Accordion styles */
    .modal-backdrop.active { display: flex !important; opacity: 1 !important; }
    .modal-backdrop.active .modal-content-card { transform: translateY(0) !important; }
    
    .modal-accordion-section .modal-accordion-content {
      max-height: 500px;
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    }
    .modal-accordion-section.collapsed .modal-accordion-content {
      max-height: 0 !important;
      padding-top: 0 !important;
      margin: 0 !important;
    }
    .modal-accordion-section.collapsed .accordion-arrow {
      transform: rotate(-90deg);
    }

    /* Sticky Notes Styling */
    .sticky-note {
      position: absolute;
      width: 210px;
      min-height: 190px;
      padding: 12px;
      border-radius: 12px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.3);
      cursor: grab;
      pointer-events: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transition: box-shadow 0.2s ease;
      color: #1c1c1e;
      font-family: 'Outfit', sans-serif;
    }
    .sticky-note:active { cursor: grabbing; box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
    .sticky-note.collapsed {
      min-height: auto !important;
      height: 38px !important;
    }
    .sticky-note.collapsed .sticky-note-body,
    .sticky-note.collapsed .sticky-note-footer {
      display: none !important;
    }
    
    .sticky-note.color-yellow { background: #fef08a; border: 1px solid #fde047; }
    .sticky-note.color-green { background: #bbf7d0; border: 1px solid #86efac; }
    .sticky-note.color-pink { background: #fbcfe8; border: 1px solid #f9a8d4; }
    .sticky-note.color-purple { background: #e9d5ff; border: 1px solid #d8b4fe; }

    .sticky-note-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      color: rgba(28,28,30,0.5);
      font-weight: 700;
      border-bottom: 1px solid rgba(28,28,30,0.08);
      padding-bottom: 4px;
      user-select: none;
      cursor: move;
    }
    .sticky-note-close {
      background: transparent;
      border: none;
      font-size: 14px;
      cursor: pointer;
      color: rgba(28,28,30,0.5);
      padding: 0 4px;
    }
    .sticky-note-close:hover { color: #000; }
    
    .sticky-note-body {
      flex: 1;
      font-family: inherit;
      font-size: 13.5px;
      line-height: 1.4;
      outline: none;
      min-height: 110px;
      overflow-y: auto;
      color: #1c1c1e;
    }

    .sticky-note-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid rgba(28,28,30,0.06);
      padding-top: 6px;
      margin-top: 2px;
    }
    .sticky-note-colors { display: flex; gap: 6px; }
    .color-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      cursor: pointer;
      border: 1px solid rgba(28,28,30,0.2);
      transition: transform 0.15s ease;
    }
    .color-dot:hover { transform: scale(1.2); }
    .dot-yellow { background: #fef08a; }
    .dot-green { background: #bbf7d0; }
    .dot-pink { background: #fbcfe8; }
    .dot-purple { background: #e9d5ff; }

/* Layout switchers for client card folder view */
#client-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

/* Default / List mode: horizontal row, compact spacing */
#client-list-container.view-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#client-list-container.view-mode-list .client-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

/* Grid / Tiles mode: 2 column grid of cards */
#client-list-container.view-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#client-list-container.view-mode-grid .client-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
}

/* Large Icons: 1 column large dashboard preview cards */
#client-list-container.view-mode-large {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#client-list-container.view-mode-large .client-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 16px;
  font-size: 15px;
}
#client-list-container.view-mode-large .client-avatar-circle {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

/* Small Icons: 3 column compact visual layout */
#client-list-container.view-mode-small {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
#client-list-container.view-mode-small .client-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 4px;
  gap: 4px;
}
#client-list-container.view-mode-small .client-avatar-circle {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
#client-list-container.view-mode-small .client-name {
  font-size: 10.5px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}
#client-list-container.view-mode-small .client-program-tag,
#client-list-container.view-mode-small .client-phone-sub {
  display: none;
}

/* ──────────────────────────────────────────────────────────
   MOBILE RESPONSIVENESS MEDIA QUERIES (iPhone 13+ & Android)
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Collapse Sidebar into bottom Tab Bar */
  .app-layout {
    display: flex;
    flex-direction: column;
  }
  
  .app-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    width: 100% !important;
    flex-direction: row !important;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    border-top: 1px solid var(--line);
    border-right: none;
    border-radius: 0;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
  }

  .sidebar-logo {
    display: none !important;
  }

  .sidebar-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  
  .sidebar-logout {
    margin-top: 0 !important;
  }

  .app-main {
    padding-bottom: 74px;
  }

  /* Responsive Headers */
  .app-topbar {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .topbar-title {
    font-size: 16px !important;
  }

  #add-sticky-note-btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
  }

  /* Dashboard: Single Column */
  .overview-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .metrics-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }

  .chart-card-wrapper {
    height: 280px;
  }

  /* Calendar: Stack columns */
  .calendar-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .client-list {
    width: 100% !important;
    max-height: 250px;
  }

  .calendar-workspace {
    width: 100% !important;
    padding: 14px;
  }

  .calendar-grid-days {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .calendar-workspace-header,
  .calendar-header-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-header-controls {
    width: 100%;
  }

  .calendar-day-cell {
    min-height: 72px;
    padding: 4px 2px;
    aspect-ratio: auto;
  }

  .calendar-day-num {
    font-size: 11px;
  }

  .calendar-day-status,
  .calendar-day-kitchen {
    font-size: 7.5px;
  }

  /* Kitchen: Stack table and adjustments */
  .kitchen-workspace-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .kitchen-table-wrapper {
    overflow-x: auto;
  }

  /* Messenger: optimize sidebar / layout */
  .gemini-chat-container {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .chat-threads {
    max-height: 120px;
    flex-direction: row !important;
    overflow-x: auto;
    padding: 8px 12px !important;
    gap: 10px !important;
    white-space: nowrap;
    border-right: none !important;
    border-bottom: 1px solid var(--line);
  }

  .chat-threads > div {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
  }

  .chat-threads div[style*="font-size"] {
    display: none !important;
  }

  .thread-card {
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
  }

  .chat-area {
    flex: 1;
    min-height: 350px;
  }

  /* Kanban: Horizontal scrolling column lists */
  .kanban-grid {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 12px;
  }

  .kanban-col {
    min-width: 280px;
    scroll-snap-align: start;
  }

  /* Map view */
  .map-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
  }

  #almaty-delivery-map {
    height: 300px !important;
  }

  /* Settings Page */
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Modals as bottom sheets or centered full cards */
  .modal-content-card {
    width: 95% !important;
    max-height: 90vh;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .details-row {
    grid-template-columns: 1fr !important;
  }

  .details-item {
    grid-column: span 1 !important;
  }
}

/* Premium Neon Glow Hover Effects */
.client-card, .metric-card, .task-card, .courier-route-card, .shift-widget-card, .sidebar-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-card:hover, .task-card:hover, .courier-route-card:hover, .shift-widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
  border-color: var(--green) !important;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-btn:hover {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Modal styling improvements */
#modal-add-client .apple-modal {
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Chat Section Collapsible Headers */
.chat-section-header {
  transition: color 0.2s ease;
}
.chat-section-header:hover {
  color: #fff !important;
}
.chat-section-header:hover .chevron {
  color: var(--green) !important;
}

/* Emoji Picker styling */
#chat-emoji-picker-panel span {
  transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#chat-emoji-picker-panel span:hover {
  transform: scale(1.35);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}
