:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef4fb;
  --ink: #122033;
  --muted: #64748b;
  --line: #dbe5f0;
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --accent: #2563eb;
  --warning: #d97706;
  --danger: #dc2626;
  --success: #16a34a;
  --purple: #7c3aed;
  --shadow: 0 20px 60px rgba(15, 23, 42, .10);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.skip { position: fixed; left: 12px; top: -80px; background: var(--ink); color: white; padding: 10px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 292px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px; background: #0b1725; color: white; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 24px; background: linear-gradient(135deg, var(--primary-2), var(--accent)); box-shadow: 0 12px 30px rgba(20, 184, 166, .25); }
.brand strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.brand span { display: block; color: #9fb2c8; font-size: 13px; margin-top: 2px; }
.nav { display: grid; gap: 8px; }
.nav button { border: 0; width: 100%; text-align: left; color: #c8d5e4; background: transparent; padding: 12px 14px; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; }
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.10); }
.sidebar-card { margin-top: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); padding: 14px; border-radius: 18px; color: #b7c6d8; }
.sidebar-card p { margin: 8px 0 0; line-height: 1.45; font-size: 13px; }
.main-wrap { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(18px); background: rgba(244,247,251,.82); border-bottom: 1px solid rgba(219,229,240,.8); padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 7px; color: var(--primary); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: 12px; }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { color: var(--muted); line-height: 1.6; }
.top-actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.role-select { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; display: grid; gap: 6px; }
select, input, textarea { border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; background: white; color: var(--ink); outline: none; }
select:focus, input:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(20,184,166,.28); outline-offset: 2px; }
.btn { border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; }
.btn.primary { color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 12px 30px rgba(37,99,235,.18); }
.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.content { padding: 28px 32px 48px; }
.view { display: none; }
.active-view { display: block; animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-bottom: 18px; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 20px; }
.panel { padding: 24px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.kpi { padding: 18px; border-radius: 20px; background: white; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.kpi span { color: var(--muted); font-weight: 700; font-size: 13px; }
.kpi strong { display: block; font-size: 32px; letter-spacing: -.06em; margin-top: 8px; }
.kpi small { display: block; margin-top: 7px; color: var(--primary); font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack { display: grid; gap: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 14px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .02em; }
.pill.success { color: #065f46; background: #d1fae5; }
.pill.warning { color: #92400e; background: #fef3c7; }
.pill.danger { color: #991b1b; background: #fee2e2; }
.pill.info { color: #1d4ed8; background: #dbeafe; }
.pill.neutral { color: #475569; background: #e2e8f0; }
.pill.purple { color: #5b21b6; background: #ede9fe; }
.progress { height: 11px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-2), var(--accent)); }
.workflow { display: grid; gap: 12px; }
.workflow-item { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: #f8fafc; border: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary-2); margin-top: 6px; flex: 0 0 auto; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.module-card { padding: 18px; border-radius: 20px; background: white; border: 1px solid var(--line); display: grid; gap: 10px; }
.module-card .icon { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); font-weight: 900; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label, .repair-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.repair-form { display: grid; gap: 12px; }
.repair-form textarea { min-height: 110px; resize: vertical; }
.timeline { position: relative; display: grid; gap: 12px; }
.timeline article { border-left: 3px solid var(--line); padding-left: 16px; }
.amount { font-variant-numeric: tabular-nums; font-weight: 900; }
.alert { border-radius: 18px; background: #fff7ed; border: 1px solid #fed7aa; padding: 16px; color: #9a3412; }
.modal { border: 0; padding: 0; background: transparent; width: min(620px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(2,6,23,.55); backdrop-filter: blur(5px); }
.modal-card { background: white; border-radius: 26px; padding: 22px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.icon-btn { width: 38px; height: 38px; border-radius: 13px; border: 1px solid var(--line); background: #f8fafc; font-size: 24px; line-height: 1; }
.modal-actions { padding: 0; margin: 20px 0 0; display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #0b1725; color: white; padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .2s; z-index: 30; }
.toast.show { transform: none; opacity: 1; }
.insight { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(20,184,166,.12), rgba(37,99,235,.10)); border: 1px solid rgba(20,184,166,.22); }
@media (max-width: 1080px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .hero, .grid-2, .grid-3 { grid-template-columns: 1fr; } .kpi-grid, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .topbar { align-items: stretch; flex-direction: column; padding: 18px; } .content { padding: 18px; } .kpi-grid, .module-grid, .form-grid { grid-template-columns: 1fr; } .top-actions { align-items: stretch; } .top-actions > * { width: 100%; } .btn { width: 100%; } }
