:root {
    --bg: #f3f5f7;
    --ink: #111827;
    --muted: #667085;
    --line: #d9e0e8;
    --panel: #ffffff;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --warning: #b45309;
    --danger: #b42318;
    --ok: #15803d;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(16, 24, 40, .08);
    --shadow-soft: 0 8px 24px rgba(16, 24, 40, .06);
}

[hidden] {
    display: none !important;
}

.draft-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #99d5cc;
    border-radius: 6px;
    background: #effcf9;
    color: #145c54;
}

.quality-merge-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #dce3e8;
}

@media (max-width: 720px) {
    .quality-merge-row { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; font-weight: 700; }
a:hover { color: var(--primary-dark); }
.topbar {
    min-height: 68px;
    padding: 0 28px;
    background: var(--custom-topbar, #101828);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.top-module-chip {
    margin-right: auto;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 800;
}
.module-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.module-switcher label {
    margin: 0;
    color: #cbd5e1;
    font-size: 12px;
    text-transform: uppercase;
}
.module-switcher select {
    width: auto;
    min-width: 210px;
    min-height: 38px;
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 800;
}
.module-switcher option {
    color: #111827;
}
.topbar-search {
    display: grid;
    grid-template-columns: minmax(180px, 280px) auto;
    align-items: center;
    gap: 6px;
}
.topbar-search input {
    min-height: 38px;
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}
.topbar-search input::placeholder {
    color: #cbd5e1;
}
.topbar-search button {
    min-height: 38px;
    padding: 0 11px;
    background: var(--primary);
    font-size: 13px;
}
.topbar nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    color: #e5e7eb;
}
.topbar nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
.view-as-banner {
    padding: 10px 18px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
}
.view-as-banner a {
    color: #0f766e;
    margin-left: 8px;
}
.sync-strip {
    min-height: 38px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #bbf7d0;
    background: #ecfdf3;
    color: #166534;
    font-size: 12px;
}
.sync-strip-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #16a34a;
}
.sync-strip [data-sync-detail] { color: #4b5563; }
.sync-strip .button { min-height: 28px; margin-left: 3px; padding: 0 9px; }
.sync-strip.is-offline {
    border-bottom-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}
.sync-strip.is-offline .sync-strip-dot,
.sync-strip.has-pending .sync-strip-dot { background: #f59e0b; }
.sync-strip.has-error {
    border-bottom-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}
.sync-strip.has-error .sync-strip-dot { background: #dc2626; }

.sync-strip.is-unauthorized {
    border-color: #f4c86a;
    background: #fff8df;
    color: #7a4d00;
}

.sync-strip.is-unauthorized .sync-strip-dot { background: #d97706; }

.sync-device-link { margin-left: auto; }

.compact-actions {
    gap: 6px;
    flex-wrap: wrap;
}
.sync-dialog {
    width: min(620px, calc(100% - 24px));
    max-height: min(760px, calc(100vh - 24px));
    padding: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
}
.sync-dialog::backdrop { background: rgba(15, 23, 42, .58); }
.sync-dialog .modal-body { padding: 20px; }
.sync-dialog .modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.sync-dialog .modal-heading h2,
.sync-dialog .modal-heading p { margin: 0; }
.sync-dialog .modal-heading p { margin-top: 4px; }
.sync-queue-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.sync-queue-item strong,
.sync-queue-item span,
.sync-queue-item small { display: block; }
.sync-queue-item span,
.sync-queue-item small { margin-top: 3px; color: var(--muted); }
.sync-queue-item .sync-item-error { color: var(--danger); }
.offline-sync-notice { margin-bottom: 14px; }
.notification-center {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.notification-toggle,
.notification-sound {
    min-height: 40px;
    border-radius: 999px;
    box-shadow: 0 14px 40px rgba(16, 24, 40, .2);
}
.notification-toggle {
    gap: 8px;
    background: #101828;
}
.notification-toggle.active {
    background: var(--danger);
}
.notification-sound {
    background: #344054;
}
.notification-sound.active {
    background: var(--primary);
}
.notification-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #98a2b3;
}
.notification-dot.active {
    background: #facc15;
    box-shadow: 0 0 0 6px rgba(250, 204, 21, .25);
}
.notification-panel {
    position: absolute;
    right: 0;
    bottom: 52px;
    display: none;
    width: min(380px, calc(100vw - 28px));
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(16, 24, 40, .24);
}
.notification-center.open .notification-panel {
    display: block;
}
.context-help-button {
    position: fixed;
    right: 18px;
    bottom: 72px;
    z-index: 79;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 14px 40px rgba(16, 24, 40, .2);
}
.context-help-button:hover {
    color: #fff;
    background: var(--primary-dark);
}
.notification-panel > strong {
    display: block;
    margin-bottom: 12px;
}
.notification-item {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}
.notification-item:first-child {
    border-top: 0;
}
.notification-item span {
    color: var(--muted);
    line-height: 1.35;
}
.notification-item small {
    color: #98a2b3;
}
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    width: min(1440px, calc(100% - 32px));
    margin: 24px auto;
    align-items: start;
}
.app-content {
    width: 100%;
    margin: 0;
}
.sidebar {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    background: var(--custom-sidebar, #101828);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    box-shadow: var(--shadow);
}
.sidebar-mobile-toggle {
    display: none;
}
.sidebar-inner {
    min-width: 0;
}
.sidebar-user {
    padding: 18px;
    border-bottom: 1px solid #344054;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
}
.sidebar-user strong,
.sidebar-user span {
    display: block;
    overflow-wrap: anywhere;
}
.sidebar-user span {
    color: #cbd5e1;
    font-size: 13px;
    margin-top: 4px;
}
.sidebar-user em {
    display: inline-flex;
    width: fit-content;
    margin-top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(20, 184, 166, .14);
    color: #99f6e4;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.sidebar-user strong { color: #fff; }
.side-nav {
    display: grid;
    gap: 8px;
    padding: 12px;
}
.side-button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .06);
    color: #f8fafc;
    font-weight: 700;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.side-button:hover,
.side-button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateX(2px);
}
.side-label {
    display: block;
    padding: 14px 12px 6px;
    color: #98a2b3;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.side-section {
    display: grid;
    min-width: 0;
}
.side-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    user-select: none;
}
.side-section-toggle::-webkit-details-marker {
    display: none;
}
.side-section-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -2px);
    transition: transform .18s ease;
    opacity: .85;
}
.side-section[open] .side-section-toggle {
    background: rgba(20, 184, 166, .14);
    border-color: rgba(20, 184, 166, .25);
    color: #f8fafc;
}
.side-section[open] .side-section-toggle::after {
    transform: rotate(225deg) translate(-2px, -1px);
}
.side-section-links {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding-top: 6px;
}
.sidebar-search {
    padding: 12px;
    border-bottom: 1px solid #344054;
}
.sidebar-search input {
    min-height: 38px;
    border-color: #344054;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
}
.sidebar-search input::placeholder {
    color: #98a2b3;
}
.list-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
    gap: 8px;
    margin: 14px 0 18px;
}
.list-toolbar input,
.list-toolbar select,
.list-toolbar button,
.list-toolbar .button {
    min-height: 42px;
}
.list-toolbar .button {
    justify-content: center;
}
.is-submitting {
    cursor: wait;
    opacity: .72;
}
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 28px;
    align-items: center;
    padding: 32px 0;
}
.login-screen {
    min-height: calc(100vh - 140px);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 28px;
    align-items: center;
}
.login-company {
    background: #101828;
    color: #fff;
    border-radius: 8px;
    padding: 34px;
}
.login-company h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 14px;
}
.login-company p {
    color: #d0d5dd;
    max-width: 620px;
}
.login-kicker {
    display: inline-block;
    color: #99f6e4;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    font-size: 12px;
}
.company-contact {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}
.company-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    width: fit-content;
    padding: 0 14px;
    border-radius: 6px;
    background: #1d2939;
    color: #fff;
    font-weight: 700;
}
.company-contact .whatsapp-link {
    background: #16a34a;
}
.login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, .12);
}
.login-card h2 {
    font-size: 28px;
}
.login-card form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}
.login-card button {
    width: 100%;
}
.forgot-link {
    text-align: center;
    font-weight: 700;
}
h1 { font-size: 38px; line-height: 1.12; margin: 0 0 12px; }
h2 { margin: 0 0 18px; color: #1f2937; }
p { color: var(--muted); line-height: 1.55; }
.panel, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.panel-head h2 {
    margin-bottom: 4px;
}
.panel-head .actions {
    margin: 0;
}
.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 22px;
}
.module-card {
    display: grid;
    gap: 10px;
    min-height: 180px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.module-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.module-card span {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}
.module-card strong {
    font-size: 24px;
}
.module-card small {
    color: var(--muted);
    line-height: 1.45;
}
.module-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.module-meta b {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
}
.module-meta i {
    color: var(--ink);
    font-size: 18px;
    font-style: normal;
}
.quick-start-panel {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    gap: 16px;
    align-items: center;
    margin: 18px 0 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.quick-start-panel h2 {
    margin: 4px 0 0;
}
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.quick-action-card {
    display: grid;
    gap: 4px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
}
.quick-action-card:hover {
    border-color: var(--primary);
    background: #ecfdf3;
}
.quick-action-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.company-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:18px}.company-heading h1{margin:4px 0 6px}.company-heading p{margin:0;color:var(--muted)}.company-month-filter{display:flex;align-items:end;gap:8px}.company-month-filter label{display:grid;gap:6px;font-weight:700}.company-month-filter input{min-width:175px}.company-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.company-kpis .stat-card{min-height:126px}.company-kpis .stat-card strong{font-size:clamp(22px,2vw,30px)}.positive-value{color:#087f5b}.negative-value{color:#b42318}.company-actions-panel{margin-bottom:18px}.company-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.company-breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.summary-list{margin:0}.summary-list div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border)}.summary-list div:last-child{border-bottom:0}.summary-list dt{color:var(--muted)}.summary-list dd{margin:0;font-weight:800}@media(max-width:980px){.company-kpis,.company-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.company-heading{align-items:stretch;flex-direction:column}.company-month-filter{display:grid;grid-template-columns:1fr auto}.company-month-filter label{grid-column:1/-1}.company-kpis,.company-action-grid,.company-breakdown{grid-template-columns:1fr}}
.module-permission-form {
    display: grid;
    gap: 8px;
}
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.permission-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.permission-group > strong {
    color: #344054;
    text-transform: uppercase;
    font-size: 12px;
}
.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 700;
}
.checkline input {
    width: auto;
}
.stat strong { display: block; font-size: 28px; margin-top: 8px; }
.stat {
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary);
}
.danger-stat {
    border-color: #fecaca;
    background: #fff5f5;
}
.danger-stat strong {
    color: var(--danger);
}
.warning-stat {
    border-color: #fed7aa;
    background: #fffbeb;
}
.warning-stat strong {
    color: var(--warning);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full { grid-column: 1 / -1; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
    outline: 0;
}
.wide-select-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
}
.wide-select-scroll select {
    display: block;
    width: max-content;
    min-width: max(100%, 840px);
    white-space: nowrap;
}
.table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}
.grid > * { min-width: 0; }
textarea { min-height: 120px; resize: vertical; }
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .16);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.html-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: currentColor;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.html-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.html-icon img,
.icon-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.icon-picker {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    padding: 14px;
    background: #fff;
}
.icon-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.icon-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--primary);
    background: #f8fafc;
}
.icon-preview svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.button.secondary .html-icon,
button.secondary .html-icon,
.side-button .html-icon {
    background: rgba(255, 255, 255, .12);
}
table a .html-icon {
    display: none;
}
.button:hover, button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 118, 110, .2);
}
.button.secondary {
    background: #344054;
    box-shadow: 0 8px 18px rgba(52, 64, 84, .12);
}
.button.danger, button.danger { background: var(--danger); }
.button.danger:hover, button.danger:hover { background: #7a271a; }
.button.small { min-height: 34px; padding: 0 12px; }
.mini-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 800;
}
.mini-check input {
    width: 18px;
    height: 18px;
}
.service-items-table th:first-child,
.service-items-table td:first-child,
.service-items-table th:last-child,
.service-items-table td:last-child {
    width: 1%;
    white-space: nowrap;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
:target {
    scroll-margin-top: 92px;
}
.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.inline-form {
    display: grid;
    gap: 8px;
    min-width: 240px;
}
.row-action-form {
    display: inline-flex;
    margin: 0;
}
.row-action-form button {
    width: auto;
}
.batch-actions {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) minmax(170px, .8fr) minmax(190px, .8fr) auto;
    align-items: end;
    gap: 10px;
}
.batch-actions strong,
.batch-actions span {
    display: block;
}
.batch-actions-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.batch-actions-panel > summary::-webkit-details-marker {
    display: none;
}
.batch-actions-panel > summary::after {
    content: "+";
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
}
.batch-actions-panel[open] > summary::after {
    content: "−";
}
.batch-actions-panel .batch-actions {
    grid-template-columns: minmax(150px, .8fr) minmax(170px, .9fr) minmax(190px, .9fr) auto;
    margin-top: 14px;
}
.ticket-list-toolbar {
    grid-template-columns: minmax(170px, .45fr) minmax(260px, 1fr) auto auto;
}
.ticket-view-switch {
    margin: 14px 0 6px;
}
[data-ticket-view-panel][hidden] {
    display: none !important;
}
.batch-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.partial-payment-form {
    display: inline-grid;
    grid-template-columns: 110px 132px auto;
    align-items: center;
    gap: 6px;
}
.partial-payment-form input {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}
.expense-table th,
.expense-table td {
    padding: 9px 10px;
    vertical-align: middle;
}
.expense-table .expense-description {
    max-width: 320px;
}
.expense-table .expense-description small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.expense-action-cell {
    min-width: 132px;
}
.expense-actions-details {
    display: block;
}
.expense-actions-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: #24354d;
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .14);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}
.expense-actions-details summary::-webkit-details-marker {
    display: none;
}
.expense-actions-details summary::after {
    content: " ↓";
    font-weight: 900;
}
.expense-actions-details[open] summary::after {
    content: " ↑";
}
.expense-actions-details .expense-row-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: min(620px, calc(100vw - 48px));
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: var(--shadow-soft);
}
.expense-actions-details .row-action-form button,
.expense-actions-details > summary {
    font-size: 13px;
}
.expense-actions-details .partial-payment-form {
    grid-column: 1 / -1;
}
.expense-actions-details summary::after {
    content: " v";
}
.expense-actions-details[open] summary::after {
    content: " ^";
}
.expense-mobile-list {
    display: none;
}
.expense-mobile-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.expense-mobile-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.expense-mobile-card header strong,
.expense-mobile-card header span {
    display: block;
}
.expense-mobile-card header strong {
    color: var(--ink);
    line-height: 1.25;
}
.expense-mobile-card header div > span,
.expense-mobile-meta {
    color: var(--muted);
    font-size: 13px;
}
.expense-mobile-money {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.expense-mobile-money span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
}
.expense-mobile-money strong {
    color: var(--ink);
    font-size: 14px;
}
.expense-mobile-meta {
    display: grid;
    gap: 4px;
}
.inline-form textarea {
    min-height: 76px;
}
.inline-form button {
    width: fit-content;
}
.tech-board {
    display: grid;
    gap: 16px;
}
.tech-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}
.tech-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.tech-ticket-details {
    display: block;
}
.tech-ticket-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    background: #fff;
}
.tech-ticket-summary::-webkit-details-marker {
    display: none;
}
.tech-ticket-summary::after {
    content: "";
    width: 9px;
    height: 9px;
    justify-self: end;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: rotate(45deg);
    transition: transform .18s ease;
}
.tech-ticket-details[open] .tech-ticket-summary {
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}
.tech-ticket-details[open] .tech-ticket-summary::after {
    transform: rotate(225deg);
}
.tech-ticket-summary-main,
.tech-ticket-summary-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.tech-ticket-summary-main strong {
    color: var(--primary-dark);
    font-size: 13px;
}
.tech-ticket-summary-main b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tech-ticket-summary-main small,
.tech-ticket-summary-meta small {
    color: var(--muted);
}
.tech-ticket-summary-meta {
    justify-items: end;
}
.tech-ticket-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}
.tech-ticket-body > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.tech-card h2 {
    margin-top: 12px;
}
.tech-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}
.tech-summary-grid p {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.tech-summary-grid span {
    color: #344054;
    overflow-wrap: anywhere;
}
.tech-core-address {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.tech-core-address span {
    overflow-wrap: anywhere;
    color: #344054;
}
.tech-extra-details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
    margin: 10px 0;
}
.tech-extra-details summary {
    cursor: pointer;
    color: var(--ink);
    font-weight: 900;
}
.tech-extra-details[open] summary {
    margin-bottom: 10px;
}
.tech-photo-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 12px 0;
}
.tech-photo-status > * {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.tech-photo-status .is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.tech-photo-status .is-pending {
    border-color: #fed7aa;
    background: #fff7ed;
}
.tech-photo-status span {
    color: var(--muted);
    font-size: 13px;
}
.tech-service-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.tech-service-list > strong {
    font-size: 15px;
}
.tech-service-list .muted {
    margin: -2px 0 2px;
}
.tech-service-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.tech-service-item.is-completed {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.tech-service-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}
.tech-service-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.tech-service-item span {
    display: grid;
    gap: 3px;
}
.tech-service-item small {
    color: var(--muted);
}
.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.quick-actions button {
    min-height: 38px;
}
.tech-final-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}
.tech-finish-review {
    display: grid;
    gap: 6px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #d8e0e6;
    border-radius: var(--card-radius);
    background: #f8fafc;
    color: #344054;
}
.tech-finish-review strong {
    color: var(--ink);
}
.tech-finish-review span {
    font-size: 13px;
}
.tech-final-actions button:last-child {
    background: var(--ok);
}
.tech-final-actions button:last-child:hover {
    background: #116b31;
}
.tech-advanced {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 9px 10px;
}
.tech-advanced summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.tech-advanced select {
    margin-top: 8px;
}
.favorite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.favorite-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.favorite-card a {
    color: var(--ink);
    font-weight: 800;
}
.favorite-card form {
    margin: 0;
}
.audit-data-details {
    margin-top: 8px;
}
.audit-data-details summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 800;
}
.audit-data-details pre {
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 12px;
}
.today-actions-panel {
    margin: 14px 0 18px;
}
.today-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.today-action-card {
    display: grid;
    gap: 6px;
    min-height: 108px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.today-action-card.needs-attention {
    border-color: #fed7aa;
    background: #fff7ed;
}
.today-action-card strong {
    font-size: 30px;
    line-height: 1;
}
.today-action-card small {
    color: var(--muted);
}
.next-step-panel {
    display: grid;
    gap: 10px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.next-step-panel h2 {
    margin: 0;
}
.next-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.next-step-card {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.next-step-card.needs-attention {
    border-color: #99f6e4;
    background: #f0fdfa;
}
.next-step-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.history-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.history-stage {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.history-stage h3 {
    margin: 0;
    font-size: 15px;
}
.link-test-list {
    display: grid;
    gap: 10px;
}
.link-test-list > div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto 120px;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.link-test-list a {
    overflow-wrap: anywhere;
}
.compact-list {
    display: grid;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
    padding-left: 20px;
}
.help-list {
    display: grid;
    gap: 8px;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.45;
}
.quick-status-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.quick-status-form .button,
.fiscal-whatsapp {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}
.checklist {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.checklist label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0;
    font-weight: 700;
}
.checklist input {
    width: auto;
    margin-top: 2px;
}
.checklist strong {
    margin-left: auto;
    color: var(--danger);
    font-size: 11px;
    text-transform: uppercase;
}
.quick-materials,
.tech-fiscal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.quick-materials .button,
.tech-fiscal-actions .button {
    width: auto;
    white-space: normal;
}
.tech-history {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.tech-history summary {
    cursor: pointer;
    font-weight: 800;
}
.tech-history div {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.tech-history div:first-of-type {
    margin-top: 8px;
}
.tech-history span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.tech-history p {
    margin: 4px 0 0;
}
.offline-alert {
    display: none;
}
.offline-alert.active {
    display: block;
}
.kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(230px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin: 18px 0 26px;
}
.kanban-column {
    min-width: 230px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    background: #f8fafc;
    transition: border-color .18s ease, background .18s ease;
}
.kanban-column.drop-target {
    border-color: var(--primary);
    background: #f0fdfa;
}
.kanban-column header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}
.kanban-column header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e2e8f0;
    font-weight: 800;
}
.kanban-list {
    display: grid;
    gap: 10px;
    padding: 10px;
}
.kanban-ticket {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    background: #fff;
    cursor: grab;
}
.kanban-ticket.is-dragging,
.calendar-card.is-dragging {
    opacity: .5;
    cursor: grabbing;
}
.kanban-ticket h3 {
    margin: 0;
    font-size: 15px;
}
.kanban-ticket p,
.kanban-ticket small {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
}
.kanban-ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dispatch-form {
    display: grid;
    gap: 8px;
}
.dispatch-form select,
.dispatch-form input {
    min-height: 36px;
    padding: 8px;
    font-size: 13px;
}
.kanban-empty {
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: var(--card-radius, 8px);
    color: var(--muted);
    text-align: center;
}
.calendar-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding: 4px 0 14px;
}
.calendar-day {
    min-height: 320px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    background: #f8fafc;
    transition: border-color .18s ease, background .18s ease;
}
.calendar-day.drop-target {
    border-color: var(--primary);
    background: #f0fdfa;
}
.calendar-day header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}
.calendar-day header strong {
    font-size: 20px;
}
.calendar-day header span {
    color: var(--muted);
    font-size: 12px;
}
.calendar-day header b {
    grid-row: 1 / span 2;
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e2e8f0;
}
.calendar-dropzone {
    display: grid;
    gap: 10px;
    padding: 10px;
}
.calendar-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    background: #fff;
    cursor: grab;
}
.calendar-card span,
.calendar-card small {
    color: var(--muted);
}
.compact-schedule-form {
    display: grid;
    gap: 6px;
}
.compact-schedule-form input,
.compact-schedule-form select {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 13px;
}
.mobile-helper {
    display: none;
}
.mobile-upload-note {
    display: block;
    margin-top: -2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.technician-photo-upload {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.photo-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.photo-upload-actions .button {
    width: auto;
    cursor: pointer;
}
.photo-upload-actions input[type="file"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}
.selected-photo-name {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}
.execution-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.execution-photo-list a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}
.photo-upload-highlight {
    border-color: var(--primary);
    background: #f0fdfa;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .14);
}
.tech-mobile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.pending-list {
    display: grid;
    gap: 14px;
}
.pending-overview a {
    color: var(--ink);
}
.pending-stat {
    border-left: 4px solid var(--primary);
}
.pending-stat.warning {
    border-left-color: var(--warning);
}
.pending-stat.danger {
    border-left-color: var(--danger);
}
.pending-stat span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.pending-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}
.pending-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.pending-card h3 {
    margin: 0 0 10px;
}
.pending-card-head p {
    margin: 0;
    color: var(--muted);
}
.client-summary-grid {
    margin-bottom: 16px;
}
.client-filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1fr) minmax(220px, .8fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.client-filter-panel > div:first-child {
    display: grid;
    gap: 2px;
}
.client-ticket-board {
    display: grid;
    gap: 14px;
}
.client-ticket-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.client-ticket-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.client-ticket-card > header > div {
    display: grid;
    gap: 4px;
}
.client-ticket-card > header strong {
    font-size: 18px;
}
.client-ticket-card > header span:not(.badge) {
    color: var(--muted);
}
.client-ticket-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.client-ticket-info p {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.client-ticket-info strong {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}
.client-ticket-info span {
    overflow-wrap: anywhere;
}
.row-warning td {
    background: #fffbeb;
}
.material-lines {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}
.service-lines {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}
.service-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.service-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.service-option label:first-child {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
}
.service-option input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}
.service-option small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 400;
}
.selection-hint {
    width: fit-content;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-weight: 800;
}
.selection-hint.is-ok {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #166534;
}
.selection-hint.is-warning {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}
.junta-page {
    display: grid;
    gap: 16px;
}
.junta-page .module-actions {
    margin-bottom: 2px;
}
.junta-page .module-lead {
    max-width: 780px;
    margin-top: -6px;
}
.junta-summary .card {
    display: grid;
    gap: 8px;
}
.junta-summary .card span {
    color: #475467;
    line-height: 1.25;
}
.junta-summary .card strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
}
.junta-request h2 {
    margin-bottom: 12px;
}
.material-line {
    display: grid;
    grid-template-columns: 1.25fr 1.5fr .55fr .65fr;
    gap: 8px;
}
.service-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: 8px;
    align-items: start;
}
.chart-list {
    display: grid;
    gap: 12px;
}
.chart-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) 46px;
    gap: 10px;
    align-items: center;
}
.chart-row span {
    font-weight: 700;
    overflow-wrap: anywhere;
}
.chart-row div {
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
body[data-chart-style="thin"] .chart-row div {
    height: 6px;
}
body[data-chart-style="solid"] .chart-row div i {
    background: #101828;
}
body[data-density="compact"] .panel,
body[data-density="compact"] .card {
    padding: 16px;
}
body[data-density="compact"] .side-button,
body[data-density="compact"] .button,
body[data-density="compact"] button {
    min-height: 36px;
}
.chart-row i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
}
.chart-row strong {
    text-align: right;
}
.timeline-visual {
    display: grid;
    gap: 10px;
}
.timeline-visual-item {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 12px 12px 12px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #f8fafc;
}
.timeline-visual-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.timeline-visual-item p {
    margin: 0;
}
.detail-list {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.detail-list dt,
.detail-list dd {
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
.detail-list dt {
    background: #f8fafc;
    font-weight: 800;
    color: #475467;
}
.document-list {
    display: grid;
    gap: 10px;
}
.document-list a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.document-list span {
    color: var(--muted);
    font-size: 12px;
}
.nfse-copy-box {
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    padding: 14px;
    background: #f8fafc;
}
.nfse-copy-box textarea[readonly] {
    background: #fff;
    color: #344054;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.45;
    min-height: 280px;
}
.nfse-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.nfse-toolbar h2 {
    margin: 0 0 4px;
}
.nfse-selection-table th:first-child,
.nfse-selection-table td:first-child {
    width: 42px;
    text-align: center;
}
.nfse-selection-table input[type="checkbox"],
.checkbox-line input[type="checkbox"] {
    width: auto;
}
.nfse-emit-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}
@media (max-width: 760px) {
    .nfse-toolbar {
        display: grid;
    }
}
.timeline-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
}
.timeline-item {
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}
.timeline-item strong,
.timeline-item span {
    display: block;
}
.timeline-item span {
    color: var(--muted);
    font-size: 12px;
}
.timeline-item p {
    margin: 4px 0 0;
}
.workflow-actions {
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    background: #f8fafc;
    padding: 12px;
    margin: 14px 0;
}
.workflow-actions h2 {
    margin: 0 0 10px;
}
.checklist-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 8px);
    padding: 12px;
    background: #f8fafc;
}
.checklist-card label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checklist-card input[type="checkbox"] {
    width: auto;
}
.whatsapp-compose textarea {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.45;
}
.quick-copy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.help-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.help-hero h2 {
    margin: 4px 0 6px;
}
.help-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.help-link-card {
    display: grid;
    gap: 7px;
    min-height: 108px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}
.help-link-card strong {
    font-size: 15px;
}
.help-link-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.help-guide-card {
    display: grid;
    gap: 10px;
    align-content: start;
}
.help-list {
    margin: 0;
    padding-left: 20px;
}
.help-list li {
    margin: 7px 0;
}
.stat span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}
.signature-pad {
    width: 100%;
    max-width: 700px;
    height: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}
.signature-image {
    display: block;
    max-width: 420px;
    width: 100%;
    border-bottom: 1px solid #111827;
    padding: 12px 0;
}
.fiscal-portal {
    margin-top: 16px;
}
.fiscal-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.fiscal-check-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}
.fiscal-check-grid strong,
.fiscal-check-grid span {
    display: block;
}
.fiscal-check-grid span {
    margin-top: 4px;
    color: var(--muted);
}
.fiscal-check-grid .is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.fiscal-check-grid .is-pending {
    border-color: #fed7aa;
    background: #fff7ed;
}
.fiscal-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.fiscal-actions-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}
.fiscal-reject-form {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}
.electronic-acceptance {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed #98a2b3;
    color: #344054;
    text-align: center;
}
.electronic-acceptance span {
    color: var(--muted);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f1f5f9; font-size: 12px; text-transform: uppercase; color: #475467; letter-spacing: .02em; }
tbody tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #eef2f6; font-size: 12px; font-weight: 800; }
.status-concluido, .status-faturada, .status-paga { color: var(--ok); }
.status-cancelado { color: var(--danger); }
.status-agendado, .status-em_execucao, .status-aguardando_fiscal { color: var(--warning); }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; background: #eef2f6; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.muted { color: var(--muted); }
.os-print { background: #fff; padding: 28px; border: 1px solid var(--line); }
.os-document {
    background: #fff;
    border: 1px solid var(--line);
    padding: 24px;
    color: #111827;
    max-width: 210mm;
    margin: 0 auto;
}
.os-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 18px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-bottom: 3px solid #101828;
    border-radius: 8px;
    background: #f8fafc;
}
.os-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}
.os-brand-block {
    display: grid;
    gap: 4px;
    justify-items: start;
}
.os-logo {
    display: block;
    width: min(145px, 100%);
    height: auto;
    object-fit: contain;
    margin-bottom: 2px;
}
.os-header p {
    margin: 2px 0;
    color: #344054;
}
.os-kicker {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.os-number {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
}
.os-number strong {
    font-size: 28px;
}
.os-number small {
    color: var(--muted);
}
.os-qr {
    width: 82px;
    height: 82px;
    object-fit: contain;
    border: 1px solid var(--line);
    background: #fff;
    padding: 4px;
}
.os-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef2f6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}
.os-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.os-summary div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    box-shadow: inset 4px 0 0 var(--primary);
}
.os-summary strong,
.os-summary span {
    display: block;
}
.os-summary strong {
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.status-timeline {
    display: grid;
    grid-template-columns: repeat(8, minmax(92px, 1fr));
    gap: 8px;
}
.timeline-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 7px;
    min-height: 86px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}
.timeline-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475467;
    font-weight: 900;
}
.timeline-step strong {
    color: #475467;
    font-size: 12px;
    line-height: 1.25;
}
.timeline-step.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.timeline-step.done span {
    background: #16a34a;
    color: #fff;
}
.timeline-step.current {
    border-color: var(--primary);
    background: #f0fdfa;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .18);
}
.timeline-step.current span {
    background: var(--primary);
    color: #fff;
}
.timeline-step.canceled {
    border-color: #fecaca;
    background: #fff5f5;
}
.timeline-step.canceled span {
    background: var(--danger);
}
.contract-summary-grid {
    margin: 16px 0;
}
.os-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.os-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-top: 14px;
    break-inside: avoid;
    background: #fff;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .04);
}
.os-box h2 {
    font-size: 18px;
    padding: 10px 12px;
    margin: -16px -16px 12px;
    background: #f8fafc;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
}
.os-box h3 {
    font-size: 15px;
    margin: 0 0 8px;
}
.os-box p {
    color: #344054;
    margin-top: 0;
}
.os-highlight-box {
    border-color: #0f766e;
    background: #f0fdfa;
}
.os-highlight-box h2 {
    background: #ccfbf1;
}
.work-instructions,
.os-extra-work {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f0fdfa;
}
.work-instructions p,
.os-extra-work p {
    margin-bottom: 0;
}
.os-extra-work {
    margin-top: 12px;
    background: #fffbeb;
}
.os-box dl {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0;
    margin: 0;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    overflow: hidden;
}
.os-box dt {
    color: #475467;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    padding: 8px 10px;
}
.os-box dd {
    margin: 0;
    border-bottom: 1px solid #eef2f6;
    padding: 8px 10px;
}
.os-box dt:last-of-type,
.os-box dd:last-of-type {
    border-bottom: 0;
}
.os-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.os-photo-grid.one {
    grid-template-columns: minmax(260px, 520px);
}
.os-photo-grid figure {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}
.os-photo-grid img,
.os-photo-empty {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.os-photo-grid figcaption {
    padding: 10px;
    font-weight: 700;
}
.os-material-table {
    margin: 0;
}
.os-material-table tfoot th {
    background: #f8fafc;
}
.os-timeline {
    display: grid;
    gap: 10px;
}
.os-timeline-item {
    border-left: 4px solid var(--primary);
    padding: 8px 0 8px 12px;
    background: #f8fafc;
}
.os-timeline-item strong,
.os-timeline-item span {
    display: block;
}
.os-timeline-item p {
    margin: 4px 0 0;
}
.os-acceptance {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    margin-top: 16px;
    padding: 18px;
    border: 2px solid #101828;
    border-radius: 8px;
    background: #f8fafc;
    break-inside: avoid;
}
.os-signature-box {
    text-align: center;
}
.os-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.signature { height: 80px; border-bottom: 1px solid #111827; margin-top: 48px; }
.notification-browser {
    min-height: 40px;
    border-radius: 999px;
    background: #475467;
    box-shadow: 0 14px 40px rgba(16, 24, 40, .2);
}
.notification-browser.active {
    background: #2563eb;
}
.notification-browser:disabled {
    opacity: .58;
    cursor: not-allowed;
}
.ticket-progress {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    break-inside: avoid;
}
.ticket-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #344054;
    font-weight: 800;
}
.ticket-progress-bar {
    height: 10px;
    margin: 10px 0 12px;
    border-radius: 999px;
    background: #e4e7ec;
    overflow: hidden;
}
.ticket-progress-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #2563eb);
}
.ticket-progress-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
}
.ticket-progress-steps span {
    display: grid;
    gap: 4px;
    min-height: 54px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.ticket-progress-steps b {
    width: fit-content;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fee2e2;
    color: var(--danger);
    font-size: 10px;
}
.ticket-progress-steps .done {
    border-color: #bbf7d0;
    color: #14532d;
}
.ticket-progress-steps .done b {
    background: #dcfce7;
    color: #15803d;
}
.live-pulse {
    animation: livePulse .65s ease;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .28); }
    100% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
}
.task-grid,
.fiscal-board,
.route-board,
.command-grid {
    display: grid;
    gap: 16px;
}
.task-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.command-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.task-panel header,
.route-panel header,
.fiscal-card header,
.command-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.task-panel header h2,
.route-panel header h2,
.fiscal-card header h2,
.command-card header h2 {
    margin: 0;
    font-size: 18px;
}
.task-panel header span,
.command-card header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #101828;
    color: #fff;
    font-weight: 900;
}
.task-list {
    display: grid;
    gap: 10px;
}
.task-item,
.route-list li {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.task-item span,
.route-list span {
    color: #344054;
}
.task-item small,
.route-list small {
    color: var(--muted);
    line-height: 1.35;
}
.task-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.route-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}
.fiscal-card {
    display: grid;
    gap: 12px;
}
.fiscal-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.fiscal-card-grid p {
    margin: 6px 0;
}
.quick-phrases {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.quick-phrases .button {
    width: auto;
    white-space: normal;
    text-align: left;
}
.tech-filter-panel {
    display: grid;
    grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr) minmax(220px, .45fr);
    gap: 12px;
    align-items: center;
    margin: 12px 0 16px;
}
.tech-filter-panel strong,
.tech-filter-panel span {
    display: block;
}
.segmented-control {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.segmented-control button,
.segmented-control a {
    width: auto;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: #f8fafc;
    color: #344054;
    box-shadow: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.segmented-control button.active,
.segmented-control button:hover,
.segmented-control a.active,
.segmented-control a:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.tech-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}
.tech-search-form button {
    width: auto;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--card-radius);
}
.pagination-summary {
    color: var(--muted);
    font-size: 14px;
}
.pagination-links,
.pagination-size {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.pagination-size span {
    color: var(--muted);
    font-size: 13px;
}
.empty-state {
    text-align: center;
}
@page {
    size: A4 portrait;
    margin: 9mm;
}
@media (max-width: 820px) {
    .sync-strip {
        min-height: 44px;
        padding: 7px 10px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 2px 8px;
    }
    .sync-strip-dot { grid-row: 1 / 3; }
    .sync-strip [data-sync-detail] { grid-column: 2; }
    .sync-strip [data-sync-pending],
    .sync-strip [data-sync-now] { grid-column: 3; grid-row: 1 / 3; }
    .sync-strip [data-sync-now] { display: none !important; }
    .sync-strip .sync-device-link { display: none; }
    .sync-queue-item { grid-template-columns: 1fr; }
    .sync-queue-item .actions { justify-content: stretch; }
    .sync-queue-item .actions .button { flex: 1; }
    .hero, .grid, .grid.two, .module-grid, .form-grid, .login-screen, .os-header, .os-summary, .os-section-grid, .os-photo-grid, .os-acceptance, .task-grid, .command-grid, .fiscal-card-grid, .quick-start-panel, .tech-filter-panel, .client-filter-panel, .client-ticket-info, .batch-actions { grid-template-columns: 1fr; }
    .help-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .status-timeline {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .timeline-step {
        min-width: 128px;
    }
    .topbar {
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        padding: 10px 14px;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 70;
    }
    .brand span:not(.brand-mark),
    .top-module-chip,
    .module-switcher,
    .topbar-search {
        display: none;
    }
    .brand-mark {
        width: 34px;
        height: 34px;
    }
    .topbar nav {
        margin-left: auto;
        gap: 6px;
    }
    .topbar nav a {
        min-height: 36px;
        padding: 0 9px;
        font-size: 13px;
    }
    .notification-center {
        right: 8px;
        bottom: 8px;
        max-width: calc(100vw - 16px);
    }
    .notification-sound {
        display: none;
    }
    .notification-browser {
        display: inline-flex;
        min-height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }
    .login-company,
    .login-card {
        padding: 22px;
    }
    .login-company h1 {
        font-size: 28px;
    }
    .app-shell {
        display: block;
        width: calc(100% - 20px);
        margin: 12px auto;
    }
    .sidebar {
        position: sticky;
        top: 58px;
        z-index: 60;
        max-height: min(76vh, calc(100dvh - 76px));
        margin-bottom: 12px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 8px;
        transition: max-height .22s ease, box-shadow .22s ease;
    }
    .sidebar.is-collapsed {
        max-height: 52px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(16, 24, 40, .14);
    }
    .sidebar.is-collapsed .sidebar-inner {
        display: none;
    }
    .sidebar-mobile-toggle {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 52px;
        padding: 0 12px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #f8fafc;
        box-shadow: none;
        text-align: left;
    }
    .sidebar-mobile-toggle:hover {
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, .06);
    }
    .sidebar-mobile-toggle span {
        font-weight: 900;
    }
    .sidebar-mobile-toggle strong {
        overflow: hidden;
        color: #99f6e4;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sidebar-mobile-toggle small {
        color: #cbd5e1;
        font-weight: 800;
    }
    .sidebar-mobile-toggle[aria-expanded="true"] small::after {
        content: " ↑";
    }
    .sidebar-mobile-toggle[aria-expanded="false"] small::after {
        content: " ↓";
    }
    .side-nav {
        display: grid;
        gap: 6px;
        padding: 8px;
        overflow: visible;
        scrollbar-width: thin;
    }
    .side-label {
        display: none;
    }
    .side-section-toggle {
        min-height: 40px;
        padding: 9px 10px;
        font-size: 11px;
    }
    .side-section-links {
        gap: 5px;
        padding-top: 5px;
    }
    .app-content {
        width: 100%;
        min-width: 0;
    }
    .container {
        width: 100%;
        margin: 0;
    }
    h1 {
        font-size: 30px;
        line-height: 1.12;
        overflow-wrap: anywhere;
    }
    h2 {
        font-size: 23px;
        line-height: 1.18;
    }
    .panel-head {
        display: grid;
        gap: 10px;
    }
    .panel-head .actions {
        margin: 0;
        overflow: visible;
        flex-wrap: wrap;
    }
    .panel-head .actions .button {
        flex: 1 1 150px;
        justify-content: center;
    }
    .panel,
    .card {
        padding: 16px;
    }
    .actions {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    .actions .button {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 12px;
        white-space: nowrap;
    }
    .form-grid > .full.actions {
        position: sticky;
        bottom: 0;
        z-index: 25;
        flex-wrap: wrap;
        margin: 10px -4px -8px;
        padding: 10px;
        border-top: 1px solid var(--line);
        border-radius: 0 0 8px 8px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -10px 24px rgba(16, 24, 40, .08);
        overflow: visible;
    }
    .form-grid > .full.actions .button,
    .form-grid > .full.actions button {
        flex: 1 1 150px;
        justify-content: center;
        width: auto;
        white-space: normal;
    }
    .junta-page {
        gap: 6px;
    }
    .junta-page .module-lead {
        margin: -2px 0 0;
        font-size: 15px;
    }
    .junta-summary {
        gap: 10px;
    }
    .junta-summary .card {
        gap: 4px;
        min-height: auto;
    }
    .junta-summary .card strong {
        font-size: 20px;
    }
    .junta-request {
        margin-top: 8px !important;
    }
    .side-button {
        justify-content: flex-start;
        min-height: 42px;
        min-width: 0;
        width: 100%;
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.15;
        gap: 6px;
        white-space: normal;
        word-break: normal;
        text-align: left;
    }
    body[data-icons="1"] .side-button {
        font-size: 12px;
    }
    .side-button .html-icon,
    .side-button svg {
        width: 16px;
        height: 16px;
        margin: 0;
        font-size: 16px;
    }
    .sidebar-user {
        display: none;
    }
    .sidebar-search {
        display: block;
        padding: 8px;
        border-bottom: 0;
        border-top: 1px solid #344054;
    }
    .sidebar-search input {
        min-height: 42px;
        font-size: 16px;
    }
    .list-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
        margin: 12px 0 14px;
    }
    .list-toolbar .button.secondary {
        grid-column: 1 / -1;
    }
    .ticket-list-toolbar select,
    .ticket-list-toolbar input {
        grid-column: 1 / -1;
    }
    .batch-actions-panel .batch-actions {
        grid-template-columns: 1fr;
    }
    .batch-actions-panel > summary {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 28px;
        position: relative;
    }
    .batch-actions-panel > summary::after {
        position: absolute;
        top: -4px;
        right: 0;
    }
    .app-shell,
    body > .container {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }
    table { display: block; overflow-x: auto; }
    table.mobile-card-table {
        display: block;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .mobile-card-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .mobile-card-table tbody {
        display: grid;
        gap: 10px;
    }
    .mobile-card-table tbody tr {
        display: grid;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-left: 4px solid var(--primary);
        border-radius: 8px;
        background: var(--panel);
        box-shadow: var(--shadow-soft);
    }
    .mobile-card-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        width: 100%;
        padding: 9px 11px;
        border-bottom: 1px solid var(--line);
        overflow-wrap: anywhere;
    }
    .mobile-card-table tbody td:last-child {
        border-bottom: 0;
    }
    .mobile-card-table tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }
    .mobile-card-table tbody td[data-label=""] {
        display: block;
    }
    .mobile-card-table tbody td[data-label=""]::before {
        display: none;
    }
    .mobile-card-table .row-actions,
    .mobile-card-table .actions {
        margin: 0;
        overflow: visible;
        flex-wrap: wrap;
    }
    .pending-card {
        padding: 12px;
    }
    .pending-card-head {
        display: grid;
    }
    .client-ticket-card {
        padding: 12px;
    }
    .client-ticket-card > header {
        display: grid;
    }
    .client-ticket-card .ticket-progress {
        margin: 4px 0;
        padding: 10px;
    }
    .client-ticket-card .ticket-progress-steps {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .client-ticket-card .ticket-progress-steps span {
        min-width: 96px;
    }
    .inline-form {
        min-width: 0;
    }
    .quick-actions button,
    .inline-form button {
        width: 100%;
    }
    .tech-service-item {
        grid-template-columns: 1fr;
    }
    .tech-service-item .button {
        width: 100%;
    }
    .partial-payment-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .mobile-helper {
        display: block;
    }
    .tech-board {
        gap: 12px;
    }
    .tech-card {
        padding: 0;
    }
    .tech-ticket-summary {
        grid-template-columns: minmax(0, 1fr) auto 16px;
        min-height: 68px;
        padding: 12px;
        gap: 8px;
    }
    .tech-ticket-summary-meta {
        max-width: 110px;
    }
    .tech-ticket-body {
        padding: 12px;
    }
    .tech-card h2 {
        font-size: 20px;
        line-height: 1.2;
        margin: 10px 0;
    }
    .tech-summary-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        margin: 10px 0;
    }
    .tech-summary-grid p {
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: center;
        padding: 8px;
    }
    .tech-core-address,
    .tech-final-actions {
        grid-template-columns: 1fr;
    }
    .tech-summary-grid span {
        overflow-wrap: break-word;
        word-break: normal;
    }
    .tech-photo-status {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }
    .tech-photo-status > * {
        min-width: 132px;
        min-height: 58px;
        padding: 8px;
        scroll-snap-align: start;
    }
    .tech-mobile-actions,
    .quick-actions,
    .tech-fiscal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .tech-mobile-actions .button,
    .quick-actions button,
    .tech-fiscal-actions .button {
        width: 100%;
        min-height: 40px;
        padding: 8px 6px;
        font-size: 13px;
        line-height: 1.15;
    }
    .link-test-list > div,
    .history-stage-grid,
    .today-actions-grid,
    .next-step-grid {
        grid-template-columns: 1fr;
    }
    .quick-materials,
    .quick-phrases,
    .segmented-control {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
    }
    .quick-materials .button,
    .quick-phrases .button,
    .segmented-control button,
    .segmented-control a {
        width: auto;
        flex: 0 0 auto;
        max-width: 190px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .pagination {
        align-items: stretch;
    }
    .pagination-summary {
        width: 100%;
    }
    .pagination-links,
    .pagination-size {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
    }
    .photo-upload-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .photo-upload-actions .button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        padding: 8px 6px;
        font-size: 13px;
        line-height: 1.15;
    }
    .work-instructions p {
        max-height: 118px;
        overflow: auto;
    }
    .checklist {
        padding: 10px;
        gap: 6px;
    }
    .checklist label {
        font-size: 13px;
        line-height: 1.25;
    }
    .fiscal-actions-panel {
        grid-template-columns: 1fr;
    }
    .fiscal-reject-form {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 16px;
    }
    .inline-form select,
    .inline-form textarea,
    .inline-form input[type="file"] {
        font-size: 16px;
    }
    .kanban-board {
        grid-template-columns: repeat(6, 84vw);
    }
    .service-card-grid,
    .service-option,
    .material-line,
    .service-line,
    .chart-row,
    .detail-list {
        grid-template-columns: 1fr;
    }
    .service-option {
        gap: 10px;
        padding: 12px;
    }
    .service-option label:first-child {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 10px;
    }
    .service-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    .service-option strong {
        display: block;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }
    .chart-row strong {
        text-align: left;
    }
    .os-document {
        padding: 16px;
    }
    .os-number {
        justify-items: start;
        text-align: left;
    }
}
@media (max-width: 820px) {
    .expense-table {
        display: none;
    }
    .expense-mobile-list {
        display: grid;
        gap: 10px;
        margin-top: 12px;
    }
    .expense-mobile-card .expense-actions-details summary {
        width: 100%;
    }
    .expense-mobile-card .expense-actions-details .expense-row-actions {
        max-width: none;
    }
    .expense-actions-details .expense-row-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .expense-actions-details .partial-payment-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .expense-actions-details .row-action-form,
    .expense-actions-details .row-action-form button,
    .expense-actions-details a {
        width: 100%;
    }
}

@media print {
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    html,
    body {
        width: auto;
        min-width: 0;
        background: #fff;
        color: #111827;
        font-size: 10.5px;
        line-height: 1.32;
    }
    .topbar, .sidebar, .actions, .no-print, .view-as-banner { display: none; }
    .app-shell,
    .app-content,
    .container {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }
    .os-print,
    .os-document {
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        padding: 0;
        box-shadow: none;
    }
    .os-header {
        grid-template-columns: minmax(0, 1fr) 46mm;
        gap: 5mm;
        padding: 4mm;
        border: 1px solid #98a2b3;
        border-bottom: 2px solid #101828;
        border-radius: 0;
        background: #f8fafc;
        break-inside: avoid;
    }
    .os-logo {
        width: 34mm;
        max-height: 17mm;
    }
    .os-qr {
        width: 20mm;
        height: 20mm;
        padding: 1mm;
    }
    .os-kicker {
        font-size: 9px;
        margin-bottom: 1mm;
    }
    .os-header p {
        margin: 0;
        font-size: 9.5px;
        line-height: 1.25;
    }
    .os-number {
        gap: 2mm;
    }
    .os-number strong {
        font-size: 17px;
        line-height: 1.1;
    }
    .os-number small {
        font-size: 9px;
    }
    .os-status {
        min-height: 20px;
        padding: 0 7px;
        font-size: 9px;
        border-radius: 4px;
    }
    .os-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2.5mm;
        margin: 4mm 0 3mm;
    }
    .os-summary div {
        padding: 2.5mm;
        border-radius: 0;
        box-shadow: inset 2mm 0 0 var(--primary);
        background: #f8fafc;
        break-inside: avoid;
    }
    .os-summary strong {
        font-size: 8.5px;
        margin-bottom: 1mm;
    }
    .os-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3mm;
    }
    .os-box {
        margin-top: 3mm;
        padding: 3mm;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .os-box h2 {
        font-size: 12px;
        padding: 2mm 3mm;
        margin: -3mm -3mm 2.5mm;
        border-radius: 0;
        background: #f8fafc;
    }
    .os-box h3 {
        font-size: 11px;
        margin-bottom: 1.5mm;
    }
    .os-box p {
        margin: 0 0 1.5mm;
        line-height: 1.32;
    }
    .os-highlight-box,
    .work-instructions,
    .os-extra-work {
        border-radius: 0;
        padding: 2.5mm;
    }
    .os-extra-work {
        margin-top: 2.5mm;
    }
    .os-box dl {
        grid-template-columns: 32mm minmax(0, 1fr);
        border-radius: 0;
    }
    .os-box dt,
    .os-box dd {
        padding: 1.6mm 2mm;
        font-size: 9.8px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .os-photo-grid {
        gap: 3mm;
    }
    .os-photo-grid.one {
        grid-template-columns: minmax(0, 82mm);
    }
    .os-photo-grid figure {
        border-radius: 0;
    }
    .os-photo-grid img,
    .os-photo-empty {
        height: 42mm;
        object-fit: contain;
        background: #fff;
    }
    .os-photo-grid figcaption {
        padding: 1.6mm 2mm;
        font-size: 9.5px;
    }
    .os-timeline {
        gap: 1.5mm;
    }
    .os-timeline-item {
        padding: 1.5mm 0 1.5mm 2mm;
        background: #fff;
        border-left-width: 2px;
        break-inside: avoid;
    }
    .os-timeline-item p {
        margin-top: 1mm;
    }
    .os-acceptance {
        grid-template-columns: minmax(0, 1fr) 62mm;
        gap: 4mm;
        margin-top: 4mm;
        padding: 4mm;
        border-width: 1px;
        border-radius: 0;
        background: #f8fafc;
        break-inside: avoid;
    }
    .os-acceptance h2 {
        font-size: 12px;
        margin-bottom: 2mm;
    }
    .signature {
        height: 18mm;
        margin-top: 8mm;
    }
    .signature-image {
        max-height: 24mm;
        object-fit: contain;
        padding: 1mm 0;
    }
    .os-footer {
        margin-top: 4mm;
        padding-top: 2mm;
        font-size: 9px;
    }
    table {
        font-size: 10px;
    }
    th,
    td {
        padding: 2mm;
    }
    a { color: #111827; }
}

.sync-device-code,
.offline-device-code code {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid #99d6cf;
    border-radius: 5px;
    background: #ecfdf9;
    color: #075e57;
    font-family: Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.offline-device-code {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
}

.offline-device-name-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.offline-device-name-form input[type="text"] {
    width: min(220px, 100%);
    min-height: 36px;
    padding: 6px 8px;
}

.offline-device-name-form button {
    flex: 0 0 auto;
}

.module-availability-panel {
    display: grid;
    gap: 16px;
}

.module-availability-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.module-availability-heading h2,
.module-availability-heading p,
.section-title {
    margin: 0;
}

.module-availability-heading p {
    margin-top: 4px;
    color: var(--muted, #64748b);
}

.module-availability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.module-availability-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 112px;
    padding: 14px;
    border: 1px solid #d5dee5;
    border-left: 4px solid #94a3b8;
    border-radius: 7px;
    background: #f8fafc;
}

.module-availability-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    cursor: pointer;
}

.module-availability-item.is-active {
    border-left-color: #0f8b80;
    background: #f0fdfa;
}

.module-availability-select input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.module-availability-item strong,
.module-availability-item small,
.module-availability-item em {
    display: block;
}

.module-availability-item small {
    margin-top: 5px;
    color: #64748b;
}

.module-availability-item em {
    margin-top: 10px;
    color: #475569;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.module-availability-item.is-active em {
    color: #0f766e;
}

.module-client-link {
    align-self: end;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.module-client-link:hover {
    text-decoration: underline;
}

.client-module-toolbar {
    display: grid;
    gap: 12px;
    margin: 12px 0 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.client-module-toolbar > div > strong,
.client-module-toolbar > div > span,
.client-module-toolbar .segmented-control small {
    display: block;
}

.client-module-toolbar > div > span {
    margin-top: 3px;
    color: var(--muted, #64748b);
}

.client-module-toolbar .segmented-control a {
    min-height: 48px;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.client-module-toolbar .segmented-control small {
    margin-top: 2px;
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    opacity: .8;
}

.client-module-toolbar .segmented-control a.is-disabled:not(.active) {
    border-style: dashed;
    background: #f1f5f9;
    color: #64748b;
}

.section-title {
    margin-top: 24px;
}

@media (max-width: 720px) {
    .module-availability-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .module-availability-heading button {
        width: 100%;
    }

    .module-availability-grid {
        grid-template-columns: 1fr;
    }

    .module-availability-item {
        grid-template-columns: 1fr;
        min-height: 96px;
    }

    .module-client-link {
        padding-left: 28px;
    }
}
