/* =====================================================================
   智管进销存 · 视觉设计系统（v4 · Apple-inspired）
   哲学：克制的留白 + 柔和分层阴影 + iOS 蓝 + 大圆角 + 按压微动效
   - 页面底色 #F5F5F7，卡片纯白带柔和阴影；单一强调色 iOS Blue #007AFF
   - 控件圆角 12px、卡片圆角 18px；focus 蓝色光环；按钮按压微缩
   - 状态用 iOS 风格胶囊（淡色底 + 同色字）；弹窗/Toast 毛玻璃
   自适应：PC（侧边栏） / 移动端（毛玻璃顶栏 + 抽屉）
   ===================================================================== */

:root {
  /* —— 唯一强调色：iOS Blue —— */
  --blue: #007AFF;
  --blue-d: #0066D6;            /* hover 加深 */
  --blue-soft: rgba(0, 122, 255, .10);

  /* —— 表面与中性（Apple 调色板） —— */
  --bg: #F5F5F7;               /* 页面底色：Apple 浅灰 */
  --white: #FFFFFF;
  --card: #FFFFFF;
  --ash: #F5F5F7;
  --carbon: #1D1D1F;           /* 近黑：正文 / 深色 hero */
  --graphite: #1D1D1F;         /* 正文 */
  --pewter: #6E6E73;           /* 次级文字 */
  --silver: #8E8E93;           /* 占位 / 禁用 */
  --cloud: #E5E5EA;            /* 发丝分隔线 */
  --pale: #D1D1D6;             /* 细边框 */

  /* —— 语义色（iOS 系统色） —— */
  --danger: #FF3B30; --warn: #FF9500; --ok: #34C759; --info: #007AFF;

  /* —— 几何与阴影 —— */
  --r: 18px;                   /* 卡片大圆角 */
  --r-ctl: 12px;               /* 控件圆角 */
  --r-pill: 999px;             /* 胶囊 */
  --t: .32s cubic-bezier(.2, .85, .25, 1);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
  --shadow-2: 0 10px 40px rgba(0, 0, 0, .14);
  --sidebar-w: 240px;
  --topbar-h: 60px;
}

/* ============ 基础 ============ */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--carbon);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; font-weight: 500; }
::selection { background: rgba(0, 122, 255, .16); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--pale); border-radius: var(--r-pill); border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--silver); }

/* ============ 应用外壳 ============ */
.app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }

/* 侧边栏：纯白 + 发丝分隔 */
.sidebar {
  width: var(--sidebar-w); background: var(--white);
  border-right: 1px solid var(--cloud);
  display: flex; flex-direction: column; position: fixed;
  top: 0; bottom: 0; left: 0; z-index: 40; transition: transform var(--t);
}
.sidebar__brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 11px;
  padding: 0 20px; border-bottom: 1px solid var(--cloud);
  font-weight: 600; font-size: 16px; letter-spacing: .1px; color: var(--carbon);
}
.sidebar__logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--carbon); display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 600;
}
.sidebar__nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; position: relative;
  padding: 10px 12px; margin-bottom: 3px; border-radius: 10px;
  color: var(--pewter); cursor: pointer; font-size: 14px; font-weight: 500; user-select: none;
  transition: background var(--t), color var(--t);
}
.nav-item:hover { background: var(--ash); color: var(--carbon); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); }
.nav-item .ico { width: 20px; text-align: center; font-size: 17px; opacity: .9; }
.nav-item.active .ico { opacity: 1; }
.nav-item .badge {
  margin-left: auto; background: var(--blue); color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; border-radius: var(--r-pill); display: grid; place-items: center;
  padding: 0 5px; font-weight: 600;
}
.sidebar__foot { padding: 12px; border-top: 1px solid var(--cloud); }
.user-chip { display: flex; align-items: center; gap: 11px; cursor: pointer; padding: 6px; border-radius: 12px; transition: background var(--t); }
.user-chip:hover { background: var(--ash); }
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ash); color: var(--carbon); display: grid; place-items: center; font-weight: 600;
}
.user-chip .meta { line-height: 1.3; }
.user-chip .meta .name { font-weight: 600; font-size: 13px; color: var(--carbon); }
.user-chip .meta .role { font-size: 11px; color: var(--silver); }

/* 主区 */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
/* 顶栏：浮动毛玻璃 */
.topbar {
  height: var(--topbar-h); background: rgba(245, 245, 247, .72);
  backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.topbar__title { font-weight: 600; font-size: 16px; letter-spacing: .1px; }
.topbar__menu-btn { display: none; font-size: 22px; cursor: pointer; border: none; background: none; color: var(--carbon); }
.topbar__spacer { flex: 1; }
.content { padding: 24px; flex: 1; animation: fadeIn .32s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.content__head { margin-bottom: 20px; }
.content__head h1 { font-size: 24px; font-weight: 600; margin: 0 0 5px; letter-spacing: .2px; }
.content__head p { margin: 0; color: var(--pewter); font-size: 13px; }
.alert-bell { position: relative; cursor: pointer; font-size: 18px; color: var(--pewter); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: background var(--t), color var(--t); }
.alert-bell:hover { background: var(--ash); color: var(--carbon); }
.alert-bell .dot {
  position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff;
  border-radius: var(--r-pill); font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; font-weight: 600;
}

.scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 35; }
.scrim.show { display: block; }

/* ============ 网格 / 卡片 ============ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 卡片：纯白 + 柔和阴影 */
.card {
  background: var(--card); border-radius: var(--r); padding: 20px;
  box-shadow: var(--shadow-1); transition: box-shadow var(--t), transform var(--t);
}
.card__title { font-weight: 600; font-size: 15px; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; color: var(--carbon); }
.card__title .sub { font-weight: 400; font-size: 12px; color: var(--silver); margin-left: auto; }

/* KPI 卡 */
.kpi {
  background: var(--card); border-radius: var(--r); padding: 20px; position: relative;
  box-shadow: var(--shadow-1); transition: box-shadow var(--t), transform var(--t);
}
.kpi__ico { position: absolute; right: 16px; top: 16px; font-size: 18px; opacity: .25; }
.kpi__label { color: var(--pewter); font-size: 13px; font-weight: 400; }
.kpi__value { font-size: 28px; font-weight: 600; margin: 8px 0 4px; letter-spacing: .2px; color: var(--carbon); }
.kpi__delta { font-size: 12px; font-weight: 500; }
.kpi__delta.up { color: var(--ok); }
.kpi__delta.down { color: var(--danger); }

.locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--silver); text-align: center; }
.locked .big { font-size: 44px; filter: grayscale(.2); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
  border-radius: var(--r-ctl); border: 1px solid var(--pale); background: var(--white);
  color: var(--graphite); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: background var(--t), color var(--t), border-color var(--t), transform .12s ease, box-shadow var(--t); white-space: nowrap;
}
.btn:hover { background: var(--ash); }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(0, 122, 255, .25); }
.btn-primary:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--ash); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 1px 2px rgba(255, 59, 48, .25); }
.btn-danger:hover { background: #e03228; border-color: #e03228; color: #fff; }
.danger-link { color: var(--danger); }
.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ============ 分段控件（iOS 风格） ============ */
.segmented { display: inline-flex; background: #E5E5EA; border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.segmented .seg {
  border: none; background: transparent; padding: 7px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--graphite); cursor: pointer; transition: background var(--t), color var(--t), box-shadow var(--t);
}
.segmented .seg:hover { color: var(--carbon); }
.segmented .seg.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

/* ============ 表单 ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--pewter); margin-bottom: 7px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--pale);
  border-radius: var(--r-ctl); font-size: 14px; background: var(--white); color: var(--carbon);
  outline: none; transition: border-color var(--t), box-shadow var(--t); font-weight: 400;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.input::placeholder, .textarea::placeholder { color: var(--silver); }
.textarea { resize: vertical; min-height: 72px; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' stroke='%236E6E73' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--cloud); white-space: nowrap; }
table.data thead th { background: var(--white); color: var(--pewter); font-weight: 600; position: sticky; top: 0; cursor: pointer; user-select: none; }
table.data thead th .sort { color: var(--silver); font-size: 11px; margin-left: 4px; }
table.data tbody tr { transition: background var(--t); }
table.data tbody tr:hover { background: rgba(0, 122, 255, .045); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
table.data .empty { text-align: center; color: var(--silver); padding: 36px; }
.row-actions { display: flex; gap: 6px; }

.table-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.table-bar .search { flex: 1; min-width: 180px; max-width: 340px; position: relative; }
.table-bar .search::before { content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .5; }
.table-bar .search .input { padding-left: 36px; }
.filter-inline { display: flex; gap: 8px; }
.filter-inline .select { width: auto; min-width: 120px; }
.table-foot { display: flex; align-items: center; gap: 12px; padding: 14px 2px; flex-wrap: wrap; }
.table-foot .info { color: var(--pewter); font-size: 13px; }
.pager { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pager button { min-width: 34px; height: 34px; border: 1px solid var(--pale); background: var(--white); border-radius: 10px; cursor: pointer; color: var(--graphite); font-weight: 500; transition: background var(--t), border-color var(--t), color var(--t); }
.pager button:hover:not(:disabled) { background: var(--ash); }
.pager button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

/* ============ 状态胶囊（iOS 风格：淡底同色字） ============ */
.badge-pill { display: inline-block; padding: 3px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; line-height: 1.6; }
.badge-pill.info { background: rgba(0, 122, 255, .12); color: #007AFF; }
.badge-pill.success { background: rgba(52, 199, 89, .14); color: #1a7f37; }
.badge-pill.warning { background: rgba(255, 149, 0, .14); color: #b25e00; }
.badge-pill.danger { background: rgba(255, 59, 48, .14); color: #d03b30; }
.badge-pill.mute { background: rgba(142, 142, 147, .14); color: var(--silver); }
.alert-banner { display: flex; align-items: center; gap: 10px; padding: 13px 16px; margin-bottom: 16px;
  background: var(--blue-soft); border-radius: var(--r-ctl); color: var(--carbon); font-size: 14px; }
.alert-banner a { color: var(--blue); font-weight: 500; text-decoration: none; cursor: pointer; }
.alert-banner a:hover { text-decoration: underline; }

/* ============ 筛选栏 ============ */
.filter-bar {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-1);
}
.filter-bar .field { margin: 0; min-width: 150px; }
.filter-bar .field.grow { flex: 1; }
.filter-bar .actions { margin-left: auto; display: flex; gap: 8px; align-items: flex-end; }

/* ============ 图表 ============ */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-placeholder { height: 220px; border: 1px solid var(--cloud); border-radius: var(--r); display: flex; align-items: center; justify-content: center; color: var(--silver); background: var(--white); }

/* ============ Toast（毛玻璃，居中偏右） ============ */
.toast-root { position: fixed; top: 18px; right: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: 370px; }
.toast {
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(0, 0, 0, .06); border-radius: 14px; padding: 13px 16px;
  box-shadow: var(--shadow-2); animation: toastIn .3s cubic-bezier(.2, .85, .25, 1); cursor: pointer; transition: transform var(--t);
}
.toast:hover { transform: translateY(-1px); }
.toast.warning { border-left: 3px solid var(--warn); }
.toast.danger { border-left: 3px solid var(--danger); }
.toast .t-title { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--carbon); }
.toast .t-body { font-size: 12.5px; color: var(--pewter); margin-top: 4px; }
.toast .t-time { font-size: 11px; color: var(--silver); margin-top: 5px; }
@keyframes toastIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 弹窗（iOS 卡片 + 毛玻璃遮罩） ============ */
.modal-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 900; display: grid; place-items: center; padding: 16px; animation: fadeIn .2s ease; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 480px; box-shadow: var(--shadow-2); overflow: hidden; animation: modalIn .28s cubic-bezier(.2, .85, .25, 1); }
@keyframes modalIn { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__head { padding: 18px 20px; border-bottom: 1px solid var(--cloud); font-weight: 600; font-size: 16px; }
.modal__body { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--cloud); display: flex; justify-content: flex-end; gap: 10px; }
.modal-scroll { max-height: 56vh; overflow-y: auto; }

/* ============ AI 问数 ============ */
.ai-layout { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 48px); }
.ai-chat { flex: 1; overflow-y: auto; padding: 8px 2px; }
.ai-msg { display: flex; gap: 11px; margin-bottom: 18px; animation: fadeIn .2s ease; }
.ai-msg .bubble { max-width: 78%; padding: 12px 15px; border-radius: 18px; font-size: 14px; line-height: 1.65; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg.user .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.ai-msg.bot .bubble { background: var(--ash); color: var(--carbon); border-bottom-left-radius: 5px; }
.ai-msg .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; flex: none; }
.ai-msg.user .av { background: var(--carbon); color: #fff; }
.ai-msg.bot .av { background: var(--ash); color: var(--carbon); }
.ai-result-card { background: var(--card); border-radius: var(--r); padding: 16px; margin-top: 10px; box-shadow: var(--shadow-1); }
.real-link-badge { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; line-height: 1.5; background: rgba(52, 199, 89, .14); color: #1a7f37; }
.real-link-badge.is-warn { background: rgba(255, 149, 0, .14); color: #b25e00; }
.infini-analysis { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-ctl); background: linear-gradient(180deg, rgba(0,122,255,.06), rgba(0,122,255,.02)); border: 1px solid rgba(0,122,255,.14); }
.infini-analysis__title { font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.infini-analysis__body { font-size: 13.5px; line-height: 1.7; color: var(--carbon); white-space: pre-wrap; word-break: break-word; }
.ai-examples { display: flex; gap: 9px; flex-wrap: wrap; margin: 12px 0; }
.ai-examples .chip { background: var(--ash); color: var(--graphite); border-radius: var(--r-pill); padding: 7px 14px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background var(--t), color var(--t); }
.ai-examples .chip:hover { background: var(--blue); color: #fff; }
.ai-input-bar { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--cloud); margin-top: 8px; }
.ai-input-bar .input { flex: 1; }

/* ============ 登录页 ============ */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
/* 左栏：深色 hero（Apple 近黑） */
.login-aside {
  background: var(--carbon); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 64px;
  position: relative; overflow: hidden;
}
.login-aside .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.login-aside .brand-row .lg { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 19px; font-weight: 600; color: #fff; }
.login-aside h1 { font-size: 34px; font-weight: 600; margin: 0 0 16px; letter-spacing: .2px; }
.login-aside p { opacity: .82; max-width: 420px; line-height: 1.8; font-size: 14.5px; font-weight: 400; }
.login-aside .feat { margin-top: 36px; display: grid; gap: 16px; }
.login-aside .feat div { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .9); font-size: 14px; }
.login-aside .feat .ic { font-size: 17px; opacity: .85; width: 20px; text-align: center; }
.login-aside .stats { display: flex; gap: 34px; margin-top: 48px; }
.login-aside .stats .n { font-size: 26px; font-weight: 600; }
.login-aside .stats .l { font-size: 12.5px; opacity: .7; }

.login-form-wrap { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.login-card { width: 100%; max-width: 372px; background: var(--white); border-radius: var(--r); padding: 32px; box-shadow: var(--shadow-1); }
.login-card h2 { margin: 0 0 5px; font-size: 23px; font-weight: 600; }
.login-card .tip { color: var(--pewter); margin: 0 0 24px; font-size: 13px; }
.login-roles { display: flex; gap: 10px; margin-bottom: 18px; }
.login-roles .opt { flex: 1; border: 1px solid var(--pale); border-radius: var(--r-ctl); padding: 11px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--pewter); transition: border-color var(--t), color var(--t), background var(--t); }
.login-roles .opt:hover { border-color: var(--silver); }
.login-roles .opt.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* ============ 工具类 ============ */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--silver); } .soft { color: var(--pewter); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.center { text-align: center; }
.loading { color: var(--silver); padding: 26px; text-align: center; }
.loading::after { content: ""; display: inline-block; width: 15px; height: 15px; margin-left: 8px; border: 2px solid var(--pale); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--cloud); margin: 14px 0; }
.store-switch .segmented { margin-top: 4px; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-2); border-right: 1px solid var(--cloud); }
  .main { margin-left: 0; }
  .topbar__menu-btn { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .ai-layout { height: calc(100vh - var(--topbar-h) - 32px); }
  .kpi__value { font-size: 23px; }
}
