/* ============================================================
   POS App — global styles
   ============================================================ */

:root {
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --primary: 221 83% 53%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --accent: 210 40% 96%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 71% 45%;
  --warning: 38 92% 50%;
  --ring: 221 83% 53%;
  --radius: 0.5rem;

  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
}

[data-theme="dark"] {
  --background: 222 47% 11%;
  --foreground: 210 40% 98%;
  --card: 222 47% 13%;
  --muted: 217 33% 17%;
  --muted-foreground: 215 20% 65%;
  --border: 217 33% 20%;
  --input: 217 33% 20%;
  --primary: 217 91% 60%;
  --primary-foreground: 222 47% 11%;
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
  --accent: 217 33% 17%;
  --destructive: 0 73% 50%;
  --destructive-foreground: 210 40% 98%;
}

* {
  box-sizing: border-box;
}

html.preload * {
  transition: none !important;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition:
    width 0.2s ease,
    transform 0.2s ease;
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section {
  display: none;
}
.sidebar.collapsed .nav a {
  justify-content: center;
  padding: 0.5rem;
}

html.sidebar-initial-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.brand .logo {
  color: hsl(var(--primary));
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: hsl(var(--muted-foreground));
  border-radius: 4px;
}
.sidebar-toggle:hover {
  background: hsl(var(--muted));
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  margin: 1rem 0.5rem 0.25rem;
  font-weight: 600;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s;
}
.nav a:hover {
  background: hsl(var(--muted));
}
.nav a.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.nav a.active svg {
  color: inherit;
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid hsl(var(--border));
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 25;
}
.sidebar-backdrop.show {
  display: block;
}

/* ===== Main content ===== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}
.sidebar.collapsed ~ .main,
html.sidebar-initial-collapsed .main {
  margin-left: var(--sidebar-w-collapsed);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
}
.breadcrumb .current {
  font-weight: 600;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

.content {
  padding: 1.5rem;
  max-width: 100%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  color: hsl(var(--foreground));
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
}
.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}
.btn-icon {
  padding: 0.5rem;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.btn-primary:hover:not(:disabled) {
  background: hsl(var(--primary) / 0.9);
}

.btn-outline {
  border-color: hsl(var(--border));
}
.btn-outline:hover:not(:disabled) {
  background: hsl(var(--muted));
}

.btn-ghost:hover:not(:disabled) {
  background: hsl(var(--muted));
}

.btn-danger {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
}
.btn-danger:hover:not(:disabled) {
  background: hsl(var(--destructive) / 0.9);
}

.btn-success {
  background: hsl(var(--success));
  color: white;
  border-color: hsl(var(--success));
}
.btn-success:hover:not(:disabled) {
  background: hsl(var(--success) / 0.9);
}

/* ===== Forms ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: 6px;
  font-size: 0.875rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition:
    border 0.15s,
    box-shadow 0.15s;
  font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}
input.has-error,
select.has-error,
textarea.has-error {
  border-color: hsl(var(--destructive));
}
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0.75rem 0 0.25rem;
}
.field-error {
  color: hsl(var(--destructive));
  font-size: 0.75rem;
  margin: -0.5rem 0 0.5rem;
}
.muted {
  color: hsl(var(--muted-foreground));
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
}

.input-sm {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
}

.form-check {
  padding: 0.25rem 0;
  font-size: 0.875rem;
}
.form-check label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* ===== Card ===== */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}
.card-desc {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== KPIs ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.kpi-label {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
}
.kpi-value.lg-text {
  font-size: 1rem;
}
.kpi-icon {
  color: hsl(var(--muted-foreground));
}

/* ===== Tables ===== */
.table-wrap {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
table thead th {
  text-align: left;
  padding: 0.625rem 0.875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  white-space: nowrap;
}
table tbody td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}
table tbody tr:last-child td {
  border-bottom: none;
}
table tbody tr:hover {
  background: hsl(var(--muted) / 0.3);
}
th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ===== Alerts ===== */
.alert {
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  border: 1px solid transparent;
}
.alert-success {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  border-color: hsl(var(--success) / 0.2);
}
.alert-error {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / 0.2);
}
.alert-info {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.2);
}
.alert-warning {
  background: hsl(var(--warning) / 0.1);
  color: hsl(var(--warning));
  border-color: hsl(var(--warning) / 0.2);
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.badge-success {
  background: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
}
.badge-danger {
  background: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
}
.badge-warning {
  background: hsl(var(--warning) / 0.15);
  color: hsl(var(--warning));
}
.badge-info {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

/* ===== Utilities ===== */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.text-xs {
  font-size: 0.75rem;
}
.text-sm {
  font-size: 0.875rem;
}
.hidden {
  display: none;
}
.w-full {
  width: 100%;
}
.flex-1 {
  flex: 1;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Pagination ===== */
.pagination {
  display: inline-flex;
  gap: 0.25rem;
}
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 0.75rem;
  cursor: pointer;
}
.page-num:hover {
  background: hsl(var(--muted));
}
.page-num.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.page-num:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Login screen ===== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  padding: 1rem;
}
.login-wrapper {
  width: 100%;
  max-width: 400px;
}
.login-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}
.login-card button[type="submit"] {
  width: 100%;
  margin-top: 1rem;
}
.login-hint {
  margin-top: 1rem;
  padding: 0.625rem;
  background: hsl(var(--muted));
  border-radius: 6px;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.login-theme {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

/* ===== POS Terminal layout ===== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1rem;
  height: calc(100vh - 56px - 3rem);
}
.pos-products {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
}
.pos-cart {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.pos-cart-header {
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.pos-cart-items {
  flex: 1;
  overflow: auto;
  padding: 0.5rem;
}
.pos-cart-footer {
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.3);
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.pos-product-tile {
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 0.625rem;
  cursor: pointer;
  background: hsl(var(--card));
  transition: all 0.15s;
}
.pos-product-tile:hover {
  border-color: hsl(var(--primary));
  transform: translateY(-1px);
}
.pos-product-tile .name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
}
.pos-product-tile .price {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-top: 0.25rem;
}
.pos-product-tile .stock {
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}
.pos-product-tile .stock.low {
  color: hsl(var(--destructive));
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  padding: 0.5rem;
  align-items: center;
  border-bottom: 1px solid hsl(var(--border));
}
.cart-line .name {
  font-size: 0.8125rem;
  font-weight: 500;
}
.cart-line .meta {
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.qty-control button {
  width: 24px;
  height: 24px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qty-control input {
  width: 50px;
  text-align: center;
  padding: 2px 4px;
}

.pos-totals {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}
.pos-totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}
.pos-totals .row.grand {
  border-top: 1px solid hsl(var(--border));
  padding-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

/* responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0 !important;
  }
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Misc ===== */
.kv-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}
.kv-grid dt {
  color: hsl(var(--muted-foreground));
}
.kv-grid dd {
  margin: 0;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   APPEND TO public/assets/css/style.css
   New styles for the redesigned product pages.
   These piggyback on your existing CSS variables (--border, --muted, etc.)
   ============================================================ */

/* ---------- Form layout: side + main ---------- */
.form-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  align-items: start;
}
.form-side .card {
  margin-bottom: 1rem;
}
.form-main .card {
  margin-bottom: 1rem;
}
.form-main .card:last-child {
  margin-bottom: 5rem; /* leave room for sticky action bar */
}
@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Grid helpers ---------- */
.grid {
  display: grid;
  gap: 1rem;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1100px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Image uploader ---------- */
.image-uploader {
  text-align: center;
}
.image-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px dashed hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--muted) / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-preview.large {
  aspect-ratio: 1 / 1;
  max-width: 280px;
  margin: 0 auto;
}
.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: hsl(var(--muted-foreground, var(--foreground)) / 0.5);
}

/* ---------- Row thumbnail (in tables) ---------- */
.row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 0.375rem;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: hsl(var(--foreground) / 0.4);
}
.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Required field marker ---------- */
.req {
  color: hsl(var(--destructive));
  margin-left: 2px;
}

/* ---------- Check row (icon + label + description) ---------- */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid hsl(var(--border));
  cursor: pointer;
}
.check-row:last-child {
  border-bottom: none;
}
.check-row input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.check-row > div > div:first-child {
  font-weight: 500;
  font-size: 0.875rem;
}

/* ---------- Status row (key-value list) ---------- */
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}
.status-row:last-child {
  border-bottom: none;
}

/* ---------- Metric grid (KPI-style boxes inside a card) ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.metric {
  padding: 0.75rem;
  background: hsl(var(--muted) / 0.4);
  border-radius: 0.375rem;
}
.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
@media (max-width: 768px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Sticky action bar at bottom of form ---------- */
.form-actions {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--background, 0 0% 100%));
  border-top: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
  margin: 1rem -1rem -1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  box-shadow: 0 -2px 8px hsl(0 0% 0% / 0.04);
  z-index: 10;
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.filter-search svg {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--foreground) / 0.4);
  pointer-events: none;
}
.filter-search input {
  padding-left: 2rem;
  width: 100%;
}

/* ---------- Data table refinements ---------- */
.data-table {
  width: 100%;
}
.data-table th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: hsl(var(--foreground) / 0.6);
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  background: hsl(var(--muted) / 0.4);
  border-bottom: 1px solid hsl(var(--border));
}
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: hsl(var(--muted) / 0.3);
}
.row-title {
  font-weight: 500;
  color: hsl(var(--foreground));
  text-decoration: none;
}
.row-title:hover {
  color: hsl(var(--primary, 220 90% 56%));
  text-decoration: underline;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: hsl(var(--foreground) / 0.5);
}
.empty-state svg {
  color: hsl(var(--foreground) / 0.3);
  margin-bottom: 1rem;
}
.empty-state h3 {
  color: hsl(var(--foreground));
  margin: 0 0 0.5rem;
}
.empty-state p {
  margin: 0 0 1.5rem;
}

/* ---------- Radio group (used in import page) ---------- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.radio-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}
.radio-group label:hover {
  background: hsl(var(--muted) / 0.3);
}
.radio-group input[type="radio"]:checked + div {
  /* highlight selection - parent label will visually update via :has() if supported */
}
.radio-group label:has(input:checked) {
  border-color: hsl(var(--primary, 220 90% 56%));
  background: hsl(var(--primary, 220 90% 56%) / 0.05);
}
.radio-group input[type="radio"] {
  margin-top: 0.15rem;
}
.radio-group label > div > div:first-child {
  font-weight: 500;
  font-size: 0.875rem;
}
