/* ============================================================
 * Lotuz Studio Ops — Dark Mode (Shadcn + Tailwind v4 style)
 * Inspired by Lotuz.AI admin UI: glass cards + indigo→purple→cyan gradient
 * ============================================================ */

/* ====== Design tokens (OKLCH — Shadcn dark) ====== */
:root {
  --radius: 10px;

  --background:          oklch(0.13 0.012 260);
  --background-elevated: oklch(0.17 0.014 260);
  --foreground:          oklch(0.96 0.01 260);

  --card:                oklch(0.19 0.015 260 / 0.68);
  --card-solid:          oklch(0.19 0.015 260);
  --card-foreground:     oklch(0.96 0.01 260);

  --popover:             oklch(0.20 0.015 260 / 0.92);
  --popover-foreground:  oklch(0.96 0.01 260);

  --primary:             oklch(0.68 0.19 276);        /* indigo */
  --primary-foreground:  oklch(0.99 0 0);
  --primary-soft:        oklch(0.68 0.19 276 / 0.12);

  --secondary:           oklch(0.27 0.02 260);
  --secondary-foreground:oklch(0.96 0.01 260);

  --muted:               oklch(0.26 0.02 260);
  --muted-foreground:    oklch(0.72 0.02 260);

  --accent:              oklch(0.28 0.03 270);
  --accent-foreground:   oklch(0.96 0.01 260);

  --success:             oklch(0.72 0.18 150);
  --success-soft:        oklch(0.72 0.18 150 / 0.15);
  --warning:             oklch(0.80 0.18 75);
  --warning-soft:        oklch(0.80 0.18 75 / 0.15);
  --danger:              oklch(0.68 0.22 25);
  --danger-soft:         oklch(0.68 0.22 25 / 0.15);

  --border:              oklch(1 0 0 / 0.08);
  --border-strong:       oklch(1 0 0 / 0.14);
  --input:               oklch(1 0 0 / 0.06);
  --input-border:        oklch(1 0 0 / 0.13);
  --ring:                oklch(0.68 0.19 276 / 0.55);

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.25);
  --shadow:     0 4px 10px -2px rgba(0,0,0,0.35), 0 2px 4px -1px rgba(0,0,0,0.25);
  --shadow-md:  0 12px 30px -8px rgba(0,0,0,0.55), 0 4px 10px -2px rgba(0,0,0,0.35);
  --shadow-lg:  0 24px 60px -12px rgba(0,0,0,0.7), 0 8px 20px -4px rgba(0,0,0,0.5);
  --glow-primary: 0 0 24px rgba(99,102,241,0.35), 0 0 48px rgba(139,92,246,0.22);

  /* Gradient accents (Lotuz.AI signature) */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-primary-hover: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #22d3ee 100%);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.14) 50%, rgba(6,182,212,0.12) 100%);
  --gradient-border: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(139,92,246,0.25), rgba(6,182,212,0.3));

  color-scheme: dark;
}

/* ====== Reset / base ====== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display", Roboto, "Helvetica Neue", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.12), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(139,92,246,0.10), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(6,182,212,0.08), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

img, svg { display: block; max-width: 100%; }

/* Scrollbar (WebKit) */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: oklch(1 0 0 / 0.08);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: oklch(1 0 0 / 0.15); background-clip: padding-box; }

/* ====== Typography ====== */
h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
}
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p  { margin: 0; }
code, kbd {
  font-family: "JetBrains Mono", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  background: oklch(1 0 0 / 0.08);
  border-radius: 5px;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  font-weight: 600;
}
.page-copy, .panel-hint {
  color: var(--muted-foreground);
  font-size: 13px;
}
.compact-copy { font-size: 12.5px; }

/* ====== Inputs ====== */
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--foreground);
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  padding: 9px 12px;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
input::placeholder, textarea::placeholder { color: oklch(0.56 0.02 260); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: oklch(1 0 0 / 0.10);
  box-shadow: 0 0 0 3px var(--ring);
}
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
}
textarea { resize: vertical; min-height: 80px; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--foreground);
}
label > span { font-weight: 500; color: var(--muted-foreground); font-size: 12.5px; }

/* ====== Buttons ====== */
button {
  cursor: pointer;
  border: 0;
  font: inherit;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.primary-btn, .auth-v2-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--gradient-primary);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px -2px rgba(99,102,241,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset;
  transition: background-position 0.4s ease, box-shadow 0.3s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}
.primary-btn:hover, .auth-v2-submit:hover {
  background-position: 100% 50%;
  box-shadow: 0 8px 24px -4px rgba(139,92,246,0.55), 0 0 0 1px rgba(255,255,255,0.1) inset, var(--glow-primary);
  transform: translateY(-1px);
}
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--muted);
  box-shadow: none;
  transform: none;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: oklch(1 0 0 / 0.06);
  color: var(--foreground);
  font-weight: 500;
  border: 1px solid var(--input-border);
  backdrop-filter: blur(6px);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.secondary-btn:hover {
  background: oklch(1 0 0 / 0.10);
  border-color: var(--border-strong);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.ghost-btn:hover {
  background: oklch(1 0 0 / 0.06);
  color: var(--foreground);
  border-color: var(--border);
}
.ghost-btn.danger { color: var(--danger); }
.ghost-btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: oklch(0.85 0.15 25); }

.compact-btn { padding: 7px 12px; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: oklch(1 0 0 / 0.04);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  transition: all 0.18s;
}
.icon-btn:hover {
  background: oklch(1 0 0 / 0.10);
  color: var(--foreground);
  border-color: var(--border-strong);
}

/* ====== Layout / shell ====== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar (sticky glass) */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: oklch(0.13 0.012 260 / 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  min-height: 64px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-width: 0;
}
.brand-block .brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-block .eyebrow { margin-bottom: 2px; }
.brand-block h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px -2px rgba(99,102,241,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  letter-spacing: -0.02em;
}

.branch-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--gradient-soft);
  border: 1px solid rgba(99,102,241,0.25);
  color: oklch(0.85 0.1 276);
}

/* Main nav (desktop) */
.main-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  backdrop-filter: blur(10px);
}
.nav-btn, .nav-link {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  transition: all 0.18s;
  cursor: pointer;
}
.nav-btn:hover, .nav-link:hover { color: var(--foreground); background: oklch(1 0 0 / 0.06); }
.nav-btn.is-active, .nav-link.is-active {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 2px 8px -1px rgba(99,102,241,0.4);
}

/* User corner */
.user-corner { position: relative; }
.user-corner-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 13px;
  transition: all 0.18s;
}
.user-corner-btn:hover { background: oklch(1 0 0 / 0.08); border-color: var(--border-strong); }
.user-corner-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.user-corner-name { font-weight: 500; }
.user-corner-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 6px;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(140%);
  z-index: 50;
  display: none;
}
.user-corner-dropdown.is-open { display: block; }
.ucd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.ucd-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}
.ucd-info { flex: 1; font-size: 13px; }
.ucd-info strong { display: block; font-size: 13.5px; color: var(--foreground); }
.ucd-info small { color: var(--muted-foreground); font-size: 11.5px; }
.ucd-actions { display: flex; flex-direction: column; gap: 1px; }
.ucd-action-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  border: 0;
  transition: all 0.15s;
}
.ucd-action-btn:hover { background: oklch(1 0 0 / 0.06); color: var(--foreground); }

/* Views (tab switcher root) */
.view {
  display: none;
  flex: 1;
  padding: 24px 28px;
  width: 100%;
}
.view > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.view.is-active { display: block; }

/* ====== Panel / Card (glass) ====== */
.panel-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.panel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-border);
  opacity: 0.45;
  pointer-events: none;
}
.panel-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.panel-card.wide { max-width: none; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-head h3 { margin: 0; }
.panel-head + * { margin-top: 0; }

.panel-card + .panel-card { margin-top: 18px; }

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .admin-grid.two { grid-template-columns: 1fr 1fr; }
}

.form-stack { display: flex; flex-direction: column; gap: 14px; }
.split-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .split-row { grid-template-columns: 1fr 1fr; } }

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.action-row.two > * { flex: 1; min-width: 0; }

/* ====== Admin subnav ====== */
.admin-subnav {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  backdrop-filter: blur(12px);
}
.admin-subnav::-webkit-scrollbar { display: none; }
.admin-subtab-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  transition: all 0.18s;
  white-space: nowrap;
}
.admin-subtab-btn:hover { color: var(--foreground); background: oklch(1 0 0 / 0.06); }
.admin-subtab-btn.is-active {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 2px 10px -1px rgba(99,102,241,0.45);
}

.admin-section { display: none; }
.admin-section.is-active { display: block; }

.admin-tab-label { font-size: 16px; font-weight: 600; color: var(--foreground); }

/* ====== Auth (login) ====== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0.05 0.01 260 / 0.6);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal.is-open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.modal-panel {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: oklch(0.17 0.015 260 / 0.86);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-border);
  border-radius: 18px 18px 0 0;
  opacity: 0.6;
  pointer-events: none;
}

.auth-panel-v2 {
  max-width: 420px;
}
.auth-v2-header { margin-bottom: 20px; }
.auth-v2-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.auth-v2-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 6px 20px -4px rgba(99,102,241,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.auth-v2-form { display: flex; flex-direction: column; gap: 14px; }
.auth-v2-submit { padding: 12px 20px; font-size: 14.5px; }
.auth-v2-demo {
  margin-top: 12px;
  padding: 12px;
  background: oklch(1 0 0 / 0.03);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.auth-v2-demo strong { color: var(--foreground); }
.auth-v2-demo code { display: inline-block; margin: 2px 0; }

/* ====== Tables (Excel-like + general) ====== */
.table-wrap, .ingredient-excel-wrap, .inventory-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  text-align: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}
thead th {
  background: oklch(1 0 0 / 0.04);
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
}
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: oklch(1 0 0 / 0.03); }
tbody tr:last-child td { border-bottom: 0; }

.report-empty-row {
  color: var(--muted-foreground);
  padding: 36px 20px !important;
  text-align: center !important;
  font-style: italic;
}

/* ====== Status badges ====== */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  line-height: 1.4;
}
.status-idea        { background: oklch(0.55 0.08 260 / 0.2); color: oklch(0.85 0.08 260); border-color: oklch(0.55 0.08 260 / 0.3); }
.status-doing       { background: oklch(0.8 0.18 75 / 0.15); color: oklch(0.85 0.15 75); border-color: oklch(0.8 0.18 75 / 0.3); }
.status-done        { background: var(--success-soft); color: oklch(0.85 0.15 150); border-color: oklch(0.72 0.18 150 / 0.3); }
/* Legacy aliases */
.status-lead, .status-design       { background: oklch(0.55 0.08 260 / 0.2); color: oklch(0.85 0.08 260); border-color: oklch(0.55 0.08 260 / 0.3); }
.status-in_progress, .status-on_hold { background: oklch(0.8 0.18 75 / 0.15); color: oklch(0.85 0.15 75); border-color: oklch(0.8 0.18 75 / 0.3); }
.status-cancelled                  { background: var(--danger-soft); color: oklch(0.85 0.15 25); border-color: oklch(0.68 0.22 25 / 0.3); }

/* ====== Stats / cards ====== */
.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 20px;
}
.stat-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-border);
  opacity: 0.4;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.stat-card .label {
  font-size: 12px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat-card .value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}
.stat-card .delta { font-size: 12.5px; margin-top: 4px; }
.stat-card .delta.up { color: oklch(0.8 0.15 150); }
.stat-card .delta.down { color: oklch(0.75 0.18 25); }

/* ====== Attendance ====== */
.att-clock-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.att-clock-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(99,102,241,0.18), transparent 70%);
  pointer-events: none;
}
.att-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.att-user { font-weight: 600; }
.att-date { color: var(--muted-foreground); font-size: 13px; }
.att-clock {
  position: relative;
  z-index: 1;
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 18px 0;
}
.att-shift-box {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 22px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  margin: 12px 0 20px;
  backdrop-filter: blur(10px);
}
.att-shift-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); font-weight: 600; }
.att-shift-status { font-size: 15px; font-weight: 600; }

.att-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.att-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.att-btn.checkin {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 6px 20px -4px rgba(99,102,241,0.5);
}
.att-btn.checkin:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -4px rgba(139,92,246,0.6), var(--glow-primary); }
.att-btn.checkout {
  background: oklch(0.68 0.22 25 / 0.2);
  color: oklch(0.85 0.18 25);
  border-color: oklch(0.68 0.22 25 / 0.4);
}
.att-btn.checkout:hover { background: oklch(0.68 0.22 25 / 0.3); box-shadow: 0 6px 18px -4px rgba(220,38,38,0.4); }

.att-info-panel {
  margin-top: 18px;
  padding: 16px;
  background: oklch(1 0 0 / 0.03);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--muted-foreground);
  font-size: 13px;
}
.att-gps-guide { font-size: 12.5px; color: var(--muted-foreground); }

.attendance-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 20px;
}

/* ====== Schedule ====== */
.inventory-toolbar, .inventory-week-nav, .schedule-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.inventory-toolbar { justify-content: space-between; }
.toolbar-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

.schedule-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
}

.schedule-reg-table th,
.schedule-reg-table td,
.admin-schedule-table th,
.admin-schedule-table td { padding: 6px; }

.schedule-reg-table td[data-available="true"],
.admin-schedule-table td[data-available="true"] {
  background: var(--success-soft);
  color: oklch(0.85 0.15 150);
  cursor: pointer;
  transition: all 0.18s;
}
.schedule-reg-table td[data-available="true"]:hover,
.admin-schedule-table td[data-available="true"]:hover {
  background: oklch(0.72 0.18 150 / 0.25);
}

.schedule-guide { font-size: 12.5px; color: var(--muted-foreground); margin-top: 10px; }

/* ====== Mobile sidebar ====== */
.mob-brand, .mob-hamburger { display: none; }
.mob-sidebar,
.mob-sidebar-overlay { display: none; }

.mob-hamburger {
  background: oklch(1 0 0 / 0.05);
  border: 1px solid var(--border);
  color: var(--foreground);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.mob-hamburger:hover { background: oklch(1 0 0 / 0.1); border-color: var(--border-strong); }
.mob-hamburger svg { display: block; pointer-events: none; }

.mob-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0.05 0.01 260 / 0.5);
  backdrop-filter: blur(6px);
  z-index: 90;
}
.mob-sidebar-overlay.is-open { display: block; }

.mob-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 86%;
  max-width: 340px;
  background: oklch(0.15 0.015 260 / 0.95);
  border-right: 1px solid var(--border-strong);
  z-index: 91;
  padding: 14px;
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mob-sidebar.is-open { display: flex; transform: translateX(0); }

.mob-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.mob-sidebar-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mob-sidebar-close { width: 32px; height: 32px; border-radius: 8px; background: oklch(1 0 0 / 0.06); color: var(--foreground); border: 0; }

.mob-sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.mob-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  text-align: left;
  border: 0;
  transition: all 0.15s;
}
.mob-sidebar-item:hover { background: oklch(1 0 0 / 0.05); color: var(--foreground); }
.mob-sidebar-item.is-active {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 3px 12px -2px rgba(99,102,241,0.45);
}
.mob-sidebar-icon { width: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }

.mob-sidebar-footer { border-top: 1px solid var(--border); padding-top: 10px; }
.mob-sidebar-logout {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: oklch(0.85 0.15 25);
  font-weight: 500;
  border: 1px solid oklch(0.68 0.22 25 / 0.3);
  transition: all 0.18s;
}
.mob-sidebar-logout:hover { background: oklch(0.68 0.22 25 / 0.25); }

@media (max-width: 860px) {
  .topbar {
    padding: 10px 14px;
    gap: 10px;
    min-height: 60px;
  }
  .main-nav { display: none; }
  .branch-badge { display: none; }
  .user-corner-name { display: none; }
  .user-corner-btn { padding: 4px; border-radius: 50%; }
  .mob-hamburger { display: inline-flex; }
  .brand-block { flex: 1; min-width: 0; }
  .brand-block .brand-mark { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .brand-block .eyebrow { display: none; }
  .brand-block h1 { font-size: 15px; }
  .topbar-actions { margin-left: 0; gap: 6px; }
  .view { padding: 18px 14px; }
  .panel-card { padding: 16px; }
  .att-clock { font-size: 40px; }
}

/* ====== Shift hours panel ====== */
.shift-hours-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.shift-hours-row {
  padding: 14px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(10px);
}
.shift-hours-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--foreground);
  text-transform: capitalize;
}
.shift-hours-hint { font-size: 12px; color: var(--muted-foreground); }

/* ====== Status strip (topbar status messages) ====== */
.status-strip {
  padding: 6px 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 999px;
  font-size: 12.5px;
  color: oklch(0.85 0.12 276);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  padding: 12px 16px;
  background: oklch(0.2 0.015 260 / 0.92);
  color: var(--foreground);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(140%);
  z-index: 120;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13.5px;
}
.toast.success { border-color: oklch(0.72 0.18 150 / 0.4); }
.toast.error   { border-color: oklch(0.68 0.22 25 / 0.4); }

/* ====== Mini-list (used in panel sub-lists) ====== */
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-list > * {
  padding: 8px 12px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

/* ====== Workspace / misc helpers ====== */
.workspace {
  display: grid;
  gap: 18px;
}

.invoice-subnav { margin-bottom: 14px; }

/* Inventory / Excel-like table tweaks */
.ingredient-excel-table th,
.ingredient-excel-table td {
  padding: 9px 10px;
  font-size: 13px;
  border-right: 1px solid var(--border);
}
.ingredient-excel-table th:last-child,
.ingredient-excel-table td:last-child { border-right: 0; }
.ingredient-excel-table td[style*="text-align:left"] { text-align: left; }

/* Weekly report / attendance history / wage tables */
.weekly-report-table td,
.attendance-history-table td,
.attendance-wage-table td,
.admin-attendance-table td { font-variant-numeric: tabular-nums; }

/* Utility */
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ====== Selection ====== */
::selection { background: rgba(99,102,241,0.35); color: #fff; }

/* ====== Focus-visible ====== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
 * MOBILE ENHANCEMENTS (phone-first refinements)
 * ============================================================ */

/* Safe area for notches (iOS) */
@supports (padding: env(safe-area-inset-top)) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .mob-sidebar {
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Larger tap targets on touch devices */
@media (hover: none) and (pointer: coarse) {
  .primary-btn, .secondary-btn, .att-btn, .auth-v2-submit {
    min-height: 44px;
  }
  .icon-btn, .mob-hamburger, .mob-sidebar-close, .user-corner-btn {
    min-height: 40px;
    min-width: 40px;
  }
  .nav-btn, .nav-link, .admin-subtab-btn, .mob-sidebar-item {
    min-height: 40px;
  }
  .ucd-action-btn { padding-block: 11px; }
  /* Prevent iOS auto-zoom on input focus */
  input, select, textarea { font-size: 16px; }
}

/* Phone (≤640px) */
@media (max-width: 640px) {
  html, body { font-size: 14.5px; }
  .view { padding: 14px 12px 28px; }
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }

  .topbar {
    padding: 8px 12px;
    gap: 6px;
  }
  .topbar-row-user { gap: 6px; }

  /* Panel cards compact + edge-to-edge feel */
  .panel-card {
    padding: 14px;
    border-radius: 14px;
  }
  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .panel-head .primary-btn,
  .panel-head .secondary-btn { width: 100%; }

  /* Subnav scrolls horizontally with snap */
  .admin-subnav {
    padding: 3px;
    gap: 2px;
    scroll-snap-type: x mandatory;
  }
  .admin-subtab-btn {
    padding: 8px 12px;
    font-size: 13px;
    scroll-snap-align: start;
  }

  /* Stats grid: 2-col on small phones */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 22px; }

  /* Attendance clock scale */
  .att-clock-panel { padding: 20px 16px; border-radius: 16px; }
  .att-clock { font-size: clamp(34px, 10vw, 48px); }
  .att-btn { flex: 1; min-width: 0; padding: 14px 16px; font-size: 14.5px; }

  /* Modal → bottom sheet on phone */
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .modal-panel {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0));
    animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-panel::before { border-radius: 20px 20px 0 0; }
  /* Grabber handle cue */
  .modal-panel::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px; height: 4px;
    background: oklch(1 0 0 / 0.22);
    border-radius: 2px;
  }

  .auth-panel-v2 { max-width: 100%; }
  .split-row { grid-template-columns: 1fr; gap: 10px; }

  /* Table → card stack on phone.
     Markup: table has class "ingredient-excel-table" / inside ".ingredient-excel-wrap".
     Rows stack as cards; cells show label via ::before using data-label attr if set.
     Fallback: nếu không có data-label, vẫn scroll ngang như thường. */
  .ingredient-excel-wrap,
  .table-wrap { border-radius: 12px; }

  /* User corner dropdown: full-width drawer style */
  .user-corner-dropdown {
    position: fixed;
    left: 12px; right: 12px;
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom));
    min-width: 0;
    border-radius: 14px;
  }

  /* Action rows stretch full-width */
  .action-row.two > * { flex-basis: 100%; }

  /* Toast slides from bottom full-width */
  .toast {
    left: 12px; right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    max-width: none;
  }

  /* Shift hours grid → single column */
  .shift-hours-grid { grid-template-columns: 1fr; gap: 10px; }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Very small phones (iPhone SE, ≤380px) */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .att-clock { font-size: 32px; }
  .att-btn { padding: 12px 14px; font-size: 13.5px; }
  .nav-btn, .nav-link, .admin-subtab-btn { padding: 7px 10px; font-size: 12.5px; }
}

/* Landscape phone / low-height */
@media (max-height: 560px) and (orientation: landscape) {
  .att-clock-panel { padding: 16px; }
  .att-clock { font-size: 32px; margin: 8px 0; }
  .modal-panel { max-height: 94vh; }
}

/* Tablet (641-900px) — keep desktop nav visible, but tighter */
@media (min-width: 641px) and (max-width: 900px) {
  .view { padding: 20px 20px; }
  .main-nav .nav-btn { padding: 7px 11px; font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Admin subnav: edge fade hint scroll horizontal */
.admin-subnav {
  position: relative;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, black 0%, black calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black calc(100% - 24px), transparent 100%);
}
@media (min-width: 901px) {
  .admin-subnav { mask-image: none; -webkit-mask-image: none; }
}

/* Tab label (redundant with subnav on mobile) */
@media (max-width: 860px) {
  .admin-tab-label { display: none; }
}

/* Panel head stack vertical on phone */
@media (max-width: 640px) {
  .panel-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .panel-head > button { width: 100%; }
  .panel-head > div:first-child { min-width: 0; }
}

/* Project name + note (better contrast) */
.project-name-cell {
  text-align: left !important;
  line-height: 1.4;
}
.project-name-cell strong {
  display: block;
  font-weight: 600;
  color: var(--foreground);
}
.project-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: oklch(0.72 0.02 260);
  font-weight: 400;
}
.project-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* ============================================================
 * TABLE → CARD REFLOW on phone (≤640px)
 * Rows stack as cards, each cell shows label via data-label attr.
 * ============================================================ */
@media (max-width: 640px) {
  .ingredient-excel-wrap,
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
    border-radius: 0;
  }
  .ingredient-excel-table,
  .table-wrap table {
    display: block;
    background: transparent;
  }
  .ingredient-excel-table thead,
  .table-wrap table thead {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .ingredient-excel-table tbody,
  .table-wrap table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ingredient-excel-table tr,
  .table-wrap table tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
  }
  .ingredient-excel-table tr::before,
  .table-wrap table tr::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient-border);
    opacity: 0.35;
  }
  .ingredient-excel-table tr:hover,
  .table-wrap table tr:hover {
    background: var(--card);
  }
  .ingredient-excel-table td,
  .table-wrap table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border: 0;
    text-align: right !important;
    font-size: 13px;
    min-width: 0;
  }
  .ingredient-excel-table td[data-label]::before,
  .table-wrap table td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground);
    font-weight: 600;
    min-width: 80px;
    text-align: left;
  }
  .ingredient-excel-table .report-empty-row,
  .table-wrap table .report-empty-row {
    display: block !important;
    text-align: center !important;
    padding: 24px 16px !important;
    background: var(--card);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
  }
  .ingredient-excel-table .report-empty-row::before,
  .table-wrap table .report-empty-row::before {
    content: '';
    display: none;
  }

  /* Project row special layout: name prominent, actions full-width at bottom */
  .project-name-cell {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }
  .project-name-cell::before {
    min-width: 0 !important;
    margin-bottom: 3px;
  }
  .project-name-cell strong { font-size: 15px; }
  .project-actions-cell {
    margin-top: 6px;
    padding-top: 8px !important;
    border-top: 1px solid var(--border);
    justify-content: flex-end !important;
  }
  .project-actions-cell::before {
    display: none !important;
  }
  .project-actions-cell button { flex: 1; max-width: 120px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ====== Print (clean) ====== */
@media print {
  body { background: #fff; color: #000; background-image: none; }
  .topbar, .admin-subnav, .main-nav, .mob-sidebar, .modal, .toast, .user-corner { display: none !important; }
  .panel-card { border: 1px solid #ccc; background: #fff; box-shadow: none; backdrop-filter: none; }
  .panel-card::before, .stat-card::before, .modal-panel::before { display: none; }
  * { color: #000 !important; }
  .status-badge { border: 1px solid #888; background: #f5f5f5 !important; color: #000 !important; }
}

/* ====== Kanban board (quản lý dự án todo-style) ====== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.kanban-col {
  background: oklch(1 0 0 / 0.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-height: 240px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}
.kanban-col[data-status="idea"]  { background: linear-gradient(180deg, oklch(0.55 0.08 260 / 0.06), oklch(1 0 0 / 0.02)); }
.kanban-col[data-status="doing"] { background: linear-gradient(180deg, oklch(0.8 0.18 75 / 0.06), oklch(1 0 0 / 0.02)); }
.kanban-col[data-status="done"]  { background: linear-gradient(180deg, oklch(0.72 0.18 150 / 0.06), oklch(1 0 0 / 0.02)); }

.kanban-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.kanban-col-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.kanban-col[data-status="idea"]  .kanban-col-dot { background: oklch(0.75 0.12 260); box-shadow: 0 0 10px oklch(0.75 0.12 260 / 0.5); }
.kanban-col[data-status="doing"] .kanban-col-dot { background: oklch(0.82 0.18 75);  box-shadow: 0 0 10px oklch(0.82 0.18 75 / 0.5); }
.kanban-col[data-status="done"]  .kanban-col-dot { background: oklch(0.75 0.18 150); box-shadow: 0 0 10px oklch(0.75 0.18 150 / 0.5); }

.kanban-col-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  flex: 1;
  letter-spacing: -0.01em;
}
.kanban-col-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.08);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.kanban-add-btn {
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 0.04);
  color: var(--foreground);
  border-radius: 8px;
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.18s;
}
.kanban-add-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: oklch(0.92 0.12 276);
  transform: scale(1.05);
}
.kanban-col-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.kanban-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-foreground);
  font-style: italic;
  opacity: 0.6;
}

.kanban-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.kanban-card:hover {
  border-color: oklch(0.55 0.18 276 / 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px oklch(0 0 0 / 0.35), 0 0 0 1px oklch(0.55 0.18 276 / 0.2);
}
.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 16px;
}
.kanban-card-code {
  font-size: 10px;
  color: var(--muted-foreground);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.kanban-card-del {
  width: 20px; height: 20px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  opacity: 0;
  transition: all 0.18s;
  line-height: 1;
}
.kanban-card:hover .kanban-card-del { opacity: 0.6; }
.kanban-card-del:hover {
  opacity: 1 !important;
  background: oklch(0.68 0.22 25 / 0.18);
  color: oklch(0.85 0.15 25);
}
.kanban-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.kanban-card-client {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
}
.kanban-card-meta .kanban-price { font-weight: 600; color: oklch(0.9 0.04 276); }
.kanban-card-meta .kanban-deadline { opacity: 0.85; }
.kanban-card-meta .dim { opacity: 0.5; }
.kanban-card-note {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 860px) {
  .kanban-board {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }
  .kanban-col { min-height: auto; padding: 12px; }
  .kanban-card-del { opacity: 0.5; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .kanban-board { grid-template-columns: 1fr 1fr; }
  .kanban-col[data-status="done"] { grid-column: span 2; }
}
