:root {
    --ink: #4A4A4A;
    --muted: #7A7A7A;
    --muted-dark: #5F5F5F;
    --line: #E1E6EF;
    --surface: #FFFFFF;
    --canvas: #F5F7FB;
    --sidebar: #002F87;
    --sidebar-soft: #12469F;
    --teal: #002F87;
    --teal-dark: #002266;
    --teal-soft: #E8EEF9;
    --amber: #E30613;
    --amber-soft: #FDEBED;
    --danger: #E30613;
    --danger-soft: #FDEBED;
    --blue: #002F87;
    --blue-soft: #E8EEF9;
    --purple: #4A4A4A;
    --purple-soft: #EFEFEF;
    --shadow: 0 10px 30px rgba(0, 47, 135, .07);
    --radius: 14px;
    --radius-sm: 9px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 0; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: 23px; margin-bottom: 4px; }
h2 { font-size: 25px; margin-bottom: 6px; }
h3 { font-size: 17px; margin-bottom: 0; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: .88em; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow--light { color: #7ed0c3; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-size: 12px; font-weight: 750; }
.text-link:hover { color: var(--teal-dark); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--teal); font-size: 11px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 25px; font-weight: 850; letter-spacing: -.055em; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; background: var(--amber); color: var(--sidebar); font-size: 20px; font-weight: 900; letter-spacing: -.06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-dot { color: var(--amber); }
.brand--large { font-size: 27px; }
.brand--light { color: #fff; }

/* App layout */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; width: 244px; padding: 28px 18px 18px; overflow-y: auto; background: var(--sidebar); color: #c7d4d2; }
.sidebar .brand { margin: 0 10px 26px; }
.workspace-label { margin: 0 12px 12px; color: #6e8987; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 13px; border: 0; border-radius: 9px; background: transparent; color: #aebfbd; font-size: 13px; font-weight: 600; text-align: left; transition: background .18s, color .18s; }
.nav-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-link.is-active { background: #214345; color: #fff; box-shadow: inset 3px 0 0 var(--amber); }
.nav-link.is-active svg { color: var(--amber); }
.nav-link--button { width: 100%; }
.sidebar-footer { display: grid; gap: 5px; margin-top: auto; padding-top: 28px; }
.sidebar-help { display: grid; grid-template-columns: 22px 1fr; gap: 3px 9px; margin: 0 5px 18px; padding: 15px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.035); }
.sidebar-help svg { grid-row: span 2; color: var(--amber); }
.sidebar-help strong { color: #e6efed; font-size: 11px; }
.sidebar-help span { color: #78918f; font-size: 10px; line-height: 1.5; }
.sidebar-backdrop { display: none; }
.app-main { min-height: 100vh; margin-left: 244px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; min-height: 76px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar-title { min-width: 0; }
.topbar-title h1 { overflow: hidden; margin: 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title .eyebrow { margin-bottom: 1px; font-size: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.global-search { display: flex; align-items: center; gap: 8px; width: 230px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf9; color: var(--muted); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted-dark); transition: .16s ease; }
.icon-button:hover { border-color: #c9d7d2; color: var(--teal); background: #f7faf8; }
.mobile-menu { display: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.user-chip-text { display: grid; max-width: 135px; }
.user-chip-text strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { color: var(--muted); font-size: 9px; }
.user-chip > svg { color: #9baaa7; }
.page-content { max-width: 1500px; margin: 0 auto; padding: 30px 32px 50px; }

/* Notifications */
.notification-wrap { position: relative; }
.notification-button { position: relative; }
.notification-count { position: absolute; top: -5px; right: -4px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #fff; border-radius: 20px; background: var(--danger); color: #fff; font-size: 8px; font-weight: 800; }
.notification-panel { position: absolute; top: 47px; right: 0; width: 365px; max-height: 480px; overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 20px 50px rgba(15,44,42,.16); }
.notification-panel[hidden] { display: none; }
.notification-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; font-size: 12px; }
.notification-item { display: flex; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f0f3f1; }
.notification-item:hover { background: #f8faf9; }
.notification-item.is-unread { background: #f4faf8; }
.notification-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--teal); }
.notification-item:not(.is-unread) .notification-dot { background: #c9d2d0; }
.notification-item > span:last-child { display: grid; gap: 3px; }
.notification-item strong { font-size: 11px; }
.notification-item small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.notification-item time { color: #99a6a4; font-size: 9px; }

/* Common components */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; line-height: 1.2; transition: .16s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { border-color: var(--teal-dark); background: var(--teal); color: #fff; box-shadow: 0 4px 10px rgba(20,118,111,.17); }
.btn--primary:hover { background: var(--teal-dark); }
.btn--secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--secondary:hover { border-color: #c3d2cd; background: #f8faf9; }
.btn--ghost { background: transparent; color: var(--muted-dark); }
.btn--ghost:hover { background: #edf2ef; }
.btn--danger { border-color: #b64444; background: var(--danger); color: #fff; }
.btn--danger:hover { background: #b64545; }
.btn--block { width: 100%; }
.btn--large { min-height: 47px; font-size: 13px; }
.btn--small { min-height: 31px; padding: 6px 10px; font-size: 10px; }
.alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; }
.alert--success { border-color: #cce6df; background: #ebf7f3; color: #25695c; }
.alert--danger { border-color: #f1d2d2; background: var(--danger-soft); color: #a23d3d; }
.alert--info { border-color: #d2e0f2; background: var(--blue-soft); color: #355f96; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 4px 8px; border-radius: 20px; font-size: 9px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.badge > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--success { background: #e7f4ee; color: #2d7d5c; }
.badge--info { background: var(--blue-soft); color: #416fa9; }
.badge--warning { background: var(--amber-soft); color: #a16b13; }
.badge--danger { background: var(--danger-soft); color: #b34a4a; }
.badge--neutral { background: #edf1ef; color: #60706d; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 20px 22px 17px; }
.panel-header .eyebrow { margin-bottom: 3px; }
.panel-note { display: flex; align-items: center; gap: 7px; margin: 0 22px 18px; padding-top: 15px; border-top: 1px solid #eef2f0; color: var(--muted); font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.data-table th { padding: 11px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8faf9; color: #81908d; font-size: 9px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #eef2f0; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfb; }
.data-table--roomy td { padding-top: 16px; padding-bottom: 16px; }
.data-table .muted { font-size: 10px; }
.reference-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 800; white-space: nowrap; }
.reference-link svg { color: var(--teal); }
.reference-link:hover { color: var(--teal); }
.cell-subtitle { display: block; margin-top: 3px; padding-left: 24px; color: var(--muted); font-size: 9px; }
.table-empty { padding: 35px !important; color: var(--muted); text-align: center; }
.route-text { color: var(--muted-dark); font-size: 10px; }
.route-arrow { padding: 0 4px; color: var(--amber); }
.route-stack { display: grid; gap: 2px; min-width: 120px; }
.route-stack strong { font-size: 10px; font-weight: 650; }
.route-stack small { color: var(--muted); font-size: 9px; }
.client-name { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.mini-avatar { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: var(--teal-soft); color: var(--teal); font-size: 8px; font-weight: 800; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 44px 20px; color: var(--muted); text-align: center; }
.empty-state svg { color: #b2c0bc; }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state span { font-size: 11px; }
.empty-state--small { padding: 24px 12px; font-size: 11px; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-toolbar .muted { margin-bottom: 0; font-size: 12px; }
.filter-bar { display: flex; align-items: center; gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 210px; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fafcfb; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], input[type="search"], input[type="tel"], textarea { width: 100%; border: 1px solid #dbe3df; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); transition: border .16s, box-shadow .16s; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], input[type="search"], input[type="tel"] { height: 38px; padding: 0 11px; }
textarea { min-height: 90px; padding: 10px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #74b5a9; box-shadow: 0 0 0 3px rgba(20,118,111,.09); }
input::placeholder, textarea::placeholder { color: #a0aeaa; }
.filter-bar select { width: auto; min-width: 145px; font-size: 11px; }
.pagination { display: flex; justify-content: flex-end; gap: 5px; padding: 15px 18px; border-top: 1px solid var(--line); }
.pagination a { display: grid; place-items: center; min-width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted-dark); font-size: 10px; }
.pagination a.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }

/* Dashboard */
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.welcome-row h2 { margin-bottom: 4px; font-size: 28px; }
.welcome-row .muted { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; }
.stat-icon--teal { background: var(--teal-soft); color: var(--teal); }
.stat-icon--blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon--orange { background: var(--amber-soft); color: #b47818; }
.stat-icon--purple { background: var(--purple-soft); color: var(--purple); }
.stat-card > div:last-child { display: grid; min-width: 0; }
.stat-card span { color: var(--muted-dark); font-size: 10px; font-weight: 650; }
.stat-card strong { margin: 1px 0; font-size: 27px; line-height: 1.2; letter-spacing: -.04em; }
.stat-card small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 20px; align-items: start; }
.panel--wide { grid-column: 1 / -1; }
.status-chart { display: grid; gap: 17px; padding: 0 22px; }
.status-chart-row > div:first-child { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 10px; }
.status-chart-row strong { margin-left: auto; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot--success { background: #56a783; }
.legend-dot--info { background: #6d96cb; }
.legend-dot--warning { background: #e0a33e; }
.legend-dot--danger { background: #d36363; }
.legend-dot--neutral { background: #9ba8a5; }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #eff3f1; }
.progress-bar { display: block; height: 100%; border-radius: inherit; }
.progress-bar--success { background: #63b18e; }
.progress-bar--info { background: #759fd4; }
.progress-bar--warning { background: #e6ad4e; }
.progress-bar--danger { background: #d97777; }
.progress-bar--neutral { background: #a3b1ae; }
.timeline { padding: 2px 22px 20px; }
.timeline-item { position: relative; display: flex; gap: 11px; padding-bottom: 19px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before { position: absolute; top: 24px; bottom: 0; left: 11px; width: 1px; background: #e0e7e4; content: ""; }
.timeline-marker { z-index: 1; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; }
.timeline-marker--success { background: #e8f5ee; color: #428968; }
.timeline-marker--info { background: var(--blue-soft); color: var(--blue); }
.timeline-marker--warning { background: var(--amber-soft); color: #a97420; }
.timeline-marker--danger { background: var(--danger-soft); color: var(--danger); }
.timeline-marker--neutral { background: #edf1ef; color: #6b7b78; }
.timeline-body { flex: 1; min-width: 0; padding-top: 2px; }
.timeline-title { display: flex; justify-content: space-between; gap: 10px; }
.timeline-title strong { font-size: 10px; line-height: 1.5; }
.timeline-title time { color: #94a29f; font-size: 8px; white-space: nowrap; }
.timeline-body p { margin: 3px 0 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.timeline-body a { color: var(--teal); font-size: 9px; font-weight: 700; }
.report-list { padding: 0 10px 10px; }
.report-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 9px; }
.report-item:hover { background: #f7faf8; }
.report-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.report-icon--low { background: var(--teal-soft); color: var(--teal); }
.report-icon--medium { background: var(--amber-soft); color: #aa771e; }
.report-icon--high, .report-icon--critical { background: var(--danger-soft); color: var(--danger); }
.report-item-body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.report-item-body strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-item-body small { color: var(--muted); font-size: 9px; }

/* Forms */
.form-panel { max-width: 940px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; padding: 22px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted-dark); font-size: 10px; font-weight: 750; }
.field input, .field select, .field textarea { font-size: 12px; }
.field--full { grid-column: 1 / -1; }
.field-hint { color: var(--muted); font-size: 9px; }
.form-section-title { grid-column: 1 / -1; margin: 5px 0 -4px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-title h3 { font-size: 13px; }
.form-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fafcfb; border-radius: 0 0 var(--radius) var(--radius); }
.checkbox-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-dark); font-size: 11px; }
.checkbox-field input { width: 15px; height: 15px; accent-color: var(--teal); }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 17px; color: var(--muted); font-size: 10px; font-weight: 700; }
.back-link:hover { color: var(--teal); }

/* Shipment detail */
.detail-hero { position: relative; overflow: hidden; margin-bottom: 20px; padding: 24px; border-radius: var(--radius); background: var(--sidebar); color: #fff; box-shadow: var(--shadow); }
.detail-hero::after { position: absolute; top: -70px; right: -30px; width: 280px; height: 280px; border: 45px solid rgba(255,255,255,.025); border-radius: 50%; content: ""; }
.detail-hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.detail-reference { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.detail-reference h2 { margin: 0; font-size: 26px; }
.detail-reference .badge { padding: 5px 10px; }
.detail-hero .eyebrow { color: #7ed0c3; }
.detail-hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 21px; }
.detail-meta-item { display: grid; gap: 2px; }
.detail-meta-item span { color: #75918e; font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.detail-meta-item strong { font-size: 11px; font-weight: 650; }
.detail-hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.detail-hero .btn--secondary { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff; }
.detail-hero .btn--secondary:hover { background: rgba(255,255,255,.14); }
.detail-tabs { display: flex; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: max-content; max-width: 100%; overflow-x: auto; }
.detail-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.detail-tabs a:hover { color: var(--teal); background: #f5f9f7; }
.detail-tabs a.is-active { background: var(--teal-soft); color: var(--teal-dark); }
.tab-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 10px; background: #e9efec; color: var(--muted-dark); font-size: 8px; }
.detail-tabs a.is-active .tab-count { background: #cce7e0; color: var(--teal-dark); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); gap: 20px; align-items: start; }
.detail-section { margin-bottom: 20px; scroll-margin-top: 96px; }
.detail-section:last-child { margin-bottom: 0; }
.info-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.info-cell { min-width: 0; padding: 17px 18px; background: #fff; }
.info-cell span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.info-cell strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.info-cell small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.summary-card { padding: 20px 22px; }
.summary-card h3 { margin-bottom: 9px; }
.summary-card p { margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.timeline--large { padding: 3px 22px 23px; }
.timeline--large .timeline-item { gap: 13px; padding-bottom: 25px; }
.timeline--large .timeline-marker { width: 27px; height: 27px; }
.timeline--large .timeline-item:not(:last-child)::before { top: 27px; left: 13px; }
.timeline--large .timeline-title { display: grid; gap: 3px; }
.timeline--large .timeline-title strong { font-size: 11px; }
.timeline--large .timeline-body p { font-size: 10px; }
.inline-form { margin: 0 22px 22px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfa; }
.inline-form-grid { display: grid; grid-template-columns: 1fr 1.6fr auto; align-items: end; gap: 9px; }
.inline-form-grid .field > span { font-size: 9px; }
.evidence-upload-grid { padding: 0 0 14px; gap: 11px; }
.status-form { display: flex; gap: 7px; padding: 18px 22px; border-top: 1px solid var(--line); background: #fafcfb; }
.status-form select { flex: 1; font-size: 11px; }

/* Evidence gallery */
.evidence-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 22px 22px; }
.evidence-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .18s ease; }
.evidence-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,50,45,.08); }
.evidence-preview { position: relative; display: grid; place-items: center; height: 125px; overflow: hidden; background: #eef3f0; }
.evidence-preview img { width: 100%; height: 100%; object-fit: cover; }
.evidence-preview video { width: 100%; height: 100%; object-fit: cover; }
.evidence-document { color: #79918b; }
.evidence-document svg { width: 40px; height: 40px; }
.evidence-type { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 6px; background: rgba(16,42,44,.82); color: #fff; font-size: 8px; font-weight: 700; backdrop-filter: blur(4px); }
.evidence-body { padding: 10px 11px; }
.evidence-body strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-body small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.evidence-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px solid #eef2f0; }
.evidence-actions a { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-size: 8px; font-weight: 750; }
.evidence-actions .icon-button { width: 25px; height: 25px; border: 0; color: var(--muted); }
.evidence-actions .icon-button:hover { color: var(--danger); background: var(--danger-soft); }
.upload-zone { margin: 0 22px 22px; padding: 20px; border: 1px dashed #b9ccc6; border-radius: 11px; background: #f8fbf9; }
.upload-zone-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.upload-zone-title > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--teal-soft); color: var(--teal); }
.upload-zone-title strong { display: block; font-size: 11px; }
.upload-zone-title small { color: var(--muted); font-size: 9px; }
.file-drop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 78px; margin-bottom: 13px; overflow: hidden; border: 1px dashed #cbdad5; border-radius: 8px; background: #fff; color: var(--muted); font-size: 10px; }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,118,111,.09); }
.camera-controls { display: flex; flex-direction: column; gap: 9px; }
.camera-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.camera-thumb { position: relative; width: 76px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.camera-thumb img { display: block; width: 100%; height: 62px; object-fit: cover; }
.camera-thumb span { display: block; padding: 3px 5px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.camera-thumb button { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 19px; height: 19px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.camera-thumb button:hover { background: var(--danger); }
.camera-modal { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: #0b1220; color: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.camera-modal::backdrop { background: rgba(3,8,20,.72); }
.camera-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 12px; }
.camera-modal-head button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.camera-modal-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: cover; }
.camera-modal-status { margin: 0; padding: 8px 14px; color: #cbd5e1; font-size: 11px; }
.camera-modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.camera-modal .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.report-detail { padding: 0 22px 22px; }
.report-block { margin-bottom: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.report-block:last-child { margin-bottom: 0; }
.report-block-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.report-block h4 { margin: 0 0 5px; font-size: 11px; }
.report-block p { margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.report-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.report-resolution { margin-top: 10px; padding: 10px; border-radius: 7px; background: #edf7f2; color: #3a6d58; font-size: 10px; }
.report-update-form { display: flex; align-items: flex-end; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.report-update-form select { width: 130px; height: 32px; font-size: 10px; }
.report-update-form input { height: 32px; font-size: 10px; }

/* Reports and files list */
.severity-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.severity-filter a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 700; }
.severity-filter a.is-active { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.files-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.file-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.file-card .evidence-preview { height: 145px; }
.file-card-body { padding: 13px; }
.file-card-body strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-card-body small { color: var(--muted); font-size: 9px; }
.file-card-body .reference-link { margin: 7px 0; font-size: 9px; }
.file-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }

/* Client and user lists */
.list-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.entity-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.entity-card-header { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.entity-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); font-size: 13px; font-weight: 800; }
.entity-card-header h3 { margin: 0; font-size: 13px; }
.entity-card-header small { color: var(--muted); font-size: 9px; }
.entity-card-header .badge { margin-left: auto; }
.entity-info { display: grid; gap: 7px; margin-bottom: 16px; }
.entity-info div { display: flex; align-items: center; gap: 7px; color: var(--muted-dark); font-size: 10px; }
.entity-info svg { color: #9aa9a5; }
.entity-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.entity-card-footer small { color: var(--muted); font-size: 9px; }
.entity-actions { display: flex; gap: 5px; }
.entity-actions .icon-button { width: 29px; height: 29px; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(250px,1fr); gap: 20px; align-items: start; }
.profile-card { padding: 23px; }
.profile-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-identity .avatar { width: 55px; height: 55px; font-size: 17px; }
.profile-identity h3 { margin-bottom: 3px; }
.profile-identity p { margin: 0; color: var(--muted); font-size: 10px; }
.security-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.security-list li { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.security-list svg { margin-top: 1px; color: var(--teal); }

/* Login */
.login-page { background: #fff; }
.login-shell { display: grid; grid-template-columns: minmax(390px, 1.05fr) minmax(430px, .95fr); min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 38px 52px 26px; background: var(--sidebar); color: #fff; }
.login-story::before { position: absolute; top: 14%; right: -180px; width: 460px; height: 460px; border: 1px solid rgba(126,208,195,.11); border-radius: 50%; content: ""; box-shadow: 0 0 0 60px rgba(126,208,195,.025), 0 0 0 120px rgba(126,208,195,.018); }
.login-story .brand { position: relative; z-index: 1; }
.login-story-content { position: relative; z-index: 1; max-width: 500px; margin: auto 0; padding: 60px 0; }
.login-story h1 { margin-bottom: 22px; font-size: clamp(38px, 4.2vw, 61px); line-height: 1.03; letter-spacing: -.055em; }
.login-story h1 span { color: var(--amber); }
.login-story-content > p:not(.eyebrow) { max-width: 440px; color: #9eb4b1; font-size: 13px; line-height: 1.75; }
.login-features { display: grid; gap: 12px; margin-top: 30px; }
.login-features > div { display: flex; align-items: center; gap: 11px; color: #d7e4e1; font-size: 11px; }
.login-features svg { width: 18px; color: #72bfb2; }
.login-story-footer { position: relative; z-index: 1; color: #607e7a; font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-form-side { display: grid; place-items: center; padding: 50px; background: #fbfcfb; }
.login-form-wrap { width: 100%; max-width: 390px; }
.login-form-wrap h2 { margin-bottom: 8px; font-size: 31px; }
.login-form-wrap > .muted { margin-bottom: 28px; font-size: 12px; }
.login-form { display: grid; gap: 17px; }
.login-form .field > span { font-size: 11px; }
.login-form .field input { height: 46px; padding: 0 13px; font-size: 12px; }
.login-form .btn { margin-top: 4px; }
.demo-access { margin-top: 23px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.demo-access summary { cursor: pointer; color: var(--muted-dark); font-size: 10px; font-weight: 650; }
.demo-credentials { display: grid; gap: 8px; margin-top: 13px; }
.demo-credentials > div { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; padding-top: 8px; border-top: 1px solid #eef2f0; font-size: 9px; }
.demo-credentials strong { color: var(--ink); }
.demo-credentials code { color: var(--teal); }
.demo-credentials span { color: var(--muted); }
.login-security { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 24px 0 0; color: #9aa8a5; font-size: 9px; }
.login-alt-link { margin: 22px 0 0; color: var(--muted-dark); font-size: 11px; text-align: center; }
.login-alt-link a { color: var(--teal); font-weight: 650; text-decoration: none; }
.login-alt-link a:hover { text-decoration: underline; }
.login-mobile-brand { display: none; }

/* Installer */
.install-page { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: radial-gradient(circle at 10% 10%, #e3f0eb, transparent 35%), var(--canvas); }
.install-card { width: min(100%, 560px); padding: 35px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 25px 60px rgba(20,50,45,.1); }
.install-card .brand { margin-bottom: 28px; }
.install-card h1 { margin-bottom: 8px; font-size: 28px; }
.install-card > .muted { font-size: 11px; }
.credentials { display: grid; gap: 9px; margin: 20px 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf9; }
.credentials > div { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; }
.credentials span { color: var(--muted); }
.credentials strong { font-size: 10px; text-align: right; }
.install-checks { display: grid; gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.install-checks li { display: flex; align-items: center; gap: 9px; color: var(--muted-dark); font-size: 11px; }
.install-checks svg { color: var(--teal); }
.security-note { display: flex; align-items: flex-start; gap: 8px; margin: 19px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.security-note svg { margin-top: 2px; color: var(--amber); }

/* Responsive */
@media (min-width: 1500px) {
    .files-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .files-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .list-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .global-search { width: 190px; }
    .user-chip-text { display: none; }
    .evidence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop.is-visible { position: fixed; inset: 0; z-index: 45; display: block; background: rgba(10,30,29,.42); }
    .app-main { margin-left: 0; }
    .mobile-menu { display: inline-flex; }
    .topbar { padding: 13px 22px; }
    .page-content { padding: 25px 22px 45px; }
    .detail-grid { grid-template-columns: minmax(0,1fr); }
    .profile-grid { grid-template-columns: minmax(0,1fr); }
    .login-shell { grid-template-columns: minmax(330px,.9fr) minmax(390px,1.1fr); }
    .login-story { padding: 32px; }
    .login-form-side { padding: 35px; }
}
@media (max-width: 760px) {
    .topbar { gap: 10px; min-height: 66px; padding: 11px 15px; }
    .topbar-title .eyebrow { display: none; }
    .topbar-title h1 { font-size: 15px; }
    .global-search { display: none; }
    .user-chip { padding-left: 7px; border-left: 0; }
    .user-chip > svg { display: none; }
    .page-content { padding: 20px 15px 40px; }
    .page-toolbar, .welcome-row { align-items: flex-start; }
    .welcome-row h2 { font-size: 24px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 15px; }
    .stat-icon { width: 33px; height: 33px; }
    .stat-card strong { font-size: 24px; }
    .filter-bar { flex-wrap: wrap; }
    .search-field { flex-basis: 100%; }
    .filter-bar select { flex: 1; min-width: 130px; }
    .form-grid { grid-template-columns: 1fr; padding: 18px; }
    .field--full, .form-section-title { grid-column: auto; }
    .info-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-hero { padding: 20px; }
    .detail-hero-top { display: grid; }
    .detail-hero-actions { flex-wrap: wrap; }
    .detail-reference { flex-wrap: wrap; }
    .detail-reference h2 { font-size: 22px; }
    .detail-meta-item { min-width: 100px; }
    .detail-tabs { width: 100%; }
    .inline-form-grid { grid-template-columns: 1fr; }
    .evidence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 15px 15px; }
    .upload-zone { margin: 0 15px 15px; }
    .timeline--large, .timeline { padding-left: 16px; padding-right: 16px; }
    .report-detail { padding: 0 15px 15px; }
    .files-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .list-grid { grid-template-columns: 1fr; }
    .notification-panel { position: fixed; top: 65px; right: 12px; left: 12px; width: auto; }
    .login-shell { grid-template-columns: 1fr; }
    .login-story { display: none; }
    .login-form-side { min-height: 100vh; padding: 30px 22px; }
    .login-mobile-brand { display: inline-flex; position: absolute; top: 25px; left: 24px; }
    .login-form-wrap { padding-top: 55px; }
    .install-page { padding: 16px; }
    .install-card { padding: 25px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-toolbar, .welcome-row { display: grid; }
    .page-toolbar .btn, .welcome-row .btn { width: 100%; }
    .topbar-actions { gap: 7px; }
    .topbar-title { max-width: 145px; }
    .evidence-grid, .files-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .report-update-form { display: grid; }
    .report-update-form select, .report-update-form input { width: 100%; }
    .detail-tabs a { padding: 8px 10px; }
    .demo-credentials > div { grid-template-columns: 1fr; gap: 2px; }
    .credentials > div { display: grid; gap: 2px; }
    .credentials strong { text-align: left; }
}

/* Identidad corporativa LEM */
.eyebrow--light, .detail-hero .eyebrow { color: #A9C4FF; }
.sidebar { background: #002F87; color: #D5E0F5; }
.workspace-label { color: #8FA9D6; }
.nav-link { color: #C4D3F0; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }
.nav-link.is-active { background: #12469F; color: #FFFFFF; box-shadow: inset 3px 0 0 #E30613; }
.nav-link.is-active svg { color: #FFFFFF; }
.sidebar-help { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
.sidebar-help strong { color: #FFFFFF; }
.sidebar-help span { color: #A9BDE2; }
.sidebar-help svg { color: #E30613; }
.global-search, .search-field { background: #F7F9FD; }
.icon-button:hover { border-color: #C7D2E8; color: #002F87; background: #F5F8FD; }
.user-chip > svg { color: #8E9BB3; }
.notification-item { border-bottom-color: #EEF1F7; }
.notification-item:hover { background: #F7F9FD; }
.notification-item.is-unread { background: #EFF4FD; }
.notification-item:not(.is-unread) .notification-dot { background: #C7D2E8; }
.notification-item time { color: #8E9BB3; }
.btn--secondary:hover { border-color: #C7D2E8; background: #F7F9FD; }
.btn--ghost:hover { background: #EDF1F8; }
.btn--danger { border-color: #B00510; background: #E30613; }
.btn--danger:hover { background: #B00510; }
.alert--success { border-color: #D7E2F7; background: #EEF4FD; color: #002F87; }
.alert--danger { border-color: #F5C7CD; background: #FDEBED; color: #B00510; }
.alert--info { border-color: #D7E2F7; background: #EEF4FD; color: #002F87; }
.badge--success { background: #E8EEF9; color: #002F87; }
.badge--info { background: #E8EEF9; color: #002F87; }
.badge--warning { background: #FDEBED; color: #B00510; }
.badge--danger { background: #FDEBED; color: #B00510; }
.badge--neutral { background: #EFEFEF; color: #4A4A4A; }
.panel-note, .data-table td { border-bottom-color: #EEF1F7; }
.data-table th { background: #F7F9FD; color: #6B7280; }
.data-table tbody tr:hover { background: #FBFCFE; }
.empty-state svg { color: #AAB4CC; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], input[type="search"], input[type="tel"], textarea { border-color: #D7DEEC; }
input:focus, select:focus, textarea:focus { border-color: #002F87; box-shadow: 0 0 0 3px rgba(0,47,135,.10); }
input::placeholder, textarea::placeholder { color: #9AA3B2; }
.stat-icon--orange { background: #FDEBED; color: #E30613; }
.legend-dot--success, .progress-bar--success { background: #002F87; }
.legend-dot--info, .progress-bar--info { background: #5B7DB8; }
.legend-dot--warning, .progress-bar--warning { background: #E30613; }
.legend-dot--danger, .progress-bar--danger { background: #B00510; }
.legend-dot--neutral, .progress-bar--neutral { background: #9AA3B2; }
.progress-track { background: #EDF1F8; }
.timeline-item:not(:last-child)::before { background: #E1E6EF; }
.timeline-marker--success { background: #E8EEF9; color: #002F87; }
.timeline-marker--warning { background: #FDEBED; color: #E30613; }
.timeline-marker--neutral { background: #EFEFEF; color: #4A4A4A; }
.timeline-title time { color: #8E9BB3; }
.report-item:hover { background: #F7F9FD; }
.report-icon--medium { background: #FDEBED; color: #E30613; }
.form-actions, .status-form { background: #F7F9FD; }
.detail-meta-item span { color: #A9BDE2; }
.detail-tabs a:hover { color: #002F87; background: #F5F8FD; }
.tab-count { background: #E8EEF9; color: #4A4A4A; }
.detail-tabs a.is-active .tab-count { background: #C7D8F5; color: #002F87; }
.inline-form { background: #F7F9FD; }
.evidence-preview { background: #EEF1F7; }
.evidence-document { color: #6B7280; }
.evidence-actions { border-top-color: #EEF1F7; }
.upload-zone { border-color: #B9C8E2; background: #F7F9FD; }
.file-drop { border-color: #C7D2E8; }
.report-resolution { background: #EEF4FD; color: #002F87; }
.entity-info svg { color: #8E9BB3; }
.login-story::before { border-color: rgba(169,196,255,.12); box-shadow: 0 0 0 60px rgba(169,196,255,.03), 0 0 0 120px rgba(169,196,255,.02); }
.login-story-content > p:not(.eyebrow) { color: #C4D3F0; }
.login-features > div { color: #FFFFFF; }
.login-features svg { color: #A9C4FF; }
.login-story-footer { color: #8FA9D6; }
.login-form-side { background: #FBFCFE; }
.demo-credentials > div { border-top-color: #EEF1F7; }
.login-security { color: #8E9BB3; }
.install-page { background: radial-gradient(circle at 10% 10%, #E8EEF9, transparent 35%), #F5F7FB; }
.credentials { background: #F7F9FD; }

/* Componentes LEM Pro */
.workflow-step-row { display: grid; grid-template-columns: 28px minmax(180px,1.4fr) minmax(130px,.8fr) 110px; gap: 10px; align-items: end; margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #F9FBFE; position: relative; }
.workflow-step-remove { position: absolute; top: 8px; right: 8px; padding: 4px 6px; line-height: 1; }
.workflow-step-row .field--full { grid-column: 2 / -1; }
.step-number { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 7px; background: #002F87; color: #FFFFFF; font-size: 10px; font-weight: 800; }
.workflow-progress { display: flex; align-items: center; gap: 12px; margin: 0 22px 18px; }
.workflow-progress .progress-track { flex: 1; height: 8px; }
.workflow-progress strong { font-size: 10px; white-space: nowrap; }
.workflow-step { display: grid; grid-template-columns: 30px 1fr auto; gap: 11px; align-items: start; padding: 14px 0; border-bottom: 1px solid #EEF1F7; }
.workflow-step:last-child { border-bottom: 0; }
.workflow-step-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #E8EEF9; color: #002F87; }
.workflow-step.is-completed .workflow-step-icon { background: #002F87; color: #FFFFFF; }
.workflow-step h4 { margin: 0 0 3px; font-size: 11px; }
.workflow-step p { margin: 0 0 7px; color: var(--muted); font-size: 9px; }
.workflow-step-form { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.workflow-step-form input, .workflow-step-form select { width: auto; min-width: 150px; height: 32px; font-size: 10px; }
.share-url { display: flex; gap: 7px; margin-top: 8px; }
.share-url input { height: 32px; font-size: 9px; }
.claim-amount { font-variant-numeric: tabular-nums; }
.mobile-capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.offline-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; background: #E8EEF9; color: #002F87; font-size: 9px; font-weight: 700; }
.offline-status.is-offline { background: #FDEBED; color: #B00510; }
.api-key { font-family: Consolas, monospace; word-break: break-all; }
@media (max-width: 760px) {
    .workflow-step-row { grid-template-columns: 28px 1fr; }
    .workflow-step-row .field--full { grid-column: 2; }
    .workflow-step-row .checkbox-field { grid-column: 2; }
    .mobile-capture-grid { grid-template-columns: 1fr; }
    .evidence-upload-grid { grid-template-columns: 1fr; }
    .detail-tabs { width: 100%; }
    .panel-header { padding: 18px 15px 14px; }
}

/* ---- Editor de flujos (rediseņo intuitivo) ---- */
.workflow-editor { padding: 22px; }
.workflow-editor__section { margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #FBFCFF; }
.workflow-editor__section:last-of-type { margin-bottom: 0; }
.workflow-editor__section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.workflow-editor__section-head h3 { margin: 2px 0 0; font-size: 18px; }
.workflow-editor__tools { display: flex; align-items: center; gap: 10px; }
.workflow-editor__hint { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid #002F87; background: #EEF2FA; border-radius: 8px; font-size: 13px; color: #4A4A4A; }
.workflow-steps { display: flex; flex-direction: column; gap: 12px; }
.workflow-step-card { position: relative; border: 1px solid var(--line); border-radius: 14px; background: #FFFFFF; box-shadow: 0 2px 8px rgba(0,47,135,.06); transition: box-shadow .15s ease, transform .15s ease; overflow: hidden; }
.workflow-step-card:hover { box-shadow: 0 4px 14px rgba(0,47,135,.12); }
.workflow-step-card__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(90deg, #002F87, #1A4FB0); color: #FFFFFF; }
.workflow-step-card__number { width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; color: #002F87; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.workflow-step-card__title { flex: 1; font-weight: 600; font-size: 14px; letter-spacing: .2px; }
.workflow-step-card__remove { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #FFFFFF; border-radius: 8px; padding: 4px 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.workflow-step-card__remove:hover { background: #E30613; border-color: #E30613; }
.workflow-step-card__body { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) auto; gap: 12px; padding: 14px; align-items: end; }
.workflow-step-card__body .field--full { grid-column: 1 / -1; }
.workflow-step-card__required { align-self: end; margin-bottom: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #F9FBFE; }
.workflow-step-card__required input { margin-right: 6px; }
.workflow-steps__empty { text-align: center; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 14px; color: #4A4A4A; }
.workflow-steps__empty strong { display: block; margin: 8px 0 4px; color: #002F87; }
.workflow-steps__empty svg { color: #9AA7BF; }
@media (max-width: 760px) {
    .workflow-step-card__body { grid-template-columns: 1fr; }
    .workflow-step-card__body .field--full { grid-column: 1; }
}
