:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: #18252b;
    background: #f4f7f7;
    font-synthesis: none;
    --ink: #18252b;
    --muted: #64757d;
    --line: #dce5e6;
    --surface: #ffffff;
    --canvas: #f4f7f7;
    --brand: #109ca2;
    --brand-dark: #087a80;
    --brand-soft: #e2f5f4;
    --sidebar: #17272d;
    --pill-primary: #0d6efd;
    --pill-info: #087a80;
    --pill-success: #198754;
    --pill-warning: #ffc107;
    --pill-orange: #fd7e14;
    --pill-danger: #dc3545;
    --pill-purple: #6f42c1;
    --pill-secondary: #6c757d;
    --sticky-actions-bg: rgba(244, 247, 247, .94);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px; overflow-y: auto; color: #eaf2f3; background: var(--sidebar); border-right: 1px solid #223a42; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-actions { display: flex; align-items: center; gap: 8px; }
.brand { width: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 4px 8px 10px; text-align: center; text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; transition: transform .28s ease; animation: brand-arrive .65s cubic-bezier(.2,.8,.2,1) both; }
.brand:hover .brand-mark { transform: translateY(-2px) rotate(-2deg); }
.brand img { width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 9px 18px rgba(0,0,0,.2)); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 1.12rem; letter-spacing: -.02em; }
.brand-copy strong span { color: #48c8c7; font-size: .86em; }
.brand-copy small { color: #9cb0b6; font-size: .72rem; }
.mobile-menu-toggle, .mobile-menu-scrim { display: none; }
.mobile-session-nav { display: none; }
.app-icon { display: block; width: 1.05rem; height: 1.05rem; }
.button-icon { width: 1rem; height: 1rem; }

.main-nav { margin-top: 17px; }
.nav-section { display: grid; gap: 6px; margin-top: 23px; }
.nav-section:first-child { margin-top: 0; }
.nav-section-title { padding: 0 12px 4px; color: #748b92; font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 9px 12px; border-radius: 10px; color: #c3d0d4; text-decoration: none; font-weight: 600; font-size: .92rem; transition: color .2s ease, background-color .2s ease, transform .2s ease; }
.main-nav a:hover { background: #20353c; color: #fff; }
.main-nav a.active { color: #fff; background: #244249; }
.main-nav a.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 2px; background: #45c4c2; }
.main-nav a small { margin-left: auto; color: #748a91; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.main-nav .nav-disabled { opacity: .64; cursor: default; }
.nav-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; color: #96afb5; border: 1px solid #486069; border-radius: 9px; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; }
.nav-icon .app-icon { width: 17px; height: 17px; }
.main-nav a:hover .nav-icon { color: #70d4d1; border-color: #5c777f; transform: translateY(-1px); }
.main-nav a.active .nav-icon { color: #8ce1de; background: rgba(69,196,194,.1); border-color: #4f7f84; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px; color: #8ea2a8; font-size: .75rem; }
.environment-dot, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #49bfa0; }

.workspace { min-width: 0; }
.topbar { position: relative; z-index: 100; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); transition: background-color .25s ease, border-color .25s ease; }
.topbar > div:first-child { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.theme-toggle { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; color: #466068; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(24,55,64,.06); cursor: pointer; font-size: .72rem; font-weight: 780; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; }
.theme-toggle:hover { color: var(--brand-dark); border-color: #a9cccd; transform: translateY(-1px); }
.theme-toggle .app-icon { width: 17px; height: 17px; }
.theme-toggle-mobile { display: none; width: 42px; padding: 0; color: #dff5f4; background: #21373e; border-color: #48636b; box-shadow: none; }
.suite-label { color: var(--brand-dark); font-weight: 700; }
.topbar-separator { color: #b8c5c8; }
.account-chip { display: flex; align-items: center; gap: 10px; }
.account-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: #2d464d; font-size: .75rem; font-weight: 800; }
.account-chip div { display: grid; }
.account-chip strong { font-size: .82rem; }
.account-chip small { color: var(--muted); font-size: .7rem; }
.workspace-content { max-width: 1440px; margin: 0 auto; padding: 34px; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 6px; color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.035em; }
.page-heading h1:focus { outline: none; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--brand-dark); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.button { position: relative; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; isolation: isolate; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: .84rem; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; }
.button::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 18px; height: 18px; pointer-events: none; background: currentColor; border-radius: 50%; opacity: 0; transform: translate(-50%, -50%) scale(0); }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,64,72,.14); }
.button:active:not(:disabled) { transform: translateY(1px) scale(.975); }
.button.is-clicked::before { animation: button-wave .46s ease-out both; }
.button-icon { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.button:hover .button-icon { transform: translateX(2px) rotate(6deg); }
.button:disabled { opacity: .52; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--brand-dark); }
.button-primary:hover:not(:disabled) { background: #066a70; }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.record-counter, .status-badge, .coming-soon { display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }
.record-counter { padding: 8px 12px; color: #fff; background: var(--pill-secondary); border: 1px solid transparent; font-size: .78rem; font-weight: 750; box-shadow: 0 2px 5px rgba(33, 37, 41, .14); }
.context-badge { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; color: #fff; background: var(--pill-info); border: 1px solid transparent; border-radius: 999px; font-size: .75rem; font-weight: 750; box-shadow: 0 2px 5px rgba(8, 122, 128, .2); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(30, 55, 61, .045); }
.metric-card { position: relative; overflow: hidden; display: grid; gap: 7px; min-height: 154px; padding: 22px; }
.metric-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #d6e0e2; }
.metric-card-accent::after { background: var(--brand); }
.metric-card span { color: var(--muted); font-size: .8rem; font-weight: 650; }
.metric-card strong { font-size: 2rem; letter-spacing: -.04em; }
.metric-card small { color: #819096; font-size: .75rem; }
.dashboard-home { position: relative; min-height: calc(100vh - 72px); margin: -34px; padding: 34px; overflow: hidden; background: radial-gradient(circle at 82% 4%, rgba(16,156,162,.11), transparent 28%), radial-gradient(circle at 8% 74%, rgba(45,169,120,.07), transparent 30%), linear-gradient(rgba(16,156,162,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(16,156,162,.025) 1px, transparent 1px), var(--canvas); background-size: auto, auto, 42px 42px, 42px 42px, auto; }
.dashboard-home::before { content: ""; position: absolute; left: 36%; top: 7%; width: 360px; height: 360px; pointer-events: none; background: radial-gradient(circle, rgba(61,201,197,.09), transparent 68%); filter: blur(4px); animation: dashboard-canvas-drift 13s ease-in-out infinite alternate; }
.dashboard-heading { position: relative; z-index: 1; margin-bottom: 22px; animation: dashboard-heading-in .58s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-atmosphere { position: absolute; top: 76px; right: 1.5%; width: min(44vw, 580px); height: 260px; overflow: hidden; pointer-events: none; opacity: .68; filter: blur(.1px); }
.dashboard-atmosphere::before { content: ""; position: absolute; inset: 18px 26px; background: radial-gradient(circle at 62% 44%, rgba(16,156,162,.13), transparent 54%); animation: dashboard-glow 8s ease-in-out infinite alternate; }
.dashboard-atmosphere span { position: absolute; display: block; border: 1px solid rgba(16,156,162,.16); border-radius: 50%; animation: dashboard-orbit 10s ease-in-out infinite; }
.dashboard-atmosphere span:nth-child(1) { top: 42px; right: 54px; width: 146px; height: 146px; }
.dashboard-atmosphere span:nth-child(2) { top: 90px; right: 177px; width: 52px; height: 52px; animation-delay: -3s; }
.dashboard-atmosphere span:nth-child(3) { top: 24px; right: 238px; width: 18px; height: 18px; background: rgba(16,156,162,.14); animation-delay: -6s; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.dashboard-metric { position: relative; overflow: hidden; min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(30, 55, 61, .045); transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background-color .25s ease; animation: metric-reveal .56s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-metric::before { content: ""; position: absolute; top: -40%; left: -70%; width: 42%; height: 180%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: rotate(18deg); animation: metric-sheen 1.15s cubic-bezier(.2,.7,.2,1) both; }
.dashboard-metric:nth-child(2) { animation-delay: .06s; }
.dashboard-metric:nth-child(3) { animation-delay: .12s; }
.dashboard-metric:nth-child(4) { animation-delay: .18s; }
.dashboard-metric:nth-child(5) { animation-delay: .24s; }
.dashboard-metric:hover { transform: translateY(-3px); border-color: #cbdcde; box-shadow: 0 15px 34px rgba(30,55,61,.1); }
.dashboard-metric::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: #b8c8cc; }
.dashboard-metric.metric-active-equipment::after { background: #28a978; }
.dashboard-metric.metric-today::after { background: var(--brand); }
.dashboard-metric.metric-overdue::after { background: #e2a83c; }
.dashboard-metric.metric-equipment::after { background: #d46970; }
.dashboard-metric.metric-parts::after { background: #718ba1; }
.metric-label { display: flex; align-items: center; gap: 9px; color: #53686f; font-size: .76rem; font-weight: 720; line-height: 1.35; }
.metric-symbol { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; color: #315158; background: #edf3f3; border-radius: 9px; transition: transform .24s ease, color .24s ease, background-color .24s ease; }
.metric-symbol .app-icon { width: 17px; height: 17px; }
.dashboard-metric:hover .metric-symbol { color: var(--brand-dark); background: var(--brand-soft); transform: scale(1.06) rotate(-2deg); }
.dashboard-metric strong { margin-top: 13px; color: #17272d; font-size: 1.85rem; line-height: 1; letter-spacing: -.045em; }
.dashboard-metric small { margin-top: 9px; color: #71858c; font-size: .71rem; }
.metric-today small { color: var(--brand-dark); }
.metric-active-equipment small { color: #197a59; }
.metric-overdue small { color: #8a690b; }
.dashboard-section { position: relative; z-index: 1; margin-top: 15px; padding: 0; overflow: hidden; animation: dashboard-section-in .58s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-agenda { animation-delay: .34s; }
.dashboard-plan { animation-delay: .43s; }
.dashboard-section-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.dashboard-section-header h2 { margin: 4px 0 0; }
.dashboard-section-header p { margin: 4px 0 0; font-size: .72rem; }
.dashboard-empty { min-height: 128px; display: flex; align-items: center; gap: 15px; padding: 24px; color: var(--muted); background: #fbfcfc; }
.dashboard-empty > div { display: grid; gap: 5px; min-width: 0; }
.dashboard-empty strong { color: #31454b; font-size: .84rem; }
.dashboard-empty span:not(.dashboard-empty-icon) { font-size: .74rem; line-height: 1.45; }
.dashboard-empty .button { margin-left: auto; }
.dashboard-empty-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 12px; }
.dashboard-empty-icon .app-icon { width: 21px; height: 21px; }
.dashboard-table { min-width: 760px; }
.dashboard-table td:first-child { width: auto; }
.dashboard-table td:nth-child(2) { width: auto; }
.dashboard-table td:nth-child(3) { width: auto; }
.due-days { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; color: #fff; background: var(--pill-secondary); border: 1px solid transparent; border-radius: 999px; font-size: .7rem; font-weight: 780; }
.due-days.overdue { color: #fff; background: var(--pill-danger); }
.content-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 15px; margin-top: 15px; }
.panel { padding: 24px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel h2 { margin: 5px 0 0; font-size: 1.2rem; letter-spacing: -.02em; }
.panel p { color: var(--muted); line-height: 1.6; }
.status-badge { padding: 6px 10px; color: #fff; background: var(--pill-success); border: 1px solid transparent; font-size: .72rem; font-weight: 780; box-shadow: 0 2px 5px rgba(25, 135, 84, .2); }
.client-summary { display: flex; align-items: center; gap: 14px; margin: 24px 0; padding: 17px; background: #f7f9f9; border: 1px solid #e7eeee; border-radius: 11px; }
.client-summary > div:last-child { display: grid; gap: 4px; }
.client-summary span { color: var(--muted); font-size: .78rem; }
.client-monogram { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: #fff; background: #2c4b52; font-weight: 800; font-size: 1.1rem; }
.client-monogram-small { width: 39px; height: 39px; border-radius: 10px; font-size: .9rem; }
.text-link { color: var(--brand-dark); font-weight: 750; font-size: .82rem; text-decoration: none; }
.text-link span { margin-left: 4px; }
.next-step-panel { background: #eef7f6; border-color: #d3e9e7; }
.coming-soon { padding: 7px 10px; color: #fff; background: var(--pill-secondary); font-size: .72rem; font-weight: 750; }

.client-page-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.client-list-panel { padding: 18px; }
.list-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-list-item { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; text-align: left; background: #fff; cursor: pointer; }
.client-list-item.selected { border-color: #a9d6d4; background: #eff8f7; }
.client-list-item > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.client-list-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.client-list-item small { color: var(--muted); font-size: .68rem; }
.client-form-panel { padding: 0; overflow: hidden; }
.client-detail-stack { min-width: 0; display: grid; gap: 16px; }
.client-equipment-panel { padding: 0; overflow: hidden; }
.client-equipment-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.client-equipment-header h2 { margin: 4px 0 0; font-size: 1.08rem; }
.client-equipment-header p { margin: 5px 0 0; font-size: .75rem; }
.client-equipment-table { min-width: 820px; }
.client-equipment-table td:nth-child(1) { width: 26%; }
.client-equipment-table td:nth-child(2) { width: 19%; }
.client-equipment-table td:nth-child(3) { width: 18%; }
.client-equipment-table td:nth-child(4) { width: 140px; }
.client-equipment-table td:nth-child(5) { width: 110px; }
.client-equipment-empty { min-height: 210px; }
.company-form-panel { max-width: 980px; margin: 0 auto; padding: 0; overflow: hidden; }
.form-heading { padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.form-heading p { margin: 7px 0 0; font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 26px; }
.field { display: grid; gap: 7px; }
.field span { color: #36474d; font-size: .76rem; font-weight: 720; }
.field b { color: #c34f57; }
.field-wide, .field-full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 0 13px; color: var(--ink); background: #fbfcfc; border: 1px solid #cfdadc; border-radius: 9px; outline: none; }
.field textarea { min-height: 84px; padding-block: 11px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 156, 162, .11); }
.logo-upload-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0 26px 26px; padding: 16px; background: #f7f9f9; border: 1px dashed #c8d5d7; border-radius: 11px; }
.company-logo-preview { width: 142px; height: 112px; overflow: hidden; background: #fff; border: 1px solid #c5d0d2; border-radius: 10px; }
.company-logo-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-upload-card > div:nth-child(2) { display: grid; gap: 4px; }
.logo-upload-card strong { font-size: .82rem; }
.logo-upload-card span { color: var(--muted); font-size: .72rem; }
.logo-upload-actions { display: flex; align-items: center; justify-content: flex-end; }
.logo-upload-actions .button { cursor: pointer; white-space: nowrap; }
.form-actions { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 26px; background: #f8fafa; border-top: 1px solid var(--line); }
.form-actions > span { color: #849398; font-size: .7rem; }
.form-actions-right { justify-content: flex-end; }
.save-feedback { margin: 18px 26px 0; padding: 11px 13px; color: #216853; background: #e7f5ef; border: 1px solid #c6e8da; border-radius: 9px; font-size: .78rem; }
.loading-panel, .empty-panel { color: var(--muted); }
.empty-list-state { display: grid; gap: 8px; margin-top: 16px; padding: 18px 8px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.empty-list-state strong { color: var(--ink); font-size: .84rem; }
.text-button { width: fit-content; padding: 0; color: var(--brand-dark); background: transparent; border: 0; font-size: .76rem; font-weight: 750; cursor: pointer; }
.empty-detail-state { min-height: 390px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-detail-state h2 { margin-top: 18px; }
.empty-detail-state p { max-width: 440px; margin: 8px 0 20px; }
.empty-state-icon { display: grid; place-items: center; width: 58px; height: 58px; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #c9e8e5; border-radius: 16px; font-size: 1.3rem; font-weight: 800; }
.access-denied-panel { min-height: 430px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.access-denied-panel h1 { max-width: 620px; margin: 12px 0 8px; font-size: clamp(1.55rem, 4vw, 2.25rem); }
.access-denied-panel p { max-width: 600px; margin: 0 0 22px; }
.access-denied-panel .empty-state-icon { margin-bottom: 18px; }

.catalog-panel { padding: 0; overflow: hidden; }
.catalog-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.catalog-toolbar > div { display: grid; gap: 4px; }
.catalog-toolbar strong { font-size: .85rem; }
.catalog-toolbar > div span { color: var(--muted); font-size: .72rem; }
.search-box { width: min(340px, 100%); display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; background: #f8fafa; border: 1px solid #cfdadc; border-radius: 9px; }
.search-box > span { color: #6f8289; font-size: 1.15rem; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .8rem; }
.toolbar-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; width: min(540px, 100%); }
.catalog-toolbar > .toolbar-controls { display: flex; }
.toolbar-controls .search-box { flex: 1 1 310px; }
.equipment-filter-controls { width: min(820px, 100%); flex-wrap: nowrap; align-items: flex-end; }
.filter-field { display: grid; flex: 0 1 190px; gap: 5px; min-width: 0; }
.filter-field > span:first-child { color: var(--muted); font-size: .66rem; font-weight: 780; letter-spacing: .04em; }
.filter-field .filter-select { width: 100%; }
.filter-search-field { flex: 1 1 270px; }
.filter-search-field .search-box { width: 100%; min-width: 210px; }
.equipment-filter-controls .clear-filter-button { align-self: flex-end; }
.clear-filter-button { min-height: 42px; padding: 0 11px; color: var(--brand-dark); background: transparent; border: 1px solid #bdd8d8; border-radius: 9px; cursor: pointer; font-size: .72rem; font-weight: 780; }
.clear-filter-button:hover { background: var(--brand-soft); border-color: var(--brand); }
.filter-select { min-height: 42px; padding: 0 32px 0 11px; color: #455a61; background: #f8fafa; border: 1px solid #cfdadc; border-radius: 9px; outline: none; font-size: .75rem; }
.filter-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 156, 162, .11); }
.error-code-filter-controls { width: min(820px, 100%); flex-wrap: wrap; }
.error-code-filter-controls .filter-select { flex: 0 1 180px; }
.error-code-filter-controls .search-box { min-width: 210px; }
.catalog-guidance { display: flex; align-items: flex-start; gap: 12px; margin: -4px 0 18px; padding: 14px 16px; color: #355159; background: #eef8f7; border: 1px solid #cce7e4; border-radius: 12px; }
.catalog-guidance-icon { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; color: #fff; background: var(--brand-dark); border-radius: 50%; font-size: .74rem; font-weight: 850; }
.catalog-guidance > div { display: grid; gap: 3px; }
.catalog-guidance strong { color: var(--ink); font-size: .79rem; }
.catalog-guidance span { font-size: .73rem; line-height: 1.45; }
.table-scroll { width: 100%; overflow-x: auto; }
.catalog-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.catalog-table th { padding: 14px 15px; color: #52656c; background: #f6f8f8; border-bottom: 1px solid var(--line); text-align: left; font-size: .72rem; font-weight: 800; }
.catalog-table td { padding: 18px 15px; border-bottom: 1px solid #e8eeee; vertical-align: middle; font-size: .78rem; line-height: 1.45; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.catalog-table tbody tr:hover { background: #fbfcfc; }
.catalog-table td:nth-child(1) { width: 105px; }
.catalog-table td:nth-child(2) { width: 80px; }
.catalog-table td:nth-child(3) { width: 31%; }
.catalog-table td:nth-child(4) { color: #34474d; }
.catalog-table td > strong:not(.error-code) { display: block; font-weight: 680; }
.catalog-table td small { display: block; margin-top: 5px; color: #6b858d; }
.miper-table td:nth-child(1) { width: 21%; }
.miper-table td:nth-child(2) { width: 23%; }
.miper-table td:nth-child(3) { width: 90px; }
.miper-table td:nth-child(4) { width: auto; }
.brand-tag { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; color: #fff; background: var(--pill-info); border: 1px solid transparent; border-radius: 999px; font-size: .7rem; font-weight: 780; box-shadow: 0 2px 5px rgba(8, 122, 128, .2); }
.error-code { color: #17272d; font-size: .86rem; }
.error-code-table { min-width: 1120px; }
.error-code-table td:nth-child(1) { width: 110px; }
.error-code-table td:nth-child(2) { width: 86px; }
.error-code-table td:nth-child(3) { width: 25%; }
.error-code-table td:nth-child(4) { width: 27%; }
.error-code-table td:nth-child(5) { width: 145px; }
.brand-catalog-table td:nth-child(1) { width: 170px; }
.brand-catalog-table td:nth-child(2) { width: 28%; }
.brand-catalog-table td:nth-child(3) { width: 220px; }
.brand-catalog-table td:nth-child(4) { width: 130px; }
.source-link { color: var(--brand-dark); font-size: .73rem; font-weight: 760; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.source-missing { color: var(--muted); font-size: .73rem; }
.brand-error-link { display: inline-flex; align-items: baseline; gap: 7px; color: var(--brand-dark); text-decoration: none; }
.brand-error-link strong { font-size: .92rem; }
.brand-error-link span { font-size: .72rem; font-weight: 720; }
.brand-error-link:hover span { text-decoration: underline; }
.risk-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid transparent; border-radius: 999px; font-size: .68rem; font-weight: 800; box-shadow: 0 2px 5px rgba(33, 37, 41, .14); }
.risk-low { color: #fff; background: var(--pill-success); }
.risk-medium { color: #332701; background: var(--pill-warning); }
.risk-high { color: #fff; background: var(--pill-orange); }
.risk-critical { color: #fff; background: var(--pill-danger); }
.row-actions { width: 128px; white-space: nowrap; text-align: right; }
.table-action { padding: 5px 7px; color: var(--brand-dark); background: transparent; border: 0; font-size: .72rem; font-weight: 750; cursor: pointer; }
.table-action:hover { text-decoration: underline; }
.catalog-empty { min-height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 30px; color: var(--muted); text-align: center; font-size: .8rem; }
.catalog-empty strong { color: var(--ink); font-size: .94rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(13, 28, 33, .58); backdrop-filter: blur(2px); }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; color: var(--ink); background: #fff; border: 1px solid #d4dfe1; border-radius: 16px; box-shadow: 0 24px 70px rgba(6, 22, 27, .24); }
.form-modal { width: min(820px, 100%); }
.equipment-form-modal { width: min(930px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 1.25rem; }
.modal-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #60747b; background: #f3f6f6; border: 1px solid var(--line); border-radius: 8px; font-size: 1.3rem; cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 26px 24px; }
.detail-grid > div { display: grid; gap: 8px; }
.detail-grid span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.detail-grid strong { font-size: .84rem; font-weight: 650; line-height: 1.55; }
.detail-full { grid-column: 1 / -1; }
.modal-form-grid { padding: 24px; }
.toggle-field { display: flex; align-items: center; gap: 10px; color: #36474d; font-size: .78rem; font-weight: 650; }
.toggle-field input { width: 17px; height: 17px; accent-color: var(--brand-dark); }
.rubro-signature-setting { align-items: flex-start; padding: 15px 16px; border: 1px solid var(--line); border-radius: 11px; background: #f7fafa; }
.rubro-signature-setting input { flex: 0 0 auto; margin-top: 2px; }
.rubro-signature-setting > span { display: grid; gap: 4px; }
.rubro-signature-setting strong { color: var(--ink); font-size: .8rem; }
.rubro-signature-setting small { color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.45; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 24px; background: #f8fafa; border-top: 1px solid var(--line); }
.modal-actions-split { justify-content: space-between; }
.modal-actions-split > div { display: flex; gap: 9px; }
.button-danger { color: #a13c44; background: #fff; border-color: #e8c8cb; }
.button-danger:hover { background: #fff4f4; }
.form-error { margin: 18px 24px 0; padding: 11px 13px; color: #8d353c; background: #fff1f2; border: 1px solid #efcbd0; border-radius: 9px; font-size: .78rem; }
.prerequisite-panel { min-height: 180px; display: flex; align-items: center; gap: 18px; }
.prerequisite-panel > div:nth-child(2) { display: grid; gap: 4px; }
.prerequisite-panel h2 { margin: 2px 0 0; }
.prerequisite-panel p { margin: 0; }
.prerequisite-panel .button { margin-left: auto; }
.equipment-table td:nth-child(1) { width: 100px; }
.equipment-table td:nth-child(2) { width: 20%; }
.equipment-table td:nth-child(3) { width: 27%; }
.equipment-table td:nth-child(4) { width: auto; }
.equipment-table td:nth-child(5) { width: 130px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-heading { padding: 19px 24px 0; }
.form-section-heading h3 { margin: 0; font-size: .9rem; }
.form-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.plate-reader-card { display: grid; gap: 14px; margin: 18px 24px 0; padding: 17px; background: linear-gradient(145deg, #f4fbfb, #f9fbfc); border: 1px solid #c9e3e3; border-radius: 13px; }
.plate-reader-heading { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.plate-reader-heading > div { display: grid; gap: 4px; }
.plate-reader-heading strong { color: #173f45; font-size: .82rem; }
.plate-reader-heading span:not(.plate-reader-icon, .plate-reader-badge) { color: #657b81; font-size: .7rem; line-height: 1.45; }
.plate-reader-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); border-radius: 10px; box-shadow: 0 8px 18px rgba(5, 130, 139, .18); font-size: 1rem; }
.plate-reader-badge { align-self: start; padding: 4px 8px; color: #fff; background: var(--pill-info); border: 1px solid transparent; border-radius: 999px; font-size: .62rem; font-weight: 850; letter-spacing: .08em; }
.plate-reader-card.is-disabled { background: #f6f8f8; border-color: #d8e0e1; }
.plate-reader-card.is-disabled .plate-reader-icon { color: #789096; background: #dde5e6; box-shadow: none; }
.plate-reader-card.is-disabled .plate-reader-badge { color: #fff; background: var(--pill-secondary); border-color: transparent; }
.plate-dropzone { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; background: #fff; border: 1px dashed #9fc9ca; border-radius: 11px; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.plate-dropzone:hover { background: #f7ffff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 156, 162, .08); }
.plate-dropzone.is-reading { overflow: hidden; cursor: progress; }
.plate-dropzone.is-disabled { color: #788b91; background: #f2f5f5; border-color: #cfdadc; cursor: not-allowed; }
.plate-dropzone.is-disabled:hover { background: #f2f5f5; border-color: #cfdadc; box-shadow: none; }
.plate-dropzone.is-reading::after { position: absolute; content: ""; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(20, 183, 192, .1) 48%, transparent 76%); animation: plate-reader-scan 1.25s linear infinite; pointer-events: none; }
.plate-reader-input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.plate-reader-input:disabled { cursor: progress; }
.plate-dropzone-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 9px; font-size: 1rem; }
.plate-dropzone > span:nth-of-type(2) { display: grid; gap: 3px; }
.plate-dropzone strong { color: #2f4b52; font-size: .76rem; }
.plate-dropzone small { color: var(--muted); font-size: .67rem; }
.plate-dropzone .button { min-height: 34px; padding: 0 12px; pointer-events: none; }
.plate-preview-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.plate-preview-row img { width: 76px; height: 58px; object-fit: cover; background: #e9eeee; border-radius: 7px; }
.plate-preview-row > div { display: grid; gap: 4px; min-width: 0; }
.plate-preview-row strong { overflow: hidden; color: #354d53; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.plate-preview-row span { color: var(--muted); font-size: .67rem; }
.plate-reader-message { padding: 10px 12px; border-radius: 9px; font-size: .72rem; font-weight: 650; }
.plate-reader-message.is-success { color: #276b56; background: #e7f5ef; border: 1px solid #bee3d4; }
.plate-reader-message.is-warning { color: #805d0e; background: #fff7e2; border: 1px solid #efd999; }
.plate-result-card { display: grid; gap: 13px; padding: 14px; background: #fff; border: 1px solid #bddcda; border-radius: 11px; box-shadow: 0 6px 18px rgba(22, 68, 71, .06); }
.plate-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.plate-result-heading > div { display: grid; gap: 3px; }
.plate-result-heading strong { color: #21454a; font-size: .8rem; }
.plate-result-heading span { color: #608087; font-size: .67rem; }
.plate-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.plate-result-grid > div { display: grid; gap: 4px; min-width: 0; padding: 9px 10px; background: #f4f8f8; border-radius: 8px; }
.plate-result-grid span { color: #6b7f84; font-size: .63rem; font-weight: 700; }
.plate-result-grid strong { overflow: hidden; color: #2e494f; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.plate-result-warnings { display: grid; gap: 5px; padding-top: 9px; color: #805d0e; border-top: 1px solid #e1e9e9; font-size: .68rem; }
@keyframes plate-reader-scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.unit-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.unit-input input { border-radius: 9px 0 0 9px; }
.unit-input > span { display: grid; place-items: center; min-width: 48px; padding: 0 10px; color: #61767d; background: #eff3f3; border: 1px solid #cfdadc; border-left: 0; border-radius: 0 9px 9px 0; font-size: .72rem; }
.qr-reference code { overflow-wrap: anywhere; padding: 8px 10px; color: #34565d; background: #f0f5f5; border-radius: 7px; font-size: .72rem; }
.view-tabs { width: fit-content; display: flex; align-items: center; gap: 4px; margin: 0 auto 20px; padding: 5px; background: #e8eeee; border: 1px solid #d7e1e2; border-radius: 11px; }
.view-tab { min-height: 36px; padding: 0 13px; color: #5b6f76; background: transparent; border: 0; border-radius: 8px; font-size: .75rem; font-weight: 720; cursor: pointer; }
.view-tab.active { color: var(--brand-dark); background: #fff; box-shadow: 0 2px 8px rgba(30, 55, 61, .08); }
.maintenance-table td:nth-child(1) { width: 115px; }
.maintenance-table td:nth-child(2) { width: 29%; }
.maintenance-table td:nth-child(3) { width: 110px; }
.maintenance-table td:nth-child(5) { width: 110px; }
.maintenance-table td:nth-child(6) { width: 100px; }
.type-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; color: #fff; background: var(--pill-secondary); border: 1px solid transparent; border-radius: 999px; font-size: .68rem; font-weight: 780; }
.work-status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; color: #fff; background: var(--pill-secondary); border: 1px solid transparent; border-radius: 999px; font-size: .68rem; font-weight: 800; box-shadow: 0 2px 5px rgba(33, 37, 41, .14); }
.status-borrador { color: #fff; background: var(--pill-secondary); }
.status-programada { color: #fff; background: var(--pill-primary); }
.status-enproceso { color: #332701; background: var(--pill-warning); }
.status-pausada { color: #fff; background: var(--pill-purple); }
.status-completada, .status-completed { color: #fff; background: var(--pill-success); }
.status-cancelada, .status-inactive { color: #fff; background: var(--pill-danger); }
.ot-link { color: var(--brand-dark); font-weight: 800; text-decoration: none; }
.creation-note { display: flex; align-items: center; gap: 12px; margin: 0 24px 22px; padding: 14px; color: #3e5960; background: #edf7f6; border: 1px solid #d0e8e5; border-radius: 10px; }
.creation-note > span { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: var(--brand-dark); border-radius: 9px; font-size: .7rem; font-weight: 850; }
.creation-note > div { display: grid; gap: 3px; }
.creation-note strong { font-size: .78rem; }
.creation-note small { color: #6a7f85; font-size: .69rem; }
.work-order-table td:nth-child(1) { width: 105px; }
.work-order-table td:nth-child(2) { width: 27%; }
.work-order-table td:nth-child(6) { width: 105px; }
.work-order-actions { min-width: 238px; flex-wrap: nowrap; }
.report-action { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 7px; }
.report-action .app-icon { width: 14px; height: 14px; }
.report-action-view { color: #075b60; background: #eaf7f7; }
.report-action:hover { text-decoration: none; background: #edf4f4; }
.report-action-view:hover { background: #d9f0ef; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.page-feedback { margin: -10px 0 18px; }
.ot-edit-section { margin-bottom: 15px; padding: 0; overflow: hidden; }
.ot-edit-section .form-grid { padding-top: 20px; }
.checklist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 28px; padding: 22px 24px 25px; }
.checklist-item { display: flex; align-items: center; gap: 10px; color: #34484e; font-size: .78rem; font-weight: 650; }
.checklist-item input { width: 17px; height: 17px; accent-color: var(--brand-dark); }
.dynamic-checklist-item { min-height: 58px; padding: 12px 14px; background: #fbfcfc; border: 1px solid #d5dfe1; border-radius: 10px; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.dynamic-checklist-item:hover { border-color: #9bc9c8; background: #f7fbfb; }
.dynamic-checklist-item:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 156, 162, .11); }
.dynamic-checklist-item.is-checked { color: #173f42; background: #edf8f7; border-color: #82c6c3; }
.dynamic-checklist-item input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; }
.dynamic-checklist-item > span { display: grid; gap: 3px; line-height: 1.25; }
.dynamic-checklist-item strong { font-size: .78rem; }
.dynamic-checklist-item strong b { color: #c34f57; }
.dynamic-checklist-item small { color: var(--muted); font-size: .69rem; font-weight: 500; }
.measurement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; padding: 22px 24px 25px; }
.measurement-grid.air-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.calculated-reading { display: grid; align-content: center; gap: 7px; padding: 4px 0; }
.calculated-reading span { color: #526970; font-size: .72rem; font-weight: 720; }
.calculated-reading strong { color: #667b81; font-size: .8rem; }
.calculated-reading .reading-ok { color: #258064; }
.calculated-reading .reading-alert { color: #bd4a52; }
.sticky-form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 9px; margin: 0 -34px -34px; padding: 14px 34px; background: var(--sticky-actions-bg); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(18, 40, 47, .08); backdrop-filter: blur(14px); }
.evidence-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.evidence-heading > div { display: grid; gap: 4px; }
.evidence-upload { flex: 0 0 auto; cursor: pointer; }
.evidence-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.evidence-feedback { margin: 16px 24px 0; padding: 11px 13px; color: #315159; background: #eef8f7; border: 1px solid #c9e6e3; border-radius: 9px; font-size: .74rem; font-weight: 650; }
.evidence-empty { display: grid; gap: 5px; margin: 22px 24px 25px; padding: 24px; text-align: center; color: #60757b; background: #f8fafa; border: 1px dashed #c9d6d8; border-radius: 11px; }
.evidence-empty strong { color: #354a50; font-size: .82rem; }
.evidence-empty span { font-size: .72rem; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 22px 24px 25px; }
.evidence-card { min-width: 0; overflow: hidden; background: #fbfcfc; border: 1px solid #d4dfe1; border-radius: 11px; }
.evidence-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9eeee; }
.evidence-card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px; }
.evidence-card-body input { min-width: 0; width: 100%; min-height: 38px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #d4dfe1; border-radius: 8px; outline: none; }
.evidence-card-body input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 156, 162, .11); }
.danger-link { color: #b94b54; }
.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 22px 24px 25px; }
.signature-card { display: grid; gap: 12px; min-width: 0; padding: 16px; background: #f9fbfb; border: 1px solid #d6e0e2; border-radius: 11px; }
.signature-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signature-card-heading strong { color: #263b41; font-size: .82rem; }
.signature-card-heading span { color: var(--brand-dark); font-size: .68rem; font-weight: 750; }
.signature-canvas { display: block; width: 100%; height: 170px; background: #fff; border: 1px dashed #aebfc2; border-radius: 9px; cursor: crosshair; touch-action: none; }
.signature-clear { justify-self: start; min-height: 36px; padding: 8px 12px; }

.report-toolbar { max-width: 940px; display: flex; justify-content: space-between; gap: 12px; margin: 0 auto 18px; }
.technical-report { max-width: 940px; min-height: 1100px; margin: 0 auto; padding: 48px 52px 34px; color: #1f2c31; background: #fff; border: 1px solid #dbe4e5; box-shadow: 0 12px 35px rgba(30,55,61,.08); }
.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 25px; border-bottom: 2px solid #233d44; }
.report-brand { display: flex; align-items: center; gap: 14px; }
.report-brand img { width: min(330px, 46vw); height: 78px; object-fit: contain; object-position: left center; }
.report-brand > div, .report-number { display: grid; gap: 4px; }
.report-brand strong { font-size: 1.1rem; }
.report-brand span, .report-number span, .report-number small { color: #6a7b81; font-size: .72rem; }
.report-number { text-align: right; }
.report-number strong { color: var(--brand-dark); font-size: 1.35rem; }
.report-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 28px 0; padding: 20px; background: #f4f7f7; border-radius: 10px; }
.report-summary-grid > div { display: grid; gap: 5px; }
.report-summary-grid span { color: #718187; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.report-summary-grid strong { font-size: .79rem; line-height: 1.4; }
.report-block { padding: 20px 0; border-top: 1px solid #e1e8e9; }
.report-block h2 { margin: 0 0 11px; font-size: .92rem; }
.report-block p { min-height: 26px; margin: 0; color: #42565d; white-space: pre-wrap; font-size: .78rem; line-height: 1.65; }
.report-muted { color: #89979b !important; font-style: italic; }
.report-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.report-checklist div { display: flex; gap: 8px; color: #3e5259; font-size: .75rem; }
.report-checklist span { color: var(--brand-dark); font-weight: 900; }
.report-dynamic-section + .report-dynamic-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e6ecee; }
.report-dynamic-section h3 { margin: 0 0 10px; color: #42565d; font-size: .78rem; }
.report-answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.report-answer-grid > div { display: grid; gap: 3px; }
.report-answer-grid span { color: #718187; font-size: .66rem; }
.report-answer-grid strong { color: #2d4148; font-size: .75rem; }
.report-signatures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px; margin-top: 65px; }
.report-signatures div { display: grid; gap: 9px; text-align: center; }
.report-signatures span { height: 1px; background: #809096; }
.report-signatures strong { font-size: .7rem; }
.report-signatures small { color: #6d7e83; font-size: .66rem; }
.captured-signatures { align-items: end; margin-top: 34px; }
.captured-signatures img { display: block; width: 100%; height: 105px; object-fit: contain; border-bottom: 1px solid #809096; }
.report-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.report-photo-grid figure { margin: 0; padding: 8px; background: #f8fafa; border: 1px solid #dbe4e5; border-radius: 9px; break-inside: avoid; }
.report-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #eef2f2; }
.report-photo-grid figcaption { padding: 8px 4px 2px; color: #566a70; text-align: center; font-size: .68rem; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 14px; color: #7a8a8f; border-top: 1px solid #dbe4e5; font-size: .62rem; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .client-page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; width: 100%; height: auto; padding: 12px 14px; }
    .brand { min-height: 56px; }
    .brand img { width: 45px; height: 45px; }
    .main-nav { display: grid; gap: 12px; margin-top: 12px; }
    .nav-section { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
    .nav-section-title { grid-column: 1 / -1; padding-top: 5px; }
    .main-nav .nav-disabled, .sidebar-footer { display: none; }
    .mobile-session-nav { display: grid; gap: 11px; padding: 13px 10px 4px; border-top: 1px solid #365058; }
    .mobile-session-nav > div { display: flex; align-items: center; gap: 10px; }
    .mobile-session-nav > div > span { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #29474f; border-radius: 50%; font-size: .7rem; font-weight: 850; }
    .mobile-session-nav > div > div { display: grid; gap: 2px; }
    .mobile-session-nav strong { color: #fff; font-size: .76rem; }
    .mobile-session-nav small { color: #91a8ae; font-size: .66rem; }
    .mobile-session-nav form { margin: 0; }
    .mobile-session-nav button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #d7e5e7; background: #20373e; border: 1px solid #45616a; border-radius: 10px; cursor: pointer; font-size: .76rem; font-weight: 750; }
    .mobile-session-nav button:hover { color: #fff; background: #29474f; }
    .mobile-session-nav .app-icon { width: 17px; height: 17px; }
    .topbar { height: 58px; padding: 0 18px; }
    .client-equipment-header { align-items: flex-start; flex-direction: column; }
    .account-chip div { display: none; }
    .workspace-content { padding: 24px 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .metric-grid, .content-grid, .form-grid { grid-template-columns: 1fr; }
    .dashboard-metrics { grid-template-columns: 1fr; }
    .dashboard-metric { min-height: 132px; }
    .dashboard-empty { align-items: flex-start; }
    .dashboard-empty .button { margin-left: 0; }
    .prerequisite-panel { align-items: flex-start; flex-direction: column; }
    .prerequisite-panel .button { margin-left: 0; }
    .field-wide, .field-full { grid-column: auto; }
    .plate-reader-heading { grid-template-columns: 38px minmax(0, 1fr); }
    .plate-reader-badge { display: none; }
    .plate-dropzone { grid-template-columns: 34px minmax(0, 1fr); }
    .plate-dropzone .button { grid-column: 1 / -1; width: 100%; }
    .plate-result-heading { align-items: stretch; flex-direction: column; }
    .plate-result-heading .button { width: 100%; }
    .plate-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .logo-upload-card { grid-template-columns: auto 1fr; }
    .logo-upload-card .button { grid-column: 1 / -1; }
    .catalog-toolbar { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .toolbar-controls,
    .catalog-toolbar > .toolbar-controls { align-items: stretch; flex-direction: column; width: 100%; }
    .toolbar-controls .search-box { flex-basis: auto; }
    .filter-field,
    .filter-search-field { flex: 0 0 auto; width: 100%; }
    .filter-search-field .search-box { min-width: 0; }
    .filter-select { width: 100%; }
    .view-tabs { width: 100%; overflow-x: auto; justify-content: flex-start; }
    .view-tab { flex: 0 0 auto; }
    .checklist-grid, .measurement-grid, .measurement-grid.air-grid { grid-template-columns: 1fr; }
    .evidence-heading { align-items: stretch; flex-direction: column; }
    .evidence-upload { align-self: flex-start; }
    .evidence-grid, .signature-grid { grid-template-columns: 1fr; }
    .heading-actions { width: 100%; }
    .technical-report { padding: 28px 20px; }
    .report-header, .report-footer { align-items: flex-start; flex-direction: column; }
    .report-number { text-align: left; }
    .report-summary-grid, .report-checklist, .report-photo-grid { grid-template-columns: 1fr; }
    .report-signatures { gap: 28px; }
    .sticky-form-actions { margin: 0 -18px -24px; padding: 12px 18px; }
    .modal-backdrop { padding: 10px; }
    .modal-card { max-height: calc(100vh - 20px); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-full { grid-column: auto; }
}

@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; }
    .sidebar, .topbar, .no-print { display: none !important; }
    .app-shell { display: block; }
    .workspace-content { max-width: none; padding: 0; }
    .technical-report { max-width: none; min-height: 0; padding: 0; border: 0; box-shadow: none; }
}

/* Configuración técnica multirubro */
.technical-catalog-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.industry-panel { overflow: hidden; }
.industry-list { display: grid; padding: 8px; gap: 6px; }
.industry-option { --industry-color: var(--brand); width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 10px; gap: 12px; align-items: center; padding: 13px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 11px; text-align: left; cursor: pointer; }
.industry-option:hover { background: rgba(255,255,255,.035); }
.industry-option.active { background: color-mix(in srgb, var(--industry-color) 10%, transparent); border-color: color-mix(in srgb, var(--industry-color) 36%, transparent); box-shadow: inset 3px 0 0 var(--industry-color); }
.industry-option > span { display: grid; place-items: center; min-height: 34px; border-radius: 8px; color: var(--industry-color); background: color-mix(in srgb, var(--industry-color) 12%, transparent); font-size: .75rem; font-weight: 800; }
.industry-option div { display: grid; gap: 4px; min-width: 0; }
.industry-option small { color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.industry-option .status-dot.enabled { background: var(--industry-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--industry-color) 13%, transparent); }
.industry-actions { padding: 14px 18px; border-top: 1px solid var(--line); }
.industry-actions > span { display: block; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.catalog-readonly-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; color: #fff; background: var(--pill-secondary); border: 1px solid transparent; border-radius: 999px; font-size: .72rem; font-weight: 780; box-shadow: 0 2px 5px rgba(33, 37, 41, .14); }
.catalog-readonly-badge .app-icon { width: 16px; height: 16px; }
.rubro-color-field > div { display: grid; grid-template-columns: 52px minmax(0, 180px) 28px; align-items: center; gap: 10px; }
.rubro-color-field input[type="color"] { width: 52px; height: 44px; padding: 4px; cursor: pointer; }
.rubro-color-field i { width: 24px; height: 24px; border: 3px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 4px 10px rgba(20,50,58,.14); }
.rubro-color-field small { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.type-catalog-panel { min-width: 0; }
.template-modal { width: min(1420px, calc(100vw - 48px)); max-height: calc(100vh - 34px); overflow: auto; }
.compact-form-section { margin-bottom: 16px; }
.template-tabs { display: flex; gap: 8px; padding: 0 24px 16px; }
.template-tabs .view-tab { display: inline-flex; gap: 8px; align-items: center; }
.template-tabs .view-tab span { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: .72rem; }
.field-builder-section { margin: 0 24px 20px; }
.field-builder-section .form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.compact-empty { padding: 28px; }
.field-builder-list { display: grid; gap: 10px; padding: 16px; }
.field-builder-row { display: grid; grid-template-columns: 34px 150px minmax(180px, 1fr) 140px 80px 90px 90px 105px 34px; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfb; }
.field-builder-row .field { gap: 5px; }
.field-builder-row .field > span { font-size: .72rem; color: var(--muted); }
.field-builder-row input, .field-builder-row select { min-height: 38px; padding: 8px 10px; }
.drag-index { align-self: center; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.05); font-size: .78rem; font-weight: 700; }
.required-check { align-self: center; display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); }
.required-check input { min-height: auto; width: 16px; height: 16px; }
.icon-danger-button { align-self: center; width: 30px; height: 30px; border: 1px solid rgba(244,63,94,.28); border-radius: 8px; color: #fb7185; background: rgba(244,63,94,.07); cursor: pointer; }
.field-options { grid-column: 3 / -1; }
.sticky-modal-actions { position: sticky; bottom: 0; z-index: 2; background: var(--surface); border-top: 1px solid var(--line); }
.dynamic-form-placeholder { display: grid; gap: 5px; margin: 18px 24px 24px; padding: 22px; color: var(--muted); background: #f7fafa; border: 1px dashed #cbd8da; border-radius: 12px; text-align: center; }
.dynamic-form-placeholder strong { color: var(--ink); }
.dynamic-form-banner { display: flex; align-items: center; gap: 10px; margin: 20px 24px 0; padding: 12px 14px; background: var(--brand-soft); border: 1px solid #c8e9e7; border-radius: 10px; }
.dynamic-form-banner > span { padding: 4px 8px; color: var(--brand-dark); background: #fff; border-radius: 6px; font-size: .7rem; font-weight: 750; }
.dynamic-form-banner small { margin-left: auto; color: var(--muted); }
.dynamic-section { margin: 18px 24px 24px; }
.dynamic-section + .dynamic-section { padding-top: 18px; border-top: 1px solid var(--line); }
.dynamic-section h4 { margin: 0 0 14px; color: var(--ink); font-size: .86rem; }
.field-help { color: var(--muted); font-size: .72rem; }
.preventive-plan-label { margin-top: 5px; color: var(--brand-dark) !important; font-weight: 700; }
.preventive-plan-toggle { padding: 18px 24px 4px; }
.preventive-plan-toggle .toggle-field { display: inline-flex; }
.preventive-plan-fields { padding-top: 14px; }
.equipment-type-modal { width: min(1180px, calc(100vw - 48px)); }
.equipment-type-modal .modal-header p { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.equipment-type-picker { display: grid; gap: 26px; padding: 24px; }
.equipment-type-group { display: grid; gap: 13px; }
.equipment-type-group + .equipment-type-group { padding-top: 24px; border-top: 1px solid var(--line); }
.equipment-type-group-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.equipment-type-group-heading h3 { margin: 0; color: var(--ink); font-size: .94rem; }
.equipment-type-group-heading p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }
.equipment-rubro-glyph, .equipment-type-icon { display: grid; place-items: center; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #c8e9e7; border-radius: 10px; font-size: .67rem; font-weight: 850; letter-spacing: .04em; }
.equipment-rubro-glyph { width: 42px; height: 42px; }
.configuration-warning { padding: 5px 8px; color: #8a5a05; background: #fff7dd; border: 1px solid #eed999; border-radius: 999px; font-size: .66rem; font-weight: 760; }
.equipment-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.equipment-type-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) 16px; gap: 11px; align-items: center; min-height: 76px; padding: 12px; color: var(--ink); background: #f9fbfb; border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.equipment-type-card:hover { border-color: #9bcfce; box-shadow: 0 7px 18px rgba(14, 80, 83, .08); transform: translateY(-1px); }
.equipment-type-card:focus-visible { outline: 3px solid rgba(5, 194, 222, .22); outline-offset: 2px; }
.equipment-type-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.equipment-type-card strong { line-height: 1.25; }
.equipment-type-card small { color: var(--muted); font-size: .65rem; line-height: 1.35; }
.equipment-type-card > i { color: #739095; font-size: 1.3rem; font-style: normal; }
.equipment-type-icon { width: 38px; height: 38px; border-radius: 9px; }
.ot-template-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 13px 16px; color: var(--ink); background: var(--brand-soft); border: 1px solid #c8e9e7; border-radius: 12px; }
.ot-template-heading > span { padding: 4px 8px; color: var(--brand-dark); background: #fff; border-radius: 6px; font-size: .7rem; font-weight: 750; }

@media (max-width: 1050px) {
    .equipment-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .equipment-type-modal { width: 100%; }
    .equipment-type-picker { padding: 18px; }
    .equipment-type-grid { grid-template-columns: 1fr; }
    .equipment-type-group-heading { grid-template-columns: 42px minmax(0, 1fr); }
    .configuration-warning { grid-column: 1 / -1; justify-self: start; }
}
.ot-template-heading small { margin-left: auto; color: var(--muted); }
.dynamic-ot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-all { grid-column: 1 / -1; }
.measurement-alert { font-size: .72rem; font-weight: 650; }
.measurement-alert.warning, .measurement-alert.invalid { color: #c15d19; }
.measurement-alert.ok { color: #20815f; }
.ot-create-section { margin-bottom: 16px; padding: 0; overflow: hidden; }
.ot-create-grid { padding-top: 20px; }
.ot-flow-field { align-content: start; }
.ot-field-step { color: var(--ink) !important; font-size: .78rem !important; }
.ot-new-equipment-fields { padding: 16px; background: #f7fafa; border: 1px solid var(--line); border-radius: 12px; }
.ot-subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.ot-subsection-heading span { color: var(--ink); font-size: .78rem; font-weight: 780; }
.ot-subsection-heading small { color: var(--muted); font-size: .7rem; }
.ot-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.ot-equipment-context { display: grid; grid-template-columns: auto minmax(210px, 1.2fr) minmax(150px, 1fr) minmax(150px, 1fr); align-items: center; gap: 15px; padding: 15px 17px; color: #315159; background: #eef8f7; border: 1px solid #c9e6e3; border-radius: 12px; }
.ot-equipment-context-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--brand-dark); background: #d9efed; border-radius: 10px; }
.ot-equipment-context-title, .ot-equipment-context-value { display: grid; gap: 3px; }
.ot-equipment-context-title small, .ot-equipment-context-value small { color: var(--muted); font-size: .68rem; }
.ot-equipment-context-title strong, .ot-equipment-context-value strong { color: var(--ink); font-size: .8rem; line-height: 1.35; }
.ot-equipment-context-value { min-height: 40px; padding-left: 15px; border-left: 1px solid #c9dfde; }
.ot-create-feedback { margin: 0 0 16px; }
.template-selection-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0 24px 24px; padding: 16px; color: #315159; background: #eef8f7; border: 1px solid #c9e6e3; border-radius: 11px; }
.template-selection-summary > div:nth-child(2) { display: grid; gap: 4px; }
.template-selection-summary span, .template-selection-summary small { color: var(--muted); font-size: .72rem; }
.template-selection-summary strong { color: var(--ink); font-size: .84rem; }
.template-selection-icon { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: var(--brand-dark); border-radius: 10px; font-weight: 850; }
.template-selection-pending { background: #f7f9f9; border-style: dashed; }
.template-selection-pending .template-selection-icon { color: var(--brand-dark); background: #dfeaea; }
.priority-badge { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; color: #fff; background: var(--pill-primary); border: 1px solid transparent; border-radius: 999px; font-size: .68rem; font-weight: 800; box-shadow: 0 2px 5px rgba(13, 110, 253, .18); }
.priority-badge.priority-alta { color: #332701; background: var(--pill-warning); box-shadow: 0 2px 5px rgba(255, 193, 7, .2); }
.priority-badge.priority-critica { color: #fff; background: var(--pill-danger); box-shadow: 0 2px 5px rgba(220, 53, 69, .2); }
.service-template-selector { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.service-template-selector span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.service-template-selector select { min-height: 38px; padding: 0 34px 0 11px; color: var(--ink); background: #fff; border: 1px solid #cfdadc; border-radius: 8px; }

@media (max-width: 1100px) {
    .technical-catalog-layout { grid-template-columns: 1fr; }
    .field-builder-row { grid-template-columns: 34px repeat(2, minmax(150px, 1fr)); }
    .field-options { grid-column: 2 / -1; }
}

@media (max-width: 430px) {
    .metric-grid { grid-template-columns: 1fr; }
    .topbar > div:first-child { display: none; }
    .topbar { justify-content: flex-end; }
    .form-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 760px) {
    .template-selection-summary { grid-template-columns: auto 1fr; }
    .template-selection-summary > a { grid-column: 1 / -1; }
    .ot-inline-grid { grid-template-columns: 1fr; }
    .ot-subsection-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .ot-equipment-context { grid-template-columns: auto minmax(0, 1fr); }
    .ot-equipment-context-value { grid-column: 1 / -1; min-height: 0; padding: 10px 0 0; border-top: 1px solid #c9dfde; border-left: 0; }
}

@keyframes brand-arrive {
    from { opacity: 0; transform: translateY(-7px) scale(.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes metric-reveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboard-heading-in {
    from { opacity: 0; transform: translateY(-9px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboard-section-in {
    from { opacity: 0; transform: translateY(16px) scale(.992); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dashboard-glow {
    from { opacity: .55; transform: translate3d(12px, -5px, 0) scale(.96); }
    to { opacity: 1; transform: translate3d(-7px, 8px, 0) scale(1.08); }
}

@keyframes dashboard-orbit {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-9px, 7px, 0); }
}

@keyframes metric-sheen {
    0%, 28% { opacity: 0; transform: translateX(0) rotate(18deg); }
    46% { opacity: .75; }
    100% { opacity: 0; transform: translateX(430%) rotate(18deg); }
}

@keyframes dashboard-canvas-drift {
    from { opacity: .55; transform: translate3d(-40px, -12px, 0) scale(.88); }
    to { opacity: 1; transform: translate3d(80px, 22px, 0) scale(1.14); }
}

@keyframes button-wave {
    0% { opacity: .2; transform: translate(-50%, -50%) scale(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@keyframes control-click {
    0%, 100% { transform: scale(1); }
    42% { transform: scale(.955); }
    72% { transform: scale(1.018); }
}

.theme-toggle.is-clicked,
.mobile-menu-toggle.is-clicked,
.main-nav a.is-clicked,
.table-action.is-clicked,
.account-chip.is-clicked,
.clear-filter-button.is-clicked,
.icon-danger-button.is-clicked { animation: control-click .36s cubic-bezier(.2,.8,.2,1); }

@keyframes mobile-menu-in {
    from { opacity: 0; transform: translateY(-10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nav-item-in {
    from { opacity: 0; transform: translateX(-7px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scrim-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        width: 100%;
        height: 72px;
        padding: 7px 14px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid #294047;
        box-shadow: 0 8px 28px rgba(10,28,33,.14);
    }
    .sidebar-head { height: 58px; }
    .brand { width: auto; min-width: 0; min-height: 58px; flex: 1 1 auto; align-items: center; justify-content: flex-start; flex-direction: row; gap: 10px; padding: 1px 0; text-align: left; }
    .brand img { width: 59px; height: 59px; }
    .brand-copy strong { font-size: 1rem; }
    .brand-copy small { font-size: .68rem; }
    .mobile-menu-toggle {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
        padding: 0;
        color: #dff5f4;
        background: #21373e;
        border: 1px solid #48636b;
        border-radius: 11px;
        cursor: pointer;
        transition: color .2s ease, background-color .2s ease, transform .2s ease;
    }
    .theme-toggle-mobile { display: grid; }
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus-visible { color: #fff; background: #2a4850; }
    .mobile-menu-toggle:active { transform: scale(.96); }
    .mobile-menu-toggle .app-icon { width: 21px; height: 21px; }
    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        z-index: 52;
        display: grid;
        gap: 16px;
        max-height: calc(100vh - 94px);
        margin: 0;
        padding: 17px;
        overflow-y: auto;
        color: #eaf2f3;
        background: rgba(23,39,45,.985);
        border: 1px solid #365058;
        border-radius: 16px;
        box-shadow: 0 22px 54px rgba(6,20,25,.34);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform-origin: top center;
    }
    .menu-open .main-nav {
        visibility: visible;
        pointer-events: auto;
        animation: mobile-menu-in .25s cubic-bezier(.2,.8,.2,1) both;
    }
    .nav-section { grid-template-columns: 1fr; gap: 4px; margin-top: 0; }
    .nav-section-title { grid-column: auto; padding: 4px 10px 6px; }
    .main-nav a { min-height: 44px; padding: 7px 10px; }
    .menu-open .main-nav a { animation: nav-item-in .28s cubic-bezier(.2,.8,.2,1) both; }
    .menu-open .nav-section:nth-child(2) a { animation-delay: .05s; }
    .menu-open .nav-section:nth-child(3) a { animation-delay: .1s; }
    .main-nav .nav-disabled, .sidebar-footer { display: none; }
    .mobile-menu-scrim {
        position: fixed;
        inset: 72px 0 0;
        z-index: 40;
        display: block;
        width: 100%;
        padding: 0;
        background: rgba(9,23,28,.42);
        border: 0;
        backdrop-filter: blur(2px);
        animation: scrim-in .2s ease both;
    }
    .topbar { display: none; }
    .workspace-content { padding: 25px 16px; }
    .dashboard-home { min-height: calc(100vh - 72px); margin: -25px -16px; padding: 25px 16px; }
    .dashboard-heading { gap: 18px; }
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dashboard-metric { min-height: 138px; padding: 16px; }
    .metric-label { align-items: flex-start; gap: 8px; font-size: .72rem; }
    .metric-symbol { width: 29px; height: 29px; }
    .dashboard-metric strong { font-size: 1.65rem; }
}

@media (max-width: 340px) {
    .brand-copy small { display: none; }
    .dashboard-metrics { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-mark,
    .dashboard-heading,
    .dashboard-atmosphere,
    .dashboard-atmosphere::before,
    .dashboard-atmosphere span,
    .dashboard-metric,
    .dashboard-metric::before,
    .dashboard-section,
    .dashboard-home::before,
    .button.is-clicked::before,
    .theme-toggle.is-clicked,
    .mobile-menu-toggle.is-clicked,
    .main-nav a.is-clicked,
    .table-action.is-clicked,
    .account-chip.is-clicked,
    .clear-filter-button.is-clicked,
    .icon-danger-button.is-clicked,
    .menu-open .main-nav,
    .menu-open .main-nav a,
    .mobile-menu-scrim { animation: none !important; }
    .brand-mark,
    .dashboard-metric,
    .metric-symbol,
    .main-nav a,
    .nav-icon,
    .mobile-menu-toggle { transition-duration: .01ms !important; }
}

/* Acceso y sesión */
.auth-layout { min-height: 100vh; }
.auth-theme-toggle { position: fixed; top: 17px; right: 20px; z-index: 12; min-width: 92px; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.auth-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 8%, rgba(63, 209, 215, .2), transparent 31%),
        radial-gradient(circle at 92% 90%, rgba(61, 124, 194, .14), transparent 34%),
        linear-gradient(135deg, #eff8f8 0%, #f7f9fb 48%, #edf3f8 100%);
}
.auth-glow { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; animation: auth-float 8s ease-in-out infinite; }
.auth-glow-one { top: -140px; left: -110px; width: 360px; height: 360px; background: rgba(33, 203, 208, .13); }
.auth-glow-two { right: -150px; bottom: -170px; width: 430px; height: 430px; background: rgba(79, 133, 192, .1); animation-delay: -3s; }
.auth-card {
    position: relative;
    z-index: 1;
    width: min(1320px, 100%);
    min-height: min(790px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(470px, .95fr);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(172, 196, 204, .72);
    border-radius: 30px;
    box-shadow: 0 32px 80px rgba(24, 58, 69, .16);
    animation: auth-card-in .62s cubic-bezier(.2,.8,.2,1) both;
}
.auth-visual { position: relative; isolation: isolate; min-height: 620px; overflow: hidden; color: #fff; background: #12272f; }
.auth-visual-photo {
    position: absolute;
    inset: -14px;
    z-index: -3;
    background: url("brand/login-technician-quotation-v1.png") 38% center / cover no-repeat;
    filter: blur(1.5px) saturate(.82);
    transform: scale(1.035);
    animation: auth-photo-in 1.4s cubic-bezier(.2,.8,.2,1) both;
}
.auth-visual-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(8,26,33,.37), rgba(9,28,35,.48)),
        linear-gradient(110deg, rgba(5,24,31,.74) 0%, rgba(9,31,39,.26) 64%, rgba(9,31,39,.47) 100%);
}
.auth-visual-shade::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 56%, rgba(4,20,26,.72));
}
.auth-visual-content { height: 100%; min-height: inherit; display: flex; flex-direction: column; padding: 48px 54px 44px; }
.auth-product-brand { align-self: center; display: grid; place-items: center; width: 100%; padding: 0; }
.auth-product-brand img { width: clamp(190px, 20vw, 260px); height: auto; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.32)); }
.auth-hero-copy { max-width: 510px; margin-top: auto; padding: 0 0 50px; text-shadow: 0 2px 16px rgba(0,0,0,.18); }
.auth-kicker { display: inline-flex; align-items: center; gap: 10px; color: #29b8bd; font-size: .7rem; font-weight: 850; letter-spacing: .16em; }
.auth-visual .auth-kicker { color: #63e0df; }
.auth-kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.auth-hero-copy h2 { margin: 19px 0 15px; max-width: 480px; font-size: clamp(2.35rem, 4vw, 4.25rem); line-height: 1.08; letter-spacing: -.045em; }
.auth-hero-copy p { max-width: 500px; margin: 0; color: #c1d1d5; font-size: 1.02rem; line-height: 1.65; }
.auth-technology-brand { display: flex; align-items: center; gap: 11px; width: fit-content; }
.auth-technology-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #072f37; background: linear-gradient(145deg, #72e2df, #25aeb5); border-radius: 11px; box-shadow: 0 8px 22px rgba(0,0,0,.18); font-size: .77rem; font-weight: 900; letter-spacing: -.04em; }
.auth-technology-brand > span:last-child { display: grid; gap: 2px; }
.auth-technology-brand small { color: #9eb5bb; font-size: .55rem; font-weight: 750; letter-spacing: .13em; }
.auth-technology-brand strong { font-size: .82rem; }
.auth-form-panel { display: grid; place-items: center; padding: 56px clamp(38px, 5vw, 76px); background: rgba(255,255,255,.98); }
.auth-form-wrap { width: min(100%, 470px); }
.auth-form-heading { margin-bottom: 28px; }
.auth-form-heading h1 { margin: 14px 0 7px; color: #122c34; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.05; letter-spacing: -.04em; }
.auth-form-heading h1:focus { outline: none; }
.auth-form-heading p { margin: 0; color: #6b7f86; line-height: 1.55; }
.auth-form { display: grid; gap: 20px; }
.auth-field { display: grid; gap: 8px; color: #334b53; font-size: .8rem; font-weight: 750; }
.auth-input { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #f5f9fb; border: 1px solid #cbdcdf; border-radius: 13px; transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.auth-input:focus-within { background: #fff; border-color: #28aeb3; box-shadow: 0 0 0 4px rgba(40,174,179,.11); }
.auth-input > .app-icon { flex: 0 0 auto; width: 20px; height: 20px; color: #62818a; }
.auth-input input { min-width: 0; flex: 1; height: 54px; padding: 0; color: #173039; background: transparent; border: 0; outline: 0; font-size: .94rem; font-weight: 620; }
.auth-input input::placeholder { color: #95a7ac; font-weight: 450; }
.auth-password-toggle { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; color: #6f878f; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.auth-password-toggle:hover { color: var(--brand-dark); background: #e8f3f3; }
.auth-password-toggle .app-icon { width: 19px; height: 19px; }
.auth-form-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: -2px; font-size: .75rem; }
.auth-form-options a, .auth-back-link { color: var(--brand-dark); font-weight: 750; text-decoration: none; }
.auth-form-options a:hover, .auth-back-link:hover { text-decoration: underline; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; color: #61777e; cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--brand-dark); }
.auth-submit { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 2px; padding: 0 22px; color: #fff; background: linear-gradient(110deg, #0ca4ad, #087b97); border: 0; border-radius: 13px; box-shadow: 0 15px 28px rgba(7,126,143,.21); cursor: pointer; font-size: .92rem; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.auth-submit:hover { filter: brightness(1.04); box-shadow: 0 18px 34px rgba(7,126,143,.28); transform: translateY(-2px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit .app-icon { width: 20px; height: 20px; transition: transform .18s ease; }
.auth-submit:hover .app-icon { transform: translateX(3px); }
.auth-protected { display: flex; align-items: center; justify-content: center; gap: 7px; color: #73888f; font-size: .7rem; }
.auth-protected .app-icon { width: 15px; height: 15px; }
.auth-alert { display: flex; align-items: flex-start; gap: 10px; margin: -7px 0 20px; padding: 12px 14px; color: #8e3d45; background: #fff0f1; border: 1px solid #f1c6ca; border-radius: 11px; font-size: .75rem; line-height: 1.45; }
.auth-alert .app-icon { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }
.auth-success { display: flex; align-items: flex-start; gap: 13px; padding: 18px; color: #2d5c50; background: #eef9f5; border: 1px solid #c9eadc; border-radius: 13px; }
.auth-success-icon { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; color: #fff; background: #2d9a7d; border-radius: 50%; }
.auth-success-icon .app-icon { width: 19px; height: 19px; }
.auth-success > div { display: grid; gap: 5px; }
.auth-success span { font-size: .76rem; line-height: 1.5; }
.auth-back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: .78rem; }
.auth-back-link .app-icon { width: 17px; height: 17px; transition: transform .18s ease; }
.auth-back-link:hover .app-icon { transform: translateX(-3px); }

.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-chip > .app-icon { width: 15px; height: 15px; color: #789097; transition: transform .18s ease; }
.account-menu[open] .account-chip > .app-icon { transform: rotate(90deg); }
.account-popover { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 245px; overflow: hidden; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 44px rgba(21,51,61,.16); animation: account-menu-in .2s ease both; }
.account-popover-heading { display: grid; gap: 3px; padding: 10px 11px 12px; border-bottom: 1px solid var(--line); }
.account-popover-heading strong { font-size: .8rem; }
.account-popover-heading small { color: var(--muted); font-size: .65rem; }
.account-popover a, .account-popover button { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; margin-top: 5px; padding: 8px 10px; color: #435a62; background: transparent; border: 0; border-radius: 8px; text-decoration: none; text-align: left; cursor: pointer; font-size: .75rem; font-weight: 700; }
.account-popover a:hover, .account-popover button:hover { color: var(--brand-dark); background: var(--brand-soft); }
.account-popover .app-icon { width: 17px; height: 17px; }
.account-popover form { margin: 0; }

@keyframes auth-card-in {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-photo-in {
    from { opacity: .35; transform: scale(1.11); }
    to { opacity: 1; transform: scale(1.035); }
}
@keyframes auth-float {
    0%, 100% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(0,14px,0); }
}
@keyframes account-menu-in {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 940px) {
    .auth-page { padding: 18px; }
    .auth-card { grid-template-columns: 1fr; min-height: 0; }
    .auth-visual { min-height: 280px; }
    .auth-visual-content { min-height: 280px; padding: 24px 32px; }
    .auth-product-brand img { width: 160px; }
    .auth-hero-copy { margin-top: auto; padding: 24px 0 0; }
    .auth-hero-copy h2 { margin: 13px 0 7px; font-size: 2.25rem; }
    .auth-hero-copy p { font-size: .88rem; }
    .auth-technology-brand { display: none; }
    .auth-form-panel { padding: 42px 32px; }
}

@media (max-width: 560px) {
    .auth-page { min-height: 100dvh; place-items: start stretch; padding: 0; overflow: visible; background: #fff; }
    .auth-card { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; animation: none; }
    .auth-visual { min-height: 220px; }
    .auth-visual-photo { background-position: 42% 45%; }
    .auth-visual-content { min-height: 220px; padding: 12px 18px 16px; }
    .auth-product-brand { width: 100%; }
    .auth-product-brand img { width: 145px; }
    .auth-hero-copy { padding: 10px 0 0; }
    .auth-hero-copy .auth-kicker, .auth-hero-copy p { display: none; }
    .auth-hero-copy h2 { max-width: 340px; margin: 0; font-size: 1.45rem; line-height: 1.08; }
    .auth-form-panel { place-items: start center; padding: 25px 20px 28px; }
    .auth-form-heading { margin-bottom: 20px; }
    .auth-form-heading h1 { margin-top: 10px; font-size: 1.9rem; }
    .auth-form { gap: 16px; }
    .auth-input { min-height: 54px; }
    .auth-input input { height: 50px; }
    .auth-form-options { align-items: center; flex-flow: row wrap; }
    .auth-submit { min-height: 56px; }
    .account-popover { position: fixed; top: 68px; right: 12px; }
}

@media (max-width: 560px) and (max-height: 700px) {
    .auth-visual { min-height: 160px; }
    .auth-visual-content { min-height: 160px; justify-content: center; padding: 7px 18px; }
    .auth-product-brand img { width: 138px; }
    .auth-hero-copy { display: none; }
    .auth-form-panel { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-visual-photo,
    .auth-glow,
    .account-popover { animation: none !important; }
}

/* Superadministración y mapa de conocimiento */
.superadmin-heading { align-items: center; }
.superadmin-role-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 13px; color: #fff; background: var(--pill-primary); border: 1px solid transparent; border-radius: 999px; font-size: .72rem; font-weight: 800; box-shadow: 0 2px 5px rgba(13, 110, 253, .2); }
.superadmin-role-badge .app-icon { width: 17px; height: 17px; color: #fff; }
.superadmin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 15px; }
.superadmin-metric { min-height: 112px; display: flex; align-items: flex-start; gap: 13px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(30,55,61,.045); }
.superadmin-metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 11px; }
.superadmin-metric-icon .app-icon { width: 20px; height: 20px; }
.superadmin-metric > div { display: grid; gap: 3px; }
.superadmin-metric span:not(.superadmin-metric-icon) { color: #5b7077; font-size: .72rem; font-weight: 720; }
.superadmin-metric strong { color: #17272d; font-size: 1.75rem; line-height: 1.15; letter-spacing: -.04em; }
.superadmin-metric small { color: #819196; font-size: .67rem; }
.platform-admin-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 15px; }
.platform-admin-metrics article { min-height: 108px; display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(30,55,61,.045); }
.platform-admin-metrics article > span { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 11px; }
.platform-admin-metrics article > span .app-icon { width: 20px; height: 20px; }
.platform-admin-metrics article > div { display: grid; gap: 2px; }
.platform-admin-metrics small { color: #5b7077; font-size: .69rem; font-style: normal; font-weight: 750; }
.platform-admin-metrics strong { color: #17272d; font-size: 1.6rem; line-height: 1.1; }
.platform-admin-metrics em { color: #819196; font-size: .65rem; font-style: normal; }
.platform-admin-feedback { margin-bottom: 15px; padding: 11px 13px; color: #276b56; background: #e7f5ef; border: 1px solid #bee3d4; border-radius: 10px; font-size: .74rem; font-weight: 700; }
.platform-companies-panel { margin-bottom: 15px; }
.platform-company-table td:first-child, .platform-user-table td:first-child { width: 30%; }
.platform-company-table td:nth-child(2), .platform-user-table td:nth-child(2) { width: 17%; }
.platform-company-table td:nth-child(3), .platform-user-table td:nth-child(3) { width: 16%; }
.platform-company-table td:nth-child(4), .platform-user-table td:nth-child(4) { width: 110px; }
.platform-company-table .selected-row { background: #f0f8f7; box-shadow: inset 3px 0 0 var(--brand); }
.status-inactive { color: #fff; background: var(--pill-danger); }
.platform-users-panel { margin-top: 15px; }
.platform-users-heading { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.platform-users-heading h2 { margin: 4px 0; font-size: 1.08rem; }
.platform-users-heading p { margin: 0; color: var(--muted); font-size: .72rem; }
.ai-access-panel { margin-bottom: 15px; padding: 0; overflow: hidden; }
.ai-access-header { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.ai-access-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.ai-access-title > div { min-width: 0; }
.ai-access-icon { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); border-radius: 12px; box-shadow: 0 10px 24px rgba(8,122,128,.17); }
.ai-access-icon .app-icon { width: 22px; height: 22px; }
.ai-access-header h2 { margin: 4px 0; color: #1d3138; font-size: 1.15rem; }
.ai-access-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.ai-access-summary { flex: 0 0 auto; padding: 7px 11px; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #c8e5e3; border-radius: 999px; font-size: .69rem; font-weight: 800; }
.ai-access-feedback { margin: 14px 20px 0; padding: 10px 12px; color: #276b56; background: #e7f5ef; border: 1px solid #bee3d4; border-radius: 9px; font-size: .72rem; font-weight: 700; }
.ai-user-list { display: grid; padding: 0 20px; }
.ai-user-row { display: grid; grid-template-columns: minmax(190px, 1.35fr) minmax(155px, .9fr) 140px minmax(180px, 1fr) auto; align-items: center; gap: 18px; min-height: 112px; padding: 18px 3px; border-bottom: 1px solid #e8eeee; }
.ai-user-row:last-child { border-bottom: 0; }
.ai-user-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.ai-user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; color: #fff; background: #2c4b52; border-radius: 11px; font-size: .72rem; font-weight: 850; }
.ai-user-identity > div { min-width: 0; display: grid; gap: 4px; }
.ai-user-identity strong, .ai-user-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-user-identity strong { color: #263d44; font-size: .8rem; }
.ai-user-identity span { color: #7a8c91; font-size: .66rem; }
.ai-feature-switch { display: flex; align-items: center; gap: 9px; color: #52676e; cursor: pointer; font-size: .7rem; font-weight: 750; }
.ai-feature-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ai-feature-switch-track { position: relative; flex: 0 0 auto; width: 37px; height: 21px; background: #cbd6d8; border-radius: 999px; transition: background-color .18s ease; }
.ai-feature-switch-track i { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(23,50,56,.2); transition: transform .18s ease; }
.ai-feature-switch input:checked + .ai-feature-switch-track { background: var(--brand); }
.ai-feature-switch input:checked + .ai-feature-switch-track i { transform: translateX(16px); }
.ai-feature-switch input:focus-visible + .ai-feature-switch-track { outline: 3px solid rgba(16,156,162,.2); outline-offset: 2px; }
.ai-limit-field { display: grid; gap: 6px; }
.ai-limit-field > span { color: #64777e; font-size: .66rem; font-weight: 750; }
.ai-limit-field > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 38px; background: #fbfcfc; border: 1px solid #cfdadc; border-radius: 8px; overflow: hidden; }
.ai-limit-field input { min-width: 0; width: 100%; height: 36px; padding: 0 9px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.ai-limit-field small { padding-right: 9px; color: #809197; font-size: .61rem; }
.ai-usage { display: grid; gap: 5px; }
.ai-usage > div:first-child { display: flex; justify-content: space-between; gap: 8px; color: #657980; font-size: .65rem; }
.ai-usage strong { color: #2e4e55; font-size: .68rem; }
.ai-usage-track { height: 6px; overflow: hidden; background: #e7eded; border-radius: 999px; }
.ai-usage-track i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--brand), #51c8c3); border-radius: inherit; transition: width .25s ease; }
.ai-usage small { color: #809197; font-size: .62rem; }
.ai-user-row > .button { min-height: 38px; padding-inline: 14px; font-size: .72rem; }
.ai-access-note { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 11px 22px; color: #71848a; background: #f7f9f9; border-top: 1px solid var(--line); font-size: .66rem; }
.ai-access-note .app-icon { flex: 0 0 auto; width: 16px; height: 16px; color: var(--brand-dark); }
.knowledge-panel { padding: 0; overflow: hidden; }
.knowledge-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.knowledge-header h2 { margin: 4px 0; color: #1d3138; font-size: 1.15rem; }
.knowledge-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.knowledge-filters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.knowledge-filters button { min-height: 34px; padding: 0 11px; color: #60757c; background: #f5f8f8; border: 1px solid #dbe5e6; border-radius: 8px; cursor: pointer; font-size: .69rem; font-weight: 750; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.knowledge-filters button:hover { color: var(--brand-dark); border-color: #b9d8d7; }
.knowledge-filters button.active { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.knowledge-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 670px; }
.knowledge-map-scroll { min-width: 0; overflow-x: auto; background: #f7fafa; border-right: 1px solid var(--line); }
.knowledge-map { position: relative; width: 1100px; min-height: 650px; background-image: radial-gradient(circle, #cfdddd 1px, transparent 1px); background-size: 22px 22px; }
.knowledge-map::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, rgba(16,156,162,.07), transparent 37%); }
.knowledge-links { position: absolute; inset: 0; width: 1100px; height: 650px; overflow: visible; pointer-events: none; }
.knowledge-links line { stroke: #b9cbce; stroke-width: 1.4; vector-effect: non-scaling-stroke; animation: knowledge-link-in .36s ease both; }
.knowledge-node { position: absolute; z-index: 2; width: 166px; min-height: 64px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; color: #294149; background: rgba(255,255,255,.97); border: 1px solid #cad9db; border-radius: 12px; box-shadow: 0 8px 18px rgba(24,59,68,.08); text-align: left; cursor: pointer; transform: translate(-50%, -50%); transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease; }
.knowledge-node:hover { z-index: 4; border-color: #87bdbe; box-shadow: 0 12px 26px rgba(24,59,68,.13); transform: translate(-50%, -52%); }
.knowledge-node:focus-visible { z-index: 5; outline: 3px solid rgba(16,156,162,.22); outline-offset: 2px; }
.knowledge-node.selected { z-index: 3; border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(16,156,162,.12), 0 12px 26px rgba(24,59,68,.12); }
.knowledge-node-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.knowledge-node-icon .app-icon { width: 18px; height: 18px; }
.knowledge-node-copy { min-width: 0; display: grid; gap: 2px; }
.knowledge-node-copy strong, .knowledge-node-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-node-copy strong { font-size: .7rem; }
.knowledge-node-copy small { color: #819298; font-family: Consolas, monospace; font-size: .56rem; }
.knowledge-node-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; color: #526970; background: #edf3f3; border-radius: 7px; font-size: .62rem; font-weight: 850; }
.knowledge-node-platform .knowledge-node-icon { color: #177f84; background: #e3f5f4; }
.knowledge-node-operation .knowledge-node-icon { color: #416f99; background: #eaf2f8; }
.knowledge-node-catalog .knowledge-node-icon { color: #8a6b1b; background: #fff5d9; }
.knowledge-node-security .knowledge-node-icon { color: #8a5369; background: #f8eaf0; }
.knowledge-node-core { width: 184px; min-height: 76px; color: #fff; background: #183b43; border-color: #183b43; box-shadow: 0 14px 35px rgba(18,59,68,.24); }
.knowledge-node-core .knowledge-node-icon { width: 42px; height: 42px; color: #8be0de; background: rgba(255,255,255,.1); }
.knowledge-node-core .knowledge-node-copy strong { font-size: .82rem; }
.knowledge-node-core .knowledge-node-copy small { color: #a9c2c7; }
.knowledge-node-core .knowledge-node-count { color: #d9f5f4; background: rgba(255,255,255,.1); }
.knowledge-inspector { min-width: 0; padding: 23px; background: #fff; }
.knowledge-inspector-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.knowledge-inspector-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 11px; }
.knowledge-inspector-icon .app-icon { width: 21px; height: 21px; }
.knowledge-inspector-heading > div { display: grid; gap: 3px; }
.knowledge-inspector-heading span { color: var(--brand-dark); font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.knowledge-inspector h3 { margin: 0; color: #1d3138; font-size: 1rem; }
.knowledge-inspector > p { min-height: 62px; margin: 18px 0; color: #64777e; font-size: .74rem; line-height: 1.55; }
.knowledge-inspector dl { display: grid; gap: 9px; margin: 0; }
.knowledge-inspector dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2f2; }
.knowledge-inspector dt { color: #87979c; font-size: .65rem; }
.knowledge-inspector dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #334b53; font-family: Consolas, monospace; font-size: .68rem; font-weight: 700; }
.knowledge-relations { margin-top: 20px; }
.knowledge-relations > span { color: #526970; font-size: .66rem; font-weight: 800; }
.knowledge-relations ul { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.knowledge-relations li { position: relative; padding-left: 15px; color: #687b81; font-size: .7rem; }
.knowledge-relations li::before { content: ""; position: absolute; top: .42em; left: 0; width: 6px; height: 6px; background: var(--brand); border-radius: 50%; }
.knowledge-legend { min-height: 54px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--line); }
.knowledge-legend > span { display: inline-flex; align-items: center; gap: 6px; color: #667a81; font-size: .65rem; font-weight: 720; }
.knowledge-legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend-platform { background: #52b9b8; }
.legend-operation { background: #739fc5; }
.legend-catalog { background: #d1a94a; }
.legend-security { background: #bd7f98; }
.knowledge-legend small { margin-left: auto; color: #87969b; font-size: .62rem; }
.superadmin-data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 15px; }
.data-principle-card { display: flex; align-items: flex-start; gap: 14px; padding: 19px; }
.data-principle-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 10px; }
.data-principle-icon .app-icon { width: 19px; height: 19px; }
.data-principle-card h2 { margin: 4px 0 7px; font-size: .85rem; }
.data-principle-card p { margin: 0; color: #6d7f85; font-size: .69rem; line-height: 1.5; }
.data-principle-card code { color: #315159; font-size: .68rem; }

@keyframes knowledge-link-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1180px) {
    .superadmin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platform-admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ai-user-row { grid-template-columns: minmax(210px, 1.3fr) minmax(155px, 1fr) 140px auto; }
    .ai-usage { grid-column: 2 / 4; }
    .ai-user-row > .button { grid-column: 4; grid-row: 1 / span 2; }
    .knowledge-workspace { grid-template-columns: 1fr; }
    .knowledge-map-scroll { border-right: 0; border-bottom: 1px solid var(--line); }
    .knowledge-inspector { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 28px; }
    .knowledge-inspector-heading, .knowledge-inspector > p { grid-column: 1; }
    .knowledge-inspector dl, .knowledge-relations { grid-column: 2; }
    .knowledge-inspector dl { grid-row: 1 / span 2; }
    .knowledge-relations { grid-row: 3; }
}

@media (max-width: 760px) {
    .superadmin-role-badge { display: none; }
    .superadmin-metrics, .superadmin-data-grid { grid-template-columns: 1fr; }
    .platform-admin-metrics { grid-template-columns: 1fr; }
    .platform-users-heading { align-items: flex-start; flex-direction: column; }
    .platform-users-heading .button { width: 100%; }
    .ai-access-header { align-items: flex-start; flex-direction: column; }
    .ai-access-summary { margin-left: 58px; }
    .ai-user-list { padding-inline: 16px; }
    .ai-user-row { grid-template-columns: 1fr; gap: 14px; padding-block: 19px; }
    .ai-usage, .ai-user-row > .button { grid-column: 1; grid-row: auto; }
    .ai-user-row > .button { width: 100%; }
    .knowledge-header { align-items: flex-start; flex-direction: column; }
    .knowledge-filters { justify-content: flex-start; }
    .knowledge-map-scroll { max-height: 520px; }
    .knowledge-map { transform-origin: top left; }
    .knowledge-inspector { display: block; }
    .knowledge-inspector > p { min-height: 0; }
    .knowledge-legend small { width: 100%; margin-left: 0; }
}

/* Privacidad y presupuestos */
.sidebar-footer { flex-direction: column; align-items: stretch; gap: 9px; }
.environment-label { display: flex; align-items: center; gap: 8px; padding-inline: 7px; }
.environment-dot { display: inline-block; flex: 0 0 auto; }
.privacy-notice { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; border-radius: 10px; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.privacy-notice:hover { transform: translateY(-1px); }
.privacy-notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; color: #76ddd8; background: rgba(60, 195, 190, .1); border: 1px solid rgba(118, 221, 216, .25); border-radius: 9px; }
.privacy-notice-icon .app-icon { width: 15px; height: 15px; }
.privacy-notice > span:last-child { display: grid; gap: 2px; min-width: 0; }
.privacy-notice strong { color: #d9e8ea; font-size: .68rem; line-height: 1.2; }
.privacy-notice small { color: #8ea2a8; font-size: .59rem; line-height: 1.25; }
.privacy-notice-sidebar { padding: 9px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.privacy-notice-mobile { display: none; padding: 10px; background: rgba(255,255,255,.04); border: 1px solid #365058; }
.privacy-notice-auth { position: fixed; left: 50%; bottom: 15px; z-index: 5; padding: 8px 13px; color: #4d666c; background: rgba(255,255,255,.86); border: 1px solid rgba(119,155,164,.28); box-shadow: 0 8px 24px rgba(22,52,59,.08); backdrop-filter: blur(10px); transform: translateX(-50%); }
.privacy-notice-auth:hover { transform: translateX(-50%) translateY(-1px); }
.privacy-notice-auth strong { color: #24464e; }
.privacy-notice-auth small { color: #698087; }

.service-pricing-card { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, .9fr); align-items: center; gap: 22px; margin: 0 24px 20px; padding: 16px 18px; background: #f4f9f9; border: 1px solid #d5e5e6; border-radius: 12px; }
.service-pricing-card .toggle-field { align-items: flex-start; }
.service-pricing-card .toggle-field > span { display: grid; gap: 4px; }
.service-pricing-card .toggle-field small { color: var(--muted); font-weight: 500; }
.money-input { display: flex; align-items: stretch; overflow: hidden; border: 1px solid #cbd8dc; border-radius: 8px; background: #fff; }
.money-input > span { display: grid; place-items: center; width: 40px; color: var(--muted); background: #eef4f4; border-right: 1px solid #d7e2e4; font-weight: 750; }
.money-input input { min-width: 0; width: 100%; border: 0 !important; border-radius: 0 !important; }
.quote-create-section { border-color: #bddedc; }
.quote-heading { align-items: center; }
.quote-switch { padding: 10px 14px; background: #eef8f7; border: 1px solid #cbe5e2; border-radius: 10px; }
.quote-switch > span, .compact-toggle > span { display: grid; gap: 2px; }
.quote-switch small, .compact-toggle small { color: var(--muted); font-weight: 500; }
.quote-items-editor { display: grid; gap: 12px; padding: 20px 24px 4px; border-top: 1px solid var(--line); }
.quote-line-item { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(110px, .55fr) minmax(170px, .8fr) 38px; align-items: end; gap: 14px; padding: 14px; background: #f7fafa; border: 1px solid var(--line); border-radius: 11px; }
.quote-remove-item { margin-bottom: 2px; }
.quote-remove-item:disabled { opacity: .35; cursor: not-allowed; }
.quote-add-item { justify-self: start; }
.quote-grid { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(120px, .55fr) minmax(180px, .8fr); gap: 16px; padding: 20px 24px; border-top: 1px solid var(--line); }
.quote-description { grid-column: 1; }
.compact-toggle { align-self: center; padding: 13px 14px; background: #f7fafa; border: 1px solid var(--line); border-radius: 10px; }
.quote-grid .compact-toggle:nth-of-type(4) { grid-column: 1 / 2; }
.quote-grid .compact-toggle:nth-of-type(5) { grid-column: 2 / 4; }
.quote-summary { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.quote-summary > span { display: grid; gap: 3px; min-width: 125px; padding: 11px 14px; background: #f5f9f9; border: 1px solid var(--line); border-radius: 9px; }
.quote-summary small { color: var(--muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.quote-summary strong { color: var(--ink); font-size: .95rem; }
.quote-summary .quote-total { background: var(--brand-soft); border-color: #b9dedd; }
.quote-summary .quote-total strong { color: var(--brand-dark); font-size: 1.05rem; }
.budget-detail-heading { align-items: center; }
.status-neutral { color: #fff; background: var(--pill-secondary); }
.budget-items { display: grid; padding: 8px 24px 18px; }
.budget-item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 110px; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.budget-item-row span { color: var(--muted); }
.budget-item-row b { text-align: right; }
.budget-detail-summary { padding-top: 2px; }
.report-budget-table { display: grid; border: 1px solid #dbe4e5; border-radius: 8px; overflow: hidden; }
.report-budget-head, .report-budget-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px 110px; gap: 10px; align-items: center; padding: 10px 12px; }
.report-budget-head { color: #31545b; background: #edf6f6; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.report-budget-row { color: #2d3c40; border-top: 1px solid #e4ebec; font-size: .75rem; }
.report-budget-row > :not(:first-child), .report-budget-head > :not(:first-child) { text-align: right; }
.report-budget-totals { display: grid; justify-content: end; gap: 7px; margin-top: 12px; }
.report-budget-totals span { display: grid; grid-template-columns: 90px 110px; gap: 16px; color: #5d7075; font-size: .75rem; }
.report-budget-totals strong { color: #172b30; text-align: right; }
.report-budget-totals span:last-child { color: #075b60; font-size: .85rem; font-weight: 800; }

@media (max-width: 900px) {
    .service-pricing-card, .quote-grid, .quote-line-item { grid-template-columns: 1fr; }
    .quote-remove-item { justify-self: end; margin-top: -48px; }
    .quote-grid .compact-toggle:nth-of-type(4), .quote-grid .compact-toggle:nth-of-type(5) { grid-column: auto; }
    .quote-summary { flex-wrap: wrap; }
    .quote-summary > span { flex: 1 1 130px; }
}

@media (max-width: 760px) {
    .work-order-actions { min-width: 112px; }
    .report-action { padding: 7px; }
    .report-action span { display: none; }
    .mobile-session-nav .privacy-notice-mobile { display: flex; }
    .privacy-notice-auth { position: static; width: calc(100% - 36px); margin: 16px auto 20px; transform: none; }
    .privacy-notice-auth:hover { transform: translateY(-1px); }
    .service-pricing-card { margin-inline: 16px; }
    .quote-heading { align-items: stretch; flex-direction: column; }
    .quote-switch { width: 100%; }
    .quote-grid { padding-inline: 16px; }
    .quote-summary { padding-inline: 16px; }
    .budget-item-row { grid-template-columns: 1fr auto; }
    .budget-item-row span { grid-column: 1; }
    .budget-item-row b { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
    .report-budget-head { display: none; }
    .report-budget-row { grid-template-columns: 1fr auto; }
    .report-budget-row > :nth-child(2), .report-budget-row > :nth-child(3) { font-size: .68rem; }
    .report-budget-row > :nth-child(4) { grid-column: 2; grid-row: 1; }
}

html[data-theme="dark"] .privacy-notice-auth { color: #c4d5d8; background: rgba(15,32,38,.9); border-color: #38545c; }
html[data-theme="dark"] .privacy-notice-auth strong { color: #e4f0f2; }
html[data-theme="dark"] .privacy-notice-auth small { color: #91a8ae; }
html[data-theme="dark"] .service-pricing-card,
html[data-theme="dark"] .quote-switch,
html[data-theme="dark"] .compact-toggle,
html[data-theme="dark"] .quote-line-item,
html[data-theme="dark"] .quote-summary > span { background: #102026; border-color: #344b52; }
html[data-theme="dark"] .ot-new-equipment-fields { background: #102026; border-color: #344b52; }
html[data-theme="dark"] .ot-equipment-context { color: #c5d9dc; background: #132b30; border-color: #34575c; }
html[data-theme="dark"] .ot-equipment-context-icon { background: #1a3c40; }
html[data-theme="dark"] .ot-equipment-context-value { border-color: #34575c; }
html[data-theme="dark"] .money-input { background: #102026; border-color: #354b52; }
html[data-theme="dark"] .money-input > span { color: #a8bdc1; background: #192d33; border-color: #354b52; }
html[data-theme="dark"] .quote-summary .quote-total { background: #17383c; border-color: #3f7779; }
html[data-theme="dark"] .status-neutral { color: #fff; background: var(--pill-secondary); }

/* Tema oscuro global */
html[data-theme="dark"] {
    color-scheme: dark;
    color: #e7f0f1;
    background: #0c171b;
    --ink: #e7f0f1;
    --muted: #92a7ad;
    --line: #2b4148;
    --surface: #14242a;
    --canvas: #0c171b;
    --brand: #37c4c3;
    --brand-dark: #66d9d5;
    --brand-soft: #17383c;
    --sidebar: #091419;
    --sticky-actions-bg: rgba(9, 20, 25, .94);
}

html[data-theme="dark"] .sticky-form-actions { box-shadow: 0 -12px 30px rgba(0, 0, 0, .3); }

html[data-theme="dark"] body { color: var(--ink); background: var(--canvas); }
html[data-theme="dark"] .sidebar { background: #091419; border-color: #1f363d; }
html[data-theme="dark"] .topbar { background: rgba(12, 23, 27, .92); }
html[data-theme="dark"] .theme-toggle { color: #c2d3d6; background: #172a30; border-color: #34515a; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
html[data-theme="dark"] .theme-toggle:hover { color: #77e4df; border-color: #4c777d; }
html[data-theme="dark"] .suite-label,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .table-action,
html[data-theme="dark"] .text-link { color: var(--brand-dark); }
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: var(--ink); }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .button-danger { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .button-secondary:hover { border-color: #466169; background: #1a2d33; }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .dashboard-metric,
html[data-theme="dark"] .superadmin-metric,
html[data-theme="dark"] .platform-admin-metrics article { background: var(--surface); border-color: var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
html[data-theme="dark"] .dashboard-metric::before { background: linear-gradient(90deg, transparent, rgba(126,232,226,.12), transparent); }
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .dashboard-metric strong,
html[data-theme="dark"] .superadmin-metric strong,
html[data-theme="dark"] .platform-admin-metrics strong { color: #edf6f7; }
html[data-theme="dark"] .metric-symbol,
html[data-theme="dark"] .dashboard-empty-icon { color: #85e3df; background: #19383d; }
html[data-theme="dark"] .dashboard-empty { background: #102026; }
html[data-theme="dark"] .dashboard-empty strong { color: #dbe9eb; }
html[data-theme="dark"] .dashboard-atmosphere { opacity: .48; }
html[data-theme="dark"] .dashboard-atmosphere::before { background: radial-gradient(circle at 62% 44%, rgba(55,196,195,.16), transparent 54%); }
html[data-theme="dark"] .dashboard-atmosphere span { border-color: rgba(75,215,211,.18); }
html[data-theme="dark"] .dashboard-atmosphere span:nth-child(3) { background: rgba(75,215,211,.17); }
html[data-theme="dark"] .dashboard-home { background: radial-gradient(circle at 82% 4%, rgba(55,196,195,.12), transparent 30%), radial-gradient(circle at 8% 74%, rgba(45,169,120,.07), transparent 31%), linear-gradient(rgba(117,221,216,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(117,221,216,.022) 1px, transparent 1px), var(--canvas); background-size: auto, auto, 42px 42px, 42px 42px, auto; }
html[data-theme="dark"] .dashboard-home::before { background: radial-gradient(circle, rgba(55,196,195,.1), transparent 68%); }

html[data-theme="dark"] .field span,
html[data-theme="dark"] .toggle-field,
html[data-theme="dark"] .checklist-item { color: #c8d7da; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .service-template-selector select,
html[data-theme="dark"] .evidence-card-body input,
html[data-theme="dark"] .ai-limit-field > div { color: var(--ink); background: #102026; border-color: #354b52; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #70878e; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled { color: #91a4aa; background: #15252b; }
html[data-theme="dark"] .catalog-guidance { color: #aac0c5; background: #10252a; border-color: #28474d; }
html[data-theme="dark"] .catalog-guidance strong { color: var(--ink); }
html[data-theme="dark"] .source-link,
html[data-theme="dark"] .brand-error-link { color: #6edbd7; }

html[data-theme="dark"] .catalog-table th { color: #aebfc3; background: #102026; }
html[data-theme="dark"] .catalog-table td { border-color: var(--line); }
html[data-theme="dark"] .catalog-table tbody tr:hover { background: #17292f; }
html[data-theme="dark"] .catalog-table td:nth-child(4),
html[data-theme="dark"] .error-code { color: #d9e8ea; }
html[data-theme="dark"] .client-list-item,
html[data-theme="dark"] .plate-dropzone,
html[data-theme="dark"] .plate-preview-row,
html[data-theme="dark"] .plate-result-card { color: var(--ink); background: #102026; border-color: var(--line); }
html[data-theme="dark"] .client-list-item.selected,
html[data-theme="dark"] .plate-dropzone:hover { background: #163036; border-color: #458c8e; }
html[data-theme="dark"] .client-summary,
html[data-theme="dark"] .logo-upload-card,
html[data-theme="dark"] .form-actions,
html[data-theme="dark"] .modal-actions,
html[data-theme="dark"] .rubro-signature-setting,
html[data-theme="dark"] .field-builder-row,
html[data-theme="dark"] .dynamic-form-placeholder,
html[data-theme="dark"] .equipment-type-card,
html[data-theme="dark"] .template-selection-pending,
html[data-theme="dark"] .ai-access-note { background: #102026; border-color: var(--line); }
html[data-theme="dark"] .modal-card { color: var(--ink); background: #14242a; border-color: #365057; box-shadow: 0 28px 80px rgba(0,0,0,.52); }
html[data-theme="dark"] .modal-close { color: #b6c8cb; background: #1c3036; }
html[data-theme="dark"] .view-tabs { background: #0e1d22; border-color: #2e454c; }
html[data-theme="dark"] .view-tab.active { color: #7fe1dd; background: #1b3036; box-shadow: 0 3px 9px rgba(0,0,0,.25); }
html[data-theme="dark"] .dynamic-checklist-item,
html[data-theme="dark"] .evidence-empty,
html[data-theme="dark"] .evidence-card,
html[data-theme="dark"] .signature-card { color: #cbdadc; background: #102026; border-color: #344b52; }
html[data-theme="dark"] .dynamic-checklist-item:hover,
html[data-theme="dark"] .dynamic-checklist-item.is-checked { color: #e7f5f4; background: #17373b; border-color: #438d8c; }
html[data-theme="dark"] .evidence-empty strong,
html[data-theme="dark"] .signature-card-heading strong,
html[data-theme="dark"] .plate-reader-heading strong,
html[data-theme="dark"] .plate-dropzone strong,
html[data-theme="dark"] .plate-preview-row strong,
html[data-theme="dark"] .plate-result-heading strong,
html[data-theme="dark"] .plate-result-grid strong { color: #dcebed; }
html[data-theme="dark"] .signature-canvas { background: #edf5f5; border-color: #567078; }
html[data-theme="dark"] .unit-input > span,
html[data-theme="dark"] .qr-reference code { color: #b9cbce; background: #1b3036; border-color: #385158; }
html[data-theme="dark"] .account-popover { background: #14242a; border-color: #345057; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
html[data-theme="dark"] .account-popover a,
html[data-theme="dark"] .account-popover button { color: #c3d2d5; }

html[data-theme="dark"] .auth-page { background: radial-gradient(circle at 10% 8%, rgba(35,185,189,.18), transparent 31%), radial-gradient(circle at 92% 90%, rgba(61,124,194,.12), transparent 34%), linear-gradient(135deg, #09171c, #102027 52%, #0b161d); }
html[data-theme="dark"] .auth-card { background: #112127; border-color: #2f4951; box-shadow: 0 34px 88px rgba(0,0,0,.44); }
html[data-theme="dark"] .auth-form-panel { background: rgba(15,29,35,.98); }
html[data-theme="dark"] .auth-form-heading h1 { color: #edf6f7; }
html[data-theme="dark"] .auth-form-heading p,
html[data-theme="dark"] .auth-check,
html[data-theme="dark"] .auth-protected { color: #91a7ad; }
html[data-theme="dark"] .auth-field { color: #c4d4d7; }
html[data-theme="dark"] .auth-input { background: #102026; border-color: #345058; }
html[data-theme="dark"] .auth-input:focus-within { background: #152a30; }
html[data-theme="dark"] .auth-input input { color: #edf6f7; }
html[data-theme="dark"] .auth-theme-toggle { background: rgba(17,34,40,.9); }

html[data-theme="dark"] .knowledge-map-scroll { background: #0f1e23; }
html[data-theme="dark"] .knowledge-map { background-image: radial-gradient(circle, #294047 1px, transparent 1px); }
html[data-theme="dark"] .knowledge-node { color: #d7e7e9; background: rgba(20,36,42,.97); border-color: #38525a; box-shadow: 0 9px 22px rgba(0,0,0,.22); }
html[data-theme="dark"] .knowledge-node-core { color: #fff; background: #17616a; border-color: #23747c; }
html[data-theme="dark"] .knowledge-node-count { color: #c7d8db; background: #21363c; }
html[data-theme="dark"] .knowledge-inspector { background: #14242a; }
html[data-theme="dark"] .knowledge-header h2,
html[data-theme="dark"] .knowledge-inspector h3,
html[data-theme="dark"] .ai-access-header h2,
html[data-theme="dark"] .ai-user-identity strong { color: #e1edef; }
html[data-theme="dark"] .knowledge-filters button { color: #aec0c4; background: #14262c; border-color: #314950; }

@media (max-width: 560px) {
    html[data-theme="dark"] .auth-page { background: #0f1d22; }
}

@media print {
    html[data-theme="dark"],
    html[data-theme="dark"] body { color: #1f2c31; background: #fff; }
    html[data-theme="dark"] .technical-report { color: #1f2c31; background: #fff; }
}
