/* ==========================================================
   SKUlytics Admin Portal — Design System
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Tokens --- */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe;
  --blue-400: #60a5fa; --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8; --blue-800: #1e40af;
  --green-50: #f0fdf4; --green-100: #dcfce7; --green-500: #22c55e; --green-600: #16a34a; --green-700: #15803d;
  --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-500: #f59e0b; --amber-600: #d97706; --amber-700: #a16207;
  --red-50: #fef2f2; --red-100: #fee2e2; --red-400: #f87171; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c;
  --purple-50: #faf5ff; --purple-600: #7c3aed;
  --zinc-50: #fafafa; --zinc-100: #f4f4f5; --zinc-200: #e4e4e7; --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa; --zinc-500: #71717a; --zinc-600: #52525b; --zinc-700: #3f3f46;
  --zinc-800: #27272a; --zinc-900: #18181b; --zinc-950: #09090b;
  --white: #ffffff;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --ease: cubic-bezier(.4,0,.2,1);
  --duration-fast: 150ms; --duration-normal: 200ms; --duration-slow: 300ms;
  --sidebar-w: 248px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--zinc-100); color: var(--zinc-900); font-size: 14px; line-height: 1.5; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* --- Layout --- */
.app { width: 1440px; margin: 0 auto; display: flex; min-height: 100vh; background: var(--zinc-50); }
.sidebar { width: var(--sidebar-w); background: var(--white); border-right: 1px solid var(--zinc-200); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; z-index: 10; }
.main { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.content { padding: 28px; max-width: 1192px; flex: 1; animation: fadeIn var(--duration-slow) var(--ease); }

/* --- Brand --- */
.brand { padding: 20px; border-bottom: 1px solid var(--zinc-200); display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; background: var(--blue-600); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 700; font-size: 14px; }
.brand-name { font-weight: 600; font-size: 14px; color: var(--zinc-900); }
.brand-sub { font-size: 11px; color: var(--zinc-500); }

/* --- Nav --- */
.nav { padding: 12px; flex: 1; overflow: auto; }
.nav-section { margin-bottom: 16px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--zinc-400); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px; margin-bottom: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--zinc-700); font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 2px; transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); }
.nav-item:hover { background: var(--zinc-100); }
.nav-item.active { background: var(--blue-50); color: var(--blue-600); }
.nav-item .ico { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; }
.nav-item .badge { margin-left: auto; background: var(--zinc-100); color: var(--zinc-600); font-size: 11px; padding: 1px 6px; border-radius: var(--radius-full); font-weight: 500; }
.nav-item.active .badge { background: var(--blue-100); color: var(--blue-600); }

/* --- Sidebar Footer --- */
.sidebar-foot { padding: 12px; border-top: 1px solid var(--zinc-200); display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background var(--duration-fast) var(--ease); }
.sidebar-foot:hover { background: var(--zinc-50); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-600), var(--purple-600)); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.who-name { font-size: 13px; font-weight: 600; }
.who-role { font-size: 11px; color: var(--zinc-500); }

/* --- Topbar --- */
.topbar { background: var(--white); border-bottom: 1px solid var(--zinc-200); padding: 12px 28px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 5; }
.crumbs { font-size: 13px; color: var(--zinc-500); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.crumbs .sep { color: var(--zinc-300); }
.crumbs .now { color: var(--zinc-900); font-weight: 500; }
.search { margin-left: 24px; flex: 1; max-width: 420px; position: relative; }
.search input { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--zinc-200); border-radius: var(--radius-md); background: var(--zinc-50); font-size: 13px; outline: none; transition: all var(--duration-fast) var(--ease); }
.search input:focus { border-color: var(--blue-600); background: var(--white); box-shadow: 0 0 0 3px var(--blue-100); }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--zinc-400); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* --- Buttons --- */
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--zinc-200); background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--zinc-600); cursor: pointer; position: relative; transition: background var(--duration-fast) var(--ease); }
.icon-btn:hover { background: var(--zinc-100); }
.dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; background: var(--red-500); border-radius: 50%; border: 2px solid var(--white); }
.btn { padding: 8px 14px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px; transition: all var(--duration-fast) var(--ease); line-height: 1.3; }
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); }
.btn-outline { background: var(--white); border-color: var(--zinc-200); color: var(--zinc-700); }
.btn-outline:hover { background: var(--zinc-100); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger:hover { background: var(--red-700); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--zinc-600); }
.btn-ghost:hover { background: var(--zinc-100); }

.tiny-btn { padding: 4px 10px; border: 1px solid var(--zinc-200); background: var(--white); border-radius: var(--radius-sm); font-size: 11px; color: var(--zinc-600); cursor: pointer; font-family: var(--font); transition: background var(--duration-fast) var(--ease); }
.tiny-btn:hover { background: var(--zinc-100); }

/* --- Page Head --- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 600; color: var(--zinc-950); letter-spacing: -.01em; }
.page-sub { font-size: 14px; color: var(--zinc-500); margin-top: 4px; }
.head-actions { display: flex; gap: 8px; }

/* --- Status Banner --- */
.status-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius-lg); margin-bottom: 20px; animation: fadeIn var(--duration-slow) var(--ease); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot.ok { background: var(--green-500); box-shadow: 0 0 0 4px var(--green-100); }
.status-dot.warn { background: var(--amber-500); box-shadow: 0 0 0 4px var(--amber-100); }
.status-dot.err { background: var(--red-500); box-shadow: 0 0 0 4px var(--red-100); }
.status-text { font-size: 13px; color: var(--zinc-700); }
.status-text strong { color: var(--zinc-950); font-weight: 600; }
.status-meta { margin-left: auto; font-size: 12px; color: var(--zinc-500); display: flex; gap: 18px; white-space: nowrap; }

/* --- KPI Cards --- */
.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: all var(--duration-fast) var(--ease); animation: fadeSlideUp var(--duration-slow) var(--ease) both; }
.kpi:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi:nth-child(1) { animation-delay: 50ms; }
.kpi:nth-child(2) { animation-delay: 100ms; }
.kpi:nth-child(3) { animation-delay: 150ms; }
.kpi:nth-child(4) { animation-delay: 200ms; }
.kpi-label { font-size: 12px; color: var(--zinc-500); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 26px; font-weight: 600; color: var(--zinc-950); margin-top: 8px; letter-spacing: -.02em; }
.kpi-trend { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--zinc-500); }
.trend-up { color: var(--green-600); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.trend-down { color: var(--red-600); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.kpi-bar { height: 4px; background: var(--zinc-100); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.kpi-bar span { display: block; height: 100%; border-radius: 2px; transition: width var(--duration-slow) var(--ease); }

/* --- Cards / Panels --- */
.card { background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius-lg); transition: box-shadow var(--duration-fast) var(--ease); }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--zinc-100); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 600; color: var(--zinc-950); }
.card-sub { font-size: 12px; color: var(--zinc-500); margin-top: 2px; }
.card-body { padding: 6px 0; }
.link { font-size: 12px; color: var(--blue-600); font-weight: 500; cursor: pointer; text-decoration: none; transition: color var(--duration-fast) var(--ease); }
.link:hover { text-decoration: underline; }

/* --- Grid --- */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }

/* --- Tables --- */
.itable { width: 100%; border-collapse: collapse; }
.itable th { text-align: left; padding: 10px 18px; font-size: 11px; font-weight: 600; color: var(--zinc-500); text-transform: uppercase; letter-spacing: .04em; background: var(--zinc-50); border-bottom: 1px solid var(--zinc-100); cursor: default; white-space: nowrap; }
.itable th.sortable { cursor: pointer; }
.itable th.sortable:hover { color: var(--zinc-900); }
.itable td { padding: 14px 18px; font-size: 13px; color: var(--zinc-700); border-bottom: 1px solid var(--zinc-100); vertical-align: middle; }
.itable tr:last-child td { border-bottom: none; }
.itable tr:hover td { background: var(--zinc-50); }
.itable tr.clickable { cursor: pointer; }
.sys { display: flex; align-items: center; gap: 10px; }
.sys-ico { width: 32px; height: 32px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.sys-name { font-weight: 500; color: var(--zinc-900); font-size: 13px; }
.sys-desc { font-size: 11px; color: var(--zinc-400); }
.row-act { display: inline-flex; gap: 6px; }

/* --- Pills --- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; white-space: nowrap; }
.pill-ok { background: var(--green-100); color: var(--green-700); }
.pill-warn { background: var(--amber-100); color: var(--amber-700); }
.pill-err { background: var(--red-100); color: var(--red-700); }
.pill-blue { background: var(--blue-50); color: var(--blue-600); }
.pill-gray { background: var(--zinc-100); color: var(--zinc-600); }
.pill-purple { background: var(--purple-50); color: var(--purple-600); }
.pdot { width: 6px; height: 6px; border-radius: 50%; }

/* --- Activity Feed --- */
.feed { padding: 8px 0; }
.feed-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--zinc-100); transition: background var(--duration-fast) var(--ease); }
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--zinc-50); }
.feed-ico { width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--zinc-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--zinc-600); }
.feed-ico.blue { background: var(--blue-50); color: var(--blue-600); }
.feed-ico.green { background: var(--green-100); color: var(--green-700); }
.feed-ico.amber { background: var(--amber-100); color: var(--amber-700); }
.feed-ico.red { background: var(--red-100); color: var(--red-700); }
.feed-text { font-size: 13px; color: var(--zinc-700); line-height: 1.45; }
.feed-text strong { color: var(--zinc-950); font-weight: 600; }
.feed-time { font-size: 11px; color: var(--zinc-400); margin-top: 3px; }

/* --- Quick Links --- */
.qgrid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; padding: 16px 18px; }
.qlink { padding: 14px; border: 1px solid var(--zinc-200); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast) var(--ease); }
.qlink:hover { border-color: var(--blue-600); background: var(--blue-50); }
.qlink-ico { width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--blue-50); color: var(--blue-600); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.qlink-title { font-size: 13px; font-weight: 600; color: var(--zinc-900); }
.qlink-sub { font-size: 11px; color: var(--zinc-500); margin-top: 2px; line-height: 1.4; }

/* --- Footer --- */
.foot { padding: 18px 28px; border-top: 1px solid var(--zinc-200); color: var(--zinc-400); font-size: 12px; display: flex; justify-content: space-between; align-items: center; background: var(--white); margin-top: auto; }
.foot-links { display: flex; gap: 18px; }
.foot-links span { cursor: pointer; transition: color var(--duration-fast) var(--ease); }
.foot-links span:hover { color: var(--zinc-600); }

/* --- Toast --- */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--zinc-200); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--zinc-700); animation: slideInRight var(--duration-normal) var(--ease); min-width: 280px; max-width: 420px; }
.toast.success { border-left: 3px solid var(--green-500); }
.toast.error { border-left: 3px solid var(--red-500); }
.toast.warning { border-left: 3px solid var(--amber-500); }
.toast.info { border-left: 3px solid var(--blue-500); }
.toast-icon { flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { cursor: pointer; color: var(--zinc-400); flex-shrink: 0; }
.toast-close:hover { color: var(--zinc-700); }
.toast-exit { animation: slideOutRight var(--duration-normal) var(--ease) forwards; }

/* --- Modal --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: fadeIn var(--duration-fast) var(--ease); }
.modal { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 520px; max-height: 85vh; overflow: auto; animation: modalIn var(--duration-normal) var(--ease); }
.modal-lg { width: 680px; }
.modal-header { padding: 20px 24px 16px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--zinc-100); }
.modal-title { font-size: 16px; font-weight: 600; color: var(--zinc-950); }
.modal-subtitle { font-size: 13px; color: var(--zinc-500); margin-top: 2px; }
.modal-close { cursor: pointer; color: var(--zinc-400); padding: 4px; border-radius: var(--radius-sm); transition: all var(--duration-fast) var(--ease); background: none; border: none; }
.modal-close:hover { background: var(--zinc-100); color: var(--zinc-700); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--zinc-100); display: flex; justify-content: flex-end; gap: 8px; }

/* --- Form --- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--zinc-700); margin-bottom: 6px; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid var(--zinc-200); border-radius: var(--radius-md); font-size: 13px; background: var(--white); outline: none; transition: all var(--duration-fast) var(--ease); }
.form-input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.form-select { width: 100%; padding: 8px 12px; border: 1px solid var(--zinc-200); border-radius: var(--radius-md); font-size: 13px; background: var(--white); outline: none; appearance: auto; cursor: pointer; transition: all var(--duration-fast) var(--ease); }
.form-select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.form-textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--zinc-200); border-radius: var(--radius-md); font-size: 13px; background: var(--white); outline: none; resize: vertical; min-height: 80px; transition: all var(--duration-fast) var(--ease); }
.form-textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--zinc-700); cursor: pointer; }
.form-check input { accent-color: var(--blue-600); }

/* --- Dropdown --- */
.dropdown-wrapper { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 180px; z-index: 50; animation: fadeSlideDown var(--duration-fast) var(--ease); }
.dropdown-menu.hidden { display: none; }
.dropdown-item { padding: 8px 14px; font-size: 13px; color: var(--zinc-700); cursor: pointer; transition: background var(--duration-fast) var(--ease); }
.dropdown-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.dropdown-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.dropdown-item:hover { background: var(--zinc-100); }
.dropdown-item.active { background: var(--blue-50); color: var(--blue-600); font-weight: 500; }

/* --- Toggle Switch --- */
.toggle { position: relative; width: 36px; height: 20px; border-radius: var(--radius-full); background: var(--zinc-300); cursor: pointer; transition: background var(--duration-fast) var(--ease); display: inline-block; flex-shrink: 0; }
.toggle.on { background: var(--blue-600); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform var(--duration-fast) var(--ease); }
.toggle.on::after { transform: translateX(16px); }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 16px 0; }
.page-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--zinc-200); background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--zinc-700); cursor: pointer; transition: all var(--duration-fast) var(--ease); }
.page-btn:hover { background: var(--zinc-100); }
.page-btn.active { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-info { font-size: 12px; color: var(--zinc-500); margin: 0 8px; }

/* --- Tabs --- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--zinc-200); margin-bottom: 20px; }
.tab { padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--zinc-500); cursor: pointer; border-bottom: 2px solid transparent; transition: all var(--duration-fast) var(--ease); margin-bottom: -1px; }
.tab:hover { color: var(--zinc-700); }
.tab.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }

/* --- Filter Bar --- */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar .search { margin-left: 0; flex: 0 1 260px; }

/* --- Progress bar --- */
.progress { height: 6px; background: var(--zinc-100); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width var(--duration-slow) var(--ease); }

/* --- Skeleton --- */
.skeleton { animation: pulse 1.5s infinite; background: var(--zinc-200); border-radius: var(--radius-md); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state-icon { width: 48px; height: 48px; margin: 0 auto 16px; border-radius: var(--radius-lg); background: var(--zinc-100); display: flex; align-items: center; justify-content: center; color: var(--zinc-400); }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--zinc-700); margin-bottom: 4px; }
.empty-state-desc { font-size: 13px; color: var(--zinc-500); }

/* --- Login --- */
.login-wrapper { width: 1440px; margin: 0 auto; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--zinc-100) 0%, var(--blue-50) 100%); }
.login-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; width: 420px; animation: fadeSlideUp var(--duration-slow) var(--ease); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; justify-content: center; }
.login-brand .brand-logo { width: 40px; height: 40px; font-size: 16px; }
.login-brand .brand-name { font-size: 18px; }
.login-title { font-size: 20px; font-weight: 600; color: var(--zinc-950); text-align: center; margin-bottom: 8px; }
.login-sub { font-size: 13px; color: var(--zinc-500); text-align: center; margin-bottom: 28px; }
.user-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--zinc-200); border-radius: var(--radius-md); cursor: pointer; margin-bottom: 16px; transition: all var(--duration-fast) var(--ease); }
.user-card:hover, .user-card.selected { border-color: var(--blue-600); background: var(--blue-50); }
.user-card .avatar { width: 40px; height: 40px; font-size: 14px; }
.user-card-name { font-weight: 600; font-size: 14px; color: var(--zinc-900); }
.user-card-role { font-size: 12px; color: var(--zinc-500); }
.login-btn { width: 100%; padding: 12px; background: var(--blue-600); color: var(--white); border: none; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--duration-fast) var(--ease); margin-top: 8px; }
.login-btn:hover { background: var(--blue-700); }
.login-btn:disabled { opacity: .5; cursor: default; }

/* --- Config Entry --- */
.config-group { margin-bottom: 24px; }
.config-group-title { font-size: 14px; font-weight: 600; color: var(--zinc-900); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.config-entry { display: flex; align-items: flex-start; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--zinc-100); transition: background var(--duration-fast) var(--ease); }
.config-entry:hover { background: var(--zinc-50); }
.config-entry:last-child { border-bottom: none; }
.config-key { font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace; font-size: 12px; color: var(--blue-600); background: var(--blue-50); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.config-value { font-size: 13px; font-weight: 500; color: var(--zinc-900); }
.config-desc { font-size: 12px; color: var(--zinc-500); margin-top: 2px; }
.config-meta { font-size: 11px; color: var(--zinc-400); margin-top: 4px; }
.config-info { flex: 1; min-width: 0; }
.config-actions { flex-shrink: 0; display: flex; gap: 6px; align-items: center; }

/* --- Workflow Flow --- */
.workflow-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.workflow-stage { padding: 4px 10px; font-size: 11px; font-weight: 500; border-radius: var(--radius-full); background: var(--blue-50); color: var(--blue-600); }
.workflow-arrow { color: var(--zinc-400); font-size: 12px; }

/* --- Integration Card (for integrations screen) --- */
.integration-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.integration-card { background: var(--white); border: 1px solid var(--zinc-200); border-radius: var(--radius-lg); padding: 20px; transition: all var(--duration-fast) var(--ease); }
.integration-card:hover { box-shadow: var(--shadow-md); }
.integration-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.integration-card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.integration-detail { font-size: 12px; }
.integration-detail-label { color: var(--zinc-500); font-weight: 500; margin-bottom: 2px; }
.integration-detail-value { color: var(--zinc-900); font-weight: 500; }
.integration-card-actions { display: flex; gap: 8px; border-top: 1px solid var(--zinc-100); padding-top: 14px; }

/* --- Sort indicator --- */
.sort-icon { display: inline-flex; margin-left: 4px; }

/* --- Inline edit --- */
.inline-edit-row { background: var(--blue-50); }
.inline-edit-row .form-input,
.inline-edit-row .form-select { font-size: 12px; padding: 6px 8px; }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* --- Utility --- */
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--zinc-500); }
.text-bold { font-weight: 600; }
.text-mono { font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
