/* ── Fonts ─────────────────────────────────────────────────── */
/* Same family as the TICventari website, dossier and video: Fraunces for the
   wordmark and page titles, Hanken Grotesk for text, JetBrains Mono for data. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #F5F4F0;
  --bg-card:     #FFFFFF;
  --bg-hover:    #F0EFE9;
  --bg-active:   #EAEAE4;
  --border:      #E2E1DA;
  --border-dark: #C8C7BF;
  --text:        #1A1A18;
  --text-2:      #5C5B56;
  --text-3:      #6B6961;  /* ≥4.5:1 on every light surface, incl. --bg-active (WCAG AA) */
  --accent:      #0B7A63;  /* TICventari teal — 5.3:1 on white */
  --accent-soft: #E0F1EC;
  --green:       #27500A; --green-bg: #EAF3DE; --green-bd: #C5DFA8;
  --amber:       #633806; --amber-bg: #FAEEDA; --amber-bd: #EFC97A;
  --red:         #791F1F; --red-bg:   #FCEBEB; --red-bd:   #EFA8A8;
  --blue:        #0C447C; --blue-bg:  #E6F1FB; --blue-bd:  #85B7EB;
  --purple:      #3C3489; --purple-bg:#EEEDFE; --purple-bd:#B0ACEF;
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: #FFFFFF;
  --select-arrow: 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='%236B6961' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --sidebar-w:   232px;
  --radius-sm:   5px;
  --radius-md:   8px;
  --radius-lg:   10px;
  --shadow:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
}

/* ── Dark theme ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #161512;
  --bg-card:     #1F1E1B;
  --bg-hover:    #27261F;
  --bg-active:   #2F2E26;
  --border:      #2B2A23;
  --border-dark: #3D3B33;
  --text:        #EDECE5;
  --text-2:      #A8A69C;
  --text-3:      #9A988E;  /* ≥4.5:1 on every dark surface, incl. --bg-active (WCAG AA) */
  --accent:      #4FD0B0;  /* 8.7:1 on --bg-card */
  --accent-soft: #123A31;
  --green:       #9BCB66; --green-bg: #1B2A11; --green-bd: #3B5826;
  --amber:       #E0A766; --amber-bg: #2C200E; --amber-bd: #5C4322;
  --red:         #E78A8A; --red-bg:   #2D1414; --red-bd:   #5C2525;
  --blue:        #6FAEE5; --blue-bg:  #0F1F2D; --blue-bd:  #23456A;
  --purple:      #A29CEA; --purple-bg:#1A1830; --purple-bd:#3A3568;
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: #06201A;
  --select-arrow: 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='%239A988E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --shadow:      0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.30);
  color-scheme:  dark;
}

html, body { height: 100%; }
body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;  /* prevent digit jitter in tables and counts */
}

a { color: inherit; text-decoration: none; }

/* ── Layout ────────────────────────────────────────────────── */
.layout        { display: flex; height: 100vh; overflow: hidden; }
.sidebar       { width: var(--sidebar-w); background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.main-content  { flex: 1; overflow-y: auto; padding: 28px 32px; min-width: 0; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar-logo  { padding: 20px 18px 16px; border-bottom: 1px solid var(--border); }
.sidebar-logo .app-name, .mobile-topbar__title { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.app-name span, .mobile-topbar__title span { color: var(--accent); }
.sidebar-logo .school   { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logo--brand    { display: flex; align-items: center; gap: 11px; }
.sidebar-logo--brand > div { min-width: 0; }
.sidebar-logo-img       { width: 34px; height: 34px; object-fit: contain; border-radius: 7px; flex-shrink: 0; background: #fff; padding: 2px; border: 1px solid var(--border); }

/* ── Settings: logo editor ─────────────────────────────────── */
.logo-editor   { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.logo-preview  { width: 120px; height: 120px; display: grid; place-items: center; flex-shrink: 0; background: #fff; border: 1px dashed var(--border-dark); border-radius: var(--radius-lg); overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 8px; transition: opacity .15s; }
.logo-empty    { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #6B6961; } /* preview box is always white, even in dark mode */
.logo-empty i  { font-size: 26px; }
.logo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; min-width: 200px; }
.checkbox-row  { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }

.nav-section   { font-size: 12px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; padding: 14px 18px 4px; }
.nav-link      { display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 14px; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s; white-space: nowrap; }
.nav-link i    { font-size: 16px; flex-shrink: 0; }
.nav-link:hover{ background: var(--bg-hover); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--text); font-weight: 600; border-left: 3px solid var(--accent); padding-left: 15px; }
.nav-link.active i { color: var(--accent); }
.nav-spacer    { flex: 1; }
.nav-bottom    { border-top: 1px solid var(--border); padding: 8px 0; }

/* Sidebar nav container + bottom user/logout bits (extracted from inline styles) */
.sidebar-nav   { flex: 1; padding: 8px 0; }
.nav-user      { font-size: 13px; color: var(--text-3); padding: 6px 18px; cursor: default; }
.nav-user i    { font-size: 14px; }
.role-badge    { font-size: 12px; background: var(--bg-active); padding: 1px 6px; border-radius: 20px; margin-left: 2px; }
.logout-form   { margin: 0; }
.nav-link--button { width: 100%; border: none; background: none; cursor: pointer; text-align: left; font-family: inherit; }

/* ── Global search trigger (sidebar) ─────────────────────────── */
.global-search-trigger {
  display: flex; align-items: center; gap: 8px;
  width: calc(100% - 24px); margin: 12px 12px 0;
  padding: 7px 10px; font-size: 13px; color: var(--text-3);
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; font-family: inherit;
}
.global-search-trigger:hover { background: var(--bg-active); color: var(--text-2); }
.global-search-trigger i     { font-size: 14px; }
.global-search-trigger span:first-of-type { flex: 1; text-align: left; }
.kbd-hint {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-3);
  background: var(--bg-card); border: 1px solid var(--border-dark);
  border-radius: 4px; padding: 1px 5px;
}

/* ── Page header ───────────────────────────────────────────── */
.page-header   { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; gap: 12px 16px; }
.page-header-left .page-title { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--text); }
.page-header-left .page-sub   { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.page-header-right { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
/* Medium screens: the sidebar already shows who is signed in, so give the room to the action buttons. */
@media (max-width: 1200px) { .page-header .user-chip { display: none; } }
.user-chip     { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 20px; font-size: 13px; color: var(--text-2); }
.user-avatar   { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-bg); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb    { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.breadcrumb a  { color: var(--text-3); transition: color .12s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb i  { font-size: 12px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn           { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 14px; font-family: 'Hanken Grotesk', system-ui, sans-serif; font-weight: 500; border-radius: var(--radius-md); border: 1px solid var(--border-dark); background: var(--bg-card); color: var(--text); cursor: pointer; transition: background .12s, opacity .12s; white-space: nowrap; text-decoration: none; }
.btn:hover     { background: var(--bg-hover); }
.btn i         { font-size: 15px; }
.btn-primary   { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: transparent; }
.btn-primary:hover { opacity: .85; background: var(--btn-primary-bg); }
.btn-danger    { border-color: var(--red-bd); color: var(--red); background: var(--bg-card); }
.btn-danger:hover  { background: var(--red-bg); }
.btn-sm        { padding: 5px 10px; font-size: 13px; }
.btn-sm i      { font-size: 14px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card          { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.card-title    { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title i  { font-size: 15px; color: var(--text-3); }

/* ── Stat cards ────────────────────────────────────────────── */
.stats-grid    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card     { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.stat-label    { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.stat-label i  { font-size: 14px; }
.stat-value    { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 28px; font-weight: 500; line-height: 1; color: var(--text); }
.stat-sub      { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* Per-type device counters on the devices list */
.type-counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.type-card     { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; cursor: pointer; transition: border-color .15s; }
.type-card:hover { border-color: var(--text-3); }
.type-card--active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.type-card-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding-right: 18px; }
.type-card-value { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 24px; font-weight: 500; line-height: 1; color: var(--text); }
.type-card-export { position: absolute; top: 10px; right: 10px; color: var(--text-3); text-decoration: none; opacity: 0; transition: opacity .15s; }
.type-card:hover .type-card-export,
.type-card:focus-within .type-card-export,
.type-card-export:focus-visible { opacity: 1; }
@media (hover: none) { .type-card-export { opacity: 1; } }
.type-card-export:hover { color: var(--text); }

/* ── Pills / badges ────────────────────────────────────────── */
.pill          { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pill-green    { background: var(--green-bg);  color: var(--green);  }
.pill-amber    { background: var(--amber-bg);  color: var(--amber);  }
.pill-red      { background: var(--red-bg);    color: var(--red);    }
.pill-blue     { background: var(--blue-bg);   color: var(--blue);   }
.pill-purple   { background: var(--purple-bg); color: var(--purple); }
.pill-gray     { background: var(--bg-hover);  color: var(--text-2); }
.dot           { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Alerts / flash ────────────────────────────────────────── */
.alert         { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 16px; }
.alert i       { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.alert-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-bd); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap    { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; }
table          { width: 100%; border-collapse: collapse; font-size: 14px; }
thead          { border-bottom: 1px solid var(--border); }
th             { font-size: 12px; color: var(--text-3); font-weight: 500; text-align: left; padding: 10px 14px; letter-spacing: .05em; text-transform: uppercase; background: var(--bg); white-space: nowrap; }
td             { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr       { transition: background .1s; }
tbody tr:hover { background: var(--bg-hover); }
.mono          { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 13px; color: var(--text-2); }
.text-sm       { font-size: 13px; }
.text-muted    { color: var(--text-3); }

/* Row actions — show on hover */
.row-actions   { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .15s; justify-content: flex-end; }
tr:hover .row-actions,
tr:focus-within .row-actions { opacity: 1; }
/* Touch screens have no hover: keep row actions always visible there. */
@media (hover: none) { .row-actions { opacity: 1; } }
.icon-btn      { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); font-size: 14px; transition: background .12s, color .12s; }
.icon-btn:hover        { background: var(--bg-hover); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-bg); color: var(--red); border-color: var(--red-bd); }

/* ── Toolbar / filters ─────────────────────────────────────── */
.toolbar       { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search-wrap   { position: relative; flex: 1; min-width: 200px; }
.search-wrap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--text-3); pointer-events: none; }
.search-input  { width: 100%; padding: 7px 10px 7px 34px; font-size: 14px; border: 1px solid var(--border-dark); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text); font-family: 'Hanken Grotesk', system-ui, sans-serif; transition: border-color .15s; }
.search-input:focus  { outline: none; border-color: var(--accent); }
/* Beats the generic input[type=text] padding, which is more specific than
   .search-input and made the magnifier icon cover the first letters. */
.search-wrap .search-input { padding-left: 34px; }
select.filter  { padding: 7px 30px 7px 10px; font-size: 13px; border: 1px solid var(--border-dark); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text); font-family: 'Hanken Grotesk', system-ui, sans-serif; appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 8px center; cursor: pointer; }
select.filter:focus { outline: none; border-color: var(--accent); }

/* ── Pagination ────────────────────────────────────────────── */
.pagination    { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.page-btns     { display: flex; gap: 4px; }
.page-btn      { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--text-2); text-decoration: none; transition: background .12s; }
.page-btn:hover  { background: var(--bg-hover); }
.page-btn.active { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: transparent; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group    { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label          { font-size: 13px; font-weight: 500; color: var(--text-2); }
label .req     { color: var(--red); margin-left: 2px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], textarea, select.form-select {
  padding: 8px 10px; font-size: 14px; border: 1px solid var(--border-dark); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text); font-family: 'Hanken Grotesk', system-ui, sans-serif;
  transition: border-color .15s; width: 100%;
}
input:focus, textarea:focus, select.form-select:focus { outline: none; border-color: var(--accent); }
textarea       { resize: vertical; min-height: 80px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
select.form-select { appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-hint     { font-size: 12px; color: var(--text-3); }
/* Server-side validation error on a single field (device and license forms) */
.field-error   { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--red); }
.field-error i { font-size: 14px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.form-actions  { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ── Detail fields ─────────────────────────────────────────── */
.field-grid    { display: grid; grid-template-columns: 1fr 1fr; }
.field         { padding: 11px 0; border-bottom: 1px solid var(--border); }
.field:nth-last-child(-n+2) { border-bottom: none; }
.field-label   { font-size: 12px; color: var(--text-3); margin-bottom: 3px; letter-spacing: .02em; }
.field-value   { font-size: 14px; color: var(--text); }

/* ── Timeline ──────────────────────────────────────────────── */
.timeline      { display: flex; flex-direction: column; }
.tl-item       { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: none; }
.tl-icon       { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.tl-body       { flex: 1; min-width: 0; }
.tl-title      { font-size: 14px; font-weight: 500; }
.tl-sub        { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.tl-date       { font-size: 12px; color: var(--text-3); font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; margin-top: 3px; }

/* ── Two-col detail layout ─────────────────────────────────── */
.detail-grid   { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.stack         { display: flex; flex-direction: column; gap: 16px; }

/* ── Upload zone ───────────────────────────────────────────── */
.upload-zone   { border: 2px dashed var(--border-dark); border-radius: var(--radius-lg); padding: 40px 24px; text-align: center; background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--bg-hover); }
.upload-zone i { font-size: 36px; color: var(--text-3); display: block; margin-bottom: 10px; }
.upload-zone p { font-size: 14px; color: var(--text-2); }
.upload-zone small { font-size: 12px; color: var(--text-3); display: block; margin-top: 4px; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 100; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal         { background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 440px; box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.modal-title   { font-size: 15px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.modal-close   { cursor: pointer; color: var(--text-3); font-size: 18px; background: none; border: 0; padding: 4px; line-height: 1; border-radius: var(--radius-sm); display: inline-flex; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.confirm-message { font-size: 14px; color: var(--text-2); line-height: 1.6; overflow-wrap: anywhere; }
/* Solid red for the button that confirms a deletion (the outlined .btn-danger is for triggers). */
.btn-danger-solid       { background: var(--red); border-color: transparent; color: var(--bg-card); }
.btn-danger-solid:hover { background: var(--red); opacity: .88; }

/* ── Global search modal (Ctrl/Cmd+K) ────────────────────────── */
.search-modal-overlay { align-items: flex-start; }
.search-modal {
  margin-top: 10vh; max-width: 560px; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; max-height: 70vh;
}
.search-modal__input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.search-modal__input-wrap i { font-size: 18px; color: var(--text-3); }
.search-modal__input {
  flex: 1; border: none; background: none; font-size: 15px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif; color: var(--text);
}
.search-modal__input:focus { outline: none; }
.search-modal__results { overflow-y: auto; padding: 8px 0; }
.search-modal__hint { padding: 24px 18px; text-align: center; font-size: 14px; color: var(--text-3); }

.search-group__title {
  padding: 8px 18px 4px; font-size: 12px; font-weight: 600; color: var(--text-3);
  letter-spacing: .06em; text-transform: uppercase;
}
.search-result-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 18px;
  color: var(--text); text-decoration: none;
}
.search-result-item i { font-size: 16px; color: var(--text-3); flex-shrink: 0; }
.search-result-item:hover,
.search-result-item--active { background: var(--bg-hover); }
.search-result-item__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.search-result-item__primary   { font-size: 14px; font-weight: 500; }
.search-result-item__secondary { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Bar chart ─────────────────────────────────────────────── */
.bar-row       { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-label     { width: 90px; font-size: 12px; color: var(--text-2); text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track     { flex: 1; height: 7px; background: var(--bg-active); border-radius: 4px; overflow: hidden; }
.bar-fill      { height: 100%; border-radius: 4px; transition: width .5s ease; }
.bar-count     { width: 30px; text-align: right; font-size: 12px; color: var(--text-3); font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; flex-shrink: 0; }

/* ── Error page ────────────────────────────────────────────── */
.error-wrap    { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.error-card    { text-align: center; }
.error-code    { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 72px; font-weight: 500; color: var(--text-3); line-height: 1; }
.error-msg     { font-size: 16px; color: var(--text-2); margin-top: 12px; }

/* ── Misc helpers ──────────────────────────────────────────── */
.flex          { display: flex; }
.flex-center   { align-items: center; }
.gap-8         { gap: 8px; }
.gap-16        { gap: 16px; }
.mt-8          { margin-top: 8px; }
.mt-16         { margin-top: 16px; }
.mb-16         { margin-bottom: 16px; }
.w-full        { width: 100%; }
.text-right    { text-align: right; }
.warranty-expired { color: var(--red); }
.warranty-soon    { color: var(--amber); }
.empty-state      { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-state i    { font-size: 40px; display: block; margin-bottom: 12px; }
.empty-state p    { font-size: 14px; }

/* ── Device list extras ────────────────────────────────────── */
.th-check        { width: 36px; padding: 10px 8px 10px 14px; }
.td-check        { padding: 11px 8px 11px 14px; }
.row-check       { cursor: pointer; width: 15px; height: 15px; }
.row-link        { cursor: pointer; }
.row--selected   { background: var(--accent-soft); }
.warranty-icon   { font-size: 13px; margin-left: 3px; }
.page-ellipsis   { display: flex; align-items: center; padding: 0 4px; color: var(--text-3); }
.page-btn i      { font-size: 14px; }

/* ── Sticky bulk-action bar (#1) ───────────────────────────── */
.bulk-bar {
  position: fixed; left: var(--sidebar-w); right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.05);
  transform: translateY(100%);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  z-index: 50;
}
[data-theme="dark"] .bulk-bar { box-shadow: 0 -4px 16px rgba(0,0,0,.45); }
.bulk-bar.is-open { transform: translateY(0); }
.bulk-bar__icon   { color: var(--accent); font-size: 18px; }
.bulk-bar__count  { font-weight: 500; color: var(--text); font-size: 14px; }
.bulk-bar__sep    { color: var(--text-3); }
.bulk-bar__label  { font-size: 13px; color: var(--text-2); }
.bulk-bar__spacer { flex: 1; }
.bulk-inline-form { display: flex; align-items: center; gap: 6px; }
.bulk-inline-form select.filter { max-width: 160px; }
.btn-status       { border-width: 1px; border-style: solid; }
.btn-status--green { border-color: var(--green-bd); color: var(--green); background: var(--green-bg); }
.btn-status--green:hover { background: var(--green-bg); filter: brightness(.97); }
.btn-status--amber { border-color: var(--amber-bd); color: var(--amber); background: var(--amber-bg); }
.btn-status--amber:hover { background: var(--amber-bg); filter: brightness(.97); }
.btn-status--gray  { border-color: var(--border-dark); color: var(--text-2); background: var(--bg-card); }
.btn-status .dot   { background: currentColor; }

/* Body padding so the sticky bar doesn't cover the last table row */
body.has-bulk-bar .main-content { padding-bottom: 80px; }

/* ── Bulk-modal inner bits ─────────────────────────────────── */
.modal-preview   { margin-bottom: 16px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.modal-preview .muted-line { margin-bottom: 6px; }
.modal-preview .tag-list   { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.modal-preview .tag-list .pill { font-size: 12px; }
.is-hidden       { display: none !important; }

/* ── Timeline icon variants (#11 extract) ──────────────────── */
.tl-icon--green  { background: var(--green-bg);  color: var(--green);  }
.tl-icon--amber  { background: var(--amber-bg);  color: var(--amber);  }
.tl-icon--red    { background: var(--red-bg);    color: var(--red);    }
.tl-icon--blue   { background: var(--blue-bg);   color: var(--blue);   }
.tl-icon--purple { background: var(--purple-bg); color: var(--purple); }
.field--full     { grid-column: 1 / -1; }

/* ── Theme switcher (segmented control) ────────────────────── */
.theme-switch     { display: flex; gap: 2px; padding: 3px; margin: 6px 14px 4px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); }
.theme-switch button {
  flex: 1; display: flex; align-items: center; justify-content: center;
  height: 26px; padding: 0; border: none; background: transparent;
  color: var(--text-3); cursor: pointer; border-radius: 4px;
  transition: background .15s, color .15s;
}
.theme-switch button:hover { color: var(--text-2); }
.theme-switch button.active {
  background: var(--bg-card); color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
[data-theme="dark"] .theme-switch button.active { box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.theme-switch i   { font-size: 14px; }

/* ── Skip link + busy state ────────────────────────────────── */
.skip-link { position: fixed; left: 12px; top: -64px; z-index: 300; padding: 10px 16px; border-radius: var(--radius-md);
             background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
.main-content:focus { outline: none; }   /* only ever focused by the skip link */

.btn.is-loading                { pointer-events: none; opacity: .8; }
.btn.is-loading > i            { display: none; }   /* the spinner takes the icon's place */
.btn.is-loading::before        { content: ''; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid currentColor;
                                 border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn.is-loading, .type-card-export.is-loading { opacity: .4; cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Accessibility ─────────────────────────────────────────── */
/* Visible keyboard focus on every interactive element. Uses
   :focus-visible so a focus ring only appears for keyboard users,
   not on mouse click. Inputs keep their existing border-color cue. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.icon-btn:focus-visible,
.page-btn:focus-visible,
.row-check:focus-visible,
.theme-switch button:focus-visible,
.modal-close:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

/* Respect the OS "reduce motion" setting: neutralise transitions and
   animations for users who request it (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .bulk-bar { transition: none; }
}

/* ── Responsive: mobile topbar + off-canvas sidebar ────────── */
/* Hidden on desktop; the media query below turns it into the sidebar's
   hamburger trigger and reveals the overlay/off-canvas behaviour. */
.mobile-topbar {
  display: none; align-items: center; gap: 12px;
  margin: -28px -32px 20px; padding: 14px 16px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.hamburger-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2); font-size: 18px; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 150;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .main-content  { padding: 20px 16px; }
  /* Bleed edge-to-edge by exactly the mobile padding (20px 16px). */
  .mobile-topbar { margin: -20px -16px 16px; }
  /* Sticky offsets count from the scroller's padding edge: pull it back up. */
  .mobile-topbar { top: -20px; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 200;
    width: min(260px, 80vw);
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }
  .sidebar.open { transform: translateX(0); }

  .stats-grid        { grid-template-columns: repeat(2, 1fr); }
  .form-grid          { grid-template-columns: 1fr; }
  .detail-grid        { grid-template-columns: minmax(0, 1fr); }
  /* nowrap: a wrapping column container sizes each line to its widest item's
     max-content, which would stretch the swipeable action row past the screen. */
  .page-header        { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .page-header-right  { flex-wrap: wrap; }
  .bulk-bar           { left: 0; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .bulk-bar__spacer, .bulk-bar__sep { display: none; }
  .bulk-inline-form   { flex: 1 1 100%; }
  .bulk-inline-form select.filter { max-width: none; flex: 1; }
  /* The wrapped bar is ~200px tall: keep the last rows reachable above it. */
  body.has-bulk-bar .main-content { padding-bottom: 230px; }
}

/* ── Sortable column headers ───────────────────────────────── */
.th-sort          { display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.th-sort i        { font-size: 14px; opacity: .55; }
.th-sort:hover    { color: var(--text); }
.th-sort:hover i  { opacity: 1; }
.th-sort.is-active, .th-sort.is-active i { color: var(--text); opacity: 1; }
.th-sort.is-active i { color: var(--accent); }
.sr-only          { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Device list filters ───────────────────────────────────── */
/* On desktop the dropdowns sit inline in the toolbar; the toggle only
   exists on phones (see the max-width: 768px block below). */
.filter-fields  { display: contents; }
.filter-toggle  { display: none; }
.sort-field     { display: none; }   /* desktop sorts via the column headers */

@media (max-width: 768px) {
  /* The name/avatar chip repeats what the sidebar already shows. */
  .page-header-right .user-chip { display: none; }
  /* Header actions: one swipeable row, main action first. */
  .page-header-right { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; }
  .page-header-right .btn-primary { order: -1; }

  /* Filters: search + a "Filtres" button; the dropdowns fold out below. */
  .filter-toggle  { display: inline-flex; }
  .filter-fields  { display: none; flex-basis: 100%; flex-direction: column; gap: 8px; }
  .filter-fields.is-open { display: flex; }
  .filter-fields select.filter { width: 100%; }
  .sort-field     { display: block; }

  /* Per-type counters: one swipeable row instead of a tall grid. */
  .type-counters  { grid-auto-flow: column; grid-auto-columns: minmax(120px, 42%); grid-template-columns: none;
                    overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .type-card      { scroll-snap-align: start; }

  /* Device table → one card per device. */
  .table-wrap:has(#device-table) { overflow: visible; }
  #device-table, #device-table tbody { display: block; }
  #device-table thead { display: none; }
  #device-table tr.device-row {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    padding: 12px 14px 12px 52px; border-bottom: 1px solid var(--border);
  }
  #device-table tr.device-row:last-child { border-bottom: none; }
  #device-table td { display: block; padding: 0; border: 0; }
  #device-table .td-check   { position: absolute; left: 14px; top: 12px; padding: 0; }
  #device-table .c-tag      { order: 1; flex: 1 1 auto; font-size: 14px; font-weight: 600; color: var(--text); }
  #device-table .c-status   { order: 2; }
  #device-table .c-model    { order: 3; flex-basis: 100%; }
  #device-table .c-model > div:first-child { font-weight: 500; }
  #device-table .c-type     { order: 4; }
  #device-table .c-cond     { order: 5; }
  #device-table .c-loc      { order: 6; }
  #device-table .c-warranty { order: 7; }
  #device-table .c-warranty::before { content: "Garantia "; font-family: 'Hanken Grotesk', system-ui, sans-serif; }
  #device-table .c-warranty.is-empty { display: none; }
  #device-table .c-actions  { order: 8; margin-left: auto; }
  #device-table .row-actions { opacity: 1; }
}

/* ── Touch screens: every control at least 44×44 (WCAG 2.5.5 / Apple HIG) ──
   Keyed on the input device, not the width: a tablet in landscape is wide
   but still used with fingers, and a desktop keeps its compact density. */
@media (pointer: coarse) {
  .btn, .btn-sm                { min-height: 44px; padding-inline: 14px; }
  .icon-btn, .page-btn         { width: 44px; height: 44px; font-size: 18px; }
  .row-actions                 { gap: 8px; }
  .th-sort                     { min-height: 44px; }
  .page-btns                   { gap: 8px; }
  .hamburger-btn               { width: 44px; height: 44px; }
  .nav-link                    { min-height: 44px; }
  .global-search-trigger       { min-height: 44px; }
  .theme-switch button         { height: 38px; }
  .modal-close                 { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -12px -12px -12px 0; }
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
  select.form-select, select.filter, .search-input { min-height: 44px; font-size: 16px; } /* 16px: no iOS zoom on focus */
  input[type=checkbox], .row-check { width: 22px; height: 22px; }
  .th-check, .td-check         { padding-inline: 12px; cursor: pointer; }
  #device-table .td-check      { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; left: 3px; top: 3px; }
  .checkbox-row                { min-height: 44px; }
  .type-card-export            { top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
  .bulk-inline-form select.filter { min-height: 44px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Utility classes (replace one-off inline styles) ───────── */
.flex           { display: flex; }
.flex-col       { display: flex; flex-direction: column; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end    { justify-content: flex-end; }
.justify-start  { justify-content: flex-start; }
.text-center    { text-align: center; }
.p-8            { padding: 8px; }
.flex-1         { flex: 1; }
.min-w-0        { min-width: 0; }
.ml-auto        { margin-left: auto; }
.cursor-pointer { cursor: pointer; }

.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }

.mt-4  { margin-top: 4px; }
.mt-6  { margin-top: 6px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mb-3  { margin-bottom: 3px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

.fs-10 { font-size: 12px; }
.fs-11 { font-size: 12px; }
.fs-13 { font-size: 14px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.fs-32 { font-size: 32px; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.italic { font-style: italic; }

.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-muted-2 { color: var(--text-2); }
.checkbox-inline { width: auto; margin-right: 6px; }
.form-narrow { max-width: 720px; }
.hidden { display: none; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.import-box--muted { background: var(--bg-hover); }
.import-error-row { padding: 0 14px 10px; background: var(--red-bg); }
.flex-wrap    { flex-wrap: wrap; }
.line-through { text-decoration: line-through; }
.text-right   { text-align: right; }
.flex-shrink-0{ flex-shrink: 0; }
.px-4         { padding: 0 4px; }

.card--flush { padding: 0; overflow: hidden; }
.tl-date-divider {
  padding: 10px 20px 6px; background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase;
}
.tl-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.tl-row--last { border-bottom: none; }
.tl-action-icon {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; margin-top: 1px;
}

.value-heading { font-weight: 500; margin-bottom: 3px; }

/* ── Component classes (replace repeated inline style blocks) */
.card-title--section { margin: 22px 0 10px; }
.dashboard-columns   { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
/* Grid items default to min-width:auto, so one long label could push a whole column past the screen. */
.dashboard-columns > *, .detail-grid > *, .import-layout > * { min-width: 0; }
.error-back-btn { margin-top: 20px; display: inline-flex; }
.table-wrap--flush   { border: none; border-radius: 0; }
.table-wrap--flush th, .table-wrap--flush td { padding-inline: 10px; }
.empty-state--compact          { padding: 20px; }
.empty-state--compact i        { font-size: 24px; }
.empty-state--sm               { padding: 16px; }

.row-link-tr { cursor: pointer; }

/* Alert feed rows (dashboard) */
.alert-row       { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.alert-row:last-child { border-bottom: none; }
.alert-row--last { border-bottom: none; }
.alert-row--top  { border-bottom: none; border-top: 1px solid var(--border); }
.alert-row__title { font-size: 14px; font-weight: 500; }

/* Detail page: icon avatar, tabs, key/value rows */
.detail-icon {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  background: var(--bg-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-3); flex-shrink: 0;
}
.count-badge {
  background: var(--blue-bg); color: var(--blue); font-size: 12px;
  padding: 1px 6px; border-radius: 20px; margin-left: 4px;
}
.tab-btn {
  flex: 1; padding: 12px 16px; font-size: 14px; font-weight: 500;
  border: none; background: none; cursor: pointer;
  color: var(--text-3); border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-bar { display: flex; border-bottom: 1px solid var(--border); }

.detail-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.detail-row--last { border-bottom: none; }

.notes-box {
  margin-top: 6px; background: var(--bg); border-radius: var(--radius-md);
  padding: 10px 12px; font-size: 14px; color: var(--text-2); line-height: 1.6;
}

.usage-value { font-size: 32px; font-weight: 600; }
.field--no-border { border-bottom: none; }
.tab-panel { padding: 16px 20px; }
.assign-current, .assign-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.assign-current { padding: 12px 0; gap: 8px; }
.assign-empty   { padding: 16px 0; gap: 10px; }
.user-avatar--lg { width: 44px; height: 44px; font-size: 16px; }
.assign-empty-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-3);
}
.meta-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.meta-row--last { border-bottom: none; }
.items-end { align-items: flex-end; }
.mt-6  { margin-top: 6px; }
.seat-assign-form { padding-top: 12px; border-top: 1px solid var(--border); }
.seat-field { margin: 0; }
.seat-field--wide   { flex: 1; min-width: 200px; }
.seat-field--narrow { flex: 1; min-width: 160px; }
.usage-summary { text-align: center; padding: 8px 0; }
.usage-bar-track { margin-top: 8px; }
.usage-percent { text-align: center; margin-top: 6px; }

/* Diff pills in the activity feed (old/new values) */
.diff-pill {
  padding: 1px 7px; border-radius: 4px; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px;
}
.diff-pill--old { background: var(--red-bg);   color: var(--red); }
.diff-pill--new { background: var(--green-bg); color: var(--green); }

/* Import "accepted values" / result boxes */
.import-box {
  padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.import-box--error { background: var(--red-bg); border-color: var(--red-bd); }
.import-box__title { font-weight: 600; margin-bottom: 4px; }
.import-box__title--error { color: var(--red); }
.import-box__title--muted { color: var(--text-2); }

/* ── Phone overrides for rules defined above this point ─────────
   Same specificity as the desktop definitions of .dashboard-columns and
   .import-layout, so they must come after them to win. */
@media (max-width: 768px) {
  .dashboard-columns, .import-layout { grid-template-columns: minmax(0, 1fr); }
}
