:root {
  --navy: #0d2748;
  --navy-2: #173b67;
  --blue: #1166d8;
  --blue-dark: #0c4fae;
  --blue-soft: #eaf3ff;
  --orange: #f38b19;
  --green: #1d8f62;
  --yellow: #b97b00;
  --red: #c93d45;
  --ink: #182334;
  --muted: #667386;
  --line: #dce3ec;
  --bg: #f4f7fb;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(13, 39, 72, .08);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.align-right { text-align: right; }
.mobile-only { display: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  z-index: 30;
  background: linear-gradient(180deg, var(--navy), #071a31);
  color: var(--white);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 24px rgba(5, 22, 42, .12);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 28px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--orange); color: white; font-weight: 900; font-size: 26px;
  box-shadow: 0 8px 18px rgba(243, 139, 25, .28);
}
.brand strong { display: block; font-size: 22px; letter-spacing: .08em; }
.brand span { display: block; margin-top: 2px; color: #aebbd0; font-size: 12px; }
.main-nav { display: grid; gap: 7px; }
.nav-link {
  appearance: none; border: 0; background: transparent; color: #c9d4e3;
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 10px; text-align: left; font-weight: 650;
  transition: .2s ease;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: #fff; color: var(--navy); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.nav-icon { width: 22px; text-align: center; font-size: 20px; }
.sidebar-note { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: #b8c5d7; font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: #48d597; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 0 4px rgba(72,213,151,.12); }

.main-area { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 84px; padding: 16px 30px;
  background: rgba(244,247,251,.93); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220,227,236,.85);
}
.topbar h1 { margin: 0; font-size: 25px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.local-badge { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--green); background: #e6f8f0; border: 1px solid #bcebd9; border-radius: 999px; padding: 7px 10px; }
.content { padding: 28px 30px 42px; }
.page { display: none; }
.page.active { display: block; animation: pageIn .24s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.button {
  border: 1px solid transparent; border-radius: 9px; padding: 10px 16px; font-weight: 750;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 7px 16px rgba(17,102,216,.18); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: #fff; color: var(--navy); border-color: var(--line); }
.button.secondary:hover { border-color: #aebdd0; background: #f9fbfe; }
.button.ghost { background: transparent; color: var(--muted); }
.button.danger { background: var(--red); color: white; }
.button.compact { padding: 9px 14px; font-size: 13px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 750; padding: 8px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 9px; }

.welcome-card {
  display: flex; justify-content: space-between; align-items: center; gap: 28px;
  background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: white;
  border-radius: 20px; padding: 32px; box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.welcome-card::after { content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -130px; border-radius: 50%; border: 42px solid rgba(255,255,255,.06); }
.welcome-card > * { position: relative; z-index: 1; }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.welcome-card h2 { max-width: 720px; font-size: clamp(24px, 3vw, 38px); line-height: 1.12; margin: 9px 0 10px; }
.welcome-card p { margin: 0; color: #c7d3e4; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome-card .button.secondary { background: rgba(255,255,255,.1); color: white; border-color: rgba(255,255,255,.2); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: 0 8px 24px rgba(13,39,72,.045); }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; }
.metric-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.metric-card h3 { font-size: 28px; margin: 16px 0 2px; }
.metric-card p { color: var(--muted); margin: 0; font-size: 13px; }
.metric-card small { color: var(--green); font-weight: 750; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(13,39,72,.045); }
.panel-header { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f6; }
.panel-header h3 { margin: 0; font-size: 17px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.recent-list { padding: 6px 20px 14px; }
.recent-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1f6; }
.recent-item:last-child { border-bottom: 0; }
.recent-avatar { width: 38px; height: 38px; background: var(--blue-soft); color: var(--blue); border-radius: 10px; display: grid; place-items: center; font-weight: 850; }
.recent-item strong { display: block; }
.recent-item small { display: block; color: var(--muted); margin-top: 3px; }
.status-summary { padding: 16px 22px 22px; display: grid; gap: 12px; }
.status-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.status-row-label { display: flex; justify-content: space-between; font-size: 13px; }
.status-bar { height: 8px; border-radius: 999px; background: #edf1f6; overflow: hidden; margin-top: 6px; }
.status-bar > span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }

.page-toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.search-box { background: white; border: 1px solid var(--line); border-radius: 10px; min-width: 320px; max-width: 600px; flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 13px; }
.search-box span { color: var(--muted); font-size: 22px; }
.search-box input { border: 0; outline: 0; padding: 11px 0; width: 100%; background: transparent; color: var(--ink); }
.toolbar-actions { display: flex; gap: 10px; }
.filter-select { border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: white; color: var(--ink); }
.table-panel { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th { background: #f8fafc; color: #59677a; font-size: 11px; letter-spacing: .045em; text-transform: uppercase; text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); }
td { padding: 14px 15px; border-bottom: 1px solid #edf1f6; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fbfdff; }
tbody tr:last-child td { border-bottom: 0; }
.actions-column { width: 150px; text-align: right; }
.cell-primary { font-weight: 800; color: var(--navy); }
.cell-secondary { color: var(--muted); font-size: 12px; margin-top: 3px; display: block; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.action-button { border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 6px 9px; border-radius: 7px; font-size: 12px; font-weight: 750; }
.action-button:hover { background: var(--blue-soft); border-color: #bad5fa; }
.action-button.delete:hover { background: #fff0f1; color: var(--red); border-color: #f3bdc1; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: #e7f7f0; color: var(--green); }
.badge.yellow { background: #fff6dc; color: var(--yellow); }
.badge.red { background: #ffedef; color: var(--red); }
.badge.gray { background: #eef2f6; color: #5d697a; }
.empty-state { padding: 64px 20px; text-align: center; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 17px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 28px; }
.empty-state h3 { margin: 0 0 6px; }
.empty-state p { margin: 0; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.settings-card { padding: 24px; }
.settings-card h3 { margin: 16px 0 8px; }
.settings-card p { color: var(--muted); min-height: 62px; line-height: 1.5; }
.settings-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 24px; font-weight: 800; }
.danger-card .settings-icon { background: #ffedef; color: var(--red); }
.file-button input { display: none; }
.info-panel { margin-top: 18px; padding: 22px; }
.info-panel h3 { margin: 0 0 8px; }
.info-panel p { margin: 0; color: var(--muted); line-height: 1.55; }

.modal { border: 0; padding: 0; background: transparent; width: min(96vw, 920px); max-height: 94vh; overflow: visible; }
.modal::backdrop { background: rgba(5, 18, 34, .62); backdrop-filter: blur(3px); }
.modal-card { background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.28); overflow: hidden; max-height: 92vh; display: flex; flex-direction: column; }
.small-modal { max-width: 600px; margin: auto; }
.wide-modal { max-width: 1060px; margin: auto; }
.modal-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-header h2 { margin: 6px 0 0; font-size: 22px; }
.modal-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.close-button { border: 0; background: #f0f3f7; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; font-size: 22px; line-height: 1; }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fafbfd; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three-columns { grid-template-columns: repeat(3, minmax(0,1fr)); }
.full-width { grid-column: 1 / -1; }
.two-span { grid-column: span 2; }
.field { display: grid; gap: 7px; align-content: start; }
.field > span { font-size: 12px; font-weight: 750; color: #4d5a6d; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #cfd8e4; border-radius: 9px; padding: 10px 11px; color: var(--ink); background: #fff; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17,102,216,.11); }
.field input[readonly] { background: #f5f7fa; color: #526074; }
.field textarea { resize: vertical; }
.checkbox-card { border: 1px solid var(--line); background: #f8fafc; border-radius: 11px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox-card input { margin-top: 3px; width: 18px; height: 18px; }
.checkbox-card strong { display: block; font-size: 13px; }
.checkbox-card small { display: block; color: var(--muted); margin-top: 4px; }
.import-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding: 16px; border-radius: 11px; background: var(--blue-soft); border: 1px solid #cfe2fc; }
.backorder-card { border: 1px solid #efd2d4; border-radius: 13px; padding: 16px; background: #fffafb; }
.backorder-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.backorder-header h3 { margin: 3px 0 4px; color: var(--navy); }
.backorder-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.button.compact { padding: 8px 11px; font-size: 12px; white-space: nowrap; }
.backorder-list { display: grid; gap: 10px; }
.backorder-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(100px, .55fr) minmax(160px, .8fr) 38px; gap: 10px; align-items: end; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.backorder-row.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208, 47, 58, .09); }
.backorder-remove { width: 38px; height: 38px; border: 1px solid #f0c5c8; border-radius: 9px; background: #fff2f3; color: var(--red); font-size: 22px; line-height: 1; }
.backorder-remove:hover { background: #ffe5e7; }
.backorder-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12px; border: 1px dashed #dfc6c8; border-radius: 10px; background: rgba(255,255,255,.65); }
.extraction-alert { margin: 16px 24px 0; border-radius: 10px; padding: 12px 14px; background: #fff8df; color: #765100; border: 1px solid #f1d991; font-size: 13px; }
.file-info { padding: 11px 13px; border: 1px solid #cfe2fc; background: var(--blue-soft); color: var(--blue-dark); border-radius: 9px; font-size: 12px; }
.pdf-dropzone { border: 2px dashed #b9c8dc; border-radius: 15px; padding: 28px; text-align: center; display: grid; justify-items: center; gap: 8px; background: #f8fbff; cursor: pointer; }
.pdf-dropzone:hover { border-color: var(--blue); background: var(--blue-soft); }
.pdf-dropzone input { display: none; }
.drop-icon { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; background: #e6373f; color: white; font-weight: 900; font-size: 13px; }
.pdf-dropzone small { color: var(--muted); line-height: 1.45; }
.selected-file { margin-top: 8px; padding: 6px 10px; border-radius: 999px; background: white; color: var(--navy); border: 1px solid var(--line); font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.privacy-note { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }

.tracking-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 28px; }
.tracking-form { display: grid; gap: 14px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.tracking-backorder-card { margin-bottom: 22px; border: 1px solid #efd2d4; border-radius: 12px; padding: 15px; background: #fffafb; }
.tracking-backorder-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.tracking-backorder-title h3 { margin: 0; }
.tracking-backorder-table { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.tracking-backorder-head, .tracking-backorder-row { display: grid; grid-template-columns: minmax(120px, 1fr) 90px 130px; gap: 10px; align-items: center; padding: 9px 11px; }
.tracking-backorder-head { background: #f6f8fb; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.tracking-backorder-row { border-top: 1px solid var(--line); font-size: 12px; }
.tracking-backorder-row strong { color: var(--navy); }
.tracking-backorder-empty { margin: 0; color: var(--muted); font-size: 12px; }
.timeline-title { margin: 0 0 14px; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 20px 28px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 15px; bottom: -2px; width: 2px; background: #dbe5f0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 4px solid #dbeaff; }
.timeline-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.timeline-card strong { font-size: 13px; }
.timeline-card time { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.timeline-card p { margin: 8px 0 0; color: #526074; font-size: 12px; line-height: 1.45; }

.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 380px; background: var(--navy); color: white; padding: 13px 15px; border-radius: 11px; box-shadow: 0 18px 35px rgba(0,0,0,.22); animation: toastIn .25s ease; }
.toast.success { border-left: 4px solid #48d597; }
.toast.error { border-left: 4px solid #ff6b72; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(5,18,34,.72); color: white; display: grid; place-content: center; justify-items: center; gap: 14px; }
.loader { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.25); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sidebar-overlay { display: none; }

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

@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-only { display: inline-grid; place-items: center; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(4,17,32,.55); z-index: 25; }
  .sidebar-overlay.visible { display: block; }
  .topbar { padding: 14px 18px; }
  .topbar > div:first-of-type { margin-right: auto; }
  .content { padding: 20px 16px 34px; }
  .welcome-card { display: grid; padding: 24px; }
  .page-toolbar { flex-direction: column; }
  .search-box { min-width: 0; max-width: none; }
  .toolbar-actions { justify-content: flex-end; flex-wrap: wrap; }
  .form-grid.three-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tracking-layout { grid-template-columns: 1fr; }
  .backorder-row { grid-template-columns: minmax(160px, 1fr) minmax(90px, .5fr) minmax(150px, .8fr) 38px; }
}

@media (max-width: 600px) {
  .topbar p, .local-badge, #quickQuoteButton { display: none; }
  .metric-grid, .settings-grid { grid-template-columns: 1fr; }
  .form-grid.two-columns, .form-grid.three-columns, .import-fields { grid-template-columns: 1fr; }
  .two-span { grid-column: 1; }
  .backorder-header { display: grid; }
  .backorder-header .button { width: 100%; }
  .backorder-row { grid-template-columns: 1fr 1fr; }
  .backorder-item-field, .backorder-date-field { grid-column: 1 / -1; }
  .backorder-remove { justify-self: end; }
  .tracking-backorder-head, .tracking-backorder-row { grid-template-columns: minmax(95px, 1fr) 70px 105px; font-size: 11px; }
  .modal { width: 100vw; max-height: 100vh; margin: 0; }
  .modal-card { border-radius: 0; max-height: 100vh; min-height: 100vh; }
  .modal-body { padding: 18px; }
  .modal-header, .modal-footer { padding-left: 18px; padding-right: 18px; }
  .welcome-actions, .welcome-actions .button { width: 100%; }
  .toolbar-actions .button { flex: 1; }
}

/* Notificaciones y tareas */
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dashboard-tasks-panel { grid-column: 1 / -1; }

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  display: grid;
  place-items: center;
  transition: .18s ease;
}
.notification-button:hover { border-color: #aebdd0; background: #f9fbfe; transform: translateY(-1px); }
.notification-button.has-notifications { background: #fff8df; border-color: #f1d991; }
.notification-bell { font-size: 18px; line-height: 1; }
.notification-count {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--bg);
  font-size: 10px;
  font-weight: 900;
}
.notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(5, 18, 34, .42);
  opacity: 0;
  visibility: hidden;
  transition: .22s ease;
}
.notification-overlay.visible { opacity: 1; visibility: visible; }
.notification-panel {
  position: fixed;
  z-index: 75;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -24px 0 60px rgba(5, 18, 34, .2);
  transform: translateX(105%);
  transition: transform .24s ease;
  display: flex;
  flex-direction: column;
}
.notification-panel.open { transform: translateX(0); }
.notification-panel-header {
  padding: 24px 22px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.notification-panel-header h2 { margin: 5px 0 5px; font-size: 24px; }
.notification-panel-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.notification-toolbar {
  padding: 11px 18px;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  background: #fafbfd;
}
.notification-list { overflow-y: auto; padding: 10px 12px 24px; display: grid; gap: 9px; }
.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.notification-item.unread { background: #f7fbff; border-color: #c9defb; box-shadow: 0 8px 20px rgba(17, 102, 216, .07); }
.notification-item.severity-danger { border-left: 4px solid var(--red); }
.notification-item.severity-warning { border-left: 4px solid var(--orange); }
.notification-item.severity-info { border-left: 4px solid var(--blue); }
.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.notification-content { min-width: 0; }
.notification-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notification-title-row strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.unread-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(17, 102, 216, .1); }
.notification-content p { margin: 6px 0; color: #526074; font-size: 12px; line-height: 1.48; }
.notification-content time { color: var(--muted); font-size: 10px; font-weight: 700; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.notification-action { border: 0; border-radius: 7px; padding: 6px 8px; background: #eef2f6; color: #526074; font-size: 10px; font-weight: 800; }
.notification-action:hover { background: #e3e9f0; }
.notification-action.primary-action { background: var(--blue-soft); color: var(--blue); }
.notification-action.dismiss-action { background: #fff0f1; color: var(--red); }
.notification-empty { margin: auto; padding: 40px 24px; text-align: center; color: var(--muted); }
.notification-empty-icon { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: #e7f7f0; color: var(--green); font-size: 25px; font-weight: 900; }
.notification-empty strong { display: block; color: var(--navy); }
.notification-empty p { margin: 6px 0 0; font-size: 12px; }

.tasks-table { min-width: 1020px; }
.task-completed-row td { opacity: .67; }
.task-completed-row .cell-primary { text-decoration: line-through; }
.text-danger { color: var(--red) !important; font-weight: 800; }
.text-warning { color: var(--yellow) !important; font-weight: 800; }
.upcoming-task-list { padding: 7px 20px 15px; display: grid; }
.upcoming-task-item {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: transparent;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  text-align: left;
}
.upcoming-task-item:last-child { border-bottom: 0; }
.upcoming-task-item:hover .upcoming-task-content strong { color: var(--blue); }
.upcoming-task-content strong { display: block; color: var(--navy); }
.upcoming-task-content small { display: block; margin-top: 4px; color: var(--muted); }
.priority-dot { width: 9px; height: 9px; border-radius: 50%; background: #8c98a8; }
.priority-dot.red { background: var(--red); }
.priority-dot.yellow { background: var(--orange); }
.priority-dot.blue { background: var(--blue); }
.priority-dot.gray { background: #8c98a8; }

.task-files-card { border: 1px solid #cfe2fc; border-radius: 13px; padding: 16px; background: #f8fbff; }
.task-files-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.task-files-header h3 { margin: 3px 0 4px; color: var(--navy); }
.task-files-header p { margin: 0; color: var(--muted); font-size: 12px; }
.task-file-list { display: grid; gap: 8px; }
.task-file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 34px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.task-file-icon { width: 39px; height: 39px; border-radius: 9px; display: grid; place-items: center; background: #ffedef; color: var(--red); font-size: 9px; font-weight: 900; }
.task-file-info { min-width: 0; }
.task-file-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 12px; }
.task-file-info small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; }
.task-file-remove { width: 32px; height: 32px; border: 1px solid #f0c5c8; border-radius: 8px; background: #fff2f3; color: var(--red); font-size: 19px; line-height: 1; }
.task-file-empty { padding: 15px; text-align: center; color: var(--muted); border: 1px dashed #bfd2ea; border-radius: 10px; background: rgba(255,255,255,.7); font-size: 12px; }

@media (max-width: 850px) {
  .notification-panel { width: min(420px, 100vw); }
  .dashboard-tasks-panel { grid-column: auto; }
}

@media (max-width: 600px) {
  .notification-button { width: 38px; height: 38px; }
  .notification-panel { width: 100vw; }
  .notification-panel-header { padding: 20px 17px 16px; }
  .notification-toolbar { padding-left: 14px; padding-right: 14px; }
  .notification-list { padding-left: 9px; padding-right: 9px; }
  .task-files-header { display: grid; }
  .task-files-header .button { width: 100%; }
  .task-file-item { grid-template-columns: 38px minmax(0, 1fr) 34px; }
  .task-file-item .action-button { grid-column: 2; justify-self: start; }
  .task-file-remove { grid-column: 3; grid-row: 1; }
}


/* Órdenes de trabajo */
.work-orders-table { min-width: 1120px; }
.work-type-section {
  border: 1px solid #cfe2fc;
  border-radius: 13px;
  padding: 16px;
  background: #f8fbff;
}
.work-type-heading h3,
.work-detail-header h3 { margin: 3px 0 4px; color: var(--navy); }
.work-type-heading p,
.work-detail-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.maintenance-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.work-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.evaluation-type-field { max-width: 360px; margin-bottom: 14px; }
.work-detail-list { display: grid; gap: 10px; }
.work-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.work-detail-row.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208, 47, 58, .09); }
.work-detail-remove {
  width: 38px;
  height: 38px;
  border: 1px solid #f0c5c8;
  border-radius: 9px;
  background: #fff2f3;
  color: var(--red);
  font-size: 22px;
  line-height: 1;
}
.work-detail-remove:hover { background: #ffe5e7; }
.work-detail-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed #bfd2ea;
  border-radius: 10px;
  background: rgba(255,255,255,.7);
}
.work-order-summary-card { margin-bottom: 22px; border: 1px solid #cfe2fc; border-radius: 12px; padding: 16px; background: #f8fbff; }
.work-order-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.work-order-summary-head h3 { margin: 4px 0 0; color: var(--navy); }
.work-order-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-order-summary-grid > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.work-order-summary-grid small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.work-order-summary-grid strong { color: var(--navy); font-size: 12px; line-height: 1.45; }

@media (max-width: 700px) {
  .maintenance-fields { grid-template-columns: 1fr; }
  .work-detail-header { display: grid; }
  .work-detail-header .button { width: 100%; }
  .work-order-summary-grid { grid-template-columns: 1fr; }
}

/* Buscador global, carteras, bitácora y papelera */
.nav-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.nav-link.active .nav-count { border: 2px solid #fff; }

.global-search {
  position: relative;
  flex: 1;
  max-width: 520px;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(13,39,72,.04);
}
.global-search:focus-within { border-color: #9ec5f6; box-shadow: 0 0 0 3px rgba(17,102,216,.09); }
.global-search-icon { color: var(--muted); font-size: 21px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 11px 0; color: var(--ink); background: transparent; }
.global-search-clear { width: 27px; height: 27px; flex: 0 0 27px; border: 0; border-radius: 7px; background: #eef2f6; color: var(--muted); font-size: 18px; line-height: 1; }
.global-search-results {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  max-height: min(520px, 72vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(5,18,34,.2);
}
.global-result-item {
  width: 100%;
  display: grid;
  grid-template-columns: 112px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}
.global-result-item:hover { background: var(--blue-soft); }
.global-result-type { color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.global-result-content { min-width: 0; }
.global-result-content strong, .global-result-content small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-result-content strong { color: var(--navy); font-size: 12px; }
.global-result-content small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.global-result-arrow { color: var(--muted); font-size: 22px; }
.global-search-empty { display: grid; gap: 4px; padding: 24px 15px; text-align: center; color: var(--muted); font-size: 12px; }
.global-search-empty strong { color: var(--navy); }

.seller-client-card {
  border: 1px solid #cfe2fc;
  border-radius: 13px;
  padding: 16px;
  background: #f8fbff;
}
.seller-client-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.seller-client-header h3 { margin: 3px 0 4px; color: var(--navy); }
.seller-client-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.seller-client-search { min-width: 0; max-width: none; margin: 14px 0 10px; }
.seller-client-list { max-height: 310px; overflow-y: auto; display: grid; gap: 7px; padding-right: 3px; }
.seller-client-option {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.seller-client-option:hover { border-color: #aacbf4; }
.seller-client-option.locked { background: #f3f5f7; cursor: not-allowed; opacity: .76; }
.seller-client-option input { width: 17px; height: 17px; accent-color: var(--blue); }
.seller-client-main { min-width: 0; }
.seller-client-main strong, .seller-client-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-client-main strong { color: var(--navy); font-size: 12px; }
.seller-client-main small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.seller-client-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }

.audit-table { min-width: 1120px; }
.audit-change-summary { display: block; max-width: 450px; color: #405066; line-height: 1.45; }
.audit-detail-list { display: grid; gap: 10px; }
.audit-detail-item { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfd; }
.audit-detail-item > strong { display: block; margin-bottom: 9px; color: var(--navy); }
.audit-values { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr); align-items: center; gap: 10px; }
.audit-values > span { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow-wrap: anywhere; font-size: 12px; }
.audit-values small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.audit-values b { text-align: center; color: var(--blue); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }

@media (max-width: 1180px) {
  .topbar > div:first-of-type { min-width: 170px; }
  .topbar p { display: none; }
  .global-search { max-width: none; }
  .local-badge { display: none; }
}

@media (max-width: 900px) {
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .topbar { flex-wrap: wrap; }
  .topbar-actions { margin-left: auto; }
}

@media (max-width: 600px) {
  .global-search { min-width: 100%; }
  .global-result-item { grid-template-columns: 82px minmax(0,1fr) 14px; padding: 9px; }
  .seller-client-header { display: grid; }
  .seller-client-option { grid-template-columns: 20px minmax(0,1fr); }
  .seller-client-option .badge { grid-column: 2; justify-self: start; }
  .audit-values { grid-template-columns: 1fr; }
  .audit-values b { transform: rotate(90deg); }
}

/* Facturación y egresos */
.billing-summary-panel { margin-bottom: 20px; }
.billing-orders-table { min-width: 1180px; }
.billing-movements-table { min-width: 1320px; }
.billing-state { display: inline-flex; align-items: center; gap: 6px; }
.billing-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.billing-money-positive { color: var(--green); font-weight: 850; }
.billing-money-warning { color: var(--yellow); font-weight: 850; }
.billing-money-danger { color: var(--red); font-weight: 850; }
.billing-document-note { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.order-billing-card {
  border: 1px solid #cce5da;
  border-radius: 13px;
  padding: 16px;
  background: #f8fffb;
}
.order-billing-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.order-billing-header h3 { margin: 3px 0 4px; color: var(--navy); }
.order-billing-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.order-billing-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.order-billing-summary > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.order-billing-summary small { display: block; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.order-billing-summary strong { display: block; margin-top: 4px; color: var(--navy); font-size: 14px; }
.order-billing-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.order-billing-list { display: grid; gap: 7px; }
.order-billing-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 11px; }
.order-billing-item-main { min-width: 0; }
.order-billing-item-main strong, .order-billing-item-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-billing-item-main strong { color: var(--navy); }
.order-billing-item-main small { color: var(--muted); margin-top: 2px; }
.order-billing-empty { padding: 13px; border: 1px dashed #bcdccc; border-radius: 9px; color: var(--muted); text-align: center; background: rgba(255,255,255,.7); font-size: 11px; }

.billing-order-context { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; padding: 14px; border: 1px solid #cfe2fc; border-radius: 12px; background: #f8fbff; }
.billing-order-context > div { min-width: 0; padding: 9px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line); }
.billing-order-context small { display: block; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.billing-order-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; color: var(--navy); font-size: 12px; }
.billing-link-banner { padding: 12px 14px; border-radius: 10px; background: #fff8df; color: #765100; border: 1px solid #f1d991; font-size: 12px; line-height: 1.45; }
.billing-files-card { border-color: #d4dfeb; background: #fafcfe; }
.billing-file-open { justify-self: end; }
.billing-status-note { display: block; max-width: 220px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.billing-movements-panel { margin-top: 20px; }

@media (max-width: 1000px) {
  .billing-order-context { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .order-billing-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .order-billing-header { display: grid; }
  .order-billing-header .text-button { justify-self: start; padding-left: 0; }
  .billing-order-context { grid-template-columns: 1fr 1fr; }
  .order-billing-summary { grid-template-columns: 1fr 1fr; }
  .order-billing-item { grid-template-columns: auto minmax(0,1fr); }
  .order-billing-item > :nth-child(n+3) { grid-column: 2; justify-self: start; }
}


/* Dashboard de flota · Municipio de Daule */
.fleet-welcome-card { align-items: stretch; }
.fleet-welcome-card h2 { max-width: 760px; }
.fleet-welcome-stats { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); gap: 10px; align-self: center; }
.fleet-welcome-stats > div { min-width: 112px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.fleet-welcome-stats span { display: block; color: #b9c9dd; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fleet-welcome-stats strong { display: block; margin-top: 4px; color: #fff; font-size: 23px; }

.fleet-dashboard-tabs { display: flex; gap: 8px; margin: 20px 0 16px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(13,39,72,.035); }
.fleet-dashboard-tab { border: 0; border-radius: 8px; padding: 9px 15px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; transition: .16s ease; }
.fleet-dashboard-tab:hover { background: var(--blue-soft); color: var(--blue); }
.fleet-dashboard-tab.active { background: var(--navy); color: #fff; box-shadow: 0 5px 13px rgba(13,39,72,.17); }
.fleet-dashboard-view { display: none; }
.fleet-dashboard-view.active { display: block; animation: pageIn .2s ease; }

.fleet-metric-grid { margin-top: 0; }
.fleet-metric-card { position: relative; overflow: hidden; cursor: pointer; }
.fleet-metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--fleet-accent, var(--blue)); }
.fleet-metric-card:hover { transform: translateY(-2px); border-color: #b9c7d8; }
.fleet-metric-card .metric-icon { background: var(--fleet-soft, var(--blue-soft)); color: var(--fleet-accent, var(--blue)); }
.fleet-metric-card small { color: var(--muted); }

.fleet-status-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fleet-status-card { position: relative; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 14px 14px 13px; text-align: left; transition: .16s ease; overflow: hidden; }
.fleet-status-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--fleet-color); }
.fleet-status-card:hover { transform: translateY(-2px); border-color: #b9c7d8; box-shadow: 0 8px 20px rgba(13,39,72,.07); }
.fleet-status-card span { display: block; min-height: 28px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.fleet-status-card strong { display: block; color: var(--fleet-color); font-size: 25px; line-height: 1; }
.fleet-status-card small { display: block; margin-top: 7px; color: #8491a3; font-size: 10px; }

.fleet-dashboard-grid { display: grid; grid-template-columns: minmax(340px,.8fr) minmax(0,1.2fr); gap: 20px; margin-bottom: 20px; }
.fleet-dashboard-grid-secondary { grid-template-columns: minmax(0,1.55fr) minmax(300px,.65fr); }
.fleet-availability-content { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 18px; padding: 22px; }
.fleet-donut { --fleet-progress: 0%; width: 160px; height: 160px; margin: auto; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--fleet-progress), #e7edf5 var(--fleet-progress) 100%); display: grid; place-items: center; position: relative; }
.fleet-donut::after { content: ""; position: absolute; width: 116px; height: 116px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #edf1f6; }
.fleet-donut > div { position: relative; z-index: 1; text-align: center; }
.fleet-donut strong { display: block; color: var(--navy); font-size: 28px; }
.fleet-donut span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.fleet-availability-breakdown { display: grid; gap: 12px; }
.fleet-breakdown-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.fleet-breakdown-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fleet-color); }
.fleet-breakdown-row strong { color: var(--ink); font-size: 13px; }

.fleet-attention-list { padding: 4px 20px 14px; }
.fleet-attention-item { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1f6; }
.fleet-attention-item:last-child { border-bottom: 0; }
.fleet-attention-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff1f1; color: var(--red); font-weight: 900; }
.fleet-attention-item strong { display: block; font-size: 13px; }
.fleet-attention-item small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.3; }
.fleet-attention-meta { text-align: right; }
.fleet-attention-meta .badge { margin-bottom: 4px; }
.fleet-attention-meta small { white-space: nowrap; }

.fleet-status-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 14px 20px 2px; }
.fleet-status-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.fleet-status-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--fleet-color); }
.fleet-type-status-list { padding: 10px 20px 20px; display: grid; gap: 14px; }
.fleet-type-status-row { display: grid; grid-template-columns: 115px minmax(0,1fr) 30px; gap: 12px; align-items: center; }
.fleet-type-status-row > strong { font-size: 12px; }
.fleet-segment-bar { height: 14px; display: flex; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.fleet-segment { min-width: 0; height: 100%; background: var(--fleet-color); border-right: 1px solid rgba(255,255,255,.7); }
.fleet-type-status-row > span { color: var(--muted); font-size: 11px; text-align: right; }

.fleet-type-summary { padding: 14px 20px 20px; display: grid; gap: 13px; }
.fleet-type-summary-row { display: grid; grid-template-columns: 105px minmax(0,1fr) 28px; gap: 10px; align-items: center; }
.fleet-type-summary-row span { color: var(--muted); font-size: 11px; }
.fleet-type-summary-row strong { font-size: 12px; text-align: right; }
.fleet-type-summary-bar { height: 8px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.fleet-type-summary-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.fleet-detail-panel { overflow: hidden; }
.fleet-detail-actions { display: flex; gap: 8px; }
.fleet-filter-bar { display: grid; grid-template-columns: minmax(260px,1.6fr) repeat(3,minmax(145px,.65fr)) auto; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.fleet-filter-bar .filter-select { min-height: 42px; }
.fleet-search-box { min-width: 0; max-width: none; }
.fleet-search-box input { width: 100%; }
.fleet-attention-toggle { border: 1px solid #f1c6c9; border-radius: 9px; padding: 0 12px; background: #fff7f7; color: var(--red); font-size: 11px; font-weight: 800; white-space: nowrap; }
.fleet-attention-toggle span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%; background: #ffe4e6; }
.fleet-attention-toggle.active { border-color: var(--red); background: var(--red); color: #fff; }
.fleet-attention-toggle.active span { background: rgba(255,255,255,.2); }
.fleet-table-wrap { max-height: 590px; overflow: auto; }
.fleet-table { min-width: 1120px; }
.fleet-table thead th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; }
.fleet-table td { vertical-align: top; }
.fleet-table .fleet-detail-text { max-width: 390px; color: var(--muted); line-height: 1.35; }
.fleet-table .fleet-model { color: var(--muted); font-size: 11px; margin-top: 2px; }
.fleet-state-badge, .fleet-priority-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 8px; background: var(--fleet-soft); color: var(--fleet-color); font-size: 9px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.fleet-state-badge::before, .fleet-priority-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fleet-matrix-panel { margin-top: 20px; overflow: hidden; }
.fleet-count-matrix { overflow-x: auto; padding: 16px 18px 20px; }
.fleet-matrix-grid { display: grid; min-width: 850px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); gap: 1px; }
.fleet-matrix-cell { min-height: 46px; padding: 9px 10px; display: flex; align-items: center; background: #fff; font-size: 11px; }
.fleet-matrix-head { background: #f6f8fb; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.fleet-matrix-type { font-weight: 800; color: var(--navy); }
.fleet-matrix-num { justify-content: center; font-size: 17px; font-weight: 850; color: var(--fleet-color, var(--ink)); }

@media (max-width: 1180px) {
  .fleet-status-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .fleet-dashboard-grid, .fleet-dashboard-grid-secondary { grid-template-columns: 1fr; }
  .fleet-filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fleet-search-box { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .fleet-welcome-stats { width: 100%; grid-template-columns: repeat(3,1fr); }
  .fleet-welcome-stats > div { min-width: 0; padding: 10px; }
  .fleet-welcome-stats strong { font-size: 19px; }
  .fleet-dashboard-tabs { width: 100%; }
  .fleet-dashboard-tab { flex: 1; }
  .fleet-status-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fleet-availability-content { grid-template-columns: 1fr; }
  .fleet-filter-bar { grid-template-columns: 1fr; }
  .fleet-search-box { grid-column: auto; }
  .fleet-detail-actions { width: 100%; }
  .fleet-detail-actions .button { flex: 1; }
  .fleet-type-status-row { grid-template-columns: 92px minmax(0,1fr) 24px; gap: 8px; }
}


/* --- Daule: informe de flota + actualización manual de estado --- */
.fleet-welcome-side { position: relative; z-index: 1; display: grid; gap: 10px; min-width: 360px; }
.fleet-welcome-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.fleet-welcome-actions .button.secondary { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.24); }
.fleet-welcome-actions .button.secondary:hover { background: rgba(255,255,255,.16); }
.fleet-welcome-actions .button.primary { background: var(--orange); box-shadow: 0 7px 16px rgba(243,139,25,.2); }
.fleet-inline-update { margin-top: 5px; padding: 4px 8px; font-size: 10px; }
.fleet-last-update { display: block; color: var(--ink); font-size: 11px; font-weight: 750; white-space: nowrap; }
.fleet-table td > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.fleet-table { min-width: 1430px; }
.fleet-status-modal { width: min(900px, calc(100vw - 32px)); }
.fleet-status-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.fleet-unit-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.fleet-unit-summary > div { min-width: 0; padding: 12px; background: #f8fafd; }
.fleet-unit-summary span { display: block; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.fleet-unit-summary strong { display: block; margin-top: 4px; color: var(--navy); font-size: 12px; overflow-wrap: anywhere; }
.fleet-history-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.fleet-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.fleet-history-heading h3 { margin: 3px 0 0; font-size: 14px; }
.fleet-history-heading > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.fleet-history-list { max-height: 240px; overflow: auto; padding: 4px 16px 10px; }
.fleet-history-item { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 9px; padding: 11px 0; border-bottom: 1px solid #edf1f6; }
.fleet-history-item:last-child { border-bottom: 0; }
.fleet-history-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.fleet-history-item strong { display: block; font-size: 11px; color: var(--navy); }
.fleet-history-item p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.fleet-history-item small { color: #8491a3; font-size: 9px; }
.fleet-history-empty { padding: 18px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 760px) {
  .fleet-welcome-side { min-width: 0; width: 100%; }
  .fleet-welcome-actions { justify-content: stretch; }
  .fleet-welcome-actions .button { flex: 1; }
  .fleet-status-form-grid { grid-template-columns: 1fr; }
  .fleet-unit-summary { grid-template-columns: 1fr 1fr; }
}

/* --- Daule: contexto fijo de cliente y responsable comercial --- */
.sidebar-note strong { color: #fff; font-size: 12px; }
.sidebar-note > span:last-child { display: inline-block; margin-top: 5px; color: #9fb0c6; line-height: 1.35; }
.fixed-context-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #f5f9ff;
}
.fixed-context-card > div { min-width: 0; }
.fixed-context-card span { display: block; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.fixed-context-card strong { display: block; margin-top: 4px; color: var(--navy); font-size: 13px; }
.fixed-context-card small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.fixed-context-card.compact-context { grid-template-columns: minmax(0, 1fr); }
.fixed-context-card.compact-context small { grid-column: auto; }
@media (max-width: 760px) {
  .fixed-context-card { grid-template-columns: 1fr; }
  .fixed-context-card small { grid-column: auto; }
}

/* SIGF Daule v5 · Intervenciones y cotizaciones por origen */
.module-tabs { display:flex; gap:8px; margin:0 0 18px; flex-wrap:wrap; }
.module-tab { border:1px solid var(--line); background:#fff; color:var(--muted); border-radius:10px; padding:10px 16px; font-weight:800; cursor:pointer; }
.module-tab:hover { border-color:#aebdd0; color:var(--navy); }
.module-tab.active { background:var(--navy); border-color:var(--navy); color:#fff; box-shadow:0 7px 16px rgba(13,39,72,.16); }
.quotation-tab-view { display:none; }
.quotation-tab-view.active { display:block; }

.intervention-metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.intervention-metric { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:17px 18px; box-shadow:0 8px 24px rgba(13,39,72,.045); }
.intervention-metric small { color:var(--muted); text-transform:uppercase; letter-spacing:.08em; font-weight:800; font-size:10px; }
.intervention-metric strong { display:block; font-size:27px; margin-top:5px; color:var(--navy); }
.intervention-metric span { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.intervention-pipeline-panel { margin-bottom:16px; }
.intervention-view-switch { display:flex; gap:4px; border:1px solid var(--line); border-radius:10px; padding:3px; background:#f6f8fb; }
.intervention-view-switch .text-button { padding:7px 10px; border-radius:7px; color:var(--muted); }
.intervention-view-switch .text-button.active { background:#fff; color:var(--navy); box-shadow:0 2px 6px rgba(13,39,72,.08); }
.intervention-flow { padding:16px 20px 20px; display:flex; gap:8px; overflow-x:auto; }
.intervention-flow-step { min-width:132px; flex:1 0 132px; position:relative; background:#f8fafc; border:1px solid var(--line); border-radius:12px; padding:11px; }
.intervention-flow-step:not(:last-child)::after { content:'›'; position:absolute; right:-8px; top:50%; transform:translateY(-50%); width:16px; height:16px; border-radius:50%; display:grid; place-items:center; background:#fff; border:1px solid var(--line); color:var(--blue); z-index:2; font-weight:900; }
.intervention-flow-step strong { display:block; color:var(--navy); font-size:12px; line-height:1.25; }
.intervention-flow-step span { display:block; margin-top:5px; color:var(--blue); font-size:19px; font-weight:900; }
.intervention-filter-bar { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.intervention-filter-bar .filter-select { min-width:170px; }
.intervention-table { min-width:1260px; }
.intervention-overdue { color:var(--red); font-weight:800; }
.intervention-due-soon { color:var(--yellow); font-weight:800; }
.intervention-stage-badge { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; white-space:nowrap; background:var(--blue-soft); color:var(--blue); border:1px solid #cfe1fb; }
.intervention-stage-badge.closed { background:#e6f8f0; color:var(--green); border-color:#bcebd9; }
.intervention-stage-badge.waiting { background:#fff6d9; color:var(--yellow); border-color:#f3df9a; }
.intervention-stage-badge.repair { background:#fff1e5; color:#d66f1c; border-color:#f4ccb0; }
.intervention-stage-badge.rejected { background:#fff0f1; color:var(--red); border-color:#f3c6ca; }

.intervention-kanban { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(250px,280px); gap:12px; overflow-x:auto; padding:2px 0 12px; }
.kanban-column { background:#f5f8fc; border:1px solid var(--line); border-radius:14px; min-height:220px; }
.kanban-column-header { padding:12px 13px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:8px; align-items:center; }
.kanban-column-header strong { font-size:12px; color:var(--navy); }
.kanban-count { min-width:24px; height:24px; display:grid; place-items:center; border-radius:999px; background:#fff; border:1px solid var(--line); font-size:11px; font-weight:900; color:var(--blue); }
.kanban-cards { padding:10px; display:grid; gap:9px; }
.kanban-card { background:#fff; border:1px solid var(--line); border-radius:11px; padding:11px; cursor:pointer; box-shadow:0 5px 15px rgba(13,39,72,.04); }
.kanban-card:hover { border-color:#b7c7d9; }
.kanban-card strong { display:block; color:var(--navy); }
.kanban-card small { display:block; color:var(--muted); margin-top:3px; }
.kanban-card-footer { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:9px; }

.intervention-links-card,.intervention-history-card { border:1px solid var(--line); border-radius:13px; padding:14px; background:#f9fbfd; }
.intervention-linked-documents,.intervention-history-list { display:grid; gap:8px; margin-top:10px; }
.intervention-doc-row,.intervention-history-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; background:#fff; border:1px solid #e7edf4; border-radius:10px; padding:10px 12px; }
.intervention-doc-row strong,.intervention-history-row strong { display:block; color:var(--navy); }
.intervention-doc-row small,.intervention-history-row small { display:block; color:var(--muted); margin-top:2px; }
.intervention-doc-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.intervention-history-empty { color:var(--muted); font-size:13px; padding:4px 0; }

.supplier-quote-pdf-badge { display:inline-flex; align-items:center; gap:5px; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; color:var(--red); background:#fff0f1; border:1px solid #f3c6ca; }

@media(max-width:1100px){
  .intervention-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .intervention-metric-grid{grid-template-columns:1fr;}
  .intervention-filter-bar .filter-select{min-width:100%;width:100%;}
  .module-tab{flex:1 1 100%;}
}

/* SIGF Daule v8 · acceso central multiusuario */
.sigf-auth-overlay {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  padding: 24px; overflow: auto; background: rgba(5, 19, 38, .82); backdrop-filter: blur(8px);
}
.sigf-auth-card, .sigf-user-manager-card {
  width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 28px 80px rgba(5, 22, 42, .28); padding: 28px;
}
.sigf-auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.sigf-auth-mark { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--orange); color: #fff; font-size: 26px; font-weight: 900; }
.sigf-auth-brand strong { display: block; color: var(--navy); letter-spacing: .08em; font-size: 18px; }
.sigf-auth-brand span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.sigf-auth-heading h1, .sigf-user-manager-card h2 { margin: 5px 0 8px; color: var(--navy); }
.sigf-auth-heading p, .sigf-user-manager-card header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sigf-auth-form { display: grid; gap: 15px; margin-top: 22px; }
.sigf-auth-form.compact { margin-top: 12px; }
.sigf-auth-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }
.sigf-auth-form input, .sigf-auth-form select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; }
.sigf-auth-form input:focus, .sigf-auth-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17,102,216,.1); }
.sigf-auth-submit { width: 100%; margin-top: 3px; }
.sigf-auth-error { color: var(--red); background: #fff1f2; border: 1px solid #fecdd3; border-radius: 9px; padding: 9px 11px; font-size: 12px; }
.sigf-auth-server { display: block; text-align: center; color: var(--muted); margin-top: 18px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.sigf-user-control { position: relative; }
.sigf-user-button { appearance: none; border: 1px solid var(--line); background: #fff; min-height: 42px; border-radius: 11px; padding: 5px 9px 5px 6px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.sigf-user-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 11px; font-weight: 900; }
.sigf-user-copy { text-align: left; line-height: 1.05; }
.sigf-user-copy strong { display: block; max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sigf-user-copy small { color: var(--muted); font-size: 9px; }
.sigf-user-caret { color: var(--muted); }
.sigf-user-menu { position: absolute; top: calc(100% + 7px); right: 0; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); z-index: 100; }
.sigf-user-menu button { width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 10px; text-align: left; color: var(--ink); font-size: 12px; font-weight: 700; }
.sigf-user-menu button:hover { background: var(--blue-soft); color: var(--blue); }
.sigf-user-manager-overlay { align-items: start; padding-top: 5vh; }
.sigf-user-manager-card { width: min(920px, 100%); }
.sigf-user-manager-card > header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.sigf-user-manager-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 24px; margin-top: 20px; }
.sigf-user-manager-grid h3 { margin: 0 0 12px; color: var(--navy); font-size: 14px; }
.sigf-users-list { display: grid; gap: 8px; }
.sigf-user-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.sigf-user-row-copy strong { display: block; font-size: 12px; }
.sigf-user-row-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.sigf-role-help { margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; color: var(--muted); font-size: 10px; line-height: 1.55; background: #f8fafc; }
@media (max-width: 780px) {
  .sigf-user-copy { display: none; }
  .sigf-user-manager-grid { grid-template-columns: 1fr; }
  .sigf-auth-overlay { padding: 12px; }
  .sigf-auth-card, .sigf-user-manager-card { padding: 20px; border-radius: 16px; }
}

/* SIGF Daule v9 · Analítica, semáforo y ficha 360 */
.analytics-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.analytics-kpi { background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:0 7px 20px rgba(13,39,72,.04); min-width:0; }
.analytics-kpi small,.analytics-kpi span { display:block; color:var(--muted); font-size:10px; }
.analytics-kpi strong { display:block; color:var(--navy); font-size:22px; margin:8px 0 4px; overflow-wrap:anywhere; }
.analytics-grid { display:grid; gap:16px; margin-bottom:16px; }
.analytics-grid-main { grid-template-columns:minmax(0,1.35fr) minmax(320px,.75fr); }
.analytics-grid-secondary { grid-template-columns:repeat(2,minmax(0,1fr)); }
.analytics-panel { min-width:0; overflow:hidden; }
.analytics-period { color:var(--muted); font-size:10px; font-weight:800; }
.analytics-chart { min-height:250px; padding:10px 14px 4px; }
.analytics-chart svg { width:100%; height:250px; display:block; overflow:visible; }
.analytics-grid-line { stroke:#e7edf4; stroke-width:1; }
.analytics-axis-label { fill:#7a8798; font-size:9px; font-family:inherit; }
.analytics-line-path { fill:none; stroke:var(--blue); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.analytics-line-dot { fill:#fff; stroke:var(--blue); stroke-width:3; }
.analytics-bar-chart { min-height:250px; padding:14px 16px 8px; }
.analytics-bars { height:220px; display:flex; gap:7px; align-items:flex-end; }
.analytics-bar-item { flex:1; min-width:0; height:100%; display:grid; grid-template-rows:20px minmax(0,1fr) 28px; align-items:end; text-align:center; }
.analytics-bar-value { font-size:10px; font-weight:900; color:var(--navy); }
.analytics-bar-track { width:min(24px,70%); height:100%; margin:0 auto; background:#edf2f7; border-radius:8px 8px 3px 3px; position:relative; overflow:hidden; }
.analytics-bar-track i { position:absolute; left:0; right:0; bottom:0; border-radius:8px 8px 3px 3px; background:var(--blue); }
.analytics-bar-item span { font-size:8.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stage-time-list,.equipment-cost-list,.recent-activity-list,.analytics-alert-list { display:grid; gap:8px; padding:14px 16px 18px; }
.stage-time-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(90px,.8fr) 48px; align-items:center; gap:10px; }
.stage-time-row strong { display:block; color:var(--navy); font-size:11px; }
.stage-time-row small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.stage-time-row > span { text-align:right; color:var(--navy); font-size:11px; font-weight:900; }
.stage-time-track { height:7px; background:#edf2f7; border-radius:999px; overflow:hidden; }
.stage-time-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),#5b8ee8); }
.equipment-cost-row,.recent-activity-item,.analytics-alert-item,.fleet-360-list-row { width:100%; appearance:none; border:1px solid #e5ebf2; background:#fff; border-radius:10px; padding:10px 11px; text-align:left; color:inherit; }
.equipment-cost-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; cursor:pointer; }
.equipment-cost-row:hover,.recent-activity-item:hover,.fleet-360-list-row:hover { border-color:#b7c7d9; background:#fbfdff; }
.equipment-cost-row strong,.recent-activity-item strong,.fleet-360-list-row strong { color:var(--navy); }
.equipment-cost-row small,.recent-activity-item small,.fleet-360-list-row small { display:block; color:var(--muted); font-size:9px; margin-top:3px; }
.equipment-cost-values { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.equipment-cost-values span { display:grid; gap:2px; color:var(--muted); font-size:8px; text-align:right; }
.equipment-cost-values strong { font-size:10px; color:var(--navy); }
.positive strong,.positive { color:var(--green)!important; }
.negative strong,.negative { color:var(--red)!important; }
.recent-activity-item { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:10px; align-items:center; cursor:pointer; }
.recent-activity-avatar { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:var(--blue-soft); color:var(--blue); font-size:9px; font-weight:900; }
.recent-activity-copy { min-width:0; }
.recent-activity-copy strong,.recent-activity-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.recent-activity-item time { color:var(--muted); font-size:9px; white-space:nowrap; }
.analytics-alert-item { display:grid; grid-template-columns:28px minmax(0,1fr); gap:9px; align-items:start; cursor:pointer; border-left:4px solid #b97b00; }
.analytics-alert-item > span { width:25px; height:25px; display:grid; place-items:center; border-radius:8px; background:#fff6d9; color:#b97b00; font-weight:900; }
.analytics-alert-item strong { display:block; color:var(--navy); font-size:11px; }
.analytics-alert-item small { display:block; color:var(--muted); font-size:9px; line-height:1.35; margin-top:2px; }
.analytics-alert-item.severity-danger { border-left-color:var(--red); background:#fffafa; }
.analytics-alert-item.severity-danger > span { background:#fff0f1; color:var(--red); }
.analytics-empty { color:var(--muted); font-size:11px; padding:8px 2px; }

.intervention-age-badge { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:5px 8px; font-size:9px; font-weight:900; white-space:nowrap; border:1px solid #dfe6ee; background:#fff; }
.intervention-age-badge i { width:7px; height:7px; border-radius:50%; background:#1d8f62; }
.intervention-age-badge.age-watch i { background:#b97b00; }
.intervention-age-badge.age-warning i { background:#d66f1c; }
.intervention-age-badge.age-critical i { background:#c93d45; }
.intervention-age-badge.age-watch { color:#8b6500; background:#fffbeb; border-color:#f3df9d; }
.intervention-age-badge.age-warning { color:#a4510e; background:#fff7ed; border-color:#fed7aa; }
.intervention-age-badge.age-critical { color:#a52d35; background:#fff1f2; border-color:#fecdd3; }
.kanban-card.age-fresh { border-left:4px solid #1d8f62; }
.kanban-card.age-watch { border-left:4px solid #b97b00; }
.kanban-card.age-warning { border-left:4px solid #d66f1c; }
.kanban-card.age-critical { border-left:4px solid #c93d45; }

.fleet-attention-actions { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
.fleet-360-modal { width:min(1120px,96vw); }
.fleet-360-body { display:grid; gap:14px; }
.fleet-360-hero { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:16px; border-radius:14px; background:linear-gradient(135deg,#f7faff,#eef5ff); border:1px solid #dce7f4; }
.fleet-360-identity { display:flex; gap:12px; align-items:center; min-width:0; }
.fleet-360-unit-number { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; background:var(--navy); color:#fff; border-radius:11px; font-size:12px; font-weight:900; }
.fleet-360-identity strong { display:block; color:var(--navy); font-size:18px; }
.fleet-360-identity small { display:block; color:var(--muted); margin-top:4px; line-height:1.35; }
.fleet-360-status { border:1px solid color-mix(in srgb,var(--fleet-color) 35%,#fff); background:var(--fleet-soft); color:var(--fleet-color); border-radius:12px; padding:9px 12px; font-size:10px; font-weight:900; display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.fleet-360-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.fleet-360-kpis > div { border:1px solid var(--line); border-radius:11px; background:#fff; padding:11px 13px; }
.fleet-360-kpis small { display:block; color:var(--muted); font-size:9px; }
.fleet-360-kpis strong { display:block; color:var(--navy); font-size:21px; margin-top:4px; }
.fleet-360-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.fleet-360-card { border:1px solid var(--line); border-radius:13px; padding:14px; background:#fbfcfe; min-width:0; }
.fleet-360-card-head { margin-bottom:10px; }
.fleet-360-card-head h3 { margin:3px 0 0; color:var(--navy); font-size:14px; }
.fleet-360-active > div:first-child strong { display:block; color:var(--navy); }
.fleet-360-active > div:first-child small { display:block; color:var(--muted); margin:3px 0 9px; }
.fleet-360-active dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.fleet-360-active dl div { border:1px solid #e7edf4; background:#fff; border-radius:9px; padding:8px; }
.fleet-360-active dt { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.05em; }
.fleet-360-active dd { margin:3px 0 0; color:var(--ink); font-size:10px; font-weight:700; }
.fleet-360-cost-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.fleet-360-cost-grid > div { background:#fff; border:1px solid #e7edf4; border-radius:9px; padding:9px; }
.fleet-360-cost-grid small { display:block; color:var(--muted); font-size:8px; }
.fleet-360-cost-grid strong { display:block; color:var(--navy); margin-top:4px; font-size:14px; }
.fleet-360-note { margin:10px 0 0; color:var(--muted); font-size:8px; line-height:1.4; }
.fleet-360-list-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; margin-bottom:7px; cursor:pointer; }
.fleet-360-list-row > span { color:var(--blue); font-size:10px; font-weight:900; }
.fleet-360-timeline { display:grid; gap:0; }
.fleet-360-timeline-row { display:grid; grid-template-columns:16px minmax(0,1fr) auto; gap:9px; align-items:start; padding:9px 0; border-bottom:1px solid #edf1f6; }
.fleet-360-timeline-row:last-child { border-bottom:0; }
.fleet-360-timeline-row > i { width:9px; height:9px; border-radius:50%; background:var(--blue); margin-top:5px; box-shadow:0 0 0 4px var(--blue-soft); }
.fleet-360-timeline-row span { display:block; color:var(--blue); font-size:8px; font-weight:900; text-transform:uppercase; }
.fleet-360-timeline-row strong { display:block; color:var(--navy); font-size:10px; margin-top:2px; }
.fleet-360-timeline-row small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.fleet-360-timeline-row time { color:var(--muted); font-size:8px; white-space:nowrap; }

@media(max-width:1180px){
  .analytics-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .analytics-grid-main,.analytics-grid-secondary{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .analytics-kpi-grid{grid-template-columns:1fr 1fr;}
  .stage-time-row{grid-template-columns:minmax(0,1fr) 48px;}
  .stage-time-track{grid-column:1/-1;}
  .equipment-cost-row{grid-template-columns:1fr;}
  .equipment-cost-values{justify-content:flex-start;}
  .fleet-360-grid{grid-template-columns:1fr;}
  .fleet-360-kpis{grid-template-columns:1fr 1fr;}
  .fleet-360-hero{align-items:flex-start;flex-direction:column;}
  .fleet-360-status{justify-content:flex-start;}
}
.intervention-header-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.intervention-age-legend { display:flex; gap:7px; flex-wrap:wrap; align-items:center; }
.intervention-age-legend span { display:inline-flex; align-items:center; gap:4px; color:var(--muted); font-size:8px; font-weight:800; }
.intervention-age-legend i { width:7px; height:7px; border-radius:50%; background:#1d8f62; }
.intervention-age-legend .age-watch i { background:#b97b00; }
.intervention-age-legend .age-warning i { background:#d66f1c; }
.intervention-age-legend .age-critical i { background:#c93d45; }

/* ===== SIGF Daule v12 · Trabajo operativo ===== */
.my-work-panel { margin: 18px 0; }
.my-work-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:18px 22px 0; }
.my-work-kpi { border:1px solid var(--line); border-radius:12px; padding:14px; background:#f9fbfe; }
.my-work-kpi small { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.my-work-kpi strong { display:block; margin-top:6px; font-size:25px; color:var(--navy); }
.my-work-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:18px 22px 22px; }
.my-work-columns section { min-width:0; border-top:1px solid #edf1f6; padding-top:14px; }
.my-work-columns h4 { margin:0 0 10px; font-size:13px; color:var(--navy); }
.my-work-item { width:100%; border:1px solid var(--line); background:#fff; border-radius:10px; padding:10px 11px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; text-align:left; margin-bottom:8px; }
.my-work-item:hover { border-color:#b7c6d9; background:#f9fbfe; }
.my-work-item strong { display:block; font-size:12px; color:var(--ink); }
.my-work-item small { display:block; color:var(--muted); font-size:11px; margin-top:3px; line-height:1.3; }
.my-work-item > span { white-space:nowrap; font-size:10px; font-weight:800; color:var(--muted); }
.my-work-empty { color:var(--muted); font-size:12px; padding:10px 0; }

.intervention-stage-progress { display:flex; align-items:flex-start; gap:0; overflow-x:auto; padding:5px 2px 15px; }
.intervention-progress-step { min-width:112px; flex:1 0 112px; position:relative; text-align:center; padding-top:25px; color:#7b8797; font-size:10px; font-weight:700; line-height:1.15; }
.intervention-progress-step::before { content:""; position:absolute; top:7px; left:50%; width:12px; height:12px; transform:translateX(-50%); border-radius:50%; background:#d8e0ea; border:3px solid #fff; box-shadow:0 0 0 1px #c9d3df; z-index:2; }
.intervention-progress-step::after { content:""; position:absolute; top:12px; left:0; right:0; height:2px; background:#d8e0ea; z-index:1; }
.intervention-progress-step:first-child::after { left:50%; }
.intervention-progress-step:last-child::after { right:50%; }
.intervention-progress-step.done { color:var(--green); }
.intervention-progress-step.done::before, .intervention-progress-step.done::after { background:var(--green); }
.intervention-progress-step.current { color:var(--blue); font-weight:900; }
.intervention-progress-step.current::before { background:var(--blue); box-shadow:0 0 0 4px #dcecff; }
.intervention-progress-step.special { color:var(--red); }
.intervention-progress-step.special::before { background:var(--red); }

.intervention-attachments-card, .intervention-comments-card, .intervention-closure-card { border:1px solid var(--line); border-radius:14px; padding:16px; background:#fbfcfe; }
.intervention-upload-row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:12px 0; }
.intervention-upload-row select { min-width:160px; border:1px solid var(--line); border-radius:9px; padding:9px 10px; background:#fff; }
.intervention-document-list { display:grid; gap:8px; }
.intervention-document-row { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #e3e8ef; background:#fff; border-radius:10px; padding:10px 12px; }
.intervention-document-row strong { display:block; font-size:12px; }
.intervention-document-row small { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.intervention-document-actions { display:flex; gap:6px; flex-wrap:wrap; }
.intervention-comment-compose { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; margin:12px 0; }
.intervention-comment-compose textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:10px 12px; resize:vertical; }
.intervention-comment-list { display:grid; gap:9px; max-height:300px; overflow:auto; }
.intervention-comment { border-left:3px solid var(--blue); background:#fff; border-radius:0 10px 10px 0; padding:10px 12px; }
.intervention-comment-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.intervention-comment-head strong { font-size:12px; }
.intervention-comment-head time { color:var(--muted); font-size:10px; white-space:nowrap; }
.intervention-comment p { margin:6px 0 0; font-size:12px; line-height:1.45; white-space:pre-wrap; }
.mention-token { background:#eaf3ff; color:var(--blue); font-weight:800; border-radius:5px; padding:1px 4px; }
.intervention-closure-card { background:#fff9ed; border-color:#ecd6a8; }
.intervention-closure-grid { margin-top:12px; }

.executive-dialog::backdrop { background:rgba(4,14,28,.82); }
.executive-modal-card { width:min(1500px,96vw); max-width:none; background:#f4f7fb; }
.executive-header { background:linear-gradient(120deg,#0d2748,#173b67); color:#fff; padding:24px 28px; display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.executive-header h2 { margin:4px 0; font-size:30px; }
.executive-header p { margin:0; color:#c7d3e4; }
.executive-body { padding:22px 28px 28px; }
.executive-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.executive-kpi { background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; }
.executive-kpi small { color:var(--muted); display:block; font-size:11px; text-transform:uppercase; }
.executive-kpi strong { display:block; margin-top:8px; font-size:30px; color:var(--navy); }
.executive-layout { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.executive-layout section, .executive-attention { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px; }
.executive-layout h3, .executive-attention h3 { margin:0 0 14px; font-size:15px; }
.executive-status-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.executive-status-card { border-left:5px solid var(--exec-color); background:var(--exec-soft); border-radius:10px; padding:12px 14px; }
.executive-status-card span { display:block; font-size:11px; color:#536276; }
.executive-status-card strong { display:block; margin-top:4px; font-size:23px; color:var(--exec-color); }
.executive-stage-list { display:grid; gap:8px; }
.executive-stage-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; }
.executive-stage-row span { font-size:12px; }
.executive-stage-row strong { font-size:13px; color:var(--navy); }
.executive-stage-bar { grid-column:1/-1; height:6px; background:#edf1f6; border-radius:999px; overflow:hidden; }
.executive-stage-bar i { display:block; height:100%; background:var(--blue); border-radius:inherit; }
.executive-attention { margin-top:18px; }
.executive-attention-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.executive-attention-item { border:1px solid #f0c7cb; border-radius:10px; padding:12px; background:#fff7f8; }
.executive-attention-item strong { display:block; font-size:12px; }
.executive-attention-item small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.executive-hint { color:var(--muted); font-size:11px; margin-right:auto; }

.fleet-360-pdf-summary { font-size:11px; color:var(--muted); }

@media (max-width: 1050px) {
  .my-work-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .my-work-columns { grid-template-columns:1fr; }
  .executive-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .executive-layout { grid-template-columns:1fr; }
  .executive-attention-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 650px) {
  .my-work-kpis, .executive-kpis { grid-template-columns:1fr 1fr; }
  .intervention-comment-compose { grid-template-columns:1fr; }
  .executive-attention-grid, .executive-status-grid { grid-template-columns:1fr; }
}

/* SIGF v13 · permisos y bloqueo de envíos */
.role-hidden { display: none !important; }
form[aria-busy="true"] { cursor: wait; }
form[aria-busy="true"] button[type="submit"] { opacity: .72; cursor: wait; }
.sigf-municipality #fleet-view-analysis { display: none !important; }
.sigf-municipality #myWorkPanel { display: none !important; }
