:root {
  --ink: #152033;
  --muted: #697386;
  --soft: #f3f5f8;
  --line: #e2e7ee;
  --white: #ffffff;
  --nav: #08030f;
  --nav-soft: #241033;
  --blue: #7c3aed;
  --blue-dark: #6925d5;
  --teal: #0d9488;
  --amber: #f59e0b;
  --red: #dc2626;
  --green: #16a34a;
  --shadow: 0 12px 32px rgba(19, 35, 63, .09);
  --radius: 16px;
}

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

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px 20px; background: var(--nav); color: #fff; display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; font-weight: 750; letter-spacing: -.02em; font-size: 18px; }
.brand b { color: #d2b5ff; }
.brand-logo { display: block; width: 178px; height: auto; object-fit: contain; }
.brand-logo-login { width: min(270px, 72vw); }
.sidebar-brand { justify-content: center; padding: 0; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: linear-gradient(140deg, #2f73ff, #16a4a1); border-radius: 11px; font-weight: 900; box-shadow: 0 7px 18px rgba(37, 99, 235, .34); }
.nav { display: grid; gap: 7px; margin-top: 44px; }
.nav-item { border: 0; border-radius: 11px; background: transparent; color: #aeb8c9; text-align: left; padding: 12px 13px; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: var(--nav-soft); box-shadow: inset 3px 0 #9d5cff; }
.nav-icon { display: inline-grid; width: 24px; place-items: center; color: #bd8cff; font-weight: 800; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 2px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-pill { min-width: 0; display: grid; gap: 2px; color: #dce5f2; font-size: 12px; }
.user-pill span { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pill small { color: #91a0b5; font-size: 11px; text-transform: capitalize; }
.text-button { border: 0; background: none; color: #91a0b5; padding: 4px; font-size: 12px; }
.text-button:hover { color: #fff; }

.main { min-width: 0; padding: 30px 34px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(27px, 3vw, 36px); line-height: 1; letter-spacing: -.045em; }
.eyebrow { margin: 0; font-size: 10px; letter-spacing: .17em; font-weight: 850; color: var(--blue); }
.button { border: 1px solid transparent; border-radius: 10px; min-height: 42px; padding: 0 15px; font-weight: 720; transition: .18s ease; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button:disabled { opacity: .55; cursor: wait; }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.2); }
.button.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button.secondary { background: #f1e9ff; color: #6925b9; }
.button.ghost { background: #fff; border-color: var(--line); color: #39455a; }
.button.ghost:hover { border-color: #bfc8d6; background: #fafbfc; }
.button.danger { background: #fff0f0; color: #bb2222; border-color: #ffd2d2; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.metric { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; min-width: 0; }
.metric-head { color: var(--muted); font-size: 11px; font-weight: 720; display: flex; justify-content: space-between; gap: 8px; }
.metric-icon { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: #eef3ff; color: var(--blue); }
.metric-value { margin-top: 7px; font-size: 23px; line-height: 1; letter-spacing: -.04em; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-note { margin-top: 7px; color: #8a94a4; font-size: 10px; }

.toolbar { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 9px; display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.search-box { flex: 1 1 300px; min-width: 180px; display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.search-box span { color: #8a96a8; font-size: 20px; line-height: 1; transform: rotate(-15deg); }
.search-box input { width: 100%; border: 0; outline: 0; min-height: 38px; color: var(--ink); }
.toolbar select { min-height: 38px; border: 0; border-left: 1px solid var(--line); outline: 0; color: #4a5668; background: #fff; padding: 0 28px 0 13px; max-width: 200px; }
.result-count { font-size: 11px; color: #8a94a4; white-space: nowrap; padding: 0 6px; }

.pipeline-board { display: grid; grid-template-columns: repeat(6, minmax(236px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding: 1px 1px 16px; scrollbar-color: #cbd3df transparent; }
.pipeline-column { background: #edf0f5; border: 1px solid #e1e6ed; border-radius: 14px; padding: 11px; min-height: 300px; }
.pipeline-column.drag-over { outline: 2px solid var(--blue); outline-offset: -2px; background: #edf3ff; }
.column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 3px 12px; }
.column-title { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 850; display: flex; align-items: center; gap: 8px; }
.column-dot { width: 8px; height: 8px; border-radius: 50%; }
.stage-0 .column-dot { background: #4f78dd; }
.stage-1 .column-dot { background: #7765d5; }
.stage-2 .column-dot { background: #d49222; }
.stage-3 .column-dot { background: #e36a44; }
.stage-4 .column-dot { background: #27a467; }
.stage-5 .column-dot { background: #9aa3b1; }
.column-count { background: #dfe4ec; color: #596478; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.column-total { color: #7b8698; font-size: 10px; margin: -5px 3px 10px; }
.card-stack { display: grid; gap: 9px; min-height: 210px; }
.scrollable-card-stack { max-height: min(68vh, 620px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #aab6c7 transparent; padding-right: 4px; align-content: start; }
.column-hint { color: #67758a; font-size: 11px; line-height: 1.35; padding: 9px 3px 2px; }
.opp-card { background: #fff; border: 1px solid #e1e5eb; border-radius: 12px; padding: 13px; box-shadow: 0 2px 6px rgba(23,33,53,.04); cursor: pointer; transition: .16s ease; }
.opp-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23,33,53,.09); border-color: #cad4e5; }
.opp-card.dragging { opacity: .45; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.client-name { margin: 0; font-size: 11px; color: #5f6b7c; font-weight: 750; }
.event-name { margin: 4px 0 0; font-weight: 820; line-height: 1.25; font-size: 14px; }
.news-star { color: #f4a81c; font-size: 15px; }
.value { margin-top: 13px; font-size: 15px; font-weight: 860; letter-spacing: -.02em; }
.card-meta { display: grid; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #edf0f4; color: #697487; font-size: 10px; }
.card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta .card-equipment { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; color: #344257; font-weight: 700; }
.date-overdue { color: var(--red) !important; font-weight: 750; }
.status-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 7px; font-size: 9px; font-weight: 800; background: #f0f3f7; color: #596478; white-space: nowrap; }
.status-chip[data-status="Fechado"] { background: #e8f8ed; color: #19773a; }
.status-chip[data-status="Perdido"] { background: #fff0f0; color: #b42c2c; }
.status-chip[data-status="Aguardando cliente"] { background: #fff6df; color: #946509; }
.status-chip[data-status="Pausado"] { background: #f1edff; color: #6650aa; }
.status-chip[data-status="Negociação"] { background: #fff1df; color: #9b5508; }
.status-chip[data-status="Proposta enviada"] { background: #f2eaff; color: #6f2dbd; }
.status-chip[data-status="Qualificação"], .status-chip[data-status="Novo atendimento"] { background: #eaf1ff; color: #315eae; }
.production-badge { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 3px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.production-badge.missing { color: #a72219; background: #fff0ed; border: 1px solid #ffc9be; }
.production-badge.started { color: #176a38; background: #e4f7ec; }
.production-badge.waiting { color: #926300; background: #fff6de; }
.production-cell .production-badge, .operation-production .production-badge { margin: 2px 4px 2px 0; }
.production-cell { min-width: 158px; }
.production-by { display: block; margin-top: 5px; color: #748196; font-size: 10px; }
.production-line { display: flex; flex-direction: column; align-items: flex-start; }
.agenda-help { margin: 0 0 10px; }
.column-empty { padding: 35px 8px; text-align: center; color: #929baa; font-size: 11px; border: 1px dashed #cdd4de; border-radius: 10px; }

.table-card, .calendar-card, .news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 5px rgba(16,24,39,.025); }
.table-card { overflow-x: auto; }
.data-table { width: 100%; min-width: 1100px; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 14px; background: #f7f8fa; color: #6c7789; font-size: 10px; letter-spacing: .055em; text-transform: uppercase; }
.data-table td { padding: 13px 14px; border-top: 1px solid #edf0f4; font-size: 12px; vertical-align: middle; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f9fbff; }
.table-primary { font-weight: 780; }
.table-secondary { color: #7b8696; font-size: 10px; margin-top: 3px; }
.table-empty { padding: 45px !important; color: #8690a0; text-align: center; }

.calendar-card { padding: 18px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.calendar-title { text-transform: capitalize; font-size: 19px; margin: 0; }
.calendar-actions { display: flex; gap: 6px; }
.icon-button { border: 1px solid var(--line); width: 36px; height: 36px; border-radius: 9px; background: #fff; color: #4d5b70; display: grid; place-items: center; font-size: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.weekday { background: #f7f8fa; color: #7b8696; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; padding: 9px; text-align: center; border-right: 1px solid var(--line); }
.calendar-day { min-height: 108px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; min-width: 0; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #fafbfc; color: #adb5c0; }
.day-number { font-size: 10px; font-weight: 750; }
.calendar-day.today .day-number { display: grid; place-items: center; width: 23px; height: 23px; margin: -4px 0 2px -4px; border-radius: 50%; background: var(--blue); color: #fff; }
.calendar-event { display: block; width: 100%; border: 0; border-left: 3px solid transparent; border-radius: 6px; margin-top: 5px; padding: 5px 6px; text-align: left; font-size: 9px; line-height: 1.2; overflow: hidden; }
.calendar-event[data-calendar-state="negotiating"], .mobile-calendar-event[data-calendar-state="negotiating"] { background: #fff0de; border-left-color: #e88825; color: #825015; }
.calendar-event[data-calendar-state="proposal"], .mobile-calendar-event[data-calendar-state="proposal"] { background: #fff2a8; border-left-color: #e6b800; color: #614c00; }
.calendar-event[data-calendar-state="closed"], .mobile-calendar-event[data-calendar-state="closed"] { background: #dff5e6; border-left-color: #32a85b; color: #176a38; }
.calendar-event[data-calendar-state="past"], .mobile-calendar-event[data-calendar-state="past"] { background: #eef1f5; border-left-color: #9aa6b6; color: #657185; }
.calendar-event-time, .calendar-event-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event-time { margin-bottom: 2px; font-weight: 850; }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: #7b8696; font-size: 11px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot.negotiating { background: #e88825; }
.legend-dot.proposal { background: #f1c40f; }
.legend-dot.closed { background: #32a85b; }
.legend-dot.past { background: #9aa6b6; }
.mobile-calendar-list { display: none; }

.news-card { padding: 21px; }
.news-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.news-intro h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.03em; }
.news-intro p { margin: 0; color: var(--muted); max-width: 660px; font-size: 12px; line-height: 1.55; }
.news-count { flex: 0 0 auto; background: #fff5df; color: #9a6700; border: 1px solid #ffe2a1; border-radius: 12px; padding: 10px 13px; font-size: 11px; font-weight: 800; }
.contact-list { display: grid; gap: 8px; }
.contact-row { display: grid; grid-template-columns: minmax(160px,1.4fr) minmax(150px,1fr) minmax(130px,.8fr) 90px; gap: 14px; align-items: center; border: 1px solid #e8ecf1; border-radius: 10px; padding: 11px 13px; font-size: 11px; }
.contact-row:hover { border-color: #cdd7e6; }
.contact-row b { font-size: 12px; }
.contact-empty { padding: 42px; text-align: center; color: #8190a4; border: 1px dashed var(--line); border-radius: 11px; }

.empty-state { background: #fff; border: 1px dashed #cbd4e1; border-radius: 16px; padding: 56px 20px; text-align: center; }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; background: #edf3ff; color: var(--blue); display: grid; place-items: center; margin: 0 auto 15px; font-size: 25px; }
.empty-state h2 { margin: 0 0 7px; font-size: 21px; }
.empty-state p { margin: 0 auto; color: var(--muted); font-size: 12px; max-width: 450px; }
.empty-actions { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }

.modal { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 28px); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 30px 90px rgba(6,17,35,.32); }
.modal::backdrop, .confirm-modal::backdrop { background: rgba(11,20,36,.58); backdrop-filter: blur(3px); }
.modal form { padding: 24px; max-height: calc(100vh - 28px); overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 21px; }
.modal-head h2 { margin: 3px 0 0; letter-spacing: -.03em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 6px; color: #536074; font-size: 14px; font-weight: 720; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid #dce2ea; border-radius: 9px; padding: 10px 11px; outline: 0; color: var(--ink); background: #fff; font-size: 14px; }
.form-grid input, .form-grid select { min-height: 40px; }
.form-grid :disabled { color: #697386; background: #f0f2f5; cursor: not-allowed; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #5b8af0; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.field-hint { color: #7b8799; font-size: 10px; font-weight: 520; line-height: 1.35; }
.field-hint.invalid { color: var(--red); font-weight: 720; }
.span-2 { grid-column: span 2; }
.equipment-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.equipment-field legend { margin-bottom: 6px; color: #536074; font-size: 14px; font-weight: 720; }
.equipment-picker { border: 1px solid #dce2ea; border-radius: 11px; overflow: hidden; background: #fff; }
.equipment-tools { display: flex; align-items: center; gap: 12px; padding: 8px; border-bottom: 1px solid #e6eaf0; background: #f8fafd; }
.equipment-search { flex: 1; display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; border: 1px solid #dce2ea; border-radius: 8px; padding: 0 9px; background: #fff; }
.equipment-search span { color: #8490a2; font-size: 18px; }
.equipment-search input { min-height: 34px !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
.equipment-count { flex: 0 0 auto; padding: 7px 9px; border-radius: 999px; background: #f2eaff; color: #6f2dbd; font-size: 10px; font-weight: 800; }
.equipment-options { max-height: 238px; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; scrollbar-color: #cbd3df transparent; }
.equipment-option { display: grid !important; grid-template-columns: 18px minmax(0, 1fr) 72px; align-items: start; gap: 8px !important; padding: 9px; border-radius: 8px; cursor: pointer; }
.equipment-option:hover { background: #f4f7fc; }
.equipment-option:has(input:checked) { background: #edf3ff; box-shadow: inset 0 0 0 1px #cfe0ff; }
.equipment-option input { width: 16px; min-height: 16px; margin: 1px 0 0; accent-color: var(--blue); }
.equipment-option span { display: grid; gap: 3px; min-width: 0; }
.equipment-option b { color: #39465a; font-size: 13px; line-height: 1.3; }
.equipment-option small { color: #7c8797; font-size: 12px; font-weight: 500; line-height: 1.35; }
.equipment-qty { display: grid; gap: 3px; font-size: 11px; color: #6d788a; }
.equipment-qty input { min-height: 32px !important; padding: 5px 7px !important; text-align: center; }
.equipment-replacement { grid-column: 2 / -1; display: grid; grid-template-columns: auto 140px; align-items: center; gap: 8px; font-size: 11px; color: #6d788a; }
.equipment-replacement input { min-height: 32px !important; padding: 5px 7px !important; width: 100%; }
.pickup-existing { margin: 12px 0; color: #536074; font-size: 12px; }
.pickup-existing a { color: #6932cb; font-weight: 700; }
#pickup-signature { display: block; background: #fff; border: 1px solid #ccd5e4; border-radius: 8px; width: 100%; height: 160px; touch-action: none; cursor: crosshair; margin-top: 8px; }
.pickup-photos { margin: 12px 0; }
.pickup-photos input { width: 100%; }
.equipment-availability { grid-column: 2 / -1; color: #63718a; font-size: 11px; }
.equipment-availability.conflicted { color: #b42318; font-weight: 750; }
.equipment-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: #8490a2; font-size: 11px; }
.equipment-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.financial-row, .financial-table { display: flex; flex-wrap: wrap; gap: 5px; }
.finance-chip { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 7px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.finance-chip.done { background: #e8f8ed; color: #19773a; }
.finance-chip.pending { background: #fff3df; color: #946009; }
.finance-chip.overdue, .payment-alert.overdue { background: #fee7e7; color: #a61b29; font-weight: 800; }
.payment-alert.overdue { display: inline-block; padding: 3px 6px; border-radius: 5px; margin-top: 3px; }
.repeat-row.installment.overdue, .payment-row-overdue { background: #fff1f1; }
.repeat-row.installment.scheduled, .payment-row-scheduled { background: #fff9e9; }
.payment-schedule { display: grid; gap: 3px; min-width: 155px; }
.payment-schedule-line { display: block; font-size: 11px; white-space: nowrap; }
.payment-schedule-line.overdue { color: #a61b29; font-weight: 800; }
.payment-schedule-line.scheduled { color: #946009; }
.payment-schedule-line.paid { color: #19773a; }
.finance-chip.neutral { background: #edf2f8; color: #4a5b72; }
.profit-line { color: #19773a !important; font-weight: 800; }
.profit-preview input[readonly] { background: #edf8f1; color: #19773a; font-weight: 850; }
.profit-preview.negative input[readonly] { background: #fff0f0; color: #b42c2c; }
.proposal-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.proposal-field legend { margin-bottom: 6px; color: #536074; font-size: 10px; font-weight: 760; }
.proposal-upload { display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px dashed #cbd5e3; border-radius: 10px; background: #f8fafd; }
.proposal-upload > div { display: grid; gap: 3px; min-width: 0; }
.proposal-upload b { color: #465469; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proposal-upload small { color: #7c8797; font-size: 9px; }
.proposal-choose { flex: 0 0 auto; display: inline-flex !important; }
.proposal-choose input { position: absolute; width: 1px; height: 1px; min-height: 1px !important; opacity: 0; pointer-events: none; }
.proposal-choose span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; background: #f1e9ff; color: #6925b9; font-size: 11px; font-weight: 800; cursor: pointer; }
.proposal-choose:focus-within span { outline: 3px solid rgba(37,99,235,.16); }
.proposal-existing { display: flex; align-items: center; gap: 9px; margin-top: 7px; padding: 9px 11px; border-radius: 9px; background: #edf8f1; color: #25653c; font-size: 10px; }
.proposal-existing a, .proposal-table-link { color: #6f2dbd; font-weight: 800; text-decoration: none; }
.proposal-existing a:hover, .proposal-table-link:hover { text-decoration: underline; }
.proposal-existing span { color: #698073; }
.text-danger { margin-left: auto; border: 0; background: transparent; color: #b42c2c; font-size: 10px; font-weight: 800; }
.proposal-summary-field { min-width: 0; margin: 0; padding: 12px; border: 1px solid #dfe5ee; border-radius: 11px; background: #f8fafd; }
.proposal-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.proposal-summary-title { color: #536074; font-size: 10px; font-weight: 760; }
.proposal-summary-field textarea[readonly] { min-height: 215px; resize: vertical; background: #fff; color: #354258; line-height: 1.55; }
.button.compact { min-height: 32px; padding: 0 10px; font-size: 10px; }
.conflict-panel { padding: 12px 14px; border: 1px solid #ffc9c2; border-radius: 10px; background: #fff3f1; color: #8f2419; font-size: 13px; line-height: 1.5; }
.conflict-panel b { display: block; margin-bottom: 3px; }
.management-field { min-width: 0; margin: 0; padding: 13px; border: 1px solid #dfe5ee; border-radius: 11px; background: #f8fafd; }
.management-field > legend, .management-title { color: #536074; font-size: 14px; font-weight: 750; }
.daily-schedule-list { display: grid; gap: 8px; margin-top: 10px; }
.daily-schedule-row { display: grid; grid-template-columns: minmax(190px,1fr) minmax(120px,.55fr) minmax(120px,.55fr); gap: 9px; align-items: end; padding: 10px; border: 1px solid #e0e6ee; border-radius: 9px; background: #fff; }
.daily-schedule-row > span { display: grid; gap: 3px; align-self: center; }
.daily-schedule-row > span b { color: #27344a; font-size: 13px; text-transform: capitalize; }
.daily-schedule-row > span small { color: #818ca0; font-size: 11px; }
.daily-schedule-row label { font-size: 11px; }
.management-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.installment-controls { display: flex; align-items: end; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.installment-controls label { display: grid; gap: 3px; color: #667388; font-size: 10px; }
.installment-controls input { width: 78px; min-height: 32px; padding: 5px 8px; }
.financial-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.financial-totals.payment-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.financial-totals.without-profit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.financial-totals span { display: grid; gap: 4px; padding: 10px; border: 1px solid #e1e6ed; border-radius: 9px; background: #fff; color: #738095; font-size: 12px; }
.financial-totals b { color: #25324a; font-size: 15px; }
.financial-totals .profit-preview b { color: #19773a; }
.financial-totals .profit-preview.negative b { color: #b42318; }
.repeat-list { display: grid; gap: 8px; }
.repeat-row { display: grid; grid-template-columns: minmax(130px,.75fr) minmax(150px,1.4fr) minmax(105px,.6fr) minmax(105px,.6fr) 36px; gap: 7px; align-items: end; }
.repeat-row.installment { grid-template-columns: minmax(150px,1.3fr) 120px 135px 86px 135px 36px; }
.repeat-row label { font-size: 11px; }
.repeat-remove { min-height: 40px; border: 1px solid #ffd2d2; border-radius: 8px; background: #fff0f0; color: #b42318; font-weight: 800; }
.repeat-empty { padding: 18px; border: 1px dashed #d5dce6; border-radius: 9px; color: #7a8698; text-align: center; font-size: 13px; }
.subgrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 9px; }
.pickup-party-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.pickup-party-grid h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; color: #4d5b70; }
.pickup-party-grid .span-2 { grid-column: 1 / -1; }
.checklist-head { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; color: #4d5b70; font-size: 13px; }
.checklist-head span { color: #768398; font-size: 12px; }
.checklist-monitor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 11px; color: #718096; }
.checklist-monitor[hidden] { display: none; }
.checklist-monitor .production-by { margin-top: 0; }
.checklist-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.checklist-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 11px; }
.checklist-actions span { font-size: 11px; color: #536074; }
.checklist-actions span.error { color: #a72219; font-weight: 700; }
.check-item { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 8px !important; padding: 9px 10px; border: 1px solid #e0e6ee; border-radius: 8px; background: #fff; font-size: 12px !important; }
.check-item input { width: 16px; min-height: 16px; margin: 1px 0 0; }
.checklist-timeline { margin-top: 16px; padding: 14px; background: #f7f9fc; border: 1px solid #e2e8f0; border-radius: 10px; color: #34445c; }
.checklist-timeline[hidden] { display: none; }
.checklist-timeline > b { font-size: 13px; }
.checklist-timeline ol { margin: 10px 0 0; padding-left: 22px; }
.checklist-timeline li { padding: 6px 0; border-top: 1px solid #e6ebf2; font-size: 13px; }
.checklist-timeline li small { display: block; margin-top: 2px; color: #607087; font-size: 12px; }

.operations-grid, .admin-grid, .finance-grid { display: grid; gap: 13px; }
.operations-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.operation-card, .admin-card, .finance-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 17px; }
.operation-card-head, .admin-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.operation-card h3, .admin-card h2, .finance-card h3 { margin: 0; }
.operation-meta { display: grid; gap: 6px; margin: 13px 0; color: #5f6c7e; font-size: 13px; }
.operation-production { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0 13px; }
.operation-production .production-by { margin: 0; }
.operation-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.section-intro { margin: -8px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.finance-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.finance-card .amount { margin: 7px 0 5px; font-size: 22px; font-weight: 850; }
.finance-card small { color: #788498; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.admin-tabs button.active { background: #e8eefc; color: #1e4dad; border-color: #cbd9f7; }
.admin-card { overflow: hidden; }
.admin-form { display: grid; grid-template-columns: 1.1fr 1.2fr .8fr 1fr auto; gap: 8px; align-items: end; margin: 15px 0; }
.admin-form label { display: grid; gap: 5px; color: #59667a; font-size: 12px; }
.admin-form label small { color: #8590a1; font-size: 11px; font-weight: 500; }
.admin-form-error { grid-column: 1 / -1; min-height: 18px; margin: 0; color: #b42318; font-size: 12px; font-weight: 650; }
.admin-form input, .admin-form select, .inventory-qty { min-height: 40px; border: 1px solid #dce2ea; border-radius: 8px; padding: 8px 10px; }
.admin-list { display: grid; gap: 7px; }
.admin-row { display: grid; grid-template-columns: minmax(160px,1.3fr) minmax(180px,1.2fr) 120px 90px auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #e4e8ee; border-radius: 9px; font-size: 13px; }
.admin-row small { color: #7b8798; }
.admin-row > input, .admin-row > select, .admin-user-actions input { width: 100%; min-height: 38px; border: 1px solid #dce2ea; border-radius: 8px; padding: 7px 9px; }
.admin-row > span { display: grid; gap: 3px; min-width: 0; }
.admin-user-actions { display: grid; grid-template-columns: minmax(125px,1fr) auto; gap: 7px; align-items: center; }
.inventory-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 13px; max-height: 560px; overflow-y: auto; }
.catalog-create { display: grid; grid-template-columns: minmax(160px,1fr) minmax(180px,1.5fr) 100px 135px auto; align-items: end; gap: 9px; margin: 15px 0; }
.catalog-create label, .catalog-row label { display: grid; gap: 4px; font-size: 11px; font-weight: 700; }
.catalog-create input, .catalog-row input { min-width: 0; width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #dce2ea; border-radius: 8px; }
.catalog-list { display: grid; gap: 7px; max-height: 370px; overflow-y: auto; }
.catalog-row { display: grid; grid-template-columns: minmax(160px,1fr) minmax(190px,1.5fr) auto; gap: 9px; align-items: end; padding: 8px; border: 1px solid #e4e8ee; border-radius: 9px; }
.catalog-list { max-height: 650px; }
.catalog-quote-row { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; padding: 13px; }
.catalog-quote-row > button { justify-self: start; }
.catalog-quote-fields, .quote-settings-form, .quote-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.catalog-quote-fields { grid-column: 1 / -1; padding: 12px; background: #f8f6fb; border-radius: 9px; }
.catalog-quote-fields label, .quote-settings-form label, .quote-fields label, .quote-form > label:not(.quote-check) { display: grid; gap: 5px; font-size: 11px; font-weight: 700; color: #4c596f; }
.quote-wide { grid-column: 1 / -1; }
.catalog-quote-fields input, .catalog-quote-fields textarea, .quote-settings-form input, .quote-settings-form textarea, .quote-form input, .quote-form textarea, .quote-form select { min-width: 0; width: 100%; border: 1px solid #dce2ea; border-radius: 8px; padding: 9px; background: #fff; color: var(--ink); }
.quote-settings-form button { justify-self: start; }
.quotes-layout { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.quotes-list, .quote-editor { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.quotes-list { display: grid; gap: 7px; max-height: 76vh; overflow-y: auto; }
.quote-choice { background: #fff; border: 1px solid var(--line); text-align: left; border-radius: 9px; padding: 11px; display: grid; gap: 3px; }
.quote-choice.active { border-color: #8553d4; background: #f4edff; }
.quote-choice small, .quote-editor-head small, .quote-product small { display: block; color: var(--muted); font-size: 11px; }
.quote-editor-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.quote-editor-head h2 { margin: 0 0 4px; font-size: 19px; }
.quote-form { display: grid; gap: 13px; }
.quote-form h3 { font-size: 13px; margin: 9px 0 0; }
.quote-product { display: grid; grid-template-columns: minmax(180px,2fr) repeat(3,minmax(70px, .6fr)) minmax(110px, .8fr); align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.quote-product p { color: #667286; font-size: 11px; line-height: 1.4; margin: 7px 0 0; white-space: pre-line; }
.quote-product label { font-size: 10px; color: var(--muted); font-weight: 700; }
.quote-product-total { display: grid; gap: 6px; text-align: right; }
.quote-product-total b { white-space: nowrap; }
.quote-check { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.quote-check input { width: auto; }
.quote-totals { display: grid; gap: 3px; width: min(360px,100%); margin-left: auto; font-size: 12px; }
.quote-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px; border-bottom: 1px solid var(--line); }
.quote-totals .quote-final { background: #eadbfa; border: 0; border-radius: 7px; font-size: 15px; font-weight: 800; }
.quote-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.inventory-row { display: grid; grid-template-columns: minmax(0,1fr) 74px 126px; gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid #e4e8ee; border-radius: 9px; font-size: 12px; }
.inventory-row label { display: grid; gap: 3px; color: #66748a; font-size: 10px; }
.inventory-row input { width: 100%; min-width: 0; min-height: 35px; border: 1px solid #dce2ea; border-radius: 8px; padding: 6px 7px; }
.modal-form-error { margin: 14px 0 0; padding: 11px 13px; border: 1px solid #eab2a6; border-radius: 8px; background: #fff1ef; color: #9b241a; font-weight: 700; }
.audit-list { display: grid; gap: 10px; margin-top: 13px; max-height: 760px; overflow-y: auto; padding-right: 4px; }
.audit-entry { padding: 13px; border: 1px solid #e1e6ee; border-radius: 11px; background: #fafbfe; }
.audit-entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.audit-entry-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.audit-entry-head b { color: #25324a; font-size: 13px; }
.audit-entry-head span { padding: 3px 7px; border-radius: 999px; background: #eee6ff; color: #6829b8; font-size: 10px; font-weight: 750; }
.audit-entry-head time { color: #768398; font-size: 11px; white-space: nowrap; }
.audit-entry-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: #59667a; font-size: 12px; }
.audit-entry-summary b { color: #303d52; }
.audit-action { color: #6f2dbd; font-weight: 800; }
.audit-changes { display: grid; gap: 6px; margin-top: 10px; }
.audit-change { display: grid; grid-template-columns: minmax(140px,.35fr) minmax(0,1fr); gap: 10px; padding: 8px 9px; border-radius: 8px; background: #fff; font-size: 11px; }
.audit-change > b { color: #47566c; }
.audit-change > span { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 7px; align-items: start; min-width: 0; }
.audit-change del, .audit-change ins { overflow-wrap: anywhere; text-decoration: none; line-height: 1.45; }
.audit-change del { color: #9b3d3d; }
.audit-change ins { color: #21683a; font-weight: 650; }
.audit-change i { color: #8a95a6; font-style: normal; }
.audit-no-changes { margin-top: 8px; color: #8a95a6; font-size: 11px; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.operational-modal { width: min(820px, calc(100vw - 24px)); }
.operational-dialog-body { padding: 22px; max-height: calc(100vh - 28px); overflow-y: auto; }
.operational-sheet { padding: 30px; border-radius: 14px; background: #fff; border: 1px solid #dfe5ee; color: #142035; }
.ops-brand { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 14px 16px; border-radius: 10px 10px 0 0; background: #08030f; border-bottom: 4px solid var(--blue); }
.ops-brand img { display: block; width: 170px; height: auto; }
.ops-brand span { color: #ddd5e9; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.ops-title { margin: 20px 0 5px; font-size: 25px; letter-spacing: -.04em; }
.ops-client { margin: 0; color: #5f6c7e; font-size: 14px; }
.ops-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 18px 0; }
.ops-field { padding: 11px; border-radius: 9px; background: #f3f6fa; }
.ops-field small { display: block; margin-bottom: 4px; color: #748197; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ops-field b { font-size: 14px; line-height: 1.4; }
.ops-section { margin-top: 17px; }
.ops-section h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: #536074; }
.ops-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ops-list li { padding: 8px 10px; border: 1px solid #e2e7ee; border-radius: 8px; font-size: 13px; }
.ops-checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.ops-check { padding: 8px; border-radius: 7px; background: #f4f6f9; font-size: 12px; }
.operational-actions { justify-content: flex-end; }
.check-row { display: flex !important; align-items: flex-start; gap: 10px !important; padding: 12px; background: #f7f9fc; border: 1px solid #e2e7ef; border-radius: 10px; cursor: pointer; }
.check-row input { width: 17px; min-height: 17px; margin: 1px 0 0; }
.check-row span { display: grid; gap: 2px; }
.check-row b { color: #374356; font-size: 11px; }
.check-row small { font-weight: 500; color: #7b8799; }
.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.action-spacer { flex: 1; }
.confirm-modal { border: 0; border-radius: 16px; padding: 24px; width: min(420px, calc(100vw - 30px)); box-shadow: var(--shadow); }
.confirm-modal h2 { margin: 0 0 8px; }
.confirm-modal p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.confirm-modal .modal-actions { justify-content: flex-end; }
.form-error { min-height: 18px; margin: 7px 0 0; color: #d72c2c; font-size: 11px; }

.toast-region { position: fixed; top: 17px; right: 17px; z-index: 30; display: grid; gap: 8px; pointer-events: none; }
.toast { background: #102036; color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 11px; animation: toastIn .22s ease both; }
.toast.error { background: #9f2525; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); background: #fff; }
.login-card { padding: clamp(38px, 7vw, 92px); display: flex; flex-direction: column; justify-content: center; }
.brand-login { width: fit-content; padding: 10px 14px; margin-bottom: 56px; border-radius: 16px; background: #03000a; box-shadow: 0 16px 40px rgba(68, 16, 113, .18); }
.login-card h1 { margin: 10px 0 14px; font-size: clamp(37px, 5vw, 58px); line-height: .98; letter-spacing: -.06em; }
.login-copy { color: var(--muted); max-width: 440px; line-height: 1.6; font-size: 14px; }
.login-form { margin-top: 25px; max-width: 510px; }
.login-form > label { display: flex; justify-content: space-between; gap: 10px; color: #49566a; font-size: 13px; font-weight: 750; margin: 12px 0 7px; }
.login-form > label small { color: #8792a2; font-weight: 500; }
.login-form > input { width: 100%; min-height: 45px; border: 1px solid #d8dfe8; border-radius: 10px; padding: 0 13px; outline: 0; }
.login-form > input:focus { border-color: #5b8af0; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.login-form > .button { width: 100%; margin-top: 12px; }
.password-row { display: flex; gap: 8px; }
.password-row input { flex: 1; min-width: 0; height: 45px; border: 1px solid #d8dfe8; border-radius: 10px; padding: 0 13px; outline: 0; }
.password-row input:focus { border-color: #5b8af0; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.security-note { margin-top: 40px; color: #8a95a5; font-size: 10px; }
.security-note span { color: #28a873; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(circle at 75% 20%, rgba(142,54,255,.34), transparent 36%), radial-gradient(circle at 20% 80%, rgba(86,24,160,.28), transparent 38%), #08030f; display: grid; place-items: center; }
.login-showcase-logo { position: absolute; z-index: 2; width: min(650px, 78%); height: auto; filter: drop-shadow(0 28px 70px rgba(124,58,237,.38)); }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .65; }
.orb-one { width: 360px; height: 360px; top: -90px; right: -70px; background: rgba(71,134,255,.18); border: 1px solid rgba(117,166,255,.28); }
.orb-two { width: 260px; height: 260px; left: -50px; bottom: -70px; background: rgba(46,220,187,.12); border: 1px solid rgba(93,225,198,.23); }
.mini-board { position: relative; z-index: 1; width: min(620px, 82%); aspect-ratio: 1.35; border: 1px solid rgba(177,108,255,.2); border-radius: 22px; padding: 24px; background: rgba(25,8,43,.42); box-shadow: 0 35px 90px rgba(0,0,0,.35); transform: perspective(900px) rotateY(-8deg) rotateX(4deg); opacity: .34; backdrop-filter: blur(10px); }
.mini-head { display: flex; gap: 7px; }
.mini-head i { width: 8px; height: 8px; border-radius: 50%; background: #657389; }
.mini-head i:nth-child(1) { background: #ff7c73; }.mini-head i:nth-child(2) { background: #f7c663; }.mini-head i:nth-child(3) { background: #5dd9a5; }
.mini-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; height: calc(100% - 31px); margin-top: 23px; }
.mini-cols span { border-radius: 13px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.09) 0 52px, transparent 52px 63px); border: 1px solid rgba(255,255,255,.08); }

@media (max-width: 1000px) {
  .quotes-layout { grid-template-columns: 1fr; }
  .quotes-list { max-height: 240px; }
  .quote-product { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .quote-product > div:first-child { grid-column: 1 / -1; }
  .app-shell { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { justify-content: center; padding: 0; }
  .sidebar-brand .brand-logo { width: 56px; }
  .brand > span:last-child, .nav-item:not(.active) { font-size: 0; }
  .nav-item { text-align: center; padding-inline: 8px; font-size: 0; }
  .nav-item.active { font-size: 0; }
  .nav-icon { font-size: 17px; width: 100%; }
  .sidebar-foot { flex-direction: column; }
  .user-pill { display: none; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .quote-product { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-quote-row, .catalog-quote-fields, .quote-settings-form, .quote-fields { grid-template-columns: 1fr; }
  .quote-wide { grid-column: auto; }
  .app-shell { display: block; padding-bottom: 68px; }
  .sidebar { position: fixed; top: auto; bottom: 0; width: 100%; height: 64px; padding: 6px 8px; flex-direction: row; align-items: center; }
  .sidebar .brand, .sidebar-foot { display: none; }
  .nav { display: flex; margin: 0; width: 100%; gap: 3px; overflow-x: auto; }
  .nav-item, .nav-item.active { flex: 0 0 74px; display: grid; justify-items: center; gap: 2px; font-size: 10px; padding: 7px 3px; text-align: center; }
  .nav-icon { font-size: 16px; }
  .main { padding: 22px 15px 28px; }
  .topbar { align-items: flex-end; }
  .topbar .button { font-size: 0; width: 44px; padding: 0; }
  .topbar .button span { font-size: 20px; }
  .summary-grid { gap: 8px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 19px; }
  .toolbar { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; }
  .toolbar select { flex: 1; border-left: 0; border-top: 1px solid var(--line); max-width: none; min-width: 140px; }
  .result-count { margin-left: auto; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 1100px; }
  .calendar-head { align-items: flex-start; flex-direction: column; }
  .calendar-actions { flex-wrap: wrap; width: 100%; }
  .calendar-export { flex-basis: 100%; min-height: 42px; }
  .calendar-grid { display: none; }
  .mobile-calendar-list { display: grid; gap: 12px; }
  .mobile-calendar-day { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
  .mobile-calendar-date { font-size: 12px; font-weight: 850; color: #334155; }
  .mobile-calendar-event { display: block; width: 100%; min-height: 56px; border: 0; border-left: 4px solid transparent; border-radius: 8px; padding: 9px 11px; text-align: left; font-size: 12px; line-height: 1.4; }
  .mobile-calendar-client { display: block; opacity: .85; font-size: 11px; }
  .calendar-empty { color: #697487; padding: 18px; }
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-row > :nth-child(2), .contact-row > :nth-child(3) { grid-column: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .equipment-options { grid-template-columns: 1fr; max-height: 270px; }
  .equipment-replacement { grid-template-columns: 1fr; }
  .inventory-row { grid-template-columns: minmax(0,1fr) 70px 110px; }
  .equipment-tools { align-items: stretch; flex-direction: column; gap: 7px; }
  .equipment-count { align-self: flex-start; }
  .proposal-upload { align-items: stretch; flex-direction: column; }
  .proposal-choose span { justify-content: center; width: 100%; }
  .proposal-existing { align-items: flex-start; flex-wrap: wrap; }
  .management-head { align-items: flex-start; flex-direction: column; }
  .installment-controls { justify-content: flex-start; width: 100%; }
  .modal form { padding: 19px; }
  .modal-actions { flex-wrap: wrap; }
  .financial-totals, .checklist-grid, .subgrid, .operations-grid, .finance-grid, .inventory-list, .ops-grid, .ops-checks, .catalog-create, .catalog-row { grid-template-columns: 1fr; }
  .repeat-row, .repeat-row.installment, .daily-schedule-row, .admin-form, .admin-row, .audit-change { grid-template-columns: 1fr; }
  .audit-entry-head { align-items: flex-start; flex-direction: column; }
  .audit-change > span { grid-template-columns: 1fr; }
  .repeat-remove { min-height: 34px; }
  .operational-sheet { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-card { padding: 34px 22px; }
  .brand-login { margin-bottom: 44px; justify-content: flex-start; }
  .login-art { display: none; }
  .password-row { flex-direction: column; }
}

@media print {
  body > :not(#operational-dialog) { display: none !important; }
  #operational-dialog { position: static; display: block !important; width: 100%; max-height: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  #operational-dialog::backdrop, .operational-dialog-body > .modal-head, .operational-actions { display: none !important; }
  .operational-dialog-body { padding: 0; max-height: none; overflow: visible; }
  .operational-sheet { border: 0; padding: 0; }
}
.supervision-head,.supervision-title,.supervision-section-head,.supervision-entry-head{display:flex;align-items:start;justify-content:space-between;gap:1rem}.supervision-head{margin:0 0 1.2rem}.supervision-head h2,.supervision-title h3{margin:.1rem 0;font-size:1.55rem}.supervision-head p,.supervision-title p{color:#64748b;margin:.35rem 0}.supervision-filter{display:flex;gap:.7rem;align-items:center;margin-bottom:1rem}.supervision-filter input{flex:1;min-width:8rem}.supervision-filter select,.supervision-filter input,.supervision-modal input,.supervision-modal select,.supervision-modal textarea,.supervision-upload select,.supervision-upload input{border:1px solid #d7ddea;border-radius:9px;padding:.65rem;background:white;color:#1e293b;font:inherit}.supervision-layout{display:grid;grid-template-columns:minmax(220px,290px) minmax(0,1fr);gap:1rem;align-items:start}.supervision-events{max-height:68vh;overflow:auto;display:grid;gap:.45rem;padding-right:.25rem}.supervision-choice{border:1px solid #e0e4ee;background:#fff;border-radius:11px;padding:.9rem;text-align:left;display:grid;gap:.25rem;cursor:pointer;color:#172439}.supervision-choice.active{border-color:#7c3aed;box-shadow:0 0 0 2px #ede9fe}.supervision-choice small,.supervision-choice span,.muted{color:#64748b}.supervision-detail{background:#fff;border:1px solid #e0e4ee;border-radius:15px;padding:1.25rem;min-height:12rem}.supervision-company{color:#6d28d9;font-size:.78rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.supervision-note{background:#f5f3ff;padding:.8rem;border-radius:10px}.supervision-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin:1rem 0}.supervision-metrics>div{border:1px solid #e5e7eb;border-radius:10px;padding:.7rem}.supervision-metrics small,.supervision-entry small{display:block;color:#64748b}.supervision-metrics b{display:block;margin-top:.3rem;font-size:1.05rem}.supervision-alert{color:#b91c1c;font-weight:700}.supervision-section{border-top:1px solid #e5e7eb;padding:1rem 0}.supervision-section h4{margin:0}.supervision-entry{border:1px solid #e5e7eb;border-radius:12px;padding:1rem;margin:.7rem 0}.supervision-entry p{line-height:1.55}.supervision-files{display:flex;flex-wrap:wrap;gap:.55rem;margin:.65rem 0}.supervision-file{display:inline-flex;align-items:center;border-radius:8px;background:#f1f5f9;padding:.35rem .55rem;max-width:100%}.supervision-file a{overflow-wrap:anywhere}.supervision-file button{border:0;background:none;color:#b91c1c;cursor:pointer;font-size:1.2rem}.supervision-upload{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;margin-top:.65rem}.supervision-upload input[type=file]{max-width:18rem}.supervision-empty{padding:1.4rem;color:#64748b}.supervision-modal{border:0;border-radius:18px;padding:0;max-width:800px;width:calc(100vw - 2rem);max-height:90vh;box-shadow:0 22px 80px #0f172a55}.supervision-modal::backdrop{background:#0f172a99}.supervision-modal-form{padding:1.4rem;max-height:90vh;overflow:auto;display:grid;gap:.9rem}.supervision-modal-form h2{margin:0}.supervision-modal label{display:grid;gap:.35rem;font-weight:600}.supervision-modal fieldset{border:1px solid #e5e7eb;border-radius:10px}.supervision-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.supervision-check,.supervision-people label{display:flex!important;gap:.5rem!important;align-items:center;font-weight:400!important}.supervision-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}.supervision-phase-list{display:grid;gap:.6rem}.supervision-phase{display:grid;grid-template-columns:1fr 1.5fr 1.5fr 1fr 1fr 1fr auto;gap:.35rem;align-items:center}.supervision-phase input,.supervision-phase select{min-width:0;width:100%}.supervision-phase button{border:0;background:none;color:#b91c1c;font-size:1.4rem;cursor:pointer}@media(max-width:880px){.supervision-layout{grid-template-columns:1fr}.supervision-events{display:flex;max-height:none;overflow:auto}.supervision-choice{min-width:190px}.supervision-metrics{grid-template-columns:1fr}.supervision-phase{grid-template-columns:1fr 1fr}.supervision-form-grid,.supervision-people{grid-template-columns:1fr}.supervision-filter{flex-wrap:wrap}.supervision-filter input{width:100%}}
