/* UA Pro CRM — Liquid Glass Architecture (Aurora / Obsidian / Light Bento) */
:root {
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);

  /* Default Aurora Glass Tokens (Videos 1 + 2 + 3) */
  --bg-base: linear-gradient(135deg, #061520 0%, #0a2d3d 48%, #0d4558 100%);
  --orb-1: radial-gradient(circle, rgba(34, 211, 238, 0.42) 0%, rgba(14, 165, 233, 0.12) 48%, transparent 72%);
  --orb-2: radial-gradient(circle, rgba(99, 102, 241, 0.34) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 72%);
  --orb-3: radial-gradient(circle, rgba(20, 184, 166, 0.36) 0%, rgba(16, 185, 129, 0.08) 52%, transparent 72%);

  --shell-bg: rgba(7, 25, 36, 0.44);
  --shell-border: rgba(255, 255, 255, 0.2);

  --sidebar-bg: linear-gradient(180deg, rgba(16, 46, 62, 0.72) 0%, rgba(8, 28, 40, 0.78) 100%);
  --sidebar-border: rgba(255, 255, 255, 0.24);
  --sidebar-shadow: 0 28px 60px rgba(2, 12, 20, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 1px 0 0 rgba(255, 255, 255, 0.16);
  --sidebar-text: #f1f5f9;
  --sidebar-muted: rgba(226, 232, 240, 0.68);
  --sidebar-active-bg: rgba(255, 255, 255, 0.2);

  --card-bg: rgba(11, 34, 48, 0.62);
  --card-bg-elevated: rgba(14, 42, 58, 0.78);
  --card-border: rgba(255, 255, 255, 0.2);
  --card-top-rim: rgba(255, 255, 255, 0.34);
  --card-shadow: 0 16px 38px rgba(2, 12, 20, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --sheen-color: rgba(103, 232, 249, 0.18);

  --text-main: #f8fafc;
  --text-soft: rgba(226, 232, 240, 0.8);
  --text-muted: rgba(186, 212, 224, 0.66);

  --pill-bg: rgba(255, 255, 255, 0.1);
  --pill-border: rgba(255, 255, 255, 0.18);
  --pill-active-bg: rgba(34, 211, 238, 0.24);
  --pill-active-border: rgba(103, 232, 249, 0.55);

  --accent: #22d3ee;
  --accent-2: #6366f1;
  --accent-grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 55%, #6366f1 100%);
  --ok: #34d399;
  --ok-bg: rgba(16, 185, 129, 0.18);
  --warn: #fbbf24;
  --warn-bg: rgba(245, 158, 11, 0.18);
  --bad: #fb7185;
  --bad-bg: rgba(244, 63, 94, 0.2);
  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.18);

  --input-bg: rgba(6, 20, 30, 0.56);
  --input-border: rgba(255, 255, 255, 0.22);
  --row-hover: rgba(255, 255, 255, 0.07);
  --divider: rgba(255, 255, 255, 0.12);
  --dock-bg: rgba(8, 28, 40, 0.78);
  --shimmer-a: rgba(255, 255, 255, 0.05);
  --shimmer-b: rgba(255, 255, 255, 0.16);
}

[data-theme="obsidian"] {
  --bg-base: linear-gradient(145deg, #07090e 0%, #0d1018 52%, #131622 100%);
  --orb-1: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(99, 102, 241, 0.08) 52%, transparent 72%);
  --orb-2: radial-gradient(circle, rgba(56, 189, 248, 0.24) 0%, rgba(14, 165, 233, 0.06) 52%, transparent 72%);
  --orb-3: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, transparent 70%);

  --shell-bg: rgba(15, 17, 25, 0.65);
  --shell-border: rgba(255, 255, 255, 0.13);

  --sidebar-bg: linear-gradient(180deg, rgba(22, 25, 35, 0.85) 0%, rgba(13, 15, 22, 0.9) 100%);
  --sidebar-border: rgba(255, 255, 255, 0.16);
  --sidebar-shadow: 0 28px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.25);

  --card-bg: rgba(22, 25, 36, 0.72);
  --card-bg-elevated: rgba(28, 32, 46, 0.86);
  --card-border: rgba(255, 255, 255, 0.14);
  --card-top-rim: rgba(255, 255, 255, 0.22);
  --card-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --sheen-color: rgba(167, 139, 250, 0.16);

  --accent: #a78bfa;
  --accent-2: #38bdf8;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 55%, #06b6d4 100%);
  --pill-active-bg: rgba(139, 92, 246, 0.26);
  --pill-active-border: rgba(167, 139, 250, 0.56);
  --input-bg: rgba(12, 14, 20, 0.72);
  --dock-bg: rgba(16, 18, 27, 0.86);
}

[data-theme="light"] {
  --bg-base: linear-gradient(140deg, #eef2f7 0%, #f5f7fb 52%, #e9eef6 100%);
  --orb-1: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 68%);
  --orb-2: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 68%);
  --orb-3: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, transparent 68%);

  --shell-bg: rgba(255, 255, 255, 0.62);
  --shell-border: rgba(15, 23, 42, 0.08);

  /* Video 4 homage: Floating dark obsidian rail inside soft light bento canvas */
  --sidebar-bg: linear-gradient(180deg, #161822 0%, #0f1118 100%);
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-shadow: 0 24px 48px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --sidebar-text: #f8fafc;
  --sidebar-muted: rgba(203, 213, 225, 0.72);
  --sidebar-active-bg: rgba(99, 102, 241, 0.28);

  --card-bg: rgba(255, 255, 255, 0.94);
  --card-bg-elevated: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --card-top-rim: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 10px 28px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.03);
  --sheen-color: rgba(99, 102, 241, 0.09);

  --text-main: #0f172a;
  --text-soft: #334155;
  --text-muted: #64748b;

  --pill-bg: rgba(15, 23, 42, 0.045);
  --pill-border: rgba(15, 23, 42, 0.09);
  --pill-active-bg: #eef2ff;
  --pill-active-border: rgba(99, 102, 241, 0.45);

  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --ok: #059669;
  --ok-bg: rgba(16, 185, 129, 0.12);
  --warn: #d97706;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --bad: #e11d48;
  --bad-bg: rgba(225, 29, 72, 0.1);
  --info: #0284c7;
  --info-bg: rgba(2, 132, 199, 0.1);

  --input-bg: #f8fafc;
  --input-border: rgba(15, 23, 42, 0.12);
  --row-hover: rgba(99, 102, 241, 0.045);
  --divider: rgba(15, 23, 42, 0.08);
  --dock-bg: rgba(255, 255, 255, 0.88);
  --shimmer-a: rgba(15, 23, 42, 0.04);
  --shimmer-b: rgba(15, 23, 42, 0.1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Ambient Orbs & Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  will-change: transform;
}

.orb-1 {
  width: 64vw;
  height: 64vw;
  max-width: 820px;
  max-height: 820px;
  top: -18%;
  left: -10%;
  background: var(--orb-1);
  animation: auroraDrift1 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 56vw;
  height: 56vw;
  max-width: 720px;
  max-height: 720px;
  bottom: -18%;
  right: -8%;
  background: var(--orb-2);
  animation: auroraDrift2 22s ease-in-out infinite alternate;
}

.orb-3 {
  width: 42vw;
  height: 42vw;
  max-width: 540px;
  max-height: 540px;
  top: 28%;
  right: 26%;
  background: var(--orb-3);
  animation: auroraDrift3 26s ease-in-out infinite alternate;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.4;
}

[data-theme="light"] .ambient-grid {
  background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

@keyframes auroraDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes auroraDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -45px) scale(1.12); }
}

@keyframes auroraDrift3 {
  0% { transform: translate(0, 0) scale(0.95); }
  100% { transform: translate(35px, -30px) scale(1.08); }
}

/* App Frame */
.app-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 1580px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  min-height: 100vh;
}

/* Curved Floating Liquid-Glass Sidebar (Video 1) */
.glass-sidebar {
  position: sticky;
  top: 18px;
  flex: 0 0 258px;
  width: 258px;
  min-height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  border-radius: 30px;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  color: var(--sidebar-text);
  overflow: hidden;
  transition: width 0.34s var(--ease-spring), flex-basis 0.34s var(--ease-spring), padding 0.34s var(--ease-spring);
}

.sidebar-rim {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.24), transparent 42%),
              linear-gradient(120deg, rgba(255, 255, 255, 0.14) 0%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 100%);
}

.glass-sidebar.collapsed {
  flex: 0 0 78px;
  width: 78px;
  padding: 16px 11px;
}

.glass-sidebar.collapsed:hover {
  flex: 0 0 258px;
  width: 258px;
  padding: 16px 14px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-orb {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.55);
}

.brand-orb svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.glass-sidebar.collapsed:not(:hover) .brand-text,
.glass-sidebar.collapsed:not(:hover) .profile-meta,
.glass-sidebar.collapsed:not(:hover) .sidebar-label,
.glass-sidebar.collapsed:not(:hover) .nav-label,
.glass-sidebar.collapsed:not(:hover) .nav-badge,
.glass-sidebar.collapsed:not(:hover) .nav-chev,
.glass-sidebar.collapsed:not(:hover) .sub-nav,
.glass-sidebar.collapsed:not(:hover) .ai-prism-text,
.glass-sidebar.collapsed:not(:hover) .rail-pin-btn {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-muted);
}

.rail-pin-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease;
}

.rail-pin-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.rail-pin-btn svg {
  width: 15px;
  height: 15px;
}

.profile-glass-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.avatar-ring {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
}

.profile-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.profile-id {
  font-size: 11px;
  color: var(--sidebar-muted);
  white-space: nowrap;
}

.sidebar-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  padding: 0 10px 8px;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s var(--ease-spring);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(0, 0, 0, 0.16);
  font-weight: 600;
}

.nav-ico {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease;
}

.nav-item.active .nav-ico {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.nav-ico svg {
  width: 16px;
  height: 16px;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
}

.nav-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #061520;
}

[data-theme="light"] .nav-badge {
  color: #fff;
}

.nav-chev svg {
  width: 14px;
  height: 14px;
  transition: transform 0.22s ease;
}

.nav-item.expanded .nav-chev svg {
  transform: rotate(180deg);
}

.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 6px 40px;
  position: relative;
}

.sub-nav::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 4px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.sub-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--sidebar-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
}

.sub-nav-item:hover,
.sub-nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

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

/* 3D Holographic AI Prism Card (Video 1 homage) */
.ai-prism-card {
  position: relative;
  margin-top: 12px;
  padding: 13px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(34, 211, 238, 0.08) 55%, rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 12px 26px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease-spring), border-color 0.2s ease;
}

.ai-prism-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.65);
}

.ai-prism-sheen {
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  animation: prismSheen 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes prismSheen {
  0%, 100% { transform: translateX(-60%) rotate(8deg); }
  50% { transform: translateX(60%) rotate(8deg); }
}

.prism-3d-wrap {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  perspective: 240px;
}

.prism-diamond {
  width: 26px;
  height: 26px;
  position: relative;
  transform-style: preserve-3d;
  animation: prismSpin 9s linear infinite;
}

.prism-face {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.72), rgba(34, 211, 238, 0.65));
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.5);
}

.p-front { transform: translateZ(13px); }
.p-back { transform: rotateY(180deg) translateZ(13px); }
.p-left { transform: rotateY(-90deg) translateZ(13px); }
.p-right { transform: rotateY(90deg) translateZ(13px); }

@keyframes prismSpin {
  0% { transform: rotateX(18deg) rotateY(0deg); }
  100% { transform: rotateX(18deg) rotateY(360deg); }
}

.ai-prism-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #67e8f9;
  margin-bottom: 2px;
}

.ai-prism-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.ai-prism-desc {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(226, 232, 240, 0.8);
}

/* Main Frosted Workspace Shell */
.workspace-shell {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: 30px;
  background: var(--shell-bg);
  border: 1px solid var(--shell-border);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow: 0 26px 64px rgba(2, 12, 20, 0.2);
}

/* Header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 4px;
}

.mobile-brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.header-greeting h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-greeting p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-switcher {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  gap: 2px;
}

.theme-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.theme-btn.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--text-main);
  white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), background 0.18s ease, box-shadow 0.18s ease;
}

.glass-btn:hover {
  transform: translateY(-1px);
  background: var(--row-hover);
}

.glass-btn.primary {
  background: var(--accent-grad);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.glass-btn.sm {
  padding: 6px 11px;
  font-size: 12px;
}

.glass-btn svg,
.btn-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* Main Viewport */
.main-viewport {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Liquid Glass Cards with Cursor Sheen + Spring Reveal */
.glass-card {
  position: relative;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;
  transition: transform 0.28s var(--ease-spring), border-color 0.22s ease, box-shadow 0.28s ease;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--sheen-color), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card.interactive:hover {
  transform: translateY(-3px);
  border-color: var(--card-top-rim);
}

.reveal-item {
  animation: springReveal 0.44s var(--ease-spring) both;
  animation-delay: calc(var(--stagger, 0) * 42ms);
}

#mainViewport.no-reveal .reveal-item {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@keyframes springReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Skeleton Shimmer Transition (Video 4) */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.skel-box {
  height: 118px;
  border-radius: 22px;
  background: linear-gradient(90deg, var(--shimmer-a) 25%, var(--shimmer-b) 50%, var(--shimmer-a) 75%);
  background-size: 200% 100%;
  animation: shimmerSlide 1s linear infinite;
  border: 1px solid var(--card-border);
}

.skel-wide {
  height: 280px;
  grid-column: span 4;
}

@keyframes shimmerSlide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hero Welcome Banner (Light Bento & Glass Accent) */
.hero-bento {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #5b5ef4 0%, #7c3aed 60%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.24);
}

[data-theme="light"] .hero-bento {
  display: flex;
}

.hero-bento h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.hero-bento p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-bento-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.hero-chip {
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  text-align: right;
}

.hero-chip b {
  display: block;
  font-size: 16px;
  font-family: var(--font-display);
}

.hero-chip span {
  font-size: 11px;
  opacity: 0.85;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Glossy 3D-like translucent orb icon badge (Video 4) */
.orb-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.55), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.orb-icon.cyan { background: radial-gradient(circle at 30% 25%, #67e8f9, #0891b2); }
.orb-icon.indigo { background: radial-gradient(circle at 30% 25%, #a5b4fc, #4f46e5); }
.orb-icon.emerald { background: radial-gradient(circle at 30% 25%, #6ee7b7, #059669); }
.orb-icon.violet { background: radial-gradient(circle at 30% 25%, #ddd6fe, #7c3aed); }
.orb-icon.amber { background: radial-gradient(circle at 30% 25%, #fde68a, #d97706); }

.orb-icon svg {
  width: 19px;
  height: 19px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--ok-bg);
  color: var(--ok);
}

/* Dashboard Bento Row */
.bento-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 14px;
}

.bento-grid-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
}

.panel-pad {
  padding: 18px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
}

.panel-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.seg-pills {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  gap: 2px;
}

.seg-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.seg-pill.active {
  background: var(--pill-active-bg);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Interactive Area Chart */
.chart-box {
  position: relative;
  width: 100%;
  height: 230px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  z-index: 4;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -115%);
  transition: opacity 0.14s ease;
}

.chart-tooltip.visible { opacity: 1; }
.chart-tooltip b { display: block; font-size: 13.5px; font-family: var(--font-display); }

/* Donut Chart */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 210px;
}

.donut-svg-box {
  position: relative;
  width: 154px;
  height: 154px;
  flex: 0 0 154px;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.donut-center span {
  font-size: 11px;
  color: var(--text-muted);
}

.legend-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

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

.legend-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-soft);
}

.legend-val {
  font-weight: 700;
}

/* Live Automation Feed & Manager Bars */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--pill-bg);
  border: 1px solid var(--divider);
}

.feed-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.feed-ico svg { width: 16px; height: 16px; }
.feed-ico.ok { background: var(--ok-bg); color: var(--ok); }
.feed-ico.info { background: var(--info-bg); color: var(--info); }
.feed-ico.warn { background: var(--warn-bg); color: var(--warn); }

.feed-body { flex: 1; min-width: 0; }
.feed-title { font-size: 13px; font-weight: 600; }
.feed-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.feed-time { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

.mgr-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.mgr-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.mgr-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}

.mgr-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-grad);
}

/* ORDERS SCREEN */
.status-bar-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.status-bar-scroll::-webkit-scrollbar { display: none; }

.status-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.status-tab-pill:hover {
  background: var(--row-hover);
  color: var(--text-main);
}

.status-tab-pill.on {
  background: var(--pill-active-bg);
  border-color: var(--pill-active-border);
  color: var(--text-main);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
}

.tab-count {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .tab-count {
  background: rgba(15, 23, 42, 0.08);
}

.tab-sep {
  width: 1px;
  height: 22px;
  background: var(--divider);
  flex: 0 0 1px;
}

.orders-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-field {
  flex: 1 1 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 13px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.glass-input, .glass-select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 13px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease;
}

.search-field .glass-input {
  padding-left: 36px;
}

.glass-input:focus, .glass-select:focus {
  border-color: var(--accent);
}

.filter-select-wrap {
  flex: 0 0 auto;
  min-width: 150px;
}

/* Orders Desktop Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.glass-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}

.glass-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}

.glass-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.glass-table tbody tr:hover {
  background: var(--row-hover);
}

.glass-table tbody tr:last-child td {
  border-bottom: none;
}

.ord-id {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
}

.sub-txt {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-chip.ok { background: var(--ok-bg); color: var(--ok); }
.badge-chip.warn { background: var(--warn-bg); color: var(--warn); }
.badge-chip.bad { background: var(--bad-bg); color: var(--bad); }
.badge-chip.info { background: var(--info-bg); color: var(--info); }
.badge-chip.custom { background: color-mix(in srgb, var(--c, #7c4dff) 20%, transparent); color: var(--text-main); border: 1px solid color-mix(in srgb, var(--c, #7c4dff) 48%, transparent); }

/* Mobile Orders Cards */
.mobile-orders-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-order-card {
  padding: 14px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.mo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.mo-mid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}

/* KANBAN BOARD */
.kanban-board-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}

.kanban-col {
  flex: 1 0 210px;
  min-width: 210px;
  padding: 14px;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kanban-col.drag-over {
  border-color: var(--accent);
  background: var(--pill-active-bg);
}

.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
}

.kanban-col-sum {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kanban-card {
  padding: 13px;
  border-radius: 16px;
  background: var(--pill-bg);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  transition: transform 0.2s var(--ease-spring), border-color 0.18s ease;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.kc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.kc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}

.kc-move-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--pill-border);
  background: var(--card-bg);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.kc-move-btn:hover {
  background: var(--accent-grad);
  color: #fff;
}

.kc-move-btn svg { width: 14px; height: 14px; }

/* OMNICHANNEL CHATS */
.chats-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 290px;
  gap: 14px;
  min-height: 540px;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  max-height: 660px;
}

.chat-list-head {
  padding: 14px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-chips::-webkit-scrollbar { display: none; }

.ch-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ch-chip.on {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

.chat-threads {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thread-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease;
}

.thread-row:hover { background: var(--row-hover); }
.thread-row.active { background: var(--pill-active-bg); border-color: var(--pill-active-border); }

.thread-av {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.thread-body { flex: 1; min-width: 0; }
.thread-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.thread-prev { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.chat-main-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-back-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.chat-back-btn {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
}

.msg-bubble.in {
  align-self: flex-start;
  background: var(--pill-bg);
  border: 1px solid var(--divider);
  border-bottom-left-radius: 6px;
}

.msg-bubble.out {
  align-self: flex-end;
  background: var(--accent-grad);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg-time {
  font-size: 10.5px;
  opacity: 0.72;
  margin-top: 4px;
  text-align: right;
}

.chat-composer {
  padding: 12px 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-client-pane {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-suggest-box svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

.ai-suggest-box {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(103, 232, 249, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* FINANCE SCREEN */
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* FLOATING VISIONOS BOTTOM DOCK (Mobile & Tablet, Video 3) */
.floating-dock {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  padding: 6px;
  border-radius: 999px;
  background: var(--dock-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(28px) saturate(175%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  gap: 4px;
  max-width: calc(100vw - 20px);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 62px;
  padding: 7px 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
}

.dock-item.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.35);
}

.dock-item svg { width: 17px; height: 17px; }

.dock-badge {
  position: absolute;
  top: 4px;
  right: 11px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fb7185;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* DRAWER & MODAL */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 10, 18, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open, .modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.glass-drawer {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: 440px;
  max-width: calc(100vw - 28px);
  z-index: 100;
  border-radius: 28px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(110%);
  transition: transform 0.32s var(--ease-spring);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.glass-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 460px;
  max-width: calc(100vw - 24px);
  z-index: 105;
  border-radius: 26px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(28px);
  padding: 20px;
  transform: translate(-50%, -46%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.26s var(--ease-spring);
}

.glass-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}

.icon-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-close-btn svg { width: 16px; height: 16px; }

.drawer-box {
  padding: 13px;
  border-radius: 16px;
  background: var(--pill-bg);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qr-preview-box svg {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: block;
}

.qr-preview-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

/* Toast Stack */
.toast-stack {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 16px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--pill-active-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  font-size: 13px;
  font-weight: 600;
  animation: springReveal 0.28s var(--ease-spring);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1180px) {
  .bento-grid-main, .bento-grid-bottom, .finance-grid {
    grid-template-columns: 1fr;
  }
  .chats-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .chat-client-pane {
    display: none;
  }
}

@media (max-width: 1024px) {
  .app-frame {
    padding: 14px 14px 100px;
    gap: 0;
  }
  .glass-sidebar {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .floating-dock {
    display: flex;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 255, 255, 0.16);
  }
  .toast-stack {
    top: 14px;
    bottom: auto;
    right: 14px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kanban-col {
    flex: 0 0 250px;
    min-width: 250px;
  }
  .desktop-orders-card {
    display: none;
  }
  .mobile-orders-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .mobile-orders-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .orders-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .orders-controls .search-field {
    grid-column: span 2;
  }
  .orders-controls .filter-select-wrap {
    min-width: 0;
  }
  .chat-pane {
    min-height: 440px;
    max-height: calc(100dvh - 280px);
  }
  .chat-main-head {
    padding: 10px 12px;
    gap: 8px;
  }
  .chat-back-btn span,
  .hide-xs {
    display: none;
  }
  .app-frame {
    padding: 10px 10px 92px;
  }
  .workspace-shell {
    padding: 10px;
    border-radius: 22px;
    gap: 12px;
  }
  .top-header {
    padding: 12px 14px;
    border-radius: 18px;
  }
  .header-greeting h1 {
    font-size: 17px;
  }
  .hide-sm {
    display: none;
  }
  .theme-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .kpi-value {
    font-size: 21px;
  }
  .kpi-card {
    padding: 14px;
  }
  .donut-wrap {
    flex-direction: column;
    align-items: center;
  }
  .legend-list {
    width: 100%;
  }

  .chats-shell {
    grid-template-columns: 1fr;
    min-height: 460px;
  }
  .chats-shell.show-thread .chat-list-pane {
    display: none;
  }
  .chats-shell:not(.show-thread) .chat-thread-pane {
    display: none;
  }
  .chat-back-btn {
    display: inline-flex;
  }
  .floating-dock {
    gap: 2px;
    padding: 5px;
  }
  .dock-item {
    min-width: 58px;
    padding: 6px 8px;
    font-size: 10px;
  }
  /* Mobile Bottom Sheet Drawer */
  .glass-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88dvh;
    border-radius: 26px 26px 0 0;
    transform: translateY(105%);
  }
  .glass-drawer.open {
    transform: translateY(0);
  }
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skel-wide {
    grid-column: span 2;
  }
}
