:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #eef5f5;
  --ink: #183139;
  --muted: #62777d;
  --line: #d8e3e5;
  --brand: #0b6269;
  --brand-dark: #084b51;
  --brand-soft: #dff1f1;
  --accent: #d6a436;
  --danger: #b94040;
  --danger-soft: #fde9e7;
  --warning: #a5650a;
  --warning-soft: #fff2d6;
  --success: #197149;
  --success-soft: #e3f5eb;
  --info: #2a6f9b;
  --info-soft: #e7f1f8;
  --sidebar: 260px;
  --topbar: 68px;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(21, 58, 64, .08);
  --shadow-strong: 0 18px 45px rgba(10, 64, 70, .18);
  --focus: 0 0 0 3px rgba(11, 98, 105, .18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; max-width: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; max-width: 100%; overflow-x: clip; font-size: 15px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout */
.topbar { position: fixed; z-index: 50; inset: 0 0 auto 0; height: var(--topbar); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-inner { height: 100%; display: grid; grid-template-columns: auto minmax(220px, 420px) auto; align-items: center; gap: 24px; padding: 0 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); min-width: 220px; }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, var(--brand), #12939b); color: #fff; font-weight: 800; letter-spacing: .04em; box-shadow: 0 8px 20px rgba(11,98,105,.22); }
.brand-copy { display: grid; font-weight: 800; font-size: 18px; line-height: 1.1; }
.brand-copy small { color: var(--muted); font-weight: 700; font-size: 9px; letter-spacing: .12em; margin-top: 4px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; color: var(--ink); }
.global-search { position: relative; width: 100%; }
.global-search input { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 10px 16px 10px 40px; outline: 0; }
.global-search input:focus { border-color: var(--brand); box-shadow: var(--focus); background: #fff; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .58; }
.top-actions { display: flex; align-items: center; gap: 9px; justify-self: end; }
.top-icon { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 800; }
.badge-count { position: absolute; right: -5px; top: -5px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; border: 2px solid #fff; }
.user-menu { position: relative; }
.user-button { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 5px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); }
.user-button:hover { background: var(--surface-soft); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; }
.user-copy { display: grid; text-align: left; line-height: 1.2; min-width: 125px; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 10px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-strong); overflow: hidden; }
.user-dropdown.open { display: block; }
.user-dropdown a, .user-dropdown button { display: block; width: 100%; padding: 11px 14px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-soft); }
.sidebar { position: fixed; z-index: 40; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; display: flex; flex-direction: column; justify-content: space-between; }
.side-nav { display: grid; gap: 4px; }
.nav-label { margin: 18px 10px 6px; color: #91a0a4; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #425960; font-weight: 650; }
.side-nav a span { width: 20px; text-align: center; }
.side-nav a:hover { background: var(--surface-soft); color: var(--brand-dark); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.pilot-card { display: grid; gap: 3px; margin: 20px 5px 4px; padding: 13px; border-radius: 12px; background: linear-gradient(145deg, #eef8f8, #fff8e6); border: 1px solid #d6eaea; }
.pilot-card strong { color: var(--brand-dark); }
.pilot-card span, .pilot-card small { color: var(--muted); font-size: 12px; }
.page-shell { margin-left: var(--sidebar); padding: calc(var(--topbar) + 26px) 32px 64px; max-width: 1680px; min-height: 100vh; }
.footer { margin-left: var(--sidebar); padding: 20px 32px 30px; color: var(--muted); text-align: center; font-size: 12px; }

/* Auth */
.auth-body { background: radial-gradient(circle at top left, #dff3f2 0, transparent 42%), linear-gradient(135deg, #f6f8f9, #edf5f5); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-strong); padding: 32px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-logo .brand-mark { width: 52px; height: 52px; }
.auth-logo h1 { margin: 0; font-size: 25px; }
.auth-logo p { margin: 2px 0 0; color: var(--muted); }
.auth-note { padding: 12px 14px; border-radius: 10px; background: var(--info-soft); color: #275b7d; font-size: 13px; margin-top: 16px; }

/* Typography and headings */
.page-heading { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; margin-bottom: 24px; }
.page-heading h1 { margin: 1px 0 6px; font-size: clamp(27px, 3vw, 38px); line-height: 1.12; letter-spacing: -.025em; }
.page-heading p { margin: 0; color: var(--muted); max-width: 820px; }
.eyebrow { color: var(--brand); font-weight: 850; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: flex-end; }
h2.section-title, .section-heading h2 { margin: 0; font-size: 20px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* Buttons */
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border-radius: 10px; border: 1px solid transparent; font-weight: 750; line-height: 1.2; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); color: #fff; }
.button-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.button-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.button-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #923030; color: #fff; }
.button-warning { background: var(--warning); color: #fff; }
.button-success { background: var(--success); color: #fff; }
.button-small { min-height: 33px; padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.button-wide { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }

/* Generic panels/cards */
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 20px; }
.panel + .panel { margin-top: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
.metric-grid-five { grid-template-columns: repeat(5, minmax(145px, 1fr)); }
.metric-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "icon value" "icon small"; column-gap: 12px; align-items: center; min-height: 118px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.metric-card:hover { border-color: #aacfd1; color: var(--ink); transform: translateY(-2px); }
.metric-icon { grid-area: icon; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; }
.metric-label { grid-area: label; color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-card strong { grid-area: value; font-size: 25px; line-height: 1; }
.metric-card small { grid-area: small; color: var(--muted); font-size: 10px; }
.metric-danger .metric-icon { background: var(--danger-soft); color: var(--danger); }
.metric-warning .metric-icon { background: var(--warning-soft); color: var(--warning); }
.metric-success .metric-icon { background: var(--success-soft); color: var(--success); }
.metric-info .metric-icon { background: var(--info-soft); color: var(--info); }
.pilot-notice { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #bfe1e1; }
.pilot-notice.external { background: var(--warning-soft); border-color: #f0d69f; }
.pilot-notice span { color: var(--muted); }
.two-column { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.three-column { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack { display: grid; gap: 14px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.empty-state { padding: 32px 22px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.field { grid-column: span 6; display: grid; gap: 6px; align-content: start; }
.field-third { grid-column: span 4; }
.field-quarter { grid-column: span 3; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { color: var(--ink); font-weight: 750; font-size: 13px; }
.required::after { content: " *"; color: var(--danger); }
.field input, .field select, .field textarea, .input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cbd9dc; border-radius: 9px; background: #fff; color: var(--ink); outline: 0; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--brand); box-shadow: var(--focus); }
.field small, .help-text { color: var(--muted); font-size: 11px; line-height: 1.4; }
.field-check { display: flex; align-items: flex-start; gap: 9px; padding-top: 8px; }
.field-check input { width: 18px; height: 18px; min-height: auto; margin-top: 2px; }
.help-bubble { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; font-weight: 900; cursor: help; vertical-align: text-bottom; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-form .field { min-width: 170px; flex: 1; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-prefix input { padding-left: 25px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.radio-card { position: relative; display: block; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: var(--focus); background: var(--brand-soft); }
.radio-card strong { display: block; }
.radio-card small { color: var(--muted); }
.file-drop { padding: 18px; border: 2px dashed #b9cfd2; border-radius: 12px; background: #f9fbfb; text-align: center; }
.file-list { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 12px; }

/* Wizard */
.wizard { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.wizard-nav { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: #f8fbfb; overflow-x: auto; }
.wizard-tab { position: relative; min-width: 118px; padding: 13px 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; }
.wizard-tab span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; margin: 0 auto 4px; background: #dce7e8; color: #52676c; }
.wizard-tab.active { background: #fff; color: var(--brand-dark); }
.wizard-tab.active span { background: var(--brand); color: #fff; }
.wizard-tab.completed span { background: var(--success); color: #fff; }
.wizard-panel { display: none; padding: 24px; }
.wizard-panel.active { display: block; }
.wizard-panel-head { margin-bottom: 20px; }
.wizard-panel-head h2 { margin: 0 0 5px; }
.wizard-panel-head p { margin: 0; color: var(--muted); }
.wizard-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: #f8fbfb; }
.wizard-progress { color: var(--muted); font-size: 12px; font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.review-box { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfb; }
.review-box small { color: var(--muted); display: block; }
.review-box strong { display: block; margin-top: 3px; white-space: pre-wrap; }
.checklist-review { display: grid; gap: 8px; margin-top: 16px; }
.check-row { display: flex; gap: 9px; align-items: center; padding: 9px 11px; border-radius: 9px; background: var(--surface-soft); }
.check-row.ok::before { content: "✓"; color: var(--success); font-weight: 900; }
.check-row.warning::before { content: "!"; color: var(--warning); font-weight: 900; }

/* Units editor */
.units-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.units-list { display: grid; gap: 12px; }
.unit-row { display: grid; grid-template-columns: 38px minmax(70px,.65fr) minmax(170px,1.4fr) minmax(145px,1.2fr) minmax(80px,.7fr) 75px 105px 42px; gap: 9px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.unit-number { display: grid; place-items: center; width: 32px; height: 42px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; }
.unit-cell { min-width: 0; }
.unit-cell label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.unit-cell input, .unit-cell select { width: 100%; height: 42px; border: 1px solid #cbd9dc; border-radius: 8px; padding: 7px 8px; background: #fff; }
.unit-remove { height: 42px; border: 1px solid #e7c5c5; border-radius: 8px; background: #fff; color: var(--danger); font-size: 18px; }
.unit-summary { margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--brand-soft); display: flex; justify-content: space-between; gap: 16px; }

/* Filters, tabs, tables */
.tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 12px; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 700; }
.tab.active { color: var(--brand-dark); border-color: var(--brand); }
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(140px, 1fr)) auto; gap: 9px; margin-bottom: 16px; align-items: end; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid #e8eff0; vertical-align: middle; text-align: left; }
.data-table th { background: #f4f8f8; color: #577077; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fbfb; }
.data-table .numeric { text-align: right; white-space: nowrap; }
.data-table .center { text-align: center; }
.clickable-row { cursor: pointer; }
.mobile-cards { display: none; gap: 10px; }
.mobile-card { display: block; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.mobile-card-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mobile-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.mobile-card dt { color: var(--muted); font-size: 10px; }
.mobile-card dd { margin: 0; font-weight: 700; font-size: 12px; }

/* Status */
.status, .badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; background: #edf2f3; color: #4a6268; }
.status-received, .status-submitted, .status-validation { background: var(--info-soft); color: var(--info); }
.status-missing_info, .status-awaiting_approval, .status-clarification { background: var(--warning-soft); color: var(--warning); }
.status-in_process, .status-cad_design, .status-model_printing, .status-milling, .status-sintering, .status-characterization, .status-layering, .status-polishing, .status-finished, .status-quality_control, .status-packaging { background: var(--brand-soft); color: var(--brand-dark); }
.status-ready, .status-applied, .status-paid, .status-approved, .status-delivered, .status-resolved { background: var(--success-soft); color: var(--success); }
.status-shipped, .status-review, .status-reported, .status-unapplied, .status-partial, .status-planned { background: #eeeafd; color: #6551a8; }
.status-overdue, .status-rejected, .status-cancelled, .status-incident, .status-rework, .status-reversed, .status-blocking { background: var(--danger-soft); color: var(--danger); }
.status-pending, .status-open { background: #eef2f3; color: #52676c; }
.priority-urgent { color: var(--danger); font-weight: 900; }
.priority-high { color: var(--warning); font-weight: 850; }

/* Pipeline / dashboard */
.pipeline { display: grid; gap: 9px; }
.pipeline-row { display: grid; grid-template-columns: 155px 1fr 40px; gap: 10px; align-items: center; }
.pipeline-label { color: var(--muted); font-size: 12px; }
.pipeline-track { height: 10px; border-radius: 999px; background: #e7eeee; overflow: hidden; }
.pipeline-fill { height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--brand), #2ea5ab); border-radius: inherit; }
.activity-list { display: grid; gap: 8px; }
.activity-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #ecf1f2; color: var(--ink); }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.activity-copy { min-width: 0; }
.activity-copy strong, .activity-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { color: var(--muted); font-size: 11px; }
.notification-list { display: grid; gap: 8px; }
.notification { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.notification.unread { border-left: 4px solid var(--brand); background: #f8fdfd; }
.notification p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.notification small { color: var(--muted); }

/* Order detail */
.order-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: start; margin-bottom: 18px; }
.order-title-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.order-title-row h1 { margin: 0; }
.order-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); margin-top: 8px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.anchor-nav { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; display: flex; gap: 5px; overflow-x: auto; padding: 8px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); }
.anchor-nav a { padding: 7px 10px; border-radius: 8px; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 750; }
.anchor-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.info-item { padding: 10px 12px; border-radius: 9px; background: #f7fafb; }
.info-item small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.info-item strong { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.unit-display { display: grid; gap: 8px; }
.unit-display-row { display: grid; grid-template-columns: 65px 1.3fr 1fr 70px 90px; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; align-items: center; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 18px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); border: 5px solid #fff; box-shadow: 0 0 0 2px #b9d9db; z-index: 1; }
.timeline-content { padding: 0 0 3px; }
.timeline-content p { margin: 2px 0; white-space: pre-wrap; }
.timeline-content small { color: var(--muted); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.file-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.file-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--brand-soft); }
.file-card strong, .file-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { color: var(--muted); }
.approval-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.quality-list { display: grid; gap: 8px; }
.quality-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.quality-item.complete { background: var(--success-soft); border-color: #bfe4d0; }
.financial-summary { display: grid; gap: 7px; }
.financial-row { display: flex; justify-content: space-between; gap: 16px; }
.financial-row.total { padding-top: 9px; border-top: 2px solid var(--line); font-size: 18px; font-weight: 900; }
.warning-box, .info-box, .success-box, .danger-box { padding: 13px 15px; border-radius: 10px; margin: 12px 0; }
.warning-box { background: var(--warning-soft); color: #71490d; border: 1px solid #efdaa8; }
.info-box { background: var(--info-soft); color: #295f80; border: 1px solid #c8e0ef; }
.success-box { background: var(--success-soft); color: #195f40; border: 1px solid #bee5cf; }
.danger-box { background: var(--danger-soft); color: #8d3333; border: 1px solid #efc6c6; }

/* Finance and benefits */
.money-big { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.aging-grid { display: grid; grid-template-columns: repeat(5, minmax(100px,1fr)); gap: 9px; }
.aging-card { padding: 12px; border-radius: 10px; background: #f7fafb; border: 1px solid var(--line); }
.aging-card small { display: block; color: var(--muted); }
.aging-card strong { display: block; margin-top: 3px; }
.reward-hero { padding: 22px; background: linear-gradient(135deg, #0b6269, #14939b); color: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.reward-hero small { color: #d8f4f4; }
.reward-hero strong { display: block; font-size: 34px; margin: 3px 0; }
.reward-progress { height: 9px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; margin: 12px 0; }
.reward-progress span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.receipt { max-width: 720px; margin: 0 auto; }
.allocation-list { display: grid; gap: 8px; }
.allocation-row { display: grid; grid-template-columns: minmax(0,1fr) 140px; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }

/* Help/support */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.help-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); }
.help-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.help-card h3 { margin: 0 0 5px; }
.help-card p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; display: grid; gap: 12px; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; }

/* Flashes and drawers */
.flash { position: relative; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; margin: 0 0 14px; border-radius: 10px; border: 1px solid; }
.flash button { border: 0; background: transparent; font-size: 20px; color: inherit; }
.flash-success { background: var(--success-soft); border-color: #b9e2ca; color: #175e3e; }
.flash-warning { background: var(--warning-soft); border-color: #efd797; color: #76500c; }
.flash-error { background: var(--danger-soft); border-color: #edc0c0; color: #883333; }
.flash-info { background: var(--info-soft); border-color: #c6deed; color: #2b6284; }
.help-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(430px, 94vw); background: #fff; box-shadow: var(--shadow-strong); transform: translateX(105%); visibility: hidden; pointer-events: none; transition: transform .2s ease, visibility 0s linear .2s; }
.help-drawer.open { transform: translateX(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
.help-drawer-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 22px; border-bottom: 1px solid var(--line); }
.help-drawer-head small { color: var(--brand); font-weight: 900; letter-spacing: .12em; }
.help-drawer-head h2 { margin: 3px 0 0; }
.help-drawer-head button { border: 0; background: transparent; font-size: 28px; }
.help-drawer-body { padding: 22px; overflow-y: auto; height: calc(100% - 90px); }
.help-drawer-body li { margin-bottom: 10px; }
.drawer-backdrop { display: none; position: fixed; z-index: 80; inset: 0; background: rgba(6,35,39,.35); }
.drawer-backdrop.open { display: block; }

/* Tour */
.tour-overlay { position: fixed; z-index: 120; inset: 0; background: rgba(4,27,30,.66); }
.tour-card { position: fixed; width: min(380px, calc(100vw - 28px)); padding: 20px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-strong); }
.tour-card h3 { margin: 5px 0; }
.tour-card p { margin: 0 0 17px; color: var(--muted); }
.tour-progress { color: var(--brand); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; }
.tour-highlight { position: relative; z-index: 121 !important; box-shadow: 0 0 0 5px rgba(255,255,255,.8), 0 0 0 9px var(--accent) !important; border-radius: 10px; background: #fff; }

/* Responsive */
@media (max-width: 1280px) {
  .metric-grid, .metric-grid-four, .metric-grid-five { grid-template-columns: repeat(3, 1fr); }
  .unit-row { grid-template-columns: 38px 75px 1.2fr 1fr 75px 65px 90px 42px; }
  .filters { grid-template-columns: minmax(220px, 2fr) repeat(2, 1fr) auto; }
  .filters .optional-filter { display: none; }
}
@media (max-width: 980px) {
  :root { --sidebar: 250px; }
  .topbar-inner { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 12px; }
  .menu-button { display: block; }
  .brand { min-width: auto; }
  .brand-copy { display: none; }
  .global-search { max-width: none; }
  .user-copy { display: none; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow-strong); }
  .sidebar.open { transform: translateX(0); }
  .page-shell, .footer { margin-left: 0; }
  .page-shell { padding: calc(var(--topbar) + 20px) 20px 54px; }
  .two-column, .detail-grid { grid-template-columns: 1fr; }
  .three-column { grid-template-columns: 1fr; }
  .wizard-nav { grid-template-columns: repeat(7, minmax(116px, 1fr)); }
  .unit-row { grid-template-columns: 38px repeat(2, minmax(0,1fr)); }
  .unit-number { grid-row: span 4; align-self: stretch; height: auto; }
  .unit-remove { grid-column: 3; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar { height: 62px; }
  :root { --topbar: 62px; }
  .topbar-inner { grid-template-columns: auto auto 1fr; }
  .global-search { display: none; }
  .top-actions { justify-self: end; }
  .top-icon { width: 36px; height: 36px; }
  .page-shell { padding: calc(var(--topbar) + 16px) 12px 46px; }
  .page-heading, .order-hero { display: grid; grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 28px; }
  .heading-actions, .order-actions { justify-content: flex-start; }
  .button { min-height: 43px; }
  .metric-grid, .metric-grid-four, .metric-grid-five { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .metric-card { min-height: 100px; padding: 12px; }
  .metric-icon { width: 36px; height: 36px; }
  .metric-card strong { font-size: 21px; }
  .panel { padding: 15px; }
  .field, .field-third, .field-quarter { grid-column: 1 / -1; }
  .form-grid { gap: 13px; }
  .wizard-panel { padding: 16px 13px; }
  .wizard-footer { position: sticky; z-index: 12; bottom: 0; padding: 10px 12px; }
  .wizard-progress { display: none; }
  .unit-row { grid-template-columns: 34px 1fr; padding: 10px; }
  .unit-number { grid-row: span 8; }
  .unit-remove { grid-column: 2; width: 100%; }
  .unit-summary { display: grid; }
  .filters { grid-template-columns: 1fr; }
  .filters .optional-filter { display: block; }
  .table-wrap.desktop-table { display: none; }
  .mobile-cards { display: grid; }
  .info-grid { grid-template-columns: 1fr; }
  .unit-display-row { grid-template-columns: 55px 1fr; }
  .unit-display-row > :nth-child(n+3) { grid-column: 2; }
  .aging-grid { grid-template-columns: repeat(2, 1fr); }
  .allocation-row { grid-template-columns: 1fr; }
  .anchor-nav { top: calc(var(--topbar) + 4px); margin-inline: -4px; }
  .auth-card { padding: 24px 18px; }
  .pilot-notice { align-items: flex-start; display: grid; }
  .footer { padding-inline: 12px; }
}
@media print {
  .topbar, .sidebar, .footer, .heading-actions, .anchor-nav, .help-drawer, .drawer-backdrop, .button, .form-actions { display: none !important; }
  .page-shell { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; }
  .panel, .card { box-shadow: none; break-inside: avoid; }
}

/* V1.1 component refinements */
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0 0 4px; }
.panel-head p { margin: 0; color: var(--muted); }
.field-half { grid-column: span 6; }
.narrow-panel { width: min(720px, 100%); }
.inset-panel { margin-top: 16px; box-shadow: none; background: #f9fbfb; }
.summary-list { margin: 0; padding-left: 22px; }
.summary-list li { margin: 5px 0; }
.compact-field { min-width: 145px !important; }
.compact-field input, .compact-field select { min-height: 38px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.auth-brand .auth-logo { flex: 0 0 auto; width: 54px; height: 54px; margin: 0; }
.auth-brand h1 { margin: 0; font-size: 28px; }
.auth-brand p { margin: 3px 0 0; color: var(--muted); }
.auth-card form { display: grid; gap: 15px; }
.auth-help { margin-top: 18px; padding: 13px 14px; border-radius: 11px; background: #f6f9fa; border: 1px solid var(--line); }
.auth-help p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.error-panel { width: min(720px, 100%); margin: 70px auto; text-align: center; padding: 42px 28px; }
.error-code { display: inline-grid; place-items: center; min-width: 86px; height: 58px; padding: 0 16px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-dark); font-size: 28px; font-weight: 900; }
.error-panel h1 { margin: 18px 0 6px; }
.error-panel p { color: var(--muted); }
.error-panel .form-actions { justify-content: center; }

.catalog-list { display: grid; gap: 14px; }
.catalog-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.catalog-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); }
.catalog-historical { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.catalog-historical p { margin: 4px 0; color: var(--muted); }

/* Order wizard and unit editor */
.units-toolbar { align-items: flex-end; }
.units-toolbar > .inline-form:last-child { flex: 1; justify-content: flex-end; }
.unit-row {
  grid-template-columns: 38px 74px minmax(155px,1.25fr) minmax(135px,1.05fr) 74px 68px minmax(145px,1.15fr) 105px 42px;
  align-items: end;
}
.unit-row > input[type="hidden"] { display: none; }
.unit-description { min-width: 0; }
.unit-summary strong { color: var(--brand-dark); }

@media (max-width: 1280px) {
  .unit-row { grid-template-columns: 38px 70px minmax(145px,1.2fr) minmax(130px,1fr) 70px 65px minmax(130px,1fr) 95px 42px; }
  .unit-cell label { font-size: 9px; }
}
@media (max-width: 1080px) {
  .unit-row { grid-template-columns: 38px repeat(3, minmax(0,1fr)); }
  .unit-number { grid-row: span 3; align-self: stretch; height: auto; }
  .unit-remove { grid-column: 4; }
  .units-toolbar, .units-toolbar > .inline-form:last-child { display: grid; justify-content: stretch; }
}
@media (max-width: 720px) {
  .field-half { grid-column: 1 / -1; }
  .catalog-historical { display: grid; }
  .catalog-actions { align-items: stretch; }
  .catalog-actions form, .catalog-actions .inline-form { width: 100%; }
  .catalog-actions .button { width: 100%; }
  .unit-row { grid-template-columns: 34px 1fr; align-items: stretch; }
  .unit-number { grid-row: span 9; }
  .unit-remove { grid-column: 2; }
  .units-toolbar .inline-form { display: grid; grid-template-columns: 1fr; width: 100%; }
  .units-toolbar .button, .compact-field { width: 100%; min-width: 0 !important; }
}

/* V1.2 - Red local, proceso visible y ayuda persistente */
.guided-help-indicator.is-on::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
}
.help-drawer-body > .button,
.help-drawer-body > form { margin-top: 10px; }
.tour-actions-wrap { flex-wrap: wrap; justify-content: flex-end; }
.tour-actions-wrap .button { flex: 1 1 120px; }

.wizard-step-guide {
  display: grid;
  gap: 4px;
  margin: 16px 20px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #c9e0e2;
  background: linear-gradient(135deg, #eff9f9, #fffdf5);
}
.wizard-step-guide strong { font-size: 17px; color: var(--brand-dark); }
.wizard-step-guide p { margin: 0; color: var(--muted); }
.wizard-step-kicker { color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.wizard-step-guide.guide-pulse { animation: guidePulse .42s ease; }
body[data-guided-help-enabled="0"] .wizard-step-guide { display: none; }
@keyframes guidePulse {
  0% { transform: translateY(-2px); box-shadow: 0 0 0 0 rgba(11,98,105,.18); }
  100% { transform: translateY(0); box-shadow: 0 0 0 8px rgba(11,98,105,0); }
}

.process-panel { scroll-margin-top: calc(var(--topbar) + 54px); border-color: #b9d7d9; }
.process-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  margin-bottom: 16px;
}
.process-phase {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  min-width: 155px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfc;
}
.process-phase::after {
  content: "";
  position: absolute;
  top: 28px;
  right: -9px;
  width: 10px;
  height: 2px;
  background: var(--line);
}
.process-phase:last-child::after { display: none; }
.process-phase small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.process-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e9ea;
  color: #587075;
  font-weight: 900;
}
.process-phase.completed { background: var(--success-soft); border-color: #b8ddc8; }
.process-phase.completed .process-dot { background: var(--success); color: #fff; }
.process-phase.active { background: var(--brand-soft); border-color: #8fc5c8; box-shadow: 0 0 0 3px rgba(11,98,105,.08); }
.process-phase.active .process-dot { background: var(--brand); color: #fff; }
.process-change-box {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 18px;
  padding: 18px;
  border-radius: 13px;
  background: #f8fbfb;
  border: 1px solid var(--line);
}
.process-instructions h3 { margin-top: 0; }
.compact-steps { gap: 9px; }
.compact-steps li { grid-template-columns: 30px 1fr; }
.compact-steps li::before { width: 28px; height: 28px; font-size: 12px; }
.compact-steps span { color: var(--muted); font-size: 12px; }
.process-form { display: grid; gap: 12px; }
.quick-stage-form { grid-column: 2; display: grid; gap: 6px; }
.quick-stage-form small { color: var(--muted); text-align: center; }
.process-shortcut { position: sticky; top: calc(var(--topbar) + 16px); }

.network-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.network-url-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-radius: 12px;
  border: 1px dashed #89b9bc;
  background: #f1fafa;
}
.network-url-box code { flex: 1 1 260px; overflow-wrap: anywhere; font-size: 15px; color: var(--brand-dark); }
.network-qr { width: min(250px, 100%); margin: 0 auto; display: block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.network-status-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.network-status-list li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; }
.network-status-list li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-weight: 900; }

@media (max-width: 980px) {
  .process-change-box { grid-template-columns: 1fr; }
  .quick-stage-form { grid-column: 1; }
  .process-shortcut { position: static; }
  .network-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wizard-step-guide { margin: 10px 12px 0; padding: 12px; }
  .tour-card { max-height: calc(100vh - 28px); overflow-y: auto; }
  .tour-actions-wrap .button { flex-basis: 100%; }
  .process-track { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
  .process-change-box { padding: 13px; }
}

/* V1.3 piloto interno: sincronización, pacientes, precios y prueba clínica. */
.sync-banner {
  position: sticky;
  top: 74px;
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 16px;
  padding: 11px 14px;
  border: 1px solid #b7dce0;
  border-radius: 12px;
  background: #eaf8fa;
  box-shadow: 0 8px 20px rgba(11, 95, 102, .1);
}
.sync-banner[hidden] { display: none !important; }
.sync-banner span { flex: 1 1 320px; font-weight: 700; color: var(--brand-dark); }

.patient-picker { position: relative; }
.autocomplete-results {
  position: absolute;
  top: calc(100% - 20px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 43, 52, .16);
  padding: 6px;
}
.autocomplete-results[hidden] { display: none; }
.autocomplete-option {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
}
.autocomplete-option:hover, .autocomplete-option:focus { background: var(--brand-soft); outline: none; }
.autocomplete-option span, .autocomplete-empty { color: var(--muted); font-size: 13px; }
.autocomplete-empty { padding: 12px; }

.pricing-alert {
  border: 1px solid #cad8df;
  border-radius: 12px;
  background: #f7fafb;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.pricing-alert.is-ok { background: #edf9f2; border-color: #acd7bd; color: #155c36; }
.pricing-alert.is-error { background: #fff3f2; border-color: #efb7b2; color: #8d2920; }
.price-cell output { display: block; min-height: 42px; padding: 10px 12px; border-radius: 9px; background: #f5f8f9; border: 1px solid var(--border); font-weight: 800; color: var(--brand-dark); }
.order-price-preview { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #eaf7f7, #f8fbfb); border: 1px solid #c5e1e2; margin-bottom: 16px; }
.order-price-preview strong { font-size: 28px; color: var(--brand-dark); }
.order-price-preview small { width: 100%; color: var(--muted); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.choice-grid.compact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-card input { margin-top: 3px; }
.choice-card span { display: grid; gap: 3px; }
.choice-card small { color: var(--muted); }

.photo-guide { border: 1px solid #cedde1; border-radius: 12px; background: #f8fbfc; padding: 12px 14px; margin-top: 14px; }
.photo-guide summary { cursor: pointer; font-weight: 800; color: var(--brand-dark); }
.photo-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.photo-guide-grid article { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 12px; }
.photo-guide-grid p { margin-bottom: 0; color: var(--muted); }
.compact-photo-guide { margin: 8px 0 12px; color: var(--muted); }

.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.record-card { border: 1px solid var(--border); border-radius: 13px; background: #fff; padding: 14px; display: grid; gap: 10px; }
.stack-list { display: grid; gap: 12px; }
details.record-card > summary { cursor: pointer; list-style: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
details.record-card > summary::-webkit-details-marker { display: none; }
details.record-card > summary > div { display: grid; gap: 3px; }
details.record-card > summary small { color: var(--muted); }
details.record-card[open] > summary { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.block { display: block; }
.record-card.status-received, .record-card.status-scanned, .record-card.status-returned { border-left: 5px solid #37a66b; }
.record-card.status-incomplete, .record-card.status-damaged { border-left: 5px solid #c9483c; }
.record-card.status-pending, .record-card.status-in_transit { border-left: 5px solid #dfa338; }
.record-card-head, .trial-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-card-head > div, .trial-card-head > div { display: grid; gap: 3px; }
.record-card-head small { color: var(--muted); }

.trial-panel { scroll-margin-top: 96px; }
.trial-rule { border-left: 5px solid #d7952d; background: #fff7e8; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.trial-card { border: 1px solid #c9dde0; border-radius: 14px; background: #fbfdfd; padding: 16px; display: grid; gap: 12px; }
.meta-list { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.prewrap { white-space: pre-wrap; }
.internal-note { border-left: 5px solid #536675; background: #f3f6f8; padding: 12px 14px; border-radius: 10px; }

.order-control-card { display: grid; gap: 10px; }
.control-row { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px; background: #f5f7f8; }
.control-row > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.control-row > div { display: grid; gap: 2px; }
.control-row small { color: var(--muted); }
.control-row.ok { background: #edf9f2; }
.control-row.ok > span { background: #2f9661; color: #fff; }
.control-row.warning { background: #fff5e9; }
.control-row.warning > span { background: #d18b24; color: #fff; }

.file-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.file-card { display: grid; gap: 4px; border: 1px solid var(--border); border-radius: 11px; padding: 12px; background: #fff; text-decoration: none; color: inherit; }
.file-card:hover { border-color: var(--brand); background: var(--brand-soft); }
.file-card small { color: var(--muted); }

@media (max-width: 720px) {
  .sync-banner { top: 62px; }
  .record-grid, .photo-guide-grid, .choice-grid { grid-template-columns: 1fr; }
  .record-card-head, .trial-card-head { flex-direction: column; }
  .order-price-preview strong { font-size: 24px; }
}

/* V1.3 setup wizard */
.setup-summary { display: grid; gap: 18px; }
.setup-summary.setup-ready { border-color: rgba(33, 135, 83, .45); }
.setup-summary.setup-pending { border-color: rgba(217, 145, 31, .45); }
.setup-progress { height: 12px; border-radius: 999px; background: rgba(14, 52, 59, .10); overflow: hidden; }
.setup-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b5f66, #2f8f83); }
.setup-grid { display: grid; gap: 14px; }
.setup-step { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.setup-step-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; background: rgba(217, 145, 31, .14); color: #9a5e0a; }
.setup-step.is-complete .setup-step-number { background: rgba(33, 135, 83, .14); color: #17683e; }
.setup-step-copy h2 { margin: 2px 0 6px; font-size: 1.05rem; }
.setup-step-copy p { margin: 0; }
@media (max-width: 720px) {
  .setup-step { grid-template-columns: 44px minmax(0, 1fr); }
  .setup-step > .button { grid-column: 1 / -1; width: 100%; }
}

/* V1.3 - Catálogo editable sin una lista interminable de formularios abiertos */
.treatment-editor { padding: 0; overflow: hidden; }
.treatment-editor > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; }
.treatment-editor > summary::-webkit-details-marker { display: none; }
.treatment-editor > summary::after { content: "+"; font-size: 24px; font-weight: 700; color: var(--teal-700, #0b626a); }
.treatment-editor[open] > summary::after { content: "−"; }
.treatment-editor > summary:hover { background: #f4fafa; }
.treatment-editor > summary strong { display: block; }
.treatment-editor > summary small { display: block; margin-top: 3px; color: var(--muted, #60777b); }
.treatment-editor > form { border-top: 1px solid var(--line, #dbe7e8); padding: 18px; }
.summary-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 720px) {
  .treatment-editor > summary { align-items: flex-start; }
  .summary-badges { display: none; }
}

/* V2.7: flujo simple y acceso práctico */
.password-field{display:flex;gap:.5rem;align-items:center}.password-field input{flex:1}.request-grid{display:grid;gap:.75rem;margin-top:1rem}.request-card{border:1px solid #d8dde6;border-radius:12px;padding:1rem}.request-card.is-pending{border-left:4px solid #d49a00}.request-card.is-resolved{opacity:.78}.request-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.simple-process .process-step-body small{display:none}.simple-process .process-step-actions .field{display:none}.simple-process .process-step-actions form{margin:0}.simple-process .process-step-actions{display:flex;gap:.5rem;flex-wrap:wrap}

/* V2.8 - operación rápida */
.quick-checks{display:flex;flex-wrap:wrap;gap:.65rem;margin:1rem 0}.quick-check{display:flex;align-items:center;gap:.45rem;border:1px solid var(--border);border-radius:10px;padding:.65rem .8rem;background:var(--surface)}.quick-check input{width:1.2rem;height:1.2rem}.quick-check.read-only.is-done{font-weight:700}.compact-columns{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.compact-columns summary,.simple-details summary,.legacy-process-wrap>summary{cursor:pointer;padding:.4rem 0}.unit-material-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.7rem}.inline-form{display:inline}.inline-form select{min-width:120px}.legacy-process-wrap{margin:0 0 1rem}.legacy-process-wrap>summary{font-size:.9rem;color:var(--muted)}.compact-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}@media(max-width:760px){.compact-columns{grid-template-columns:1fr}.quick-check{flex:1 1 44%}}


/* V2.8.4 — Producción limpia: una decisión por pantalla */
.production-heading { margin-bottom: 14px; }
.production-tabs { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.production-tabs a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 750; }
.production-tabs a:hover { border-color: #a9cfd1; background: var(--surface-soft); }
.production-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.production-tabs small { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.06); font-size: 11px; }
.production-tabs a.active small { background: rgba(255,255,255,.18); }
.production-main { padding: 18px; }
.production-table th, .production-table td { white-space: nowrap; vertical-align: middle; }
.production-table .pick-col { width: 34px; }
.production-table tr.is-grouped { background: #fafcfc; }
.production-actionbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-top: 14px; }
.production-material-select { width: min(420px, 100%); }
.priority-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: capitalize; }
.priority-pill.priority-urgent, .priority-pill.priority-alta, .priority-pill.priority-high { background: var(--danger-soft); color: var(--danger); }
.production-groups { margin-top: 18px; }
.production-group-list { display: grid; gap: 8px; margin-top: 10px; }
.production-group-card { display: grid; grid-template-columns: minmax(180px,1fr) minmax(140px,.5fr); gap: 8px 14px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.production-group-card strong { margin-right: 10px; }
.production-group-card span, .production-group-card small { color: var(--muted); }
.production-inventory { margin-top: 16px; padding: 0; overflow: visible; }
.production-inventory > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; }
.production-inventory > summary::-webkit-details-marker { display:none; }
.production-inventory > summary span:first-child { display: grid; }
.production-inventory > summary small { color: var(--muted); font-weight: 500; }
.production-inventory > summary span:last-child { color: var(--brand); font-weight: 800; }
.inventory-content { padding: 0 18px 18px; }
.compact-inventory-form { margin-bottom: 14px; box-shadow: none; }
.inventory-table td { vertical-align: middle; }
.cost-popover { position: relative; }
.cost-popover > summary { color: var(--brand); font-weight: 750; cursor: pointer; white-space: nowrap; }
.cost-popover form { display: grid; gap: 8px; min-width: 220px; padding-top: 10px; }
.cost-popover label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.cost-popover input { min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.production-footnote { margin: 12px 4px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .production-tabs { grid-template-columns: repeat(2, 1fr); }
  .production-actionbar { align-items: stretch; flex-direction: column; }
  .production-material-select { width: 100%; }
}


/* V2.8.5 — Órdenes limpias y filtros compactos */
.orders-clean-heading { margin-bottom: 12px; }
.orders-clean-heading h1 { margin-bottom: 2px; }
.orders-tabs { margin-bottom: 12px; }
.orders-tools { display: grid; grid-template-columns: minmax(320px, 1fr) auto; gap: 10px; align-items: start; margin-bottom: 14px; }
.orders-search { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.orders-search .search-icon { left: 13px; z-index: 1; }
.orders-search input { width: 100%; min-height: 42px; padding: 9px 12px 9px 38px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: 0; }
.orders-search input:focus { border-color: var(--brand); box-shadow: var(--focus); }
.orders-filter-drawer { min-width: 150px; }
.orders-filter-drawer > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 800; list-style: none; }
.orders-filter-drawer > summary::-webkit-details-marker { display: none; }
.orders-filter-drawer > summary small { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; }
.orders-filter-drawer[open] { grid-column: 1 / -1; }
.orders-filter-drawer[open] > summary { width: fit-content; margin-left: auto; }
.orders-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)) auto; gap: 9px; align-items: end; margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.orders-filter-grid .field { grid-column: auto; gap: 4px; }
.orders-filter-grid .field label { font-size: 11px; }
.orders-filter-grid .field select { min-height: 38px; padding: 7px 9px; }
.orders-filter-actions { display: flex; gap: 5px; align-items: end; }
.orders-results-panel { padding: 14px 16px 16px; }
.orders-results-head { display: flex; gap: 6px; align-items: baseline; margin-bottom: 10px; color: var(--muted); }
.orders-results-head strong { color: var(--ink); font-size: 15px; }
.orders-clean-table th, .orders-clean-table td { padding-top: 9px; padding-bottom: 9px; }
.orders-clean-table .help-text { margin-top: 2px; }
@media (max-width: 1100px) {
  .orders-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  .orders-tools { grid-template-columns: 1fr; }
  .orders-filter-drawer { width: 100%; }
  .orders-filter-drawer > summary { justify-content: space-between; }
  .orders-filter-drawer[open] > summary { width: 100%; margin-left: 0; }
  .orders-filter-grid { grid-template-columns: 1fr; }
  .orders-filter-actions { justify-content: flex-end; }
}


/* V2.8.6 — Panel realmente simple */
.dashboard-clean-heading { margin-bottom: 14px; }
.dashboard-clean-heading h1 { margin-bottom: 1px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dashboard-kpi { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.dashboard-kpi:hover { color: var(--ink); border-color: #aacfd1; }
.dashboard-kpi span { color: var(--muted); font-size: 12px; font-weight: 750; }
.dashboard-kpi strong { font-size: 25px; line-height: 1; }
.dashboard-kpi.danger { border-left: 4px solid var(--danger); }
.dashboard-kpi.warning { border-left: 4px solid var(--warning); }
.dashboard-clean-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 14px; align-items: start; }
.dashboard-clean-grid .panel { padding: 16px; }
.compact-heading { margin-bottom: 10px; }
.compact-heading h2 { font-size: 17px; }
.compact-heading p { font-size: 11px; }
.dashboard-attention-list { display: grid; }
.dashboard-attention-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #e9eff0; color: var(--ink); }
.dashboard-attention-row:last-child { border-bottom: 0; }
.dashboard-attention-row:hover { color: var(--brand-dark); }
.dashboard-attention-row strong, .dashboard-attention-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-attention-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.dashboard-attention-meta { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.dashboard-clear-state { padding: 26px 10px; color: var(--muted); text-align: center; }
.dashboard-production-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dashboard-production-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfd; color: var(--ink); }
.dashboard-production-card:hover { border-color: var(--brand); color: var(--brand-dark); }
.dashboard-production-card span { font-size: 12px; font-weight: 750; }
.dashboard-production-card strong { font-size: 21px; }
@media (max-width: 980px) {
  .dashboard-clean-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dashboard-kpis { grid-template-columns: repeat(2, 1fr); }
  .dashboard-attention-row { grid-template-columns: 1fr; gap: 5px; }
  .dashboard-attention-meta { justify-content: flex-start; }
}

/* V2.9 - selección visual de materiales y recuperación segura de captura */
.material-choice-panel{margin:14px 0 16px;padding:16px;border:1px solid rgba(161,126,53,.28);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(250,247,240,.96));box-shadow:0 8px 24px rgba(24,24,24,.05)}
.material-choice-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}.material-choice-head strong{display:block;font-size:1.02rem}.material-choice-head small{max-width:420px;color:var(--muted,#6d6d6d);text-align:right}
.material-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.material-card{appearance:none;border:1px solid #ddd4c2;background:#fff;border-radius:14px;padding:14px;text-align:left;display:grid;gap:4px;cursor:pointer;min-height:112px;transition:.16s ease}.material-card:hover{transform:translateY(-1px);border-color:#b9944a;box-shadow:0 8px 18px rgba(24,24,24,.07)}.material-card.active{border-color:#9b7428;box-shadow:0 0 0 2px rgba(155,116,40,.12);background:#fffdf8}.material-family{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:#765d2a}.material-card strong{font-size:1rem}.material-badge{font-size:.7rem;font-weight:700;letter-spacing:.06em;color:#8c6c2e}.material-card small{line-height:1.35;color:#666}
.draft-recovery{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;padding:12px 14px;border-radius:14px;border:1px solid #e0c26e;background:#fff9e7}.draft-recovery strong{display:block}.draft-recovery span{font-size:.88rem;color:#675a36}.auth-recovery{margin-top:12px;display:grid;gap:2px;text-align:center}.auth-recovery a{font-weight:700}.auth-recovery small{color:var(--muted,#747474)}
@media (max-width:720px){.material-choice-head{align-items:flex-start;flex-direction:column}.material-choice-head small{text-align:left}.draft-recovery{align-items:flex-start;flex-direction:column}.material-choice-grid{grid-template-columns:1fr}}

/* V2.9.7 — proceso compacto y accionable */
.process-panel-compact{padding:16px}.process-panel-compact .compact-heading{margin-bottom:10px}.process-compact-table-wrap{overflow-x:auto}.process-compact-table{width:100%;border-collapse:collapse}.process-compact-table th{padding:8px 10px;text-align:left;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.process-compact-table td{padding:8px 10px;border-bottom:1px solid #e9eff0;vertical-align:middle}.process-compact-row.is-current{background:#f6fbfb}.process-compact-name{display:flex;align-items:center;gap:9px;min-width:220px}.process-compact-name small{display:block;margin-top:2px;color:var(--muted);font-size:10px;max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.process-dot{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:var(--surface-soft);font-weight:800;font-size:11px}.process-compact-row.status-completed .process-dot,.process-compact-row.status-approved .process-dot{background:#e8f6ef;color:#18794e}.process-compact-action{min-width:180px}.process-inline-form{display:flex;align-items:center;gap:7px}.process-check-button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-weight:750;cursor:pointer}.process-check-button:hover{border-color:var(--brand);background:var(--surface-soft)}.process-check-button span{font-size:16px}.process-done{color:#18794e;font-weight:800}.process-more{position:relative}.process-more>summary{cursor:pointer;color:var(--brand);font-size:11px;font-weight:750;white-space:nowrap}.process-more[open]{min-width:220px}.process-more textarea,.process-more input,.process-more select{width:100%;margin-top:6px}.approval-compact{min-width:190px}.clinic-process-actions{display:flex;gap:6px;align-items:center}@media(max-width:760px){.process-compact-table thead{display:none}.process-compact-table,.process-compact-table tbody,.process-compact-table tr,.process-compact-table td{display:block;width:100%}.process-compact-row{padding:10px 0;border-bottom:1px solid var(--line)}.process-compact-table td{border:0;padding:4px 2px}.process-compact-action{min-width:0}.process-inline-form{flex-wrap:wrap}}


/* V2.9.8 — LST Connect: operación compacta + acabado visual */
.order-hero-compact { padding:16px 18px; border:1px solid rgba(11,98,105,.14); box-shadow:0 8px 24px rgba(24,49,57,.06); }
.order-hero-compact h1 { font-size:clamp(22px,2.2vw,30px); letter-spacing:-.025em; }
.order-hero-compact .order-meta { gap:7px 14px; margin-top:6px; font-size:12px; }
.order-hero-compact .order-actions { gap:6px; max-width:460px; }
.order-hero-compact .button { min-height:36px; padding:7px 10px; }

.order-more-nav { margin:8px 0 12px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.78); }
.order-more-nav > summary { min-height:38px; padding:7px 12px; cursor:pointer; color:var(--brand-dark); font-size:12px; font-weight:800; list-style:none; }
.order-more-nav > summary::-webkit-details-marker { display:none; }
.order-more-links { display:flex; flex-wrap:wrap; gap:5px; padding:0 10px 10px; }
.order-more-links a { padding:5px 8px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--muted); font-size:11px; font-weight:700; }

.process-panel-compact { border-top:3px solid var(--brand); padding:14px 16px; }
.process-panel-compact .compact-heading { margin-bottom:8px; }
.process-panel-compact .compact-heading h2 { font-size:17px; }
.process-panel-compact .compact-heading p { max-width:760px; font-size:11px; }
.process-compact-table-wrap { overflow:auto; border:1px solid var(--line); border-radius:10px; background:#fff; }
.process-compact-table { width:100%; border-collapse:collapse; font-size:12px; }
.process-compact-table th { padding:7px 9px; background:#f7fafb; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.process-compact-table td { padding:7px 9px; border-top:1px solid #edf2f3; }
.process-compact-row.is-current { background:linear-gradient(90deg,rgba(214,164,54,.09),transparent 72%); }
.process-compact-name { display:flex; align-items:center; gap:8px; }
.process-compact-name strong { font-size:12px; }
.process-compact-name small { display:block; margin-top:1px; color:var(--muted); font-size:10px; }
.process-dot { display:inline-grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:50%; background:var(--surface-soft); color:var(--brand-dark); font-size:10px; font-weight:900; }
.status-completed .process-dot,.status-approved .process-dot { background:var(--success-soft); color:var(--success); }
.process-check-button { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:4px 9px; border:1px solid rgba(11,98,105,.25); border-radius:8px; background:var(--brand-soft); color:var(--brand-dark); font-size:11px; font-weight:850; }
.process-check-button:hover { border-color:var(--brand); background:#d3ecec; }
.process-done { color:var(--success); font-size:11px; font-weight:850; }

.secondary-section { margin-top:10px; padding:12px 14px; box-shadow:none; }
.secondary-section .section-heading { margin-bottom:0; }
.secondary-section .section-heading h2 { font-size:15px; }
.secondary-section .section-heading p { font-size:10px; }
.secondary-section-body { display:none; padding-top:10px; }
.secondary-section.is-open .secondary-section-body { display:block; }
.secondary-toggle { margin-left:auto; }

.wizard-nav-compact { grid-template-columns:repeat(8,minmax(78px,1fr)); gap:5px; }
.wizard-nav-compact .wizard-tab { min-height:42px; padding:6px 7px; font-size:10px; }
.wizard-nav-compact .wizard-tab span { width:20px; height:20px; font-size:9px; }
.wizard-mode-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 10px; padding:8px 10px; border:1px solid rgba(11,98,105,.14); border-radius:10px; background:linear-gradient(90deg,rgba(223,241,241,.72),rgba(255,255,255,.9)); }
.wizard-mode-copy { display:grid; line-height:1.25; }
.wizard-mode-copy strong { font-size:12px; color:var(--brand-dark); }
.wizard-mode-copy small { color:var(--muted); font-size:10px; }
.wizard-step-guide { padding:10px 12px; }
.wizard-panel { padding:15px; }
.wizard-panel-head { margin-bottom:10px; }
.wizard-panel-head h2 { font-size:17px; }
.wizard-panel-head p { font-size:11px; }

@media (max-width:980px) {
  .wizard-nav-compact { grid-template-columns:repeat(4,1fr); }
  .order-hero-compact { padding:13px; }
}
@media (max-width:680px) {
  .wizard-nav-compact { grid-template-columns:repeat(2,1fr); }
  .wizard-mode-row { align-items:stretch; flex-direction:column; }
  .process-compact-table th:nth-child(2), .process-compact-table td:nth-child(2) { display:none; }
  .process-compact-table td { padding:8px 7px; }
  .order-hero-compact .order-actions { width:100%; }
}


/* ================= V2.9.9 MULTI-TRABAJO + IDENTIDAD LST ================= */
:root{--lst-gold:#C49A4D;--lst-copper:#B98255;--lst-black:#121417;--lst-charcoal:#2A2E33;--lst-cream:#F6F4EF}
.brand-logo{display:block;width:210px;height:48px;object-fit:contain}.brand-copy.v299-brand-copy{display:none}
.v299-heading{margin-bottom:12px}.v299-heading h1{font-size:clamp(26px,3vw,38px);letter-spacing:-.035em}.v299-card{padding:16px 18px;margin-bottom:12px;border:1px solid #dfe5e7;box-shadow:0 8px 24px rgba(15,17,19,.045)}
.v299-section-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.v299-section-title>span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--lst-black);color:var(--lst-gold);font-weight:900}.v299-section-title>div{flex:1}.v299-section-title h2{margin:0;font-size:18px}.v299-section-title p{margin:1px 0 0;color:var(--muted);font-size:11px}.compact-grid{gap:10px}.compact-grid .field label{font-size:11px}
.v299-work-table-head,.v299-work-row{display:grid;grid-template-columns:minmax(190px,1.6fr) minmax(100px,.75fr) minmax(140px,1fr) minmax(150px,1.1fr) minmax(80px,.55fr) 68px 118px 34px;gap:8px;align-items:end}.v299-work-table-head{padding:6px 8px;color:#78878b;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.v299-work-row{padding:9px 8px;border-top:1px solid #e8edef;background:#fff}.v299-work-row:first-child{border-top:1px solid var(--line)}.v299-work-row .field{min-width:0}.v299-work-row .field label{display:none}.v299-work-row input,.v299-work-row select{min-height:38px;padding:7px 8px;font-size:12px}.v299-price output{display:flex;align-items:center;min-height:38px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:#f8fafb;font-weight:850}.v299-price small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px;color:var(--muted)}.v299-order-total{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 2px;color:var(--muted)}.v299-order-total strong{color:var(--ink);font-size:18px}.v299-advanced{margin-top:10px;border:1px solid var(--line);border-radius:10px}.v299-advanced>summary{padding:10px 12px;font-weight:800;color:var(--brand-dark);cursor:pointer}.v299-advanced>div{padding:0 12px 12px}
.v299-sticky-actions{position:sticky;z-index:20;bottom:10px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;padding:12px 14px;border:1px solid rgba(196,154,77,.38);border-radius:13px;background:rgba(18,20,23,.96);color:#fff;box-shadow:0 14px 38px rgba(0,0,0,.18);backdrop-filter:blur(10px)}.v299-sticky-actions>div:first-child{display:grid}.v299-sticky-actions small{color:#c7cdd0}.v299-sticky-actions strong{font-size:22px;color:#efd394}.v299-sticky-actions span{font-size:10px;color:#aeb7bb}.v299-sticky-actions .button-primary{background:var(--lst-gold);border-color:var(--lst-gold);color:#17130d}.v299-sticky-actions .button-secondary{background:#fff;color:#1a2529}
@media(max-width:1180px){.v299-work-table-head{display:none}.v299-work-row{grid-template-columns:repeat(4,minmax(120px,1fr));align-items:start;border:1px solid var(--line);border-radius:10px;margin-bottom:8px}.v299-work-row .field label{display:block}.v299-work-row .unit-remove{align-self:center}}
@media(max-width:720px){.brand-logo{width:160px;height:42px}.v299-card{padding:12px}.v299-work-row{grid-template-columns:1fr 1fr}.v299-section-title{align-items:flex-start;flex-wrap:wrap}.v299-section-title .button{width:100%}.v299-sticky-actions{bottom:6px;align-items:stretch;flex-direction:column}.v299-sticky-actions>div:last-child{display:grid;grid-template-columns:1fr 1fr}.v299-sticky-actions .button{width:100%}}

/* V2.9.9.1 */
.v299-work-row .is-auto-field{opacity:.6}.v299-work-row .is-auto-field select{background:#f3f5f5}.v299-work-row .is-auto-field label::after{content:' · automático';font-weight:500;color:#637477}


/* =========================================================
   V2.9.9.2 — IDENTIDAD PREMIUM + LENGUAJE VISUAL OPERATIVO
   ========================================================= */
:root {
  --lst-graphite:#15171a;
  --lst-graphite-2:#23262b;
  --lst-warm:#f7f4ee;
  --lst-gold:#c49a4d;
  --lst-gold-dark:#9a6b2f;
  --lst-gold-soft:#f2e7cf;
  --lst-clinic:#2f6fa8;
  --lst-clinic-soft:#e7f1fb;
  --lst-attention:#b77a16;
  --lst-attention-soft:#fff2d9;
  --lst-done:#23734d;
  --lst-done-soft:#e5f4eb;
  --lst-block:#b94747;
  --lst-block-soft:#fdeaea;
}
.topbar { background:rgba(21,23,26,.98) !important; border-bottom-color:#30343a !important; }
.topbar .brand { min-width:250px; color:#fff !important; }
.brand-logo { width:210px; max-height:50px; object-fit:contain; object-position:left center; }
.v299-brand-copy { display:none !important; }
.topbar .top-icon, .topbar .user-button { color:#f7f4ee !important; border-color:#3a3e44 !important; background:#202328 !important; }
.topbar .global-search input { background:#24272c !important; border-color:#383c42 !important; color:#fff !important; }
.topbar .global-search input::placeholder { color:#aeb2b8; }
.sidebar { border-right-color:#e6dfd2; }
.side-nav a.active, .side-nav a:hover { background:var(--lst-gold-soft) !important; color:#5f4420 !important; }
.page-heading.v299-heading h1, .premium-order-hero h1 { letter-spacing:-.035em; }
.v299-heading-actions { display:flex; gap:8px; align-items:center; }

.button-primary, .button-lst-action {
  background:linear-gradient(135deg,var(--lst-gold),var(--lst-gold-dark)) !important;
  border-color:var(--lst-gold-dark) !important; color:#fff !important;
  box-shadow:0 7px 18px rgba(154,107,47,.18);
}
.button-primary:hover, .button-lst-action:hover { filter:brightness(.96); transform:translateY(-1px); }
.button-help {
  background:#fff !important; color:var(--lst-gold-dark) !important;
  border:1px solid #d9c49b !important; box-shadow:none !important;
}
.button-clinic-action {
  background:var(--lst-clinic) !important; border-color:var(--lst-clinic) !important; color:#fff !important;
}
.button-warning-action {
  background:var(--lst-attention-soft) !important; border-color:#e1b25d !important; color:#7a4f07 !important;
}
.button-success { background:var(--lst-done) !important; border-color:var(--lst-done) !important; color:#fff !important; }
.button-danger { background:var(--lst-block) !important; border-color:var(--lst-block) !important; }

.v299-card, .process-panel-compact, .premium-order-hero {
  border:1px solid #e2ddd3 !important;
  box-shadow:0 10px 30px rgba(29,31,35,.065) !important;
  background:#fff;
}
.v299-section-title > span {
  background:var(--lst-graphite) !important; color:var(--lst-gold) !important;
  border:1px solid #33363b;
}
.v299-work-table-head {
  grid-template-columns:minmax(210px,1.6fr) minmax(125px,.8fr) minmax(125px,.8fr) minmax(150px,1fr) minmax(80px,.55fr) 70px minmax(120px,.8fr) minmax(120px,.8fr) 36px !important;
  background:var(--lst-graphite) !important; color:#f7f4ee !important;
  border-radius:10px 10px 0 0;
}
.v299-work-row {
  grid-template-columns:minmax(210px,1.6fr) minmax(125px,.8fr) minmax(125px,.8fr) minmax(150px,1fr) minmax(80px,.55fr) 70px minmax(120px,.8fr) minmax(120px,.8fr) 36px !important;
  border-color:#e6e0d6 !important;
}
.v299-work-row:hover { background:#fffdf9; }
.v299-price output, .v299-row-total output {
  display:block; min-height:40px; padding:9px 10px; border-radius:8px;
  background:#f7f4ee; border:1px solid #e3dac8; font-weight:850; color:#34291a;
}
.v299-row-total output { background:var(--lst-gold-soft); color:#60451f; font-size:14px; }
.v299-order-total {
  margin-top:10px; padding:12px 14px; border:1px solid #d9c49b !important;
  background:linear-gradient(90deg,#fff,var(--lst-gold-soft)) !important;
}
.v299-order-total strong[data-v299-total] { font-size:22px; color:#6b4b1f; }
.v299-sticky-actions {
  border-top:1px solid #d9c49b !important; background:rgba(21,23,26,.96) !important;
  color:#f7f4ee !important; box-shadow:0 -10px 28px rgba(0,0,0,.14);
}
.v299-sticky-actions small, .v299-sticky-actions span { color:#d8d2c8 !important; }
.v299-sticky-actions strong { color:#e1bc70 !important; font-size:24px; }

.action-owner-banner {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:12px 14px; margin:0 0 10px; border-radius:12px; border:1px solid;
}
.action-owner-banner > div { display:grid; gap:2px; }
.action-owner-banner small { font-size:9px; letter-spacing:.12em; font-weight:900; }
.action-owner-banner strong { font-size:16px; }
.action-owner-banner span:not(.owner-chip) { font-size:11px; }
.owner-lst { background:var(--lst-gold-soft); border-color:#d8bd86; color:#68491c; }
.owner-clinic { background:var(--lst-clinic-soft); border-color:#b8d1e8; color:#24557e; }
.owner-chip { padding:5px 9px; border-radius:999px; background:#fff; font-size:10px; font-weight:850; white-space:nowrap; }

.process-compact-row.status-completed, .process-compact-row.status-approved { background:var(--lst-done-soft); }
.process-compact-row.status-changes_requested { background:var(--lst-attention-soft); }
.process-compact-row.is-current { box-shadow:inset 3px 0 0 var(--lst-gold); background:#fffbf3 !important; }
.process-check-button {
  background:#fff !important; color:#4b3a21 !important; border-color:#d6c19a !important;
}
.process-check-button:hover { background:var(--lst-gold-soft) !important; border-color:var(--lst-gold) !important; }

.tour-highlight { outline:3px solid rgba(196,154,77,.48) !important; box-shadow:0 0 0 7px rgba(196,154,77,.12) !important; }
.help-drawer h2, .tour-card h3 { color:#68491c; }

@media (max-width:1180px) {
  .v299-work-table-head { display:none !important; }
  .v299-work-row { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px; padding:12px; border:1px solid #e3ddd1; border-radius:12px; margin-bottom:10px; }
  .v299-work-row .field:first-of-type { grid-column:1/-1; }
  .v299-row-total { grid-column:2; }
  .unit-remove { align-self:end; justify-self:end; }
}
@media (max-width:680px) {
  .brand-logo { width:175px; }
  .v299-work-row { grid-template-columns:1fr !important; }
  .v299-row-total { grid-column:1; }
  .action-owner-banner { align-items:flex-start; flex-direction:column; }
  .v299-heading-actions { width:100%; justify-content:flex-end; }
}


/* =========================================================
   V2.10.2.0 — BASE REAL VALIDADA / IDENTIDAD + MÓVIL APP
   ========================================================= */

/* Identidad real LST en escritorio */
.brand-real{
  min-width:290px;
  gap:14px;
}
.brand-picture{
  display:flex;
  align-items:center;
  width:190px;
  height:54px;
  flex:0 0 190px;
}
.brand-logo-real{
  display:block;
  width:190px;
  height:54px;
  object-fit:contain;
  object-position:left center;
}
.mobile-brand-copy{display:none}
.attention-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  background:#fff0d3;
  border:1px solid #e8c67f;
  color:#7a5411;
  font-size:11px;
  font-weight:800;
}
.dates-cell{
  min-width:155px;
}
.dates-cell>div{
  display:grid;
  grid-template-columns:70px 1fr;
  gap:6px;
  align-items:center;
  padding:2px 0;
}
.dates-cell small{
  font-size:9px;
  letter-spacing:.06em;
  color:var(--muted);
}
.dates-cell strong{
  font-size:12px;
  color:var(--ink);
}

.mobile-dock,
.mobile-more-backdrop,
.mobile-sheet-head,
.mobile-quick-actions,
.mobile-notification-filters,
.mobile-filter-toggle{display:none}

@media (max-width:900px){
  :root{
    --mobile-bg:#f3f7f7;
    --mobile-surface:#ffffff;
    --mobile-ink:#16343a;
    --mobile-muted:#72858a;
    --mobile-line:#d9e5e6;
    --mobile-teal:#0f777a;
    --mobile-gold:#bd8a32;
  }

  html,body{
    width:100%;
    max-width:100%;
    min-width:0!important;
    overflow-x:hidden!important;
    background:var(--mobile-bg)!important;
  }
  body{
    font-size:16px!important;
    padding:0!important;
  }

  /* Header móvil tipo app: claro y legible */
  .topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    height:64px!important;
    background:rgba(255,255,255,.98)!important;
    border-bottom:1px solid var(--mobile-line)!important;
    box-shadow:0 4px 16px rgba(21,58,64,.06)!important;
    backdrop-filter:blur(12px)!important;
    z-index:100!important;
  }
  .topbar-inner{
    height:64px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:7px 10px!important;
  }
  .menu-button{display:none!important}
  .brand-real{
    min-width:0!important;
    width:auto!important;
    flex:0 0 auto!important;
    gap:7px!important;
  }
  .brand-picture{
    width:48px!important;
    height:48px!important;
    flex:0 0 48px!important;
  }
  .brand-logo-real{
    width:48px!important;
    height:48px!important;
    object-fit:contain!important;
    border-radius:12px!important;
    background:#fff!important;
  }
  .mobile-brand-copy{
    display:grid!important;
    font-size:14px!important;
    line-height:1.05!important;
    color:var(--mobile-ink)!important;
    font-weight:900!important;
    min-width:78px!important;
  }
  .mobile-brand-copy small{
    margin-top:3px!important;
    font-size:7px!important;
    letter-spacing:.04em!important;
    color:var(--mobile-muted)!important;
  }

  /* En móvil la búsqueda global deja de ocupar media pantalla.
     Las búsquedas específicas viven dentro de cada módulo. */
  .global-search{display:none!important}
  .top-actions{
    margin-left:auto!important;
    gap:6px!important;
  }
  .top-actions .top-icon{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    border-radius:13px!important;
  }
  .guided-help-indicator{display:none!important}
  .user-menu{display:none!important}

  /* Contenido */
  .page-shell{
    margin:0!important;
    padding:80px 12px 102px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .page-heading{
    display:block!important;
    margin:0 0 12px!important;
  }
  .page-heading h1{
    font-size:28px!important;
    line-height:1.05!important;
    letter-spacing:-.02em!important;
    margin:2px 0 0!important;
  }
  .page-heading p{
    font-size:13px!important;
    line-height:1.35!important;
    margin:4px 0 0!important;
  }
  .page-heading .heading-actions{display:none!important}
  .eyebrow{
    font-size:9px!important;
    letter-spacing:.12em!important;
  }

  .panel{
    padding:13px!important;
    border-radius:18px!important;
    border:1px solid var(--mobile-line)!important;
    background:#fff!important;
    box-shadow:0 7px 22px rgba(20,56,63,.05)!important;
  }

  /* Dashboard app */
  .mobile-quick-actions{
    display:grid!important;
    grid-template-columns:1.25fr 1fr 1fr!important;
    gap:8px!important;
    margin:0 0 11px!important;
  }
  .mobile-quick-actions a{
    min-width:0!important;
    min-height:82px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:2px!important;
    padding:11px!important;
    border-radius:16px!important;
    border:1px solid var(--mobile-line)!important;
    background:#fff!important;
    color:var(--mobile-ink)!important;
    text-decoration:none!important;
    box-shadow:0 6px 18px rgba(20,56,63,.05)!important;
  }
  .mobile-quick-actions .mobile-primary-action{
    background:linear-gradient(145deg,#a97827,#d4a650)!important;
    border-color:#bd8a32!important;
    color:#fff!important;
  }
  .mobile-primary-action span{font-size:24px!important;line-height:1!important}
  .mobile-quick-actions strong{font-size:13px!important}
  .mobile-quick-actions small{font-size:9px!important;opacity:.78!important}

  .dashboard-kpis{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin:0 0 11px!important;
  }
  .dashboard-kpi{
    min-height:100px!important;
    padding:13px!important;
    border-radius:17px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:space-between!important;
    background:#fff!important;
    border:1px solid var(--mobile-line)!important;
    box-shadow:0 6px 18px rgba(20,56,63,.04)!important;
  }
  .dashboard-kpi span{font-size:11px!important}
  .dashboard-kpi strong{font-size:30px!important;line-height:1!important}
  .dashboard-clean-grid{display:block!important}
  .dashboard-attention{
    width:100%!important;
    margin:0 0 10px!important;
  }
  .dashboard-attention-row{
    padding:11px 2px!important;
    gap:10px!important;
  }
  .dashboard-attention-row strong{font-size:14px!important}
  .dashboard-attention-row small{font-size:10px!important}
  .dashboard-command-strip{
    display:none!important;
  }

  /* Órdenes: cards, nunca tabla encogida */
  .desktop-table{display:none!important}
  .mobile-cards{
    display:grid!important;
    gap:10px!important;
  }
  .mobile-card{
    display:block!important;
    width:100%!important;
    padding:14px!important;
    border:1px solid var(--mobile-line)!important;
    border-radius:17px!important;
    background:#fff!important;
    color:var(--mobile-ink)!important;
    text-decoration:none!important;
    box-shadow:0 7px 20px rgba(20,56,63,.05)!important;
  }
  .mobile-card-top{
    display:flex!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    gap:10px!important;
  }
  .mobile-card-top>div{min-width:0!important}
  .mobile-card-top>div>strong{
    font-size:11px!important;
    color:#6c8084!important;
  }
  .patient-name-mobile{
    margin-top:3px!important;
    font-size:17px!important;
    line-height:1.16!important;
    font-weight:900!important;
    color:var(--mobile-ink)!important;
  }
  .mobile-card dl{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin:12px 0 0!important;
  }
  .mobile-card dl>div{
    min-width:0!important;
    padding:8px 9px!important;
    border-radius:11px!important;
    background:#f6f9f9!important;
  }
  .mobile-card dt{
    font-size:8px!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
    color:#8b999c!important;
  }
  .mobile-card dd{
    margin:3px 0 0!important;
    font-size:12px!important;
    line-height:1.25!important;
    font-weight:800!important;
    overflow-wrap:anywhere!important;
  }

  /* Tabs y filtros compactos */
  .tabs{
    display:flex!important;
    gap:6px!important;
    width:calc(100% + 12px)!important;
    margin:0 -6px 10px!important;
    padding:0 6px 3px!important;
    overflow-x:auto!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
    border-bottom:0!important;
  }
  .tabs::-webkit-scrollbar{display:none!important}
  .tab{
    flex:0 0 auto!important;
    padding:9px 12px!important;
    border:1px solid var(--mobile-line)!important;
    border-radius:999px!important;
    background:#fff!important;
    font-size:11px!important;
  }
  .tab.active{
    color:#fff!important;
    background:#174249!important;
    border-color:#174249!important;
  }
  .mobile-filter-toggle{
    display:flex!important;
    width:100%!important;
    min-height:48px!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    margin:0 0 8px!important;
    padding:10px 13px!important;
    border:1px solid var(--mobile-line)!important;
    border-radius:14px!important;
    background:#fff!important;
    color:var(--mobile-ink)!important;
  }
  .mobile-filter-toggle strong{font-size:13px!important}
  .mobile-filter-toggle span{font-size:9px!important;color:var(--mobile-muted)!important}
  .mobile-filter-panel{
    display:none!important;
    margin:0 0 10px!important;
  }
  .mobile-filter-panel.mobile-open{display:grid!important}
  .filters{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .filters .field,
  .filters .optional-filter{
    width:100%!important;
  }
  .filters .inline-form{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }

  /* Formularios táctiles */
  .form-grid,
  .compact-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .field,
  .field-full,
  .field-half,
  .field-third,
  .field-quarter{
    width:100%!important;
    min-width:0!important;
    grid-column:1/-1!important;
  }
  .field label{font-size:12px!important}
  .field input,
  .field select,
  .field textarea{
    min-height:52px!important;
    width:100%!important;
    font-size:16px!important;
    padding:11px 12px!important;
    border-radius:13px!important;
  }
  .field textarea{min-height:96px!important}
  .button{
    min-height:46px!important;
    border-radius:12px!important;
  }

  /* Notificaciones */
  .mobile-notification-filters{
    display:flex!important;
    gap:7px!important;
    margin:0 0 10px!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
  }
  .mobile-notification-filters::-webkit-scrollbar{display:none!important}
  .mobile-notification-filters button{
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:8px 13px!important;
    border-radius:999px!important;
    border:1px solid var(--mobile-line)!important;
    background:#fff!important;
    color:#536b70!important;
    font-size:11px!important;
    font-weight:800!important;
  }
  .mobile-notification-filters button.active{
    background:#174249!important;
    border-color:#174249!important;
    color:#fff!important;
  }
  .notification-list{display:grid!important;gap:9px!important}
  .notification{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:10px!important;
    align-items:center!important;
    width:100%!important;
    padding:12px!important;
    border:1px solid var(--mobile-line)!important;
    border-left:4px solid #9ab8ba!important;
    border-radius:15px!important;
    background:#fff!important;
  }
  .notification.unread{
    border-left-color:var(--mobile-teal)!important;
    background:#f7fdfd!important;
  }
  .notification strong{font-size:13px!important}
  .notification p{margin:4px 0!important;font-size:11px!important;line-height:1.35!important}
  .notification small{font-size:9px!important}
  .notification .button{
    min-width:62px!important;
    width:62px!important;
    padding:7px!important;
    font-size:10px!important;
  }

  /* Login móvil real */
  .auth-body{
    min-height:100dvh!important;
    background:
      radial-gradient(circle at 50% 12%, rgba(15,119,122,.12), transparent 31%),
      linear-gradient(180deg,#edf8f8 0,#f8fafa 56%,#eef4f4 100%)!important;
  }
  .auth-shell{
    min-height:100dvh!important;
    width:100%!important;
    max-width:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:18px 14px!important;
  }
  .auth-card{
    width:100%!important;
    max-width:430px!important;
    margin:0!important;
    padding:22px 18px!important;
    border-radius:22px!important;
    box-shadow:0 18px 48px rgba(20,56,63,.12)!important;
  }
  .auth-brand-real{
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    margin-bottom:18px!important;
  }
  .auth-brand-real img{
    width:205px!important;
    height:86px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  .auth-brand-real h1{
    margin:0!important;
    font-size:26px!important;
  }
  .auth-brand-real p{
    margin:3px 0 0!important;
    font-size:12px!important;
  }
  .password-field{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:7px!important;
  }
  .check-row{
    min-height:50px!important;
    border-radius:12px!important;
    padding:10px!important;
  }
  .button-wide{width:100%!important}

  /* Menú Más: hoja móvil, no sidebar de escritorio */
  .sidebar{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    top:auto!important;
    bottom:82px!important;
    width:auto!important;
    height:min(72vh,680px)!important;
    max-height:72vh!important;
    padding:0!important;
    border:1px solid var(--mobile-line)!important;
    border-radius:22px!important;
    background:#fff!important;
    box-shadow:0 24px 70px rgba(14,37,42,.28)!important;
    overflow:hidden!important;
    transform:translateY(calc(100% + 110px))!important;
    transition:transform .22s ease!important;
    z-index:180!important;
  }
  body.mobile-more-open .sidebar{
    transform:translateY(0)!important;
  }
  .mobile-sheet-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    padding:13px 15px!important;
    border-bottom:1px solid var(--mobile-line)!important;
    background:#fff!important;
  }
  .mobile-sheet-head>div{
    display:grid!important;
    gap:1px!important;
  }
  .mobile-sheet-head strong{font-size:17px!important}
  .mobile-sheet-head small{font-size:10px!important;color:var(--mobile-muted)!important}
  .mobile-sheet-head button{
    width:40px!important;
    height:40px!important;
    border:0!important;
    border-radius:50%!important;
    background:#eef4f4!important;
    color:#3c595f!important;
    font-size:24px!important;
  }
  .side-nav{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    height:calc(100% - 67px)!important;
    max-height:none!important;
    padding:10px 12px 22px!important;
    overflow-y:auto!important;
  }
  .side-nav .nav-label{
    grid-column:1/-1!important;
    margin:8px 4px 1px!important;
    font-size:9px!important;
  }
  .side-nav a{
    min-height:54px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:13px!important;
    background:#f7f9f9!important;
    font-size:12px!important;
    line-height:1.2!important;
  }
  .side-nav a.active{
    background:#fff4dd!important;
    color:#76551a!important;
  }
  .pilot-card{display:none!important}

  .mobile-more-backdrop{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:170!important;
    background:rgba(11,29,33,.42)!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .2s ease!important;
  }
  body.mobile-more-open .mobile-more-backdrop{
    opacity:1!important;
    pointer-events:auto!important;
  }

  /* Dock inferior fijo */
  .mobile-dock{
    display:grid!important;
    grid-template-columns:repeat(5,1fr)!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    height:76px!important;
    padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid var(--mobile-line)!important;
    box-shadow:0 -8px 26px rgba(20,56,63,.10)!important;
    backdrop-filter:blur(14px)!important;
    z-index:200!important;
  }
  .mobile-dock>a,
  .mobile-dock>button{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    min-width:0!important;
    border:0!important;
    background:transparent!important;
    color:#6e7f83!important;
    text-decoration:none!important;
    font-family:inherit!important;
  }
  .mobile-dock>a>span,
  .mobile-dock>button>span{
    font-size:21px!important;
    line-height:1!important;
    font-weight:900!important;
  }
  .mobile-dock small{
    font-size:9px!important;
    font-weight:800!important;
  }
  .mobile-dock .active{color:var(--mobile-teal)!important}
  .mobile-dock-new{
    transform:translateY(-14px)!important;
  }
  .mobile-dock-new b{
    display:grid!important;
    place-items:center!important;
    width:54px!important;
    height:54px!important;
    border-radius:18px!important;
    background:linear-gradient(145deg,#a97827,#d4a650)!important;
    color:#fff!important;
    font-size:30px!important;
    line-height:1!important;
    box-shadow:0 8px 21px rgba(168,116,33,.28)!important;
  }
  .mobile-dock-new small{color:#7c5a1f!important}
  .mobile-dock em{
    position:absolute!important;
    top:2px!important;
    right:19%!important;
    min-width:18px!important;
    height:18px!important;
    padding:0 4px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:999px!important;
    background:#c74b40!important;
    color:#fff!important;
    font-size:8px!important;
    font-style:normal!important;
  }

  .help-drawer{
    left:10px!important;
    right:10px!important;
    top:auto!important;
    bottom:84px!important;
    width:auto!important;
    max-width:none!important;
    max-height:72vh!important;
    border-radius:22px!important;
  }
  .footer{display:none!important}
  .tour-card{
    left:12px!important;
    right:12px!important;
    bottom:86px!important;
    top:auto!important;
    width:auto!important;
    max-width:none!important;
    border-radius:18px!important;
  }
}

@media (max-width:520px){
  .mobile-quick-actions{
    grid-template-columns:1.25fr 1fr!important;
  }
  .mobile-quick-actions a:last-child{
    grid-column:1/-1!important;
    min-height:58px!important;
  }
  .side-nav{
    grid-template-columns:1fr!important;
  }
  .side-nav .nav-label{grid-column:1!important}
}
