#carlep-app {
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --surface-3: #e4e8e1;
  --ink: #15201c;
  --muted: #68736e;
  --line: #dce2dc;
  --brand: #bdf33b;
  --brand-ink: #17200b;
  --green: #2b885b;
  --red: #d85b53;
  --blue: #4b7ccc;
  --amber: #d99931;
  --shadow: 0 18px 50px rgba(24, 41, 34, .08);
  --radius: 22px;
  position: relative;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  overflow: clip;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#carlep-app *, #carlep-app *::before, #carlep-app *::after { box-sizing: border-box; }
#carlep-app button, #carlep-app input, #carlep-app select, #carlep-app textarea { font: inherit; }
#carlep-app button { color: inherit; }
#carlep-app button, #carlep-app [data-record] { touch-action: manipulation; }
#carlep-app [hidden] { display: none !important; }
.carlep-admin-wrap { margin: 0 0 0 -20px !important; }
.carlep-login { max-width: 620px; margin: 50px auto; padding: 28px; border: 1px solid #dce2dc; border-radius: 18px; background: white; font: 16px/1.5 system-ui; }

.cp-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 14px 18px;
  border-right: 1px solid var(--line);
  background: #151b18;
  color: #f4f7f4;
}

.cp-brand { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 10px 20px; }
.cp-brandmark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--brand); color: var(--brand-ink); font-size: 20px; font-weight: 900; transform: skew(-5deg); }
.cp-brand strong { display: block; letter-spacing: .16em; font-size: 15px; }
.cp-brand small { display: block; margin-top: 1px; color: #96a39c; font-size: 11px; }
.cp-nav { display: flex; flex: 1; flex-direction: column; gap: 3px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.cp-nav button, .cp-sidebar-foot a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 13px; color: #aeb8b2; background: transparent; text-align: left; text-decoration: none; cursor: pointer; transition: .18s ease; }
.cp-nav button span, .cp-sidebar-foot span { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border: 1px solid #354039; border-radius: 8px; color: #859089; font-size: 9px; font-weight: 800; }
.cp-nav button:hover, .cp-nav button.active, .cp-sidebar-foot a:hover { background: #252e29; color: #fff; }
.cp-nav button.active span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.cp-sidebar-foot { display: grid; gap: 3px; padding-top: 12px; border-top: 1px solid #2b342f; }

.cp-main { min-width: 0; }
.cp-topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; min-height: 88px; padding: 14px clamp(20px, 3vw, 44px); border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(15px); }
.cp-menu { display: none; width: 42px; height: 42px; margin-right: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.cp-title { min-width: 0; }
.cp-title small, .cp-panel-head small, .cp-modal-title small, .cp-config-head > span, .cp-config-summary > small { display: block; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.cp-title h1 { margin: 1px 0 0; font-size: clamp(21px, 2vw, 28px); line-height: 1.1; letter-spacing: -.03em; }
.cp-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
#carlep-app button { border: 0; }
.cp-primary, .cp-secondary, .cp-search, .cp-ai-open, .cp-danger { min-height: 42px; padding: 9px 15px; border-radius: 12px; font-weight: 750; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.cp-primary { background: var(--brand); color: var(--brand-ink) !important; box-shadow: 0 8px 22px rgba(176, 228, 57, .2); }
.cp-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(176, 228, 57, .3); }
.cp-secondary, .cp-search { border: 1px solid var(--line) !important; background: var(--surface); }
.cp-ai-open { border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line)) !important; background: color-mix(in srgb, var(--green) 9%, var(--surface)); color: var(--green) !important; }
.cp-danger { margin-right: auto; background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: var(--red) !important; }
.cp-content { width: 100%; max-width: 1640px; min-height: calc(100vh - 88px); margin: 0 auto; padding: 26px clamp(20px, 3vw, 44px) 70px; }
.cp-loading, .cp-error { display: grid; place-items: center; min-height: 50vh; color: var(--muted); }

.cp-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 190px; padding: clamp(24px, 4vw, 46px); overflow: hidden; border-radius: 28px; background: #19231e; color: #fff; box-shadow: var(--shadow); }
.cp-hero::after { position: absolute; right: -65px; bottom: -105px; width: 280px; height: 280px; border: 55px solid rgba(197, 243, 77, .18); border-radius: 50%; content: ""; }
.cp-hero > * { position: relative; z-index: 1; }
.cp-hero span { color: var(--brand); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.cp-hero h2 { max-width: 760px; margin: 9px 0 6px; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; letter-spacing: -.045em; }
.cp-hero p { margin: 0; color: #bac5bf; font-size: 16px; }
.cp-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.cp-metric { position: relative; min-width: 0; min-height: 145px; padding: 21px 21px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 25px rgba(23, 36, 30, .035); }
.cp-metric small { display: block; min-height: 26px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.cp-metric strong { display: block; margin: 6px 0 3px; overflow-wrap: anywhere; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.05; letter-spacing: -.045em; }
.cp-metric span { display: block; max-width: calc(100% - 24px); color: var(--muted); font-size: 12px; }
.cp-metric i { position: absolute; right: -26px; bottom: -30px; width: 90px; height: 90px; border: 20px solid currentColor; border-radius: 50%; opacity: .1; }
.cp-metric.green { color: var(--green); } .cp-metric.red { color: var(--red); } .cp-metric.blue { color: var(--blue); } .cp-metric.amber { color: var(--amber); }
.cp-metric strong, .cp-metric small { color: var(--ink); }

.cp-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 18px; margin-top: 18px; }
.cp-dashboard-grid.lower { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
.cp-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 28px rgba(23, 36, 30, .035); }
.cp-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 79px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cp-panel-head h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.025em; }
.cp-panel-head button { padding: 8px; background: transparent; color: var(--green); font-size: 12px; font-weight: 750; cursor: pointer; }
.cp-pipeline-row { display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); min-height: 265px; padding: 24px 18px 18px; overflow-x: auto; }
.cp-pipeline-row button { display: grid; grid-template-rows: 100px auto auto auto; align-items: end; min-width: 86px; padding: 0 8px; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.cp-pipeline-row button:last-child { border-right: 0; }
.cp-pipeline-row i { width: 28px; height: var(--h); max-height: 90px; margin: auto auto 7px; border-radius: 8px 8px 3px 3px; background: var(--brand); }
.cp-pipeline-row strong { font-size: 23px; }
.cp-pipeline-row span { margin-top: 3px; font-size: 11px; font-weight: 750; }
.cp-pipeline-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.cp-agenda, .cp-compact-list { display: grid; }
.cp-agenda > button, .cp-list-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 70px; padding: 12px 20px; border-bottom: 1px solid var(--line) !important; background: transparent; text-align: left; cursor: pointer; }
.cp-agenda > button:last-child, .cp-list-row:last-child { border-bottom: 0 !important; }
.cp-agenda time { color: var(--muted); font-size: 11px; font-weight: 750; }
.cp-agenda strong, .cp-agenda span, .cp-list-row strong, .cp-list-row span { display: block; min-width: 0; }
.cp-agenda span, .cp-list-row span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cp-list-row { grid-template-columns: 38px minmax(0, 1fr) auto auto; }
.cp-list-row > b { font-size: 13px; }
.cp-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--green); font-size: 11px; font-weight: 850; }
.cp-avatar.large { width: 48px; height: 48px; border-radius: 15px; font-size: 13px; }
.cp-status { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.s-approved, .s-paid, .s-completed, .s-done { background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--green); }
.s-overdue, .s-lost { background: color-mix(in srgb, var(--red) 14%, var(--surface)); color: var(--red); }
.s-production, .s-calculation { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); color: var(--blue); }
.s-offer, .s-open, .s-handover { background: color-mix(in srgb, var(--amber) 14%, var(--surface)); color: var(--amber); }
.cp-quick > div:last-child { display: grid; padding: 10px; }
.cp-quick > div > button { display: flex; align-items: center; gap: 13px; min-height: 71px; padding: 10px 12px; border-radius: 15px; background: transparent; text-align: left; cursor: pointer; }
.cp-quick > div > button:hover { background: var(--surface-2); }
.cp-quick b { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--green); font-size: 10px; }
.cp-quick span, .cp-quick strong, .cp-quick small { display: block; }
.cp-quick small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.cp-empty { display: grid; place-items: center; min-height: 240px; padding: 34px; text-align: center; }
.cp-empty-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--brand); color: var(--brand-ink); font-weight: 900; transform: skew(-5deg); }
.cp-empty h3 { margin: 13px 0 4px; }
.cp-empty p { max-width: 430px; margin: 0 0 17px; color: var(--muted); }

.cp-view-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 62px; margin-bottom: 18px; }
.cp-view-head p { max-width: 730px; margin: 0; color: var(--muted); font-size: 15px; }
.cp-kanban { display: grid; grid-template-columns: repeat(7, minmax(235px, 1fr)); gap: 12px; padding-bottom: 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.cp-kanban > section { min-height: 500px; padding: 10px; border: 1px solid var(--line); border-radius: 19px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); scroll-snap-align: start; }
.cp-kanban > section > header { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 5px 7px 11px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.cp-kanban > section > header b { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: 8px; background: var(--surface); }
.cp-kanban > section > div { display: grid; align-content: start; gap: 9px; }
.cp-kanban article { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 14px rgba(22, 34, 28, .04); cursor: pointer; }
.cp-kanban article small { color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.cp-kanban article h3 { margin: 7px 0 2px; font-size: 15px; }
.cp-kanban article p { margin: 0 0 13px; color: var(--muted); font-size: 11px; }
.cp-kanban article > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.cp-kanban article footer { margin: 12px -15px -15px; padding: 9px 15px; border-radius: 0 0 15px 15px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.cp-kanban-empty { display: grid; place-items: center; min-height: 90px; color: var(--muted); font-size: 11px; }

.cp-client-grid, .cp-vehicle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-employee-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-client-grid article, .cp-vehicle-grid article, .cp-employee-grid article { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 95px; padding: 18px 21px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.cp-client-grid article:nth-child(2n), .cp-vehicle-grid article:nth-child(2n), .cp-employee-grid article:nth-child(2n) { border-right: 0; }
.cp-client-grid h3, .cp-vehicle-grid h3, .cp-employee-grid h3 { margin: 0 0 3px; font-size: 15px; }
.cp-client-grid p, .cp-vehicle-grid p, .cp-client-grid span, .cp-vehicle-grid span, .cp-employee-grid p, .cp-employee-grid span { display: block; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cp-employee-title { display: flex; align-items: center; gap: 8px; }
.cp-employee-title h3 { min-width: 0; }
.cp-employee-grid em { color: var(--amber); font-style: normal; }
.cp-vehicle-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #1c2922; color: var(--brand); font-weight: 900; }

.cp-usage-chart { display: flex; align-items: end; gap: 9px; min-height: 235px; padding: 35px 22px 22px; overflow-x: auto; }
.cp-usage-chart button { display: grid; grid-template-rows: 125px auto auto auto; align-items: end; flex: 1 0 55px; min-width: 55px; max-width: 85px; padding: 0 5px; background: transparent; text-align: center; cursor: pointer; }
.cp-usage-chart i { width: 24px; max-height: 120px; margin: auto auto 7px; border-radius: 7px 7px 2px 2px; background: var(--brand); box-shadow: inset 0 -22px 30px rgba(42, 136, 91, .13); }
.cp-usage-chart b { font-size: 11px; }
.cp-usage-chart span, .cp-usage-chart small { color: var(--muted); font-size: 9px; }
.cp-utility-breakdown { display: grid; }
.cp-utility-breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; min-height: 55px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.cp-utility-breakdown > div:last-child { border-bottom: 0; }
.cp-utility-breakdown span { font-size: 12px; font-weight: 700; }
.cp-utility-breakdown b { font-size: 12px; }
.cp-utility-breakdown small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.cp-utility-table { margin-top: 18px; }
.cp-employee-docs { display: grid; gap: 6px; }
.cp-employee-docs button { display: grid; gap: 2px; width: 100%; padding: 10px 11px; border-radius: 10px; background: var(--surface-2); text-align: left; cursor: pointer; }
.cp-employee-docs button span { color: var(--ink); font-size: 11px; font-weight: 750; }
.cp-employee-docs button small { color: var(--muted); font-size: 9px; }

.cp-calendar { padding: 0 22px; }
.cp-day { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cp-day:last-child { border-bottom: 0; }
.cp-day > div:first-child strong, .cp-day > div:first-child small { display: block; }
.cp-day > div:first-child small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.cp-day > div:last-child { display: grid; gap: 7px; }
.cp-day button { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 12px; border-radius: 13px; background: var(--surface-2); text-align: left; cursor: pointer; }
.cp-day time { color: var(--green); font-size: 12px; font-weight: 800; }
.cp-day button span strong, .cp-day button span small { display: block; }
.cp-day button span small { color: var(--muted); font-size: 10px; }

.cp-production-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cp-production-grid > article { padding: 22px; cursor: pointer; }
.cp-production-top { display: flex; align-items: center; justify-content: space-between; }
.cp-production-top small { color: var(--muted); }
.cp-production-grid h2 { margin: 20px 0 3px; font-size: 20px; }
.cp-production-grid p { margin: 0; color: var(--muted); }
.cp-progress { height: 8px; margin: 22px 0 12px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.cp-progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.cp-production-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 18px; }
.cp-production-stats span { color: var(--muted); font-size: 10px; }
.cp-production-stats b { display: block; color: var(--ink); font-size: 14px; }

.cp-config-head { max-width: 810px; padding: 16px 0 24px; }
.cp-config-head h2 { margin: 7px 0 5px; font-size: clamp(29px, 4vw, 48px); letter-spacing: -.045em; }
.cp-config-head p { margin: 0; color: var(--muted); font-size: 16px; }
.cp-config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 365px; align-items: start; gap: 20px; }
.cp-config-layout > section { display: grid; gap: 16px; }
.cp-step { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cp-step > header { display: flex; align-items: center; gap: 13px; min-height: 78px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.cp-step > header > b { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: #1c2922; color: var(--brand); }
.cp-step h3, .cp-step p { margin: 0; }
.cp-step h3 { font-size: 17px; }
.cp-step p { color: var(--muted); font-size: 11px; }
.cp-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 18px; }
.cp-choice-grid label { position: relative; }
.cp-choice-grid input { position: absolute; opacity: 0; }
.cp-choice-grid label > span { display: block; min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); cursor: pointer; }
.cp-choice-grid input:checked + span { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: color-mix(in srgb, var(--green) 6%, var(--surface)); }
.cp-choice-grid i { display: grid; place-items: center; width: 36px; height: 29px; margin-bottom: 10px; border-radius: 9px; background: var(--surface-2); color: var(--green); font-size: 8px; font-style: normal; font-weight: 900; }
.cp-choice-grid strong, .cp-choice-grid small { display: block; }
.cp-choice-grid strong { font-size: 12px; }
.cp-choice-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.cp-field-grid, .cp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.cp-field-grid label, .cp-form-grid label, .cp-config-summary > label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
#carlep-app input, #carlep-app select, #carlep-app textarea { width: 100%; min-width: 0; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface); color: var(--ink); }
#carlep-app textarea { resize: vertical; }
#carlep-app input:focus, #carlep-app select:focus, #carlep-app textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent); }
.cp-config-summary { position: sticky; top: 108px; padding: 24px; border-radius: var(--radius); background: #19231e; color: #f4f7f5; box-shadow: var(--shadow); }
.cp-config-summary h3 { margin: 5px 0 19px; font-size: 20px; }
.cp-config-summary #cfg-lines { display: grid; gap: 10px; padding-bottom: 17px; border-bottom: 1px solid #35423b; }
.cp-config-summary #cfg-lines > div { display: flex; justify-content: space-between; gap: 12px; color: #aebbb4; font-size: 11px; }
.cp-config-summary #cfg-lines b { color: #fff; }
.cp-config-total { padding: 20px 0; }
.cp-config-total span, .cp-config-total strong, .cp-config-total small { display: block; }
.cp-config-total strong { margin: 3px 0; color: var(--brand); font-size: 37px; letter-spacing: -.05em; }
.cp-config-total small { color: #93a098; }
.cp-confidence { display: grid; gap: 2px; margin: 0 0 17px; padding: 12px; border-radius: 12px; font-size: 10px; }
.cp-confidence.ok { background: rgba(90, 196, 136, .13); color: #82d7a8; }
.cp-confidence.warn { background: rgba(239, 183, 92, .13); color: #efbd70; }
.cp-config-summary > label { margin: 12px 0; color: #aebbb4; }
.cp-config-summary input, .cp-config-summary select { border-color: #35423b !important; background: #222d27 !important; color: #fff !important; }
.cp-config-summary .wide { width: 100%; margin-top: 6px; }
.cp-config-summary > p { margin: 14px 0 0; color: #8e9a93; font-size: 10px; }

.cp-finance-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.cp-data-table { overflow-x: auto; }
.cp-data-table > .head, .cp-data-table > button { display: grid; grid-template-columns: 120px minmax(200px, 1.4fr) minmax(170px, 1fr) 120px 130px; align-items: center; gap: 13px; min-width: 790px; padding: 13px 20px; text-align: left; }
.cp-data-table > .head { min-height: 45px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.cp-data-table > button { width: 100%; min-height: 66px; border-bottom: 1px solid var(--line) !important; background: transparent; cursor: pointer; }
.cp-data-table > button:last-child { border-bottom: 0 !important; }
.cp-data-table > button:hover { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.cp-data-table span, .cp-data-table strong, .cp-data-table small { display: block; min-width: 0; }
.cp-data-table > button > span { color: var(--muted); font-size: 11px; }
.cp-data-table strong, .cp-data-table b { color: var(--ink); font-size: 12px; }
.cp-data-table.stock > .head, .cp-data-table.stock > button { grid-template-columns: minmax(240px, 1fr) 130px 100px 100px 150px; }
.cp-doc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.cp-doc-grid article { min-height: 180px; padding: 21px; background: var(--surface); cursor: pointer; }
.cp-doc-grid article > div { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--green); font-size: 9px; font-weight: 850; }
.cp-doc-grid h3 { margin: 23px 0 4px; overflow-wrap: anywhere; font-size: 14px; }
.cp-doc-grid p, .cp-doc-grid span { display: block; margin: 0; color: var(--muted); font-size: 10px; }

.cp-modal-layer { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px; background: rgba(5, 10, 7, .68); backdrop-filter: blur(8px); }
.cp-modal { position: relative; width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--line); border-radius: 25px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px rgba(0, 0, 0, .35); }
.cp-modal-close { position: sticky; top: 13px; z-index: 2; float: right; display: grid; place-items: center; width: 38px; height: 38px; margin: 13px 13px -50px 0; border-radius: 12px; background: var(--surface-2); font-size: 22px; cursor: pointer; }
.cp-modal-title { padding: 28px 29px 20px; border-bottom: 1px solid var(--line); }
.cp-modal-title h2 { margin: 5px 46px 0 0; font-size: 27px; line-height: 1.1; letter-spacing: -.035em; }
.cp-modal-title .cp-status { margin-top: 10px; }
.cp-form-grid label.full { grid-column: 1 / -1; }
.cp-form-actions { display: flex; align-items: center; gap: 9px; padding: 17px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cp-form-actions > span { flex: 1; }
.cp-detail-hero { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.cp-detail-hero > div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.cp-detail-hero > div:last-child { border-right: 0; }
.cp-detail-hero span, .cp-detail-hero strong { display: block; overflow-wrap: anywhere; }
.cp-detail-hero span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.cp-detail-hero strong { margin-top: 5px; font-size: 13px; }
.cp-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 25px 28px; }
.cp-detail-grid h3 { margin: 0 0 7px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cp-detail-grid p { margin: 0 0 19px; color: var(--muted); font-size: 13px; }
.cp-detail-grid b { color: var(--ink); }
.cp-detail-actions { flex-wrap: wrap; }
.cp-big-search { min-height: 58px !important; margin: 22px 25px 12px; width: calc(100% - 50px) !important; padding: 14px 16px !important; font-size: 17px !important; }
.cp-search-hint { padding: 20px 25px 35px; color: var(--muted); }
.cp-search-results { display: grid; padding: 0 25px 25px; }
.cp-search-results button { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--line) !important; background: transparent; text-align: left; cursor: pointer; }
.cp-search-results button span, .cp-search-results button small { color: var(--muted); font-size: 10px; }
.cp-more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 24px; }
.cp-more-grid button { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: left; cursor: pointer; }
.cp-more-grid span { color: var(--green); font-size: 11px; }

.cp-ai { position: fixed; top: 0; right: 0; z-index: 100001; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(420px, 100vw); height: 100dvh; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -25px 0 80px rgba(0, 0, 0, .24); }
.cp-ai-head { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 18px 19px; border-bottom: 1px solid var(--line); }
.cp-ai-head small, .cp-ai-head strong { display: block; }
.cp-ai-head small { color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.cp-ai-head strong { margin-top: 3px; }
.cp-ai-close { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); font-size: 22px; cursor: pointer; }
.cp-ai-log { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 19px; }
.cp-ai-msg { max-width: 91%; padding: 12px 14px; border-radius: 15px; background: var(--surface-2); font-size: 13px; white-space: pre-wrap; }
.cp-ai-msg.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.cp-ai-msg.error { color: var(--red); }
.cp-ai-msg.loading { opacity: .66; }
.cp-ai-msg > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-ai-msg button { min-height: 32px; padding: 6px 10px; border-radius: 9px; background: var(--surface); color: var(--green); font-size: 10px; font-weight: 750; cursor: pointer; }
#cp-ai-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 13px; border-top: 1px solid var(--line); }
#cp-ai-form textarea { min-height: 52px; max-height: 130px; }
#cp-ai-form button { min-width: 76px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-weight: 800; cursor: pointer; }
.cp-toast { position: fixed; right: 25px; bottom: 25px; z-index: 100010; max-width: 360px; padding: 12px 17px; border-radius: 12px; background: #18221d; color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.cp-toast.show { opacity: 1; transform: none; }
.cp-mobile-nav { display: none; }
body.cp-modal-open { overflow: hidden; }

@media (max-width: 1180px) {
  #carlep-app { grid-template-columns: 78px minmax(0, 1fr); }
  .cp-sidebar { padding-inline: 10px; }
  .cp-brand { justify-content: center; padding-inline: 0; }
  .cp-brand > div, .cp-nav button:not(.active) { font-size: 0; }
  .cp-nav button { justify-content: center; gap: 0; }
  .cp-nav button span { flex-basis: 32px; width: 32px; height: 32px; font-size: 9px; }
  .cp-nav button.active { font-size: 9px; flex-direction: column; gap: 3px; }
  .cp-sidebar-foot a { justify-content: center; font-size: 0; }
  .cp-dashboard-grid, .cp-dashboard-grid.lower { grid-template-columns: 1fr; }
  .cp-production-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-doc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  #carlep-app { display: block; min-height: 100dvh; }
  .cp-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(290px, 86vw); height: 100dvh; padding: 20px 14px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .28); }
  #carlep-app.menu-open .cp-sidebar { transform: none; }
  .cp-brand { justify-content: flex-start; }
  .cp-brand > div { display: block; }
  .cp-nav button, .cp-nav button:not(.active), .cp-nav button.active { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 14px; }
  .cp-sidebar-foot a { justify-content: flex-start; font-size: 13px; }
  .cp-topbar { min-height: 72px; padding: 10px 14px; }
  .cp-menu { display: block; }
  .cp-title small { display: none; }
  .cp-title h1 { font-size: 21px; }
  .cp-actions .cp-search span, .cp-actions .cp-ai-open span, .cp-actions .cp-primary { display: none; }
  .cp-actions .cp-search, .cp-actions .cp-ai-open { width: 42px; min-width: 42px; padding: 0; }
  .cp-content { min-height: calc(100dvh - 72px); padding: 16px 13px 92px; }
  .cp-hero { min-height: 178px; padding: 24px; border-radius: 21px; }
  .cp-hero h2 { font-size: 34px; }
  .cp-hero p { max-width: 430px; font-size: 13px; }
  .cp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-metric { min-height: 135px; }
  .cp-config-layout { grid-template-columns: 1fr; }
  .cp-config-summary { position: static; }
  .cp-client-grid, .cp-vehicle-grid, .cp-employee-grid { grid-template-columns: 1fr; }
  .cp-client-grid article, .cp-vehicle-grid article, .cp-employee-grid article, .cp-client-grid article:nth-child(2n), .cp-vehicle-grid article:nth-child(2n), .cp-employee-grid article:nth-child(2n) { border-right: 0; }
  .cp-production-grid { grid-template-columns: 1fr; }
  .cp-doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); min-height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(17px); }
  .cp-mobile-nav button { display: grid; place-items: center; align-content: center; gap: 3px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
  .cp-mobile-nav b { display: grid; place-items: center; width: 28px; height: 26px; border-radius: 8px; color: var(--green); font-size: 8px; }
  .cp-mobile-nav button.active { color: var(--ink); font-weight: 800; }
  .cp-mobile-nav button.active b { background: var(--brand); color: var(--brand-ink); }
}

@media (max-width: 560px) {
  .cp-hero { align-items: flex-start; flex-direction: column; }
  .cp-hero .cp-primary { min-height: 38px; }
  .cp-metrics { gap: 9px; }
  .cp-metric { min-height: 128px; padding: 17px; border-radius: 17px; }
  .cp-metric small { min-height: 24px; font-size: 8px; }
  .cp-metric strong { font-size: 22px; }
  .cp-metric span { display: -webkit-box; max-width: 100%; overflow: hidden; font-size: 10px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .cp-panel { border-radius: 18px; }
  .cp-panel-head { min-height: 70px; padding: 15px 17px; }
  .cp-panel-head h2 { font-size: 16px; }
  .cp-agenda > button { grid-template-columns: 68px minmax(0, 1fr); padding: 11px 15px; }
  .cp-agenda > button .cp-status { display: none; }
  .cp-list-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 11px 14px; }
  .cp-list-row > .cp-status { display: none; }
  .cp-list-row > b { font-size: 11px; }
  .cp-view-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .cp-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; }
  .cp-field-grid, .cp-form-grid { grid-template-columns: 1fr; padding: 16px; }
  .cp-form-grid label.full { grid-column: auto; }
  .cp-day { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }
  .cp-day button { grid-template-columns: 48px minmax(0, 1fr); }
  .cp-day .cp-status { display: none; }
  .cp-doc-grid { grid-template-columns: 1fr 1fr; }
  .cp-doc-grid article { min-height: 155px; padding: 16px; }
  .cp-modal-layer { padding: 0; align-items: end; }
  .cp-modal { width: 100%; max-height: 93dvh; border-radius: 24px 24px 0 0; }
  .cp-modal-title { padding: 24px 19px 17px; }
  .cp-modal-title h2 { font-size: 23px; }
  .cp-detail-hero { grid-template-columns: 1fr 1fr; }
  .cp-detail-hero > div:nth-child(2) { border-right: 0; }
  .cp-detail-hero > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cp-detail-grid { grid-template-columns: 1fr; gap: 8px; padding: 21px 19px; }
  .cp-form-actions { position: sticky; bottom: 0; flex-wrap: wrap; padding-bottom: calc(13px + env(safe-area-inset-bottom)); }
  .cp-form-actions .cp-danger { order: 4; width: 100%; }
  .cp-detail-actions > button { flex: 1 1 42%; }
  .cp-big-search { margin-inline: 16px; width: calc(100% - 32px) !important; }
  .cp-search-results { padding-inline: 16px; }
  .cp-search-results button { grid-template-columns: 75px minmax(0, 1fr); }
  .cp-search-results button small { display: none; }
  .cp-more-grid { grid-template-columns: 1fr; padding: 17px; }
}

@media (max-width: 370px) {
  .cp-content { padding-inline: 10px; }
  .cp-hero { padding: 20px; }
  .cp-hero h2 { font-size: 29px; }
  .cp-metric { min-height: 121px; padding: 14px; }
  .cp-metric strong { font-size: 19px; }
  .cp-choice-grid { grid-template-columns: 1fr; }
  .cp-doc-grid { grid-template-columns: 1fr; }
  .cp-config-summary { padding: 19px; }
  .cp-config-total strong { font-size: 32px; }
}
