:root {
  --ink: #172027;
  --muted: #66727b;
  --line: #d8ddd9;
  --soft: #f3f5f2;
  --paper: #fffef9;
  --green: #246b4a;
  --green-2: #31815b;
  --green-soft: #e7f2ec;
  --nav: #151b1f;
  --amber: #a55b09;
  --red: #a63d38;
  --shadow: 0 18px 44px rgba(23, 32, 39, .09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #eef0ed; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px; color: white; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand strong { display: block; letter-spacing: .09em; font-size: 18px; }
.brand small { display: block; color: #9ca7ac; margin-top: 3px; }
.brand-mark { width: 40px; height: 34px; position: relative; }
.brand-mark span { position: absolute; inset: 2px 21px 2px 0; border-radius: 4px 14px 14px 4px; background: #fff; transform: skewY(22deg); }
.brand-mark span:last-child { inset: 2px 0 2px 21px; border-radius: 14px 4px 4px 14px; transform: skewY(-22deg); }
.nav-list { display: grid; gap: 7px; margin-top: 28px; }
.nav-item { width: 100%; border: 0; border-radius: 9px; padding: 12px 13px; color: #bfc7ca; background: transparent; text-align: left; display: flex; align-items: center; gap: 11px; }
.nav-item span { width: 20px; text-align: center; font-size: 19px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--green-2); }
.sidebar-note { margin-top: auto; padding: 14px; border-radius: 10px; background: rgba(255,255,255,.06); display: flex; gap: 10px; align-items: center; }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { font-size: 13px; }.sidebar-note small { color: #9ca7ac; margin-top: 2px; font-size: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #62c98d; box-shadow: 0 0 0 4px rgba(98,201,141,.12); }

.main-content { min-width: 0; padding: 32px 38px 54px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-weight: 800; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: 30px; letter-spacing: -.03em; } h2 { margin-bottom: 8px; }
.top-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.period-switch { display: inline-flex; padding: 3px; border: 1px solid #d2d7d3; border-radius: 9px; background: white; }
.period-switch button { border: 0; border-radius: 6px; padding: 8px 11px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.period-switch button.active { color: white; background: var(--ink); }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea, .search { width: 100%; border: 1px solid #ccd2cf; border-radius: 8px; color: var(--ink); background: white; padding: 11px 12px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(49,129,91,.12); }
.field.compact input, .field.compact select { min-width: 155px; padding: 9px 10px; }
.button { border: 0; border-radius: 8px; padding: 10px 15px; font-weight: 800; color: var(--ink); background: #e5e8e5; }
.button.primary { color: white; background: var(--green); box-shadow: 0 6px 15px rgba(36,107,74,.18); }
.button.primary:hover { background: #1c5b3d; }.button.secondary { color: var(--green); background: var(--green-soft); }.button.ghost { background: transparent; color: var(--muted); }

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 25px 0 18px; }
.stat { border: 1px solid #dfe3df; border-radius: 11px; padding: 14px 16px; background: rgba(255,255,255,.7); }
.stat span { color: var(--muted); font-size: 12px; }.stat strong { display: block; margin-top: 5px; font-size: 22px; }.stat small { color: var(--muted); }
.view { display: none; }.view.active { display: block; }

.paper-card { overflow: hidden; border: 1px solid #d7d8d2; border-radius: 4px; background: var(--paper); box-shadow: var(--shadow); }
.resource-card { margin-bottom: 18px; overflow: hidden; border: 1px solid #d7dcd8; border-radius: 10px; background: white; box-shadow: var(--shadow); }.resource-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 16px 18px; border-bottom: 1px solid #e0e4e1; }.resource-head h2 { margin: 0; font-size: 19px; }.resource-head > p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }.resource-scroll { overflow-x: auto; }.resource-table { width: 100%; min-width: 700px; border-collapse: collapse; }.resource-table th, .resource-table td { padding: 9px 12px; border-right: 1px solid #d8ddda; border-bottom: 1px solid #d8ddda; text-align: center; font-size: 12px; }.resource-table th { background: #f3f5f3; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }.resource-table th:first-child, .resource-table td:first-child { text-align: left; font-weight: 900; }.resource-table .group.confirmed { color: #17643f; background: #e4f3ea; }.resource-table .group.unconfirmed { color: #9f2925; background: #fae7e5; }.resource-table td.confirmed { color: #17643f; background: #f3faf6; font-weight: 900; }.resource-table td.unconfirmed { color: #9f2925; background: #fff6f5; font-weight: 900; }.resource-table tfoot td { background: var(--ink); color: white; font-weight: 900; border-color: #3a4348; }.resource-table th:last-child, .resource-table td:last-child { border-right: 0; }
.sheet-heading { min-width: 900px; display: flex; justify-content: space-between; align-items: end; padding: 22px 24px 17px; border-bottom: 2px solid var(--ink); }
.sheet-kicker { margin-bottom: 3px; font-size: 10px; font-weight: 900; letter-spacing: .16em; }.sheet-heading h2 { margin: 0; font-size: 20px; text-transform: capitalize; }
.sheet-plant { min-width: 190px; text-align: right; }.sheet-plant span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .13em; }.sheet-plant strong { display: block; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
.service-table { width: 100%; min-width: 1210px; border-collapse: collapse; table-layout: fixed; }
.service-table th { padding: 10px 9px; border-right: 1px solid var(--ink); border-bottom: 2px solid var(--ink); background: #f1f0e9; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.service-table td { height: 68px; padding: 8px 9px; border-right: 1px solid #69716f; border-bottom: 1px solid #69716f; vertical-align: middle; font-size: 13px; }
.service-table th:nth-child(1) { width: 90px; }.service-table th:nth-child(2) { width: 235px; }.service-table th:nth-child(3) { width: 170px; }.service-table th:nth-child(4) { width: 60px; }.service-table th:nth-child(5) { width: 205px; }.service-table th:nth-child(6) { width: 90px; }.service-table th:nth-child(7) { width: 110px; }.service-table th:nth-child(8) { width: 75px; }.service-table th:nth-child(9) { width: 105px; }.service-table th:last-child { width: 108px; border-right: 0; }
.service-table td:last-child { border-right: 0; }.service-table tbody tr:hover { background: #f7faf7; }
.plate { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.client-cell strong, .client-cell span, .client-cell small { display: block; }.client-cell span { color: var(--muted); margin-top: 3px; font-size: 12px; }.client-cell small { margin-top: 7px; color: #7b8580; font-size: 10px; font-weight: 700; }.formula-stack strong, .formula-stack span, .formula-stack small { display: block; }.formula-stack span { margin-top: 5px; font-size: 11px; font-weight: 700; }.formula-stack small { margin-top: 4px; color: var(--green); font-size: 10px; }
.order-number.pending { color: #9aa09d; font-style: italic; }.volume { font-size: 16px; font-weight: 900; }.row-actions { display: flex; gap: 5px; }
.mini-button { border: 1px solid #cbd1ce; background: white; border-radius: 6px; padding: 6px 8px; font-size: 11px; font-weight: 800; }.mini-button.start { color: white; border-color: var(--green); background: var(--green); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 900; background: #ecefed; color: #55615b; }
.badge.sin-confirmar { color: #9f2925; background: #f8dedd; }.badge.confirmado { color: #17643f; background: #daf0e3; }.badge.en-servicio { color: #195d91; background: #dcecf8; }.badge.finalizado { color: #55615b; background: #e7ebe8; }.badge.cancelado { color: var(--red); background: #f3dfdd; }
.empty-state { padding: 56px 20px; text-align: center; }.empty-state strong, .empty-state span { display: block; }.empty-state span { color: var(--muted); margin-top: 6px; }

.panel-toolbar { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 15px; }.search { max-width: 460px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }.search input { width: 100%; border: 0; outline: 0; padding: 11px 0; background: transparent; }
.cards-list { display: grid; gap: 10px; }.order-card { display: grid; grid-template-columns: 85px 1fr 130px 100px 130px 110px; gap: 18px; align-items: center; padding: 15px 17px; border: 1px solid #dde1de; border-radius: 10px; background: white; }.order-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }.order-card .date-block strong { display: block; font-size: 18px; }.order-card .date-block small { color: var(--muted); }.order-card .amount { font-size: 18px; font-weight: 900; }
.section-intro { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 12px 0 20px; }.section-intro h2 { font-size: 25px; margin-bottom: 6px; }.section-intro p:last-child { color: var(--muted); margin-bottom: 0; }
.catalog-grid, .formula-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.catalog-card, .formula-card { border: 1px solid #dce1dd; border-radius: 11px; background: white; padding: 18px; }.catalog-card h3, .formula-card h3 { margin: 0 0 5px; }.catalog-card > p, .formula-card > p { color: var(--muted); font-size: 13px; }.work-list { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid #e7e9e7; list-style: none; }.work-list li { padding: 5px 0; font-size: 13px; }.formula-code { display: inline-block; margin-bottom: 12px; padding: 5px 8px; border-radius: 5px; background: #edf2ed; color: var(--green); font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace; }.formula-meta { display: flex; justify-content: space-between; margin-top: 15px; color: var(--muted); font-size: 12px; }
.catalog-actions { display: flex; gap: 7px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #e7e9e7; }.catalog-actions button { flex: 1; }.catalog-actions .danger { color: var(--red); }
.integration-note { display: flex; gap: 12px; align-items: flex-start; margin: -6px 0 18px; padding: 13px 15px; border: 1px solid #d7e3ec; border-radius: 10px; background: #edf5fa; color: #315b77; }.integration-note span { font-size: 20px; }.integration-note strong { font-size: 13px; }.integration-note p { margin: 3px 0 0; font-size: 12px; }
.catalog-empty { border: 1px dashed #cfd5d1; border-radius: 10px; background: rgba(255,255,255,.5); }.complement-field { margin: 0; padding: 0; border: 0; }.complement-field legend { margin-bottom: 7px; }.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.check-option { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #d7dcd8; border-radius: 8px; background: #f8faf8; color: var(--ink); font-size: 12px; }.check-option input { width: auto; margin: 0; }.check-empty { grid-column: 1 / -1; padding: 12px; border-radius: 8px; background: #f3f5f3; color: var(--muted); font-size: 12px; font-weight: 500; }
.calendar-card { overflow: hidden; border: 1px solid #d7dcd8; border-radius: 10px; background: white; box-shadow: var(--shadow); }.calendar-head, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 840px; }.calendar-head { background: var(--ink); color: white; }.calendar-head div { padding: 10px; text-align: center; font-size: 11px; font-weight: 900; text-transform: uppercase; }.calendar-grid { border-top: 1px solid #dce0dd; }.calendar-day { min-height: 138px; padding: 9px; border-right: 1px solid #dce0dd; border-bottom: 1px solid #dce0dd; background: #fff; }.calendar-day:nth-child(7n) { border-right: 0; }.calendar-day.outside { background: #f3f4f2; color: #9ca3a0; }.calendar-day.today .day-number { color: white; background: var(--green); }.day-number { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 12px; font-weight: 900; }.calendar-orders { display: grid; gap: 5px; margin-top: 7px; }.calendar-order { padding: 6px 7px; border-left: 3px solid #8c9690; border-radius: 4px; background: #f3f5f3; font-size: 10px; line-height: 1.3; }.calendar-order strong, .calendar-order span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.calendar-order.sin-confirmar { border-color: #d04a43; background: #fff0ef; }.calendar-order.confirmado { border-color: #2e9463; background: #ebf7f0; }.calendar-order.en-servicio { border-color: #3c89bd; background: #edf6fc; }.calendar-scroll { overflow-x: auto; }.calendar-title { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid #dce0dd; }.calendar-title h2 { margin: 0; text-transform: capitalize; }

dialog { width: min(680px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 26px 80px rgba(0,0,0,.25); } dialog::backdrop { background: rgba(12,18,21,.55); backdrop-filter: blur(2px); } dialog form { padding: 24px; }.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid #e1e4e1; }.dialog-head h2 { margin: 0; }.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; font-size: 22px; background: #edf0ed; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 20px; }.field.full { grid-column: 1 / -1; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 17px; border-top: 1px solid #e1e4e1; }.dialog-copy { color: var(--muted); margin: 18px 0; }
#simple-fields { display: grid; gap: 15px; padding-top: 20px; }
#toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; opacity: 0; transform: translateY(10px); pointer-events: none; border-radius: 8px; padding: 12px 15px; color: white; background: var(--nav); box-shadow: var(--shadow); transition: .2s ease; }#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) { .app-shell { grid-template-columns: 78px minmax(0,1fr); }.sidebar { padding: 24px 12px; }.brand > div:last-child, .nav-item:not(.active)::after, .nav-item { font-size: 0; }.brand { padding: 0 7px 22px; }.brand-mark { flex: 0 0 40px; }.nav-item { justify-content: center; padding: 12px; }.nav-item span { font-size: 20px; }.sidebar-note div { display: none; }.sidebar-note { justify-content: center; }.catalog-grid, .formula-grid { grid-template-columns: repeat(2, 1fr); }.order-card { grid-template-columns: 75px 1fr 110px 90px; }.order-card > :nth-child(5), .order-card > :nth-child(6) { display: none; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { position: fixed; inset: auto 0 0; z-index: 10; width: auto; height: 66px; padding: 8px 12px; flex-direction: row; }.brand, .sidebar-note { display: none; }.nav-list { width: 100%; margin: 0; display: grid; grid-template-columns: repeat(6,1fr); gap: 3px; }.nav-item { padding: 7px 4px; border-radius: 7px; }.nav-item.active { box-shadow: inset 0 -3px var(--green-2); }.main-content { padding: 22px 16px 90px; }.topbar { display: block; }.top-actions { margin-top: 17px; justify-content: stretch; }.period-switch { flex: 1 1 100%; }.period-switch button { flex: 1; }.top-actions .field { flex: 1 1 140px; }.top-actions .button { flex: 1 1 100%; }.summary { grid-template-columns: 1fr 1fr; }.catalog-grid, .formula-grid { grid-template-columns: 1fr; }.section-intro { align-items: start; flex-direction: column; }.panel-toolbar { flex-direction: column; }.search { max-width: none; }.order-card { grid-template-columns: 60px 1fr 85px; gap: 10px; }.order-card > :nth-child(4) { display: none; }.form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.check-grid { grid-template-columns: 1fr; } }
