:root {
  --ink: #192c3f;
  --ink-soft: #42566a;
  --muted: #6d7d8d;
  --line: #d8e1ea;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --teal: #192c3f;
  --teal-dark: #102132;
  --teal-soft: #e6edf5;
  --navy: #192c3f;
  --danger: #c93737;
  --warning: #b26a00;
  --radius: 16px;
  --shadow: 0 14px 36px rgba(19, 42, 47, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-bottom: .2rem; }
h2 { font-size: clamp(1.15rem, 2.5vw, 1.45rem); margin-bottom: .35rem; }
h3 { font-size: 1rem; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.eyebrow { display: block; margin-bottom: .35rem; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.help { color: var(--muted); font-size: .85rem; }
.span-2 { grid-column: 1 / -1; }

.app-shell { padding-left: 270px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 270px; flex-direction: column; padding: 24px 18px; color: white; background: linear-gradient(180deg, #192c3f 0%, #0f1e2c 100%); box-shadow: 8px 0 30px rgba(13, 30, 46, .12); }
.brand { display: flex; align-items: center; gap: 12px; padding: 3px 10px 24px; }
.sidebar-logo { display: block; width: 112px; height: 52px; object-fit: contain; object-position: left center; }
.brand-mark { display: grid; min-width: 59px; height: 48px; place-items: center; border-right: 1px solid rgba(255,255,255,.35); color: white; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 800; letter-spacing: .03em; }
.brand-copy { color: white; font-size: .92rem; font-weight: 800; line-height: 1.25; }
.brand-copy small { display: block; margin-top: 4px; color: #9fc4c0; font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: #c9dcda; font-size: .92rem; font-weight: 650; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); text-decoration: none; }
.nav-link.active { color: #102132; background: #dce7f2; }
.sidebar-user { display: grid; grid-template-columns: 38px 1fr 28px; gap: 10px; align-items: center; margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user .avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #192c3f; background: #dce7f2; font-weight: 900; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: white; font-size: .8rem; }
.sidebar-user small { color: #9fc4c0; font-size: .7rem; }
.sidebar-user a { display: grid; color: #9fc4c0; place-items: center; }
.main-shell { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 20px; padding: 15px clamp(20px, 4vw, 48px); border-bottom: 1px solid rgba(220,230,231,.9); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.topbar h1 { margin: 0; }
.topbar .eyebrow { margin-bottom: .15rem; }
.menu-button { display: none; border: 0; background: transparent; font-size: 1.4rem; }
.page-content { width: min(1500px, 100%); margin: auto; padding: 30px clamp(18px, 4vw, 48px) 70px; }

.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; font-size: .88rem; font-weight: 750; line-height: 1.2; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(25,44,63,.24); outline-offset: 2px; }
.button-primary { color: white; background: var(--teal); box-shadow: 0 7px 16px rgba(25,44,63,.2); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { color: var(--teal-dark); border-color: #b9c9d9; background: #edf3f8; }
.button-light { color: var(--ink); background: white; }
.button-ghost { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.button-danger { color: white; background: var(--danger); }
.button-small { min-height: 36px; padding: 7px 12px; font-size: .8rem; }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.disabled, .button:disabled { pointer-events: none; border-color: #c5d2d3; color: #38575a; background: #dfe8e8; box-shadow: none; opacity: 1; cursor: not-allowed; }

.panel { min-width: 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 16px rgba(19,42,47,.035); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel-heading h2 { margin-bottom: 0; }
.welcome-panel, .ticket-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 40px); overflow: hidden; border-radius: 20px; color: white; background: radial-gradient(circle at 85% 10%, rgba(121,151,181,.38), transparent 32%), linear-gradient(135deg, #192c3f 0%, #31516f 100%); box-shadow: var(--shadow); }
.welcome-panel h2, .ticket-hero h2 { color: white; margin-bottom: .35rem; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.welcome-panel p, .ticket-hero p { margin: 0; color: #dce7f2; }
.welcome-panel .eyebrow, .ticket-hero .eyebrow { color: #c2d4e5; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 15px; margin: 20px 0; }
.metric-card { position: relative; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric-card::after { position: absolute; right: -20px; bottom: -35px; width: 85px; height: 85px; border-radius: 50%; background: var(--teal-soft); content: ""; }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { font-size: .78rem; font-weight: 700; }
.metric-card strong { display: block; margin: 6px 0 2px; color: var(--ink); font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1; }
.metric-card small { font-size: .72rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(520px,1.5fr); gap: 20px; }
.panel-wide { min-width: 0; }

.branch-monthly-panel { margin-top: 20px; }
.month-badge { padding: 7px 11px; border-radius: 99px; color: #fff; background: var(--ink); font-size: .72rem; font-weight: 800; }
.branch-usage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.consolidated-usage { margin-bottom: 16px; padding: 18px; border: 1px solid #b9c9d9; border-radius: 13px; background: linear-gradient(135deg,#eef3f8,#f8fafc); }
.consolidated-usage .panel-heading { margin-bottom: 12px; }
.consolidated-metrics { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.consolidated-metrics > div { padding: 11px; border-radius: 9px; background: white; }
.consolidated-metrics small, .consolidated-metrics strong { display: block; }
.consolidated-metrics small { min-height: 30px; color: var(--muted); font-size: .62rem; font-weight: 750; line-height: 1.25; }
.consolidated-metrics strong { margin-top: 4px; color: var(--ink); font-size: 1.08rem; }
.branch-usage-card { overflow: hidden; padding: 17px; border: 1px solid #dbe4ed; border-radius: 13px; background: #fbfcfe; }
.branch-usage-card.has-overflow { border-color: #efc77f; background: #fffaf1; }
.branch-usage-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.branch-usage-heading span { color: var(--muted); font-size: .63rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.branch-usage-heading h3 { margin: 3px 0 0; }
.branch-usage-heading > strong { color: var(--ink); font-size: .86rem; white-space: nowrap; }
.usage-progress { height: 8px; margin: 14px 0; overflow: hidden; border-radius: 99px; background: #e5ebf1; }
.usage-progress i { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: #31516f; }
.has-overflow .usage-progress i { background: #c47a0a; }
.branch-usage-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.branch-usage-metrics > div { padding: 9px 10px; border-radius: 9px; background: #eef3f8; }
.branch-usage-metrics small, .branch-usage-metrics strong { display: block; }
.branch-usage-metrics small { min-height: 30px; color: var(--muted); font-size: .62rem; font-weight: 750; line-height: 1.25; }
.branch-usage-metrics strong { margin-top: 4px; color: var(--ink); font-size: 1rem; }
.branch-usage-metrics .emergency-metric { background: #fff0ee; }
.branch-usage-metrics .emergency-metric strong { color: #a62f2f; }
.branch-usage-metrics .positive-metric, .consolidated-metrics .positive-metric { background: #ebf7ef; }
.branch-usage-metrics .positive-metric strong, .consolidated-metrics .positive-metric strong { color: #257043; }
.branch-usage-metrics .merged-metric, .consolidated-metrics .merged-metric { background: #f1effb; }
.branch-usage-metrics .merged-metric strong, .consolidated-metrics .merged-metric strong { color: #5e4b9b; }
.consolidated-metrics .emergency-metric { background: #fff0ee; }
.consolidated-metrics .emergency-metric strong { color: #a62f2f; }
.branch-usage-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 13px -17px -17px; padding: 10px 17px; border-top: 1px solid #e1e8ef; color: var(--muted); background: white; font-size: .68rem; }
.branch-usage-card footer b { color: var(--ink); }
.emergency-banner, .emergency-note { border: 1px solid #efc1bd; border-radius: 10px; color: #852b2b; background: #fff3f2; }
.emergency-report-panel { margin-bottom: 20px; border-top: 4px solid #c93737; }
.emergency-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 12px 14px; }
.emergency-banner span { font-size: .76rem; }
.emergency-note { margin: 0; padding: 10px 12px; font-size: .76rem; }

.bar-chart { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(100px,150px) 1fr 30px; gap: 10px; align-items: center; font-size: .78rem; }
.bar-row > div { height: 9px; overflow: hidden; border-radius: 99px; background: #edf2f2; }
.bar-row i { display: block; min-width: 3px; height: 100%; border-radius: inherit; }
.bar-row strong { text-align: right; }

.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid #e0e7ef; border-radius: 12px; background: white; }
.table-wrap.is-enhanced { overflow: visible; }
.table-scroll { width: 100%; overflow-x: auto; border-radius: 0 0 12px 12px; }
table { width: 100%; border-collapse: collapse; color: #42556a; background: white; font-size: .79rem; }
th { padding: 12px 14px; border-bottom: 1px solid #dfe7ef; color: #66788c; background: #f7f9fc; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #e9eef4; vertical-align: middle; }
tbody tr { transition: background .15s ease; }
tbody tr:hover > td { background: #f8fbfe; }
tbody tr:last-child > td { border-bottom: 0; }
td:last-child, th:last-child { text-align: right; }
.diagnostic-table td:last-child, .diagnostic-table th:last-child { text-align: left; }
td:last-child .button-row { justify-content: flex-end; }
td small, td strong { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.table-primary { color: var(--ink); font-weight: 800; }
.table-secondary { display: block; max-width: 420px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.table-number { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 800; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.table-actions .button { min-height: 34px; padding: 6px 10px; }
.table-toolbar, .table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: white; }
.table-toolbar { border-bottom: 1px solid #e3eaf1; border-radius: 12px 12px 0 0; }
.table-footer { border-top: 1px solid #e3eaf1; border-radius: 0 0 12px 12px; color: var(--muted); font-size: .72rem; }
.table-search { position: relative; width: min(340px,100%); }
.table-search input { width: 100%; min-height: 38px; padding: 8px 12px 8px 34px; border: 1px solid #ccd8e4; border-radius: 8px; background: #fff; font-size: .78rem; }
.table-search::before { position: absolute; top: 50%; left: 12px; color: #7a8da1; content: "⌕"; font-size: 1rem; transform: translateY(-52%); }
.table-size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.table-size select { min-height: 36px; padding: 6px 28px 6px 9px; border: 1px solid #ccd8e4; border-radius: 8px; background: white; font-size: .75rem; }
.table-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.table-page { min-width: 32px; min-height: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--ink-soft); background: transparent; font-size: .72rem; font-weight: 750; cursor: pointer; }
.table-page:hover { border-color: #cbd8e4; background: #f2f6fa; }
.table-page.active { color: white; background: var(--teal); }
.table-page:disabled { color: #a1adba; cursor: not-allowed; }
.row-actions { position: relative; display: inline-block; text-align: left; }
.row-actions > summary { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 6px 12px; border: 1px solid #b8c9d9; border-radius: 8px; color: var(--ink); background: #edf3f8; font-size: .75rem; font-weight: 800; cursor: pointer; list-style: none; }
.row-actions > summary::-webkit-details-marker { display: none; }
.row-actions > summary::after { margin-left: 7px; content: "▾"; font-size: .65rem; }
.row-actions[open] > summary::after { content: "▴"; }
.row-actions[open]::before { position: fixed; inset: 0; z-index: 79; background: rgba(9,22,35,.42); content: ""; backdrop-filter: blur(2px); }
.row-actions-panel { position: fixed; top: 50%; left: 50%; z-index: 80; width: min(590px,calc(100vw - 36px)); max-height: min(82vh,720px); padding: 18px; overflow-y: auto; border: 1px solid #ccd8e4; border-radius: 14px; background: white; box-shadow: 0 24px 60px rgba(9,22,35,.28); transform: translate(-50%,-50%); }
.row-actions-panel h3 { margin-bottom: 13px; }
.row-edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.row-edit-grid .span-all { grid-column: 1 / -1; }
.row-edit-grid input, .row-edit-grid select, .row-edit-grid textarea { width: 100%; min-width: 0; }
.row-edit-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e4eaf0; }
.inventory-item-photo { display: inline-flex; margin-top: 5px; font-size: .7rem; font-weight: 750; }
.color-preview { display: inline-block; width: 12px; height: 12px; margin-right: 7px; border: 1px solid rgba(15,23,42,.14); border-radius: 50%; background: var(--preview); vertical-align: -1px; }
.stock-zero > td { background: #fff9f9; }
.stock-low > td { background: #fffdf4; }
.ticket-code { color: var(--ink); font-weight: 800; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 99px; color: color-mix(in srgb, var(--status) 75%, #17272c); background: color-mix(in srgb, var(--status) 13%, white); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.status::before { width: 7px; height: 7px; border-radius: 50%; background: var(--status); content: ""; }
.status-large { padding: 9px 13px; color: white; background: rgba(255,255,255,.13); }
.status-large::before { background: white; }
.empty { padding: 28px; color: var(--muted); text-align: center; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.filter-bar label { min-width: 180px; flex: 0 1 260px; }
.filter-bar .search-field { flex-grow: 1; }
.ticket-filters { padding: 14px; border: 1px solid #dfe7ef; border-radius: 12px; background: #f7f9fc; }
.ticket-filters label { flex: 1 1 180px; }
.ticket-filters .search-field { flex-basis: 320px; }
.bulk-ticket-form { display: grid; grid-template-columns: minmax(190px,.75fr) minmax(180px,.8fr) minmax(220px,1.2fr) auto; gap: 12px; align-items: end; margin: 18px 0; padding: 15px; border: 1px solid #cbd8e4; border-radius: 12px; background: #eef3f8; }
.bulk-ticket-form [hidden] { display: none !important; }
.bulk-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); }
.bulk-heading span { color: var(--muted); font-size: .76rem; }
.bulk-comment { min-width: 220px; }
.tickets-table { min-width: 1280px; table-layout: auto; }
.tickets-table th:nth-child(4), .tickets-table td:nth-child(4), .tickets-table th:nth-child(5), .tickets-table td:nth-child(5) { min-width: 175px; text-align: left; }
.tickets-table .table-secondary { display: -webkit-box; max-width: 260px; overflow: hidden; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ticket-select-cell { width: 44px; min-width: 44px; text-align: center !important; }
.ticket-select { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; }
.tickets-table tr:has(.ticket-select:checked) > td { background: #eaf2f8; }
.ticket-actions-cell { position: sticky; right: 0; z-index: 2; min-width: 150px; background: white; box-shadow: -8px 0 12px rgba(25,44,63,.05); }
.tickets-table thead .ticket-actions-cell { z-index: 3; background: #f7f9fc; }
.tickets-table tbody tr:hover > .ticket-actions-cell { background: #f8fbfe; }
.ticket-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ticket-actions form { margin: 0; }
.ticket-actions .muted-text { max-width: 80px; font-size: .66rem; text-align: right; }
.merge-notice { border-left: 4px solid var(--teal); background: #f4f8fb; }
.merge-notice p { margin: 7px 0 0; color: var(--ink-soft); }
label, fieldset { color: var(--ink-soft); font-size: .78rem; font-weight: 700; }
label input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), label > select, label > textarea, .inline-create input, .editable-table input, .editable-table select, .diagnostic-grid input, .diagnostic-grid select, .finding-row input, .finding-row select { display: block; width: 100%; min-width: 0; margin-top: 6px; padding: 11px 12px; border: 1px solid #cddbdd; border-radius: 9px; color: var(--ink); background: white; font-weight: 500; }
input[readonly] { color: var(--muted); background: #f4f7f7; }
textarea { resize: vertical; }
select { min-height: 44px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; }

.form-stack { display: grid; gap: 18px; }
.ticket-create-form { width: min(1120px, 100%); margin-inline: auto; }
.form-section { display: grid; grid-template-columns: 48px 1fr; gap: 20px; }
.section-number, .diagnostic-section summary span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: white; background: var(--teal); font-weight: 900; }
.section-body { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.choice-card { cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card > span { display: flex; min-height: 86px; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; transition: .15s ease; }
.choice-card i { width: 24px; height: 4px; margin-bottom: 12px; border-radius: 99px; }
.choice-card strong { color: var(--ink); }
.choice-card small { margin-top: 5px; color: var(--muted); font-weight: 500; }
.choice-card input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.inline-search { min-width: 220px; }
.service-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.service-group legend { color: var(--teal); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.service-catalog { display: grid; gap: 2px; }
.service-heading { align-items: end; }
.service-heading .help { margin: 7px 0 0; }
.service-notes { margin-top: 22px; }
.check-grid, .checkbox-set { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.check-option, .checkbox-set label { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #e0e9ea; border-radius: 9px; color: var(--ink-soft); background: #fbfdfd; cursor: pointer; font-weight: 600; }
.check-option:has(input:checked), .checkbox-set label:has(input:checked) { border-color: #8bcac3; color: var(--teal-dark); background: #eaf8f5; }
.check-option input, .checkbox-set input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; padding: 0; accent-color: var(--teal); }
.check-option span, .checkbox-set label span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: .7rem; font-weight: 500; line-height: 1.4; }
.dropzone { display: grid; min-height: 135px; place-items: center; align-content: center; padding: 22px; border: 2px dashed #a8c7c5; border-radius: 14px; color: var(--teal); background: #f6fbfa; text-align: center; cursor: pointer; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone span { color: var(--muted); font-size: .76rem; font-weight: 500; }
.file-list { display: grid; gap: 6px; margin-top: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 8px 0; }

.ticket-hero { align-items: flex-start; margin-bottom: 20px; }
.detail-navigation { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.detail-navigation span { color: var(--muted); font-size: .75rem; }
.ticket-hero.compact { margin-bottom: 0; }
.ticket-hero .tag-list { margin-top: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; padding: 5px 9px; border-radius: 7px; color: #dff8f4; background: rgba(255,255,255,.12); font-size: .7rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,360px); gap: 20px; }
.ticket-main { display: grid; gap: 20px; min-width: 0; }
.sticky-actions { position: sticky; top: 106px; display: grid; gap: 13px; }
.action-form { display: grid; gap: 11px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 14px rgba(19,42,47,.04); }
.action-form h3 { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0; }
.detail-grid > div { padding: 13px; border-radius: 10px; background: #f7f9f9; }
.detail-grid dt { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.detail-grid dd { margin: 4px 0 0; font-size: .85rem; font-weight: 650; }
.timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline::before { position: absolute; top: 10px; bottom: 18px; left: 8px; width: 2px; background: #dbe8e7; content: ""; }
.timeline li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 13px; padding-bottom: 20px; }
.timeline li > i { z-index: 1; width: 18px; height: 18px; border: 5px solid #c8ebe6; border-radius: 50%; background: var(--teal); }
.timeline strong { font-size: .82rem; }
.timeline p { margin: 2px 0; color: var(--ink-soft); font-size: .8rem; }
.timeline small { color: var(--muted); font-size: .68rem; }
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.comment-form label:first-of-type { grid-column: 1 / -1; }
.comment-form button { justify-self: start; }
.file-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.file-card { display: flex; min-width: 0; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.file-card strong { overflow: hidden; color: var(--ink); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { color: var(--muted); font-size: .67rem; }
.location-ok { display: flex; flex-direction: column; padding: 12px; border: 1px solid #a9d9b8; border-radius: 10px; color: #175c2a; background: #edf9f0; }
.location-ok span { font-size: .72rem; }
.location-ok.location-warning { border-color: #efcf91; color: #815300; background: #fff8e8; }

.diagnostic-form { display: grid; width: min(1240px,100%); margin-inline: auto; gap: 15px; }
.diagnostic-section { padding: 0; overflow: hidden; }
.diagnostic-index { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 14px rgba(19,42,47,.04); }
.diagnostic-index a { padding: 9px 11px; border-radius: 8px; color: var(--ink-soft); background: #f3f8f7; font-size: .72rem; font-weight: 750; }
.diagnostic-index a:hover { color: var(--teal-dark); background: var(--teal-soft); text-decoration: none; }
.diagnostic-section summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-weight: 850; cursor: pointer; list-style: none; }
.diagnostic-section summary::-webkit-details-marker { display: none; }
.diagnostic-section summary::after { margin-left: auto; color: var(--muted); content: "+"; font-size: 1.3rem; }
.diagnostic-section[open] summary::after { content: "−"; }
.diagnostic-title { display: flex; align-items: center; gap: 12px; padding: 16px 22px; color: white; background: linear-gradient(90deg,var(--navy),var(--teal)); }
.diagnostic-title span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; color: var(--navy); background: white; font-weight: 900; }
.diagnostic-title h3 { margin: 0; color: white; font-size: 1rem; letter-spacing: 0; text-transform: uppercase; }
.diagnostic-body { display: grid; gap: 18px; padding: 0 22px 24px; border-top: 1px solid var(--line); }
.diagnostic-body > :first-child { margin-top: 22px; }
.diagnostic-grid { display: grid; grid-template-columns: minmax(160px,.8fr) minmax(180px,1fr) minmax(180px,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.diagnostic-grid > div { min-width: 0; padding: 8px; background: white; }
.diagnostic-grid .diag-head { color: white; background: var(--navy); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.diagnostic-grid input, .diagnostic-grid select { margin: 0; }
.diag-label { font-size: .75rem; font-weight: 700; }
.readonly-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.readonly-summary > div { min-width: 0; padding: 13px; border: 1px solid #dfe9e9; border-radius: 10px; background: #f6f9f9; }
.readonly-summary small, .readonly-summary strong { display: block; }
.readonly-summary small { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.readonly-summary strong { margin-top: 4px; overflow-wrap: anywhere; font-size: .82rem; }
.technical-note { margin: 0; padding: 12px 14px; border-left: 4px solid var(--teal); border-radius: 8px; color: #315457; background: #edf8f6; font-size: .78rem; }
.technical-note.warning { border-left-color: #d97706; color: #734b09; background: #fff8e8; }
.reading-grid { margin-top: 10px; }
.editable-table input, .editable-table select { min-width: 100px; margin: 0; padding: 8px; }
.findings { display: grid; gap: 7px; }
.finding-header { display: grid; grid-template-columns: 30px 1fr 150px 1fr; gap: 7px; padding: 0 8px; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.finding-row { display: grid; grid-template-columns: 30px 1fr 150px 1fr; gap: 7px; align-items: center; }
.finding-row > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: white; background: var(--teal); font-size: .75rem; font-weight: 800; }
.signature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.signature-pad { display: block; width: 100%; height: 150px; border: 1px dashed #9fb7b9; border-radius: 10px; background: #fcfefe; touch-action: none; }
.signature-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.signature-title h3 { margin-bottom: 8px; }
.signature-saved { padding: 4px 8px; border-radius: 99px; color: #176332; background: #e7f7ec; font-size: .66rem; font-weight: 800; }
.signature-screen { display: grid; width: min(1100px,100%); margin-inline: auto; gap: 18px; }
.signature-form { display: grid; gap: 22px; }
.signature-box { padding: 17px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #f8fbfb; }
.signature-required, .signature-pending { padding: 4px 8px; border-radius: 99px; color: #8b2b22; background: #fff0ee; font-size: .66rem; font-weight: 800; }
.signature-optional { padding: 4px 8px; border-radius: 99px; color: #445f63; background: #eaf0f1; font-size: .66rem; font-weight: 800; }
.approval-upload { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: end; padding: 18px; border: 1px solid #cfe1df; border-radius: 13px; color: var(--ink); background: #f2f9f8; }
.diagnostic-table { min-width: 900px; }

.admin-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(310px,.7fr); gap: 20px; }
.users-admin-grid { grid-template-columns: minmax(620px,1.6fr) minmax(340px,.75fr); align-items: start; }
.users-table { min-width: 880px; }
.user-actions { flex-wrap: nowrap; }
.user-actions form { margin: 0; }
.client-fields { display: grid; gap: 14px; }
.branch-permissions { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; }
.branch-permissions legend { padding: 0 5px; color: var(--ink); font-weight: 800; }
.branch-permissions .field-help { margin: 0 0 10px; }
.branch-permission-list { display: grid; gap: 7px; }
.branch-permission { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #dce7e7; border-radius: 9px; background: white; cursor: pointer; }
.branch-permission:hover { border-color: #91c9c4; background: #f1faf8; }
.branch-permission:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(15,118,110,.1); }
.branch-permission input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--teal); }
.branch-permission span, .branch-permission strong, .branch-permission small { display: block; min-width: 0; }
.branch-permission strong { color: var(--ink); font-size: .78rem; overflow-wrap: anywhere; }
.branch-permission small { margin-top: 2px; color: var(--muted); font-size: .66rem; font-weight: 500; }
.compact-form { gap: 12px; }
.inline-create { display: grid; grid-template-columns: 1.4fr .7fr auto; gap: 8px; margin-bottom: 16px; }
.service-create { grid-template-columns: minmax(220px,1.5fr) minmax(150px,.7fr) 90px auto; }
.setting-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.setting-card { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.setting-card > div, .setting-card > button { grid-column: 1 / -1; }
.setting-card strong, .setting-card small { display: block; }
.setting-card small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.color-input { min-height: 44px; padding: 4px !important; cursor: pointer; }
.service-admin-list { display: grid; gap: 9px; }
.service-admin-row { display: grid; grid-template-columns: minmax(260px,1.5fr) minmax(150px,.7fr) 85px 80px auto; gap: 10px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; }
.toggle-field { display: flex; min-height: 44px; align-items: center; gap: 8px; padding-bottom: 9px; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--teal); }
.catalog-add-form { display: grid; grid-template-columns: minmax(240px,1.4fr) minmax(140px,.55fr) 120px auto; gap: 10px; align-items: end; margin-bottom: 18px; padding: 14px; border: 1px solid #dfe9e9; border-radius: 11px; background: #f8fbfb; }
.service-add-form { grid-template-columns: minmax(260px,1.4fr) minmax(180px,.8fr) auto; }
.catalog-table { min-width: 860px; }
.services-catalog-table { min-width: 780px; }
.catalog-table th:last-child { width: 190px; }
.catalog-table td { padding: 10px; vertical-align: middle; }
.catalog-table input:not([type="checkbox"]), .catalog-table select { width: 100%; min-width: 90px; margin: 0; padding: 9px 10px; border: 1px solid #cddbdd; border-radius: 8px; background: white; }
.catalog-table td:first-child input { min-width: 230px; }
.services-catalog-table td:nth-child(2) input { min-width: 150px; }
.color-cell { display: flex; align-items: center; gap: 8px; }
.color-cell .color-input { width: 58px !important; min-width: 58px !important; }
.color-cell code { color: var(--ink-soft); font-size: .72rem; }
.table-toggle { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.table-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.profile-grid { display: grid; width: min(980px,100%); grid-template-columns: minmax(260px,.75fr) minmax(420px,1.25fr); gap: 20px; margin-inline: auto; align-items: start; }
.profile-summary { display: flex; align-items: center; gap: 17px; }
.profile-summary p { margin: 4px 0 12px; color: var(--muted); overflow-wrap: anywhere; }
.profile-avatar { display: grid; width: 74px; height: 74px; flex: 0 0 74px; place-items: center; border-radius: 22px; color: white; background: linear-gradient(135deg,var(--teal),var(--navy)); font-size: 1.8rem; font-weight: 900; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 14px rgba(19,42,47,.04); }
.settings-tab { padding: 10px 14px; border-radius: 9px; color: var(--ink-soft); font-size: .78rem; font-weight: 750; }
.settings-tab:hover { color: var(--teal-dark); background: #eef8f6; text-decoration: none; }
.settings-tab.active { color: white; background: var(--teal); box-shadow: 0 5px 12px rgba(25,44,63,.2); }
.mail-config-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.mail-config-summary > div { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f7fbfa; }
.mail-config-summary span, .mail-config-summary strong { display: block; }
.mail-config-summary span { margin-bottom: 4px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mail-config-summary strong { overflow-wrap: anywhere; color: var(--ink); font-size: .8rem; }
.mail-test-row { display: flex; align-items: end; gap: 10px; margin: 18px 0; }
.mail-test-row form:first-child { display: grid; min-width: min(100%,520px); grid-template-columns: minmax(220px,1fr) auto; gap: 10px; align-items: end; }
.mail-test-row form:last-child { margin-left: auto; }
.mail-log-table { min-width: 980px; }
.mail-log-table td { vertical-align: top; }
.mail-log-table td:nth-child(2) strong, .mail-log-table td:nth-child(2) small { display: block; }
.mail-log-table td:nth-child(2) small { max-width: 260px; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.mail-error { max-width: 380px; color: #8e2525; font-size: .72rem; text-align: left !important; overflow-wrap: anywhere; }
.alert { position: relative; margin-bottom: 15px; padding: 12px 42px 12px 15px; border: 1px solid; border-radius: 10px; font-size: .82rem; font-weight: 650; }
.alert button { position: absolute; top: 5px; right: 8px; border: 0; color: inherit; background: none; font-size: 1.4rem; cursor: pointer; }
.alert-success { border-color: #a8d9b6; color: #236236; background: #eef9f1; }
.alert-danger { border-color: #efb1b1; color: #8e2525; background: #fff2f2; }
.alert-warning { border-color: #efd39c; color: #825400; background: #fff9ed; }

.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, #d8f1ed 0, transparent 28%), linear-gradient(145deg, #f7fbfa, #e7f1f1); }
.auth-shell .main-shell { width: min(1040px,100%); }
.auth-shell .page-content { padding: 0; }
.login-card { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 620px; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: white; box-shadow: 0 30px 80px rgba(13,57,57,.16); }
.login-visual { display: flex; flex-direction: column; justify-content: flex-end; padding: 58px; color: white; background: radial-gradient(circle at 30% 20%, rgba(135,166,197,.48), transparent 28%), linear-gradient(145deg,#294863,#0f1e2c); }
.login-brand-logo { display: block; width: min(520px,100%); height: 190px; margin-bottom: 24px; object-fit: contain; object-position: left center; }
.login-visual h1 { max-width: 440px; color: white; font-size: clamp(2.2rem,5vw,3.7rem); }
.login-visual > p { margin: 0 0 auto; font-family: Georgia,serif; font-size: 2rem; font-weight: 800; }
.login-visual > span { color: #c7e6e3; }
.industrial-symbol { display: grid; width: 66px; height: 66px; margin-bottom: 22px; place-items: center; border: 2px solid #9de1d8; border-radius: 20px; font-size: 2rem; transform: rotate(-8deg); }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px,7vw,70px); }
.login-form h2 { margin-bottom: 7px; font-size: 2rem; }
.login-form > p { color: var(--muted); }
.login-form form { display: grid; gap: 17px; margin: 22px 0 15px; }
.password-wrap { display: grid; width: 100%; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: stretch; margin-top: 6px; }
.password-wrap input { width: 100%; min-width: 0; min-height: 44px; margin: 0 !important; padding: 10px 12px !important; }
.password-wrap button { min-width: 62px; min-height: 44px; padding: 8px 11px; border: 1px solid #a9d6d2; border-radius: 9px; color: var(--teal-dark); background: #eef9f7; font-size: .75rem; font-weight: 800; cursor: pointer; }
.password-wrap button:hover { background: #dff3f0; }
.muted-link { color: var(--muted); font-size: .78rem; text-align: center; }
.simple-auth { width: min(520px,100%); margin: auto; }
.simple-auth .brand { justify-content: center; }
.simple-auth .brand-copy { color: var(--ink); }
.simple-auth .brand-mark { color: var(--ink); border-color: var(--line); }

.report-locked { max-width: 260px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; color: #fff; background: rgba(9,25,40,.28); font-size: .75rem; font-weight: 750; text-align: center; }
.operations-panel { display: grid; gap: 22px; }
.credit-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.credit-summary > div { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f6f8fb; }
.credit-summary small, .credit-summary strong { display: block; }
.credit-summary small { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.credit-summary strong { margin-top: 5px; color: var(--ink); }
.operations-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.equivalence-create { grid-template-columns: minmax(220px,1.5fr) repeat(4,minmax(145px,.7fr)) auto; align-items: end; }
.inventory-create { grid-template-columns: repeat(4,minmax(130px,1fr)); align-items: end; }
.equivalence-create label { min-width: 0; }
.equivalence-table { min-width: 1080px; }
.equivalence-table th:nth-child(2), .equivalence-table td:nth-child(2) { width: 105px; text-align: left; }
.operations-table { min-width: 1120px; }
.inventory-table { min-width: 1200px; }
.inventory-table textarea { min-width: 220px; }
.inventory-table .button-row { min-width: 230px; }
.editable-table td input, .editable-table td select, .editable-table td textarea { width: 100%; margin: 2px 0; }
.inline-check { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.inline-check input { margin: 0; accent-color: var(--teal); }
.spaced-table { margin-top: 24px; }
.operations-panel table form { margin: 0; }
.table-row-form { display: grid; width: 100%; gap: 10px; align-items: center; }
.table-row-form input, .table-row-form select, .table-row-form textarea { width: 100%; min-width: 0; margin: 2px 0; }
.equivalence-row-form { grid-template-columns: 1.25fr 1fr 1.25fr .55fr .55fr .7fr 1fr; }
.branch-credit-row { grid-template-columns: 1.3fr .8fr .8fr .8fr auto; }
.inventory-row-form { grid-template-columns: 1.1fr 1.35fr .55fr .8fr 1fr 1.4fr; }
.inventory-actions, .stock-movement-fields { display: grid; gap: 6px; }
.stock-movement-fields { grid-template-columns: 1fr 1fr; }
.stock-movement-fields .button { grid-column: 1 / -1; }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .users-admin-grid { grid-template-columns: 1fr; }
  .setting-card-grid { grid-template-columns: 1fr 1fr; }
  .service-admin-row { grid-template-columns: 1fr 1fr 90px 80px; }
  .service-admin-row .button-row { grid-column: 1 / -1; }
  .credit-summary { grid-template-columns: 1fr 1fr; }
  .equivalence-create, .inventory-create { grid-template-columns: 1fr 1fr; }
  .equivalence-row-form, .inventory-row-form { grid-template-columns: 1fr 1fr; }
  .branch-usage-grid { grid-template-columns: 1fr 1fr; }
  .consolidated-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 960px) {
  .app-shell { padding-left: 0; }
  .sidebar { width: min(290px,85vw); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { justify-content: flex-start; }
  .topbar > .button { margin-left: auto; }
  .ticket-layout { grid-template-columns: 1fr; }
  .ticket-aside { order: -1; }
  .sticky-actions { position: static; }
  .login-card { grid-template-columns: 1fr; }
  .login-visual { min-height: 310px; padding: 36px; }
  .login-visual h1 { font-size: 2.1rem; }
  .industrial-symbol { display: none; }
}

@media (max-width: 680px) {
  .page-content { padding: 18px 13px 50px; }
  .topbar { min-height: 72px; padding: 12px 14px; }
  .topbar .eyebrow { display: none; }
  .topbar > .button { width: 42px; padding: 0; overflow: hidden; white-space: nowrap; color: transparent; }
  .topbar > .button .icon { color: white; }
  .welcome-panel, .ticket-hero { align-items: flex-start; flex-direction: column; padding: 23px; }
  .welcome-panel .button { width: 100%; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 15px; }
  .metric-card small { display: none; }
  .metric-card strong { font-size: 1.65rem; }
  .panel { padding: 17px; border-radius: 13px; }
  .panel-heading { flex-direction: column; margin-bottom: 15px; }
  .form-section { grid-template-columns: 1fr; gap: 12px; }
  .form-grid, .choice-grid, .check-grid, .checkbox-set, .detail-grid, .file-grid, .signature-grid { grid-template-columns: 1fr; }
  .choice-card > span { min-height: 72px; }
  .form-actions { position: sticky; bottom: 0; z-index: 10; margin: 0 -13px -50px; padding: 12px 13px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
  .form-actions .button { flex: 1; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form label:first-of-type { grid-column: auto; }
  .diagnostic-section summary { padding: 14px; }
  .diagnostic-index { grid-template-columns: 1fr 1fr; }
  .diagnostic-title { padding: 14px; }
  .diagnostic-title h3 { font-size: .84rem; }
  .diagnostic-body { padding: 0 14px 18px; }
  .diagnostic-grid { grid-template-columns: 1fr; }
  .diagnostic-grid .diag-head { display: none; }
  .diagnostic-grid .diag-label { padding-top: 15px; color: var(--teal); background: #f0f8f7; }
  .signature-grid, .approval-upload { grid-template-columns: 1fr; }
  .finding-row { grid-template-columns: 27px 1fr; }
  .finding-header { display: none; }
  .finding-row select, .finding-row input:last-child { grid-column: 2; }
  .readonly-summary { grid-template-columns: 1fr 1fr; }
  .inline-create { grid-template-columns: 1fr; }
  .setting-card-grid, .service-create, .service-admin-row { grid-template-columns: 1fr; }
  .catalog-add-form, .service-add-form, .profile-grid { grid-template-columns: 1fr; }
  .settings-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-tab { text-align: center; }
  .mail-config-summary { grid-template-columns: 1fr; }
  .mail-test-row { align-items: stretch; flex-direction: column; }
  .mail-test-row form:first-child { min-width: 0; grid-template-columns: 1fr; }
  .mail-test-row form:last-child { margin-left: 0; }
  .mail-test-row .button { width: 100%; }
  .operations-admin-grid, .credit-summary, .equivalence-create, .inventory-create, .table-row-form { grid-template-columns: 1fr; }
  .bulk-ticket-form { grid-template-columns: 1fr; }
  .bulk-heading { align-items: flex-start; flex-direction: column; }
  .ticket-filters label, .ticket-filters .search-field { flex-basis: 100%; }
  .ticket-filters .button { flex: 1; }
  .tickets-panel .table-wrap { overflow: visible; border: 0; background: transparent; }
  .tickets-table { min-width: 0; border-collapse: separate; background: transparent; }
  .tickets-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .tickets-table tbody { display: grid; gap: 12px; }
  .tickets-table tbody tr { display: grid; overflow: hidden; border: 1px solid #dce5ee; border-radius: 13px; background: white; box-shadow: 0 5px 16px rgba(25,44,63,.06); }
  .tickets-table tbody td { position: static; display: grid; width: 100%; min-width: 0; grid-template-columns: 105px minmax(0,1fr); gap: 9px; align-items: start; padding: 9px 12px; border: 0; border-bottom: 1px solid #edf1f5; background: white; text-align: left !important; box-shadow: none; }
  .tickets-table tbody td::before { color: #6b7d8f; content: attr(data-label); font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .tickets-table tbody td:last-child { border-bottom: 0; }
  .tickets-table .ticket-select-cell { display: block; width: 100%; padding: 10px 12px 2px; border-bottom: 0; }
  .tickets-table .ticket-select-cell::before { display: none; }
  .tickets-table .ticket-actions-cell { position: static; min-width: 0; background: #f7f9fc; }
  .tickets-table .ticket-actions { justify-content: flex-start; }
  .tickets-table .ticket-actions .button { flex: 1; }
  .tickets-table .table-secondary { max-width: none; font-size: .74rem; -webkit-line-clamp: 3; }
  .tickets-table tbody tr:has(.empty) td { display: block; }
  .tickets-table tbody tr:has(.empty) td::before { display: none; }
  .detail-navigation { align-items: stretch; flex-direction: column; }
  .detail-navigation .button { width: 100%; }
  .detail-navigation span { text-align: center; }
  .setting-card > div, .setting-card > button, .service-admin-row .button-row { grid-column: auto; }
  .toggle-field { padding-bottom: 0; }
  .login-card { min-height: 0; }
  .login-visual { display: none; }
  .login-form { padding: 34px 25px; }
  .auth-shell { padding: 13px; }
  .bar-row { grid-template-columns: 100px 1fr 24px; }
  .branch-usage-grid { grid-template-columns: 1fr; }
  .consolidated-metrics { grid-template-columns: 1fr 1fr; }
  .emergency-banner { align-items: flex-start; flex-direction: column; }
  .table-toolbar, .table-footer { align-items: stretch; flex-direction: column; }
  .table-search { width: 100%; }
  .table-size { justify-content: space-between; }
  .table-footer { align-items: center; }
  .table-pagination { flex-wrap: wrap; justify-content: center; }
  .row-actions-panel { top: auto; bottom: 12px; left: 12px; width: calc(100vw - 24px); max-height: 82vh; transform: none; }
  .row-edit-grid { grid-template-columns: 1fr; }
  .row-edit-grid .span-all { grid-column: auto; }
  th, td { padding: 11px 12px; }
}

@media print {
  .sidebar, .topbar, .form-actions, .button, .ticket-aside, .comment-form { display: none !important; }
  .app-shell { padding: 0; }
  .page-content { padding: 0; }
  .panel, .ticket-hero { break-inside: avoid; box-shadow: none; }
}
