/* PrintRUSH Lopez — Shared Components */
@import './tokens.css';

/* Lucide icon sizing helpers */
[data-lucide] { display: inline-block; width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; vertical-align: middle; }

/* ── LAYOUT ── */
.container { width: 100%; max-width: var(--max-w-xl); margin: 0 auto; padding: 0 var(--space-4); }
.page { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.page-content { flex: 1; padding: var(--space-6) var(--space-4); padding-top: calc(var(--header-h) + var(--space-6)); }

/* ── HEADER / NAV ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: var(--z-overlay);
  background: rgba(255,255,255,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 var(--space-6);
  transition: background var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out);
}
[data-theme="dark"] .site-header { background: rgba(13,13,15,0.85); }
.site-header .logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.site-header .logo-mark { width: 36px; height: 36px; }
.site-header .logo-text { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-xl); }
.site-header .logo-text span { background: var(--grad-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid var(--border-md); background: var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { width: 18px; height: 18px; }
[data-theme="dark"] .icon-sun { display: none; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── CMYK LOGO MARK ── */
.cmyk-mark { position: relative; width: 36px; height: 36px; }
.cmyk-mark .dot {
  position: absolute; width: 18px; height: 18px; border-radius: 50%; opacity: 0.9;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .cmyk-mark .dot { mix-blend-mode: screen; }
.cmyk-mark .dot-c { background: var(--cyan); top: 0; left: 0; }
.cmyk-mark .dot-m { background: var(--magenta); top: 0; right: 0; }
.cmyk-mark .dot-y { background: var(--yellow); bottom: 0; left: 50%; transform: translateX(-50%); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-full);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--fw-semibold);
  border: none; cursor: pointer; white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out); text-decoration: none;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

.btn-primary {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 4px 16px var(--cyan-20);
}
.btn-primary:hover { box-shadow: 0 6px 24px var(--cyan-20); filter: brightness(1.08); }

.btn-cyan { background: var(--cyan); color: #fff; box-shadow: 0 4px 12px var(--cyan-20); }
.btn-cyan:hover { filter: brightness(1.1); box-shadow: 0 6px 20px var(--cyan-20); }
.btn-magenta { background: var(--magenta); color: #fff; box-shadow: 0 4px 12px var(--magenta-20); }
.btn-magenta:hover { filter: brightness(1.1); box-shadow: 0 6px 20px var(--magenta-20); }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border-md);
}
.btn-outline:hover { background: var(--surface); border-color: var(--cyan); color: var(--cyan); }

.btn-ghost { background: var(--surface); color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-icon { padding: var(--space-2); border-radius: var(--radius-md); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out);
}
.card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .card-glass {
  background: rgba(24,24,31,0.7);
  border-color: rgba(255,255,255,0.08);
}
.card-hover { transition: all var(--dur-base) var(--ease-out); cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── BADGE / PILL ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: var(--fw-semibold); white-space: nowrap;
}
.badge-pending    { background: var(--status-pending-bg);    color: var(--status-pending); }
.badge-approved   { background: var(--status-approved-bg);   color: var(--status-approved); }
.badge-processing { background: var(--status-processing-bg); color: var(--status-processing); }
.badge-ready      { background: var(--status-ready-bg);      color: var(--status-ready); }
.badge-done       { background: var(--status-done-bg);       color: var(--status-done); }
.badge-cancelled  { background: var(--status-cancelled-bg);  color: var(--status-cancelled); }
.badge-cyan     { background: var(--cyan-10);     color: var(--cyan); }
.badge-magenta  { background: var(--magenta-10);  color: var(--magenta); }

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--surface); border: 1.5px solid var(--border-md);
  border-radius: var(--radius-md); color: var(--text); font-size: var(--text-base);
  transition: all var(--dur-fast) var(--ease-out);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-10);
}
.form-input::placeholder { color: var(--text-faint); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: var(--space-6) 0; }

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
  position: fixed; bottom: var(--space-6); right: var(--space-6);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-3);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); pointer-events: all;
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  animation: toast-in var(--dur-base) var(--ease-out);
  max-width: 360px;
}
.toast-success { border-left: 3px solid var(--status-ready); }
.toast-error   { border-left: 3px solid var(--status-cancelled); }
.toast-info    { border-left: 3px solid var(--cyan); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── LOADING / SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-md);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── QUEUE POSITION WIDGET ── */
.queue-number {
  font-family: var(--font-heading); font-weight: var(--fw-black);
  font-size: clamp(4rem, 12vw, 7rem); line-height: 1;
  background: var(--grad-brand); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.queue-arc {
  position: relative; width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.queue-arc svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.queue-arc .track { fill: none; stroke: var(--border-md); stroke-width: 8; }
.queue-arc .progress {
  fill: none; stroke: url(#arcGrad); stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--dur-xslow) var(--ease-out);
}

/* ── STATUS TIMELINE ── */
.status-timeline { display: flex; flex-direction: column; gap: 0; }
.status-step { display: flex; align-items: flex-start; gap: var(--space-4); padding-bottom: var(--space-5); position: relative; }
.status-step:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 28px; bottom: 0;
  width: 2px; background: var(--border-md);
}
.status-step.done::before { background: var(--cyan-20); }
.status-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-md);
  background: var(--surface-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  position: relative; z-index: 1;
  transition: all var(--dur-base) var(--ease-out);
}
.status-step.done .status-dot { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.status-step.active .status-dot {
  background: var(--magenta); border-color: var(--magenta); color: #fff;
  box-shadow: 0 0 0 6px var(--magenta-10);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 6px var(--magenta-10); }
  50%       { box-shadow: 0 0 0 10px var(--magenta-10); }
}
.status-step-info { padding-top: 5px; }
.status-step-title { font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text); }
.status-step-time  { font-size: var(--text-xs); color: var(--text-faint); margin-top: 2px; }

/* ── PAYMENT SELECTOR ── */
.payment-options { display: flex; flex-direction: column; gap: var(--space-3); }
.payment-option {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); border-radius: var(--radius-lg);
  border: 2px solid var(--border); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out); background: var(--surface);
}
.payment-option:hover { border-color: var(--cyan-20); background: var(--cyan-10); }
.payment-option.selected { border-color: var(--cyan); background: var(--cyan-10); }
.payment-option-icon { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.payment-option-body { flex: 1; }
.payment-option-title { font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text); }
.payment-option-desc  { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.payment-option-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-md); transition: all var(--dur-fast) var(--ease-out); display: flex; align-items: center; justify-content: center; }
.payment-option.selected .payment-option-radio { border-color: var(--cyan); background: var(--cyan); }
.payment-option.selected .payment-option-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* ── SERVICE CATEGORY GRID ── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); }
.service-tile {
  padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: center; transition: all var(--dur-fast) var(--ease-out);
}
.service-tile:hover { border-color: var(--cyan); background: var(--cyan-10); transform: translateY(-2px); }
.service-tile.selected { border-color: var(--cyan); background: var(--cyan-10); box-shadow: 0 0 0 3px var(--cyan-10); }
.service-tile-icon { font-size: 2rem; margin-bottom: var(--space-2); }
.service-tile-name { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text); line-height: var(--lh-snug); }

/* ── PRICE DISPLAY ── */
.price-tag {
  font-family: var(--font-heading); font-weight: var(--fw-black);
  font-size: var(--text-3xl); color: var(--text);
}
.price-tag .currency { font-size: var(--text-xl); font-weight: var(--fw-semibold); color: var(--text-muted); vertical-align: top; margin-top: 6px; display: inline-block; }
.price-breakdown { display: flex; flex-direction: column; gap: var(--space-2); }
.price-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-sm); }
.price-row.total { font-weight: var(--fw-bold); font-size: var(--text-base); padding-top: var(--space-3); border-top: 1px solid var(--border); }

/* ── FILE UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border-md); border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-6); text-align: center;
  cursor: pointer; transition: all var(--dur-base) var(--ease-out);
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--cyan); background: var(--cyan-10);
}
.upload-zone-icon { font-size: 3rem; margin-bottom: var(--space-3); }
.upload-zone-text { font-size: var(--text-sm); color: var(--text-muted); }
.upload-zone-text strong { color: var(--cyan); }

/* ── KANBAN (Owner Queue Board) ── */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); align-items: start; }
.kanban-col { background: var(--surface); border-radius: var(--radius-xl); padding: var(--space-4); min-height: 200px; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.kanban-col-title { font-weight: var(--fw-bold); font-size: var(--text-base); display: flex; align-items: center; gap: var(--space-2); }
.kanban-col-count { background: var(--surface-2); border-radius: var(--radius-full); padding: 2px 10px; font-size: var(--text-xs); font-weight: var(--fw-semibold); }
.job-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  margin-bottom: var(--space-3); cursor: grab; user-select: none;
  transition: all var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.job-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.job-card.dragging { opacity: 0.5; cursor: grabbing; }
.job-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
.job-card-number { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-lg); color: var(--cyan); }
.job-card-meta { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-1); }
.job-card-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

/* ── REVENUE WIDGETS ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-5); }
.stat-value { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-3xl); color: var(--text); margin: var(--space-1) 0; }
.stat-label { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-change { font-size: var(--text-xs); color: var(--status-ready); font-weight: var(--fw-medium); }

/* ── ALERT BANNER ── */
.alert { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); font-size: var(--text-sm); }
.alert-warning { background: var(--yellow-10); border: 1px solid rgba(184,144,10,0.2); }
.alert-error   { background: var(--magenta-10); border: 1px solid var(--magenta-20); }
.alert-info    { background: var(--cyan-10);    border: 1px solid var(--cyan-20); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .kanban { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: var(--space-4); padding-top: calc(var(--header-h) + var(--space-4)); }
}
@media (max-width: 480px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   OWNER DASHBOARD LAYOUT
═══════════════════════════════════════════ */

/* Sidebar shell */
:root { --sidebar-w: 240px; }
.owner-layout-root { display: flex; min-height: 100vh; align-items: flex-start; }
.owner-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 300; transition: transform var(--dur-base) var(--ease-out);
}
.owner-sidebar-logo {
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.owner-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: var(--space-3) var(--space-2);
  display: flex; flex-direction: column; gap: 2px; width: 100%;
}
.owner-nav-link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3); border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-muted); text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  width: 100%; box-sizing: border-box; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.owner-nav-link:hover { background: var(--bg); color: var(--text); }
.owner-nav-link.active { background: var(--cyan-10); color: var(--cyan); }
.owner-nav-link.active .icon { color: var(--cyan); }
.owner-sidebar-footer {
  padding: var(--space-4); border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.owner-shop-name { font-weight: var(--fw-bold); font-size: var(--text-sm); }
.owner-user-email { font-size: var(--text-xs); color: var(--text-muted); word-break: break-all; }

/* Main area */
.owner-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; min-height: 100vh;
}
.owner-topbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg); border-bottom: 1px solid var(--border);
  height: 60px; display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-6);
}
.owner-topbar-title { font-family: var(--font-heading); font-weight: var(--fw-bold); font-size: var(--text-lg); flex: 1; }
.owner-topbar-actions { display: flex; align-items: center; gap: var(--space-2); }
.owner-menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); }
.owner-page-content { flex: 1; padding: var(--space-6); max-width: 1200px; }

/* ── KANBAN BOARD ── */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); align-items: start; }
.kanban-col { background: var(--surface); border-radius: var(--radius-xl); padding: var(--space-4); min-height: 200px; }
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4); padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border);
}
.kanban-col-title { font-weight: var(--fw-bold); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; }
.kanban-col-count { background: var(--bg); color: var(--text-muted); border-radius: var(--radius-full); padding: 2px 8px; font-size: var(--text-xs); font-weight: var(--fw-bold); }
.kanban-col-pending   .kanban-col-header { border-color: var(--yellow); }
.kanban-col-pending   .kanban-col-title  { color: var(--yellow); }
.kanban-col-processing .kanban-col-header { border-color: var(--cyan); }
.kanban-col-processing .kanban-col-title  { color: var(--cyan); }
.kanban-col-ready     .kanban-col-header { border-color: var(--status-ready); }
.kanban-col-ready     .kanban-col-title  { color: var(--status-ready); }
.kanban-col-done      .kanban-col-header { border-color: var(--border-md); }
.kanban-col-done      .kanban-col-title  { color: var(--text-muted); }

/* Job cards */
.job-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  margin-bottom: var(--space-3); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative; overflow: hidden;
}
.job-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; border-radius:2px 0 0 2px; }
.job-card.pending::before   { background: var(--yellow); }
.job-card.processing::before { background: var(--cyan); }
.job-card.ready::before     { background: var(--status-ready); }
.job-card.done::before      { background: var(--border-md); }
.job-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-md); }
.job-card-num { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-lg); color: var(--cyan); }
.job-card-service { font-size: var(--text-xs); color: var(--text-muted); margin: 2px 0; }
.job-card-customer { font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.job-card-meta { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-2); flex-wrap: wrap; }
.job-card-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: var(--radius-md); border: 1.5px solid var(--border-md); background: var(--surface); cursor: pointer; font-weight: var(--fw-semibold); transition: all var(--dur-fast) var(--ease-out); }
.btn-xs:hover { background: var(--bg); }
.btn-xs.advance { border-color: var(--cyan); color: var(--cyan); }
.btn-xs.advance:hover { background: var(--cyan-10); }
.btn-xs.danger  { border-color: var(--magenta); color: var(--magenta); }
.btn-xs.danger:hover  { background: var(--magenta-10); }
.btn-xs.success { border-color: var(--status-ready); color: var(--status-ready); }
.btn-xs.success:hover { background: rgba(0,200,100,0.1); }

/* ── STAT CARDS ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--space-5);
  transition: all var(--dur-fast) var(--ease-out);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--fw-semibold); }
.stat-card-value { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-3xl); margin: var(--space-1) 0; }
.stat-card-sub { font-size: var(--text-xs); color: var(--text-muted); }
.stat-card-icon { width: 40px; height: 40px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); }
.stat-card-icon.cyan    { background: var(--cyan-10);    color: var(--cyan); }
.stat-card-icon.magenta { background: var(--magenta-10); color: var(--magenta); }
.stat-card-icon.yellow  { background: var(--yellow-10);  color: var(--yellow); }
.stat-card-icon.green   { background: rgba(0,200,100,.1); color: var(--status-ready); }

/* ── CHART CONTAINER ── */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.chart-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.chart-card-title { font-weight: var(--fw-bold); font-size: var(--text-base); }

/* ── SERVICE LIST ── */
.service-list { display: flex; flex-direction: column; gap: var(--space-2); }
.service-row {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  transition: all var(--dur-fast) var(--ease-out);
}
.service-row:hover { border-color: var(--border-md); }
.service-row-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-row-info { flex: 1; min-width: 0; }
.service-row-name { font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.service-row-cat  { font-size: var(--text-xs); color: var(--text-muted); }
.service-row-price { font-weight: var(--fw-bold); font-size: var(--text-base); color: var(--cyan); min-width: 80px; text-align: right; }
.service-row-actions { display: flex; gap: var(--space-2); }
.toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border-md); border-radius: 22px;
  transition: all var(--dur-base) var(--ease-out);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: all var(--dur-base) var(--ease-out);
}
input:checked + .toggle-slider { background: var(--cyan); }
input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── INVENTORY ── */
.inventory-list { display: flex; flex-direction: column; gap: var(--space-2); }
.inventory-row {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-4);
}
.inventory-row.low { border-color: var(--magenta-20); background: var(--magenta-10); }
.inventory-bar { flex: 1; }
.inventory-bar-track { height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; margin-top: 4px; }
.inventory-bar-fill  { height: 100%; border-radius: var(--radius-full); background: var(--cyan); transition: width 1s var(--ease-out); }
.inventory-row.low .inventory-bar-fill { background: var(--magenta); }
.inventory-qty { font-weight: var(--fw-bold); font-size: var(--text-base); min-width: 50px; text-align: right; }
.low-badge { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;}50%{opacity:.5;} }

/* ── SETTINGS ── */
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-5); margin-bottom: var(--space-4); }
.settings-section-title { font-weight: var(--fw-bold); font-size: var(--text-base); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.qr-card { text-align: center; padding: var(--space-6); }
.qr-canvas { border: 4px solid var(--border); border-radius: var(--radius-lg); display: inline-block; margin: var(--space-4) 0; }

/* ── JOB DETAIL MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--space-4);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius-2xl);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  padding: var(--space-6); box-shadow: var(--shadow-xl);
  transform: translateY(16px); transition: transform var(--dur-base) var(--ease-out);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.modal-title { font-family: var(--font-heading); font-weight: var(--fw-bold); font-size: var(--text-xl); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: var(--space-1); border-radius: var(--radius-md); }
.modal-close:hover { background: var(--bg); color: var(--text); }
.detail-row { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.detail-row:last-child { border: none; }
.detail-label { color: var(--text-muted); flex-shrink: 0; margin-right: var(--space-4); }
.detail-value { font-weight: var(--fw-semibold); text-align: right; }

/* ── OWNER RESPONSIVE ── */
@media (max-width: 1024px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .owner-sidebar { transform: translateX(-100%); }
  .owner-sidebar.open { transform: translateX(0); }
  .owner-main { margin-left: 0; }
  .owner-menu-toggle { display: flex; }
  .kanban-board { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .owner-page-content { padding: var(--space-4); }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ── OWNER LOGIN PAGE ── */
.owner-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-6) var(--space-4);
}
.owner-login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); padding: var(--space-8);
  width: 100%; max-width: 400px; box-shadow: var(--shadow-xl);
}
.owner-login-logo { text-align: center; margin-bottom: var(--space-6); }
.owner-login-title { font-family: var(--font-heading); font-weight: var(--fw-black); font-size: var(--text-2xl); text-align: center; margin-bottom: var(--space-2); }
.owner-login-sub { color: var(--text-muted); font-size: var(--text-sm); text-align: center; margin-bottom: var(--space-6); }

/* ── TOAST NOTIFICATIONS ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 20px;
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-xl); max-width: 320px;
  transform: translateY(80px); opacity: 0;
  transition: all 0.35s var(--ease-out);
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 4px solid var(--status-ready); }
.toast-error   { border-left: 4px solid var(--status-cancelled); }
.toast-success::before { content: '✓'; color: var(--status-ready); font-weight: 900; }
.toast-error::before   { content: '✕'; color: var(--status-cancelled); font-weight: 900; }

/* ── FORM SELECT ── */
.form-select {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text);
  font-size: var(--text-sm); font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease-out);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-10); }

/* ── BADGE VARIANTS ── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: var(--fw-semibold); }
.badge-sm { padding: 2px 6px; font-size: 10px; }
.badge-cyan    { background: var(--cyan-10); color: var(--cyan); border: 1px solid var(--cyan-20); }
.badge-magenta { background: var(--magenta-10); color: var(--magenta); border: 1px solid var(--magenta-20); }
.badge-yellow  { background: var(--yellow-10); color: color-mix(in srgb, var(--yellow) 80%, var(--text)); border: 1px solid color-mix(in srgb,var(--yellow) 40%,transparent); }
.badge-green   { background: rgba(0,200,100,.12); color: var(--status-ready); border: 1px solid rgba(0,200,100,.25); }

/* ── FIELD ERROR ── */
.field-error {
  font-size: var(--text-xs); color: var(--status-cancelled);
  margin-top: var(--space-1); display: block;
}

/* ── LOADING SPINNER ── */
.spinner {
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MAGENTA/YELLOW CSS VARS (fallback if missing from tokens) ── */
:root {
  --magenta-10: rgba(236,72,153,.12);
  --magenta-20: rgba(236,72,153,.25);
  --yellow-10:  rgba(234,179,8,.12);
  --cyan-10:    rgba(0,188,212,.12);
  --cyan-20:    rgba(0,188,212,.25);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .kanban-board {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .kanban-col {
    min-width: 100%;
    max-height: 400px;
    margin-bottom: var(--space-2);
  }
  .quick-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .modal {
    width: 95%;
    max-height: 90vh;
    padding: var(--space-4);
  }
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-label {
    margin-bottom: 2px;
  }
  .owner-layout-root aside {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100% !important;
    z-index: 999 !important;
    transition: transform 0.2s ease;
  }
}

/* ── Bluetooth Alert Banner ── */
.bt-alert-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--cyan-20);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bt-alert-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }
