/* Instal·lacions Rastrojo · disseny de la plataforma */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --brand: #1a4f8b;
  --brand-dark: #133a66;
  --brand-soft: #e7f0fa;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --violet: #5925dc;
  --violet-soft: #f4f3ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 24px -4px rgba(16, 24, 40, .12), 0 4px 8px -2px rgba(16, 24, 40, .05);
  --focus: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 1rem; line-height: 1.25; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 1.75rem 0 .75rem; letter-spacing: -.005em; }
h3 { font-size: .95rem; font-weight: 650; margin: 0 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: .75rem; }
.hidden { display: none !important; }
.ico { flex: none; vertical-align: middle; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .05rem .35rem; font-size: .85em; }

/* ── botons i formularis ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 38px; padding: .5rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; text-decoration: none !important; white-space: nowrap; box-shadow: var(--shadow);
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #05603a; border-color: #05603a; }
.btn-danger { color: var(--danger); border-color: #fda29b; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .84rem; }
.btn-block { width: 100%; min-height: 48px; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

label { display: block; font-weight: 550; font-size: .86rem; color: var(--text-2); margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; min-height: 40px; padding: .5rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s;
}
input[type=checkbox], input[type=radio] { min-height: 0; box-shadow: none; accent-color: var(--brand); width: 16px; height: 16px; }
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
::placeholder { color: #98a2b3; }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.checkbox { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.checkbox input { width: 16px; }

/* ── targetes, taules, etiquetes ─────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: .85rem; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f9fafb; }
.table td a { font-weight: 550; color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
         background: #f2f4f7; color: var(--text-2); white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
.badge-new, .badge-submitted { background: var(--info-soft); color: var(--info); border-color: #b2ddff; }
.badge-assigned { background: var(--violet-soft); color: var(--violet); border-color: #d9d6fe; }
.badge-in_progress, .badge-processing, .badge-draft, .badge-high { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.badge-done, .badge-validated { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.badge-failed, .badge-rejected, .badge-urgent { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge-closed, .badge-cancelled, .badge-void, .badge-low { background: #f2f4f7; color: var(--muted); border-color: var(--border); }

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; font-size: .9rem; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }

.doubtful { background: var(--warn-soft) !important; border-color: #fdb022 !important; }
.doubt-note { color: var(--warn); font-size: .8rem; font-weight: 600; margin-top: .25rem; }

.demo-strip { background: #fffaeb; color: #b54708; border-bottom: 1px solid #fedf89; text-align: center; font-size: .8rem; font-weight: 600; padding: .3rem 1rem; }

.nav-soon { margin-left: auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--violet); background: var(--violet-soft); border: 1px solid #d9d6fe; border-radius: 999px; padding: .02rem .45rem; }

/* centre de comunicacions (aparador del M1) */
.soon-hero { display: flex; gap: 1.25rem; align-items: center; background: linear-gradient(135deg, var(--violet-soft), #fff 60%); border: 1px solid #d9d6fe; border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.soon-hero .hero-ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--violet); border: 1px solid #d9d6fe; flex: none; }
.soon-hero h2 { margin: 0 0 .25rem; font-size: 1.15rem; }
.soon-hero p { margin: 0; color: var(--text-2); max-width: 760px; }
.channels > .card { margin-top: 0; }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.channel { display: flex; gap: .8rem; align-items: flex-start; }
.channel .kpi-ico { background: var(--surface-2); }
.channel h3 { margin: 0 0 .15rem; }
.flow { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .5rem 0 1.25rem; }
.flow-step { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow); }
.flow .ico { color: #98a2b3; }
.mock { position: relative; opacity: .9; }
.mock::after { content: "Exemple"; position: absolute; top: -10px; right: 12px; background: var(--violet); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .1rem .55rem; letter-spacing: .03em; }
.mock .table button { pointer-events: none; }
@media (max-width: 900px) { .channels { grid-template-columns: 1fr; } .soon-hero { flex-direction: column; align-items: flex-start; } }

/* Taules: al mòbil cada fila es mostra com una targeta (sense desplaçament lateral) */
@media (max-width: 700px) {
  table.table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { padding: .7rem .95rem; border-bottom: 1px solid var(--border); }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0 !important; padding: .1rem 0; text-align: left !important; }
  .table td:empty { display: none; }
  .table td:first-child { font-weight: 600; color: var(--text); }
  .table tr.clickable:hover td { background: none; }
  .table tr.clickable:active { background: var(--surface-2); }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 500; }
  .table .hide-sm { display: none !important; }
  .filters .field { flex: 1 1 140px; min-width: 0; }
  .table td.nowrap { white-space: normal; }
  .table td .btn { margin-top: .35rem; }
}

/* Fitxes amb columna principal + lateral (part, avís) */
.grid-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } }

/* ── login ───────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(1200px 600px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 380px; padding: 1.75rem 1.75rem 1.5rem; box-shadow: var(--shadow-lg); }
.logo { display: block; height: 40px; width: auto; max-width: 100%; }
.login-card .logo { height: 46px; margin: .25rem auto .5rem; }

/* ── disseny comú (ordinador: menú lateral; mòbil: barra inferior) ── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--sidebar, #fff); border-right: 1px solid var(--border); padding: 1.25rem .85rem 1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-logo { padding: .15rem .6rem 1.1rem; }
.side-logo .logo { height: 28px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #98a2b3; padding: 1rem .7rem .35rem; }
.nav-group:first-child { padding-top: .2rem; }
.nav-item { display: flex; align-items: center; gap: .7rem; color: var(--text-2); padding: .55rem .7rem; border-radius: var(--radius-sm); text-decoration: none !important; font-weight: 550; position: relative; }
.nav-item .ico { color: #667085; }
.nav-item:hover { background: #f2f4f7; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-item.active .ico { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; font-weight: 700; line-height: 1.5; min-width: 1.4rem; text-align: center; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .85rem .3rem 0; border-top: 1px solid var(--border); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .85rem; flex: none; }
.who { flex: 1; min-width: 0; color: var(--text) !important; text-decoration: none !important; line-height: 1.3; }
.who strong { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: .76rem; color: var(--muted); }
.link-btn { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; }
.link-btn:hover { color: var(--text); }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { padding: 1.75rem 2.25rem 2.5rem; max-width: 1440px; width: 100%; }
.narrow { max-width: 640px; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--brand); padding: .75rem 1rem; position: sticky; top: 0; z-index: 5; }
  .topbar a { color: var(--text); }
  .top-logo .logo { height: 22px; }
  .top-title { flex: 1; text-align: right; font-weight: 650; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 1rem 1rem 96px; }
  .narrow { max-width: none; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border); z-index: 6; padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); gap: .2rem; }
  .bottom-nav > a, .bottom-nav > details > summary { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4rem .2rem; color: var(--muted); font-weight: 600; font-size: .72rem; text-decoration: none; cursor: pointer; border-radius: 10px; }
  .bottom-nav > a, .bottom-nav > details { flex: 1; }
  .bottom-nav > a.active, .bottom-nav > details.active > summary { color: var(--brand); background: var(--brand-soft); }
  .bottom-nav .nav-count { position: absolute; top: 1px; left: calc(50% + 6px); margin: 0; font-size: .64rem; min-width: 1.1rem; padding: 0 .3rem; }
  .bottom-nav summary { list-style: none; }
  .bottom-nav summary::-webkit-details-marker { display: none; }
  .more { position: relative; }
  .more-menu { position: absolute; bottom: calc(100% + 10px); right: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: .4rem; display: flex; flex-direction: column; }
  .more-menu a { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 550; }
  .more-menu a .nav-count { position: static; margin-left: auto; }
  .more-menu a.active { background: var(--brand-soft); color: var(--brand-dark); }
  .more-menu form { border-top: 1px solid var(--border); margin-top: .3rem; padding: .65rem .75rem .35rem; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  h1 { font-size: 1.3rem; }
}
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters .field { margin: 0; min-width: 150px; }

/* panell d'inici */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem;
       color: var(--muted); text-decoration: none !important; box-shadow: var(--shadow); font-size: .85rem; transition: box-shadow .12s, border-color .12s; }
.kpi:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi-ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.kpi-n { display: block; font-size: 1.65rem; font-weight: 700; color: var(--text); line-height: 1.15; letter-spacing: -.02em; }
.kpi-warn .kpi-ico { background: var(--warn-soft); color: var(--warn); }
.kpi-bad .kpi-ico { background: var(--danger-soft); color: var(--danger); }
.kpi-bad .kpi-n { color: var(--danger); }
.kpi-ok .kpi-ico { background: var(--ok-soft); color: var(--ok); }
.section-title { display: flex; align-items: center; gap: .5rem; }
.section-title .ico { color: var(--muted); }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .sub { margin: .15rem 0 0; color: var(--muted); }
.show-sm { display: none; }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; } .kpi { padding: .8rem; } .kpi-ico { width: 36px; height: 36px; } }

/* selector dia/mes */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.seg a { padding: .35rem .8rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.seg a.active { background: var(--brand); color: #fff; }

/* calendari mensual */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-head { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 .3rem; }
.month-day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-height: 104px; padding: .35rem .4rem; color: inherit; text-decoration: none !important; display: flex; flex-direction: column; gap: 3px; }
.month-day:hover { border-color: var(--brand); }
.month-day.weekend { background: #fafbfc; }
.month-day.past { opacity: .65; }
.month-day.today { border: 2px solid var(--brand); }
.month-day.empty { background: transparent; border: 0; }
.month-num { font-weight: 700; font-size: .9rem; }
.month-chip { display: flex; align-items: center; gap: .3rem; background: #f2f4f7; border-radius: 6px; padding: .1rem .35rem; font-size: .78rem; }
.month-who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-n { font-weight: 700; }
.month-urgent { background: var(--danger); color: #fff; border-radius: 999px; width: 15px; height: 15px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.month-total { display: none; }
@media (max-width: 700px) {
  .month { gap: 3px; }
  .month-head { padding: 0; text-align: center; }
  .month-day { min-height: 58px; padding: .3rem .25rem; align-items: center; }
  .month-chip, .month-num .small { display: none; }
  .month-total { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .3rem; border-radius: 999px;
                 background: var(--brand-soft); color: var(--brand-dark); font-size: .75rem; font-weight: 700; }
  .month-total.urgent { background: var(--danger); color: #fff; }
}

/* tauler d'assignació */
.board { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.col { background: #f2f4f7; border: 1px solid var(--border); border-radius: var(--radius); width: 250px; flex: 0 0 250px; display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.col-unassigned { background: #fff7e6; position: sticky; left: 0; z-index: 2; box-shadow: 6px 0 10px -6px rgba(16,24,40,.25); }
.col.hidden-col { display: none; }
.ticket.filtered { display: none; }
.board-tools { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.board-tools input[type=search] { max-width: 260px; }
.worker-picker { position: relative; }
.worker-picker summary { list-style: none; cursor: pointer; }
.worker-picker summary::-webkit-details-marker { display: none; }
.worker-picker .menu { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.15); padding: .5rem; max-height: 60vh; overflow-y: auto; min-width: 230px; }
.worker-picker .menu label { font-weight: 500; padding: .25rem .3rem; }
.col-head { padding: .6rem .75rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.col-head .count { font-weight: 600; color: var(--muted); font-size: .85rem; }
.col-body { padding: 0 .5rem .6rem; min-height: 80px; overflow-y: auto; flex: 1; }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .65rem; margin-bottom: .5rem; box-shadow: var(--shadow); cursor: grab; font-size: .88rem; border-left: 4px solid #98a2b3; }
.ticket.prio-urgent { border-left-color: var(--danger); }
.ticket.prio-high { border-left-color: #f79009; }
.ticket.prio-low { border-left-color: #d0d5dd; }
.ticket .t-title { font-weight: 650; color: var(--text); }
.ticket .t-meta { color: var(--muted); font-size: .8rem; }
.ticket.sortable-ghost { opacity: .4; }
.ticket.sortable-chosen { cursor: grabbing; }

/* ── pantalles de l'operari ── */
.task-card { display: block; color: inherit; text-decoration: none !important; border-left: 5px solid #98a2b3; }
.task-card.prio-urgent { border-left-color: var(--danger); }
.task-card.prio-high { border-left-color: #f79009; }
.task-card .t-title { font-weight: 700; font-size: 1.02rem; }
.big-actions { display: grid; gap: .6rem; margin: 1rem 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem .9rem; margin: 0; align-items: center; }
.kv dt .ico { color: var(--muted); }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; }

.rec-btn { width: 120px; height: 120px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 1rem; font-weight: 700; margin: 1rem auto; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(180, 35, 24, .35); cursor: pointer; }
.rec-btn.recording { animation: pulse 1.2s infinite; background: #7a1a12; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(180,35,24,.5); } 70% { box-shadow: 0 0 0 18px rgba(180,35,24,0); } 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0); } }
.rec-timer { text-align: center; font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 1.5rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.line-item { display: grid; grid-template-columns: 1fr 90px 36px; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.line-item.mat { grid-template-columns: 1fr 70px 70px 36px; }
@media (max-width: 700px) {
  .line-item { grid-template-columns: 1fr 84px 44px; }
  .line-item.mat { grid-template-columns: 1fr 1fr 44px; padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
  .line-item.mat > input:first-child { grid-column: 1 / -1; }
}
.line-item .btn { padding: .4rem; }
