/* ==========================================================================
   @horizon/core · hz.css
   The shared design system of Horizon. Taken from the instance mockups
   (co-* kit) without the domain-specific pieces, which stay in each
   instance. Every co-* class a module uses must come from here.
   Vendor CSS (Bootstrap Icons) is loaded before this file by the shell.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../vendor/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../vendor/inter/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --co-primary: #1D4ED8; --co-primary-600: #1E40AF; --co-primary-100: #DBEAFE; --co-primary-50: #EFF6FF;
  --co-accent: #047857; --co-accent-600: #065F46; --co-accent-50: #ECFDF5;
  --co-success: #10B981; --co-warning: #F59E0B; --co-danger: #EF4444; --co-info: #0EA5E9; --co-violet: #7C3AED;
  --co-bg: #F6F8FB; --co-surface: #FFFFFF; --co-border: #E5E7EB; --co-text: #0F172A;
  --co-muted: #64748B; --co-subtle: #F1F5F9;
  --co-radius: 10px; --co-radius-sm: 6px;
  --co-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --co-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  --co-shadow-lg: 0 12px 32px rgba(15, 23, 42, .10);
  --co-sidebar-w: 292px; --co-sidebar-w-collapsed: 72px; --co-topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--co-bg);
  color: var(--co-text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--co-primary); text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.co-app { display: flex; min-height: 100vh; }
.co-sidebar {
  width: var(--co-sidebar-w); flex: 0 0 var(--co-sidebar-w); background: var(--co-surface);
  border-right: 1px solid var(--co-border); position: fixed; inset: 0 auto 0 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; z-index: 30; transition: width .18s, flex-basis .18s;
}
.co-main { margin-left: var(--co-sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; transition: margin-left .18s; }
body.co-collapsed .co-sidebar { width: var(--co-sidebar-w-collapsed); flex-basis: var(--co-sidebar-w-collapsed); }
body.co-collapsed .co-main { margin-left: var(--co-sidebar-w-collapsed); }
body.co-collapsed .co-nav span, body.co-collapsed .co-nav-section-title .st-label,
body.co-collapsed .co-brand-text, body.co-collapsed .co-user-meta,
body.co-collapsed .co-nav a .co-tag, body.co-collapsed .co-nav-section-title .caret { display: none; }
body.co-collapsed .co-brand { justify-content: center; }

/* ---------- Brand ---------- */
.co-brand {
  display: flex; align-items: center; gap: 10px; height: var(--co-topbar-h); padding: 0 20px;
  border-bottom: 1px solid var(--co-border); flex: 0 0 auto; color: var(--co-text);
}
.co-brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px; background: var(--co-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.co-brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.co-brand-text .b-name { font-weight: 800; font-size: 17px; letter-spacing: -.4px; }
.co-brand-text .b-sub {
  font-size: 9px; letter-spacing: 1.4px; color: var(--co-muted); font-weight: 600; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Navigation ---------- */
.co-nav { padding: 12px 12px 24px; flex: 1 1 auto; }
.co-nav-section-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--co-muted); padding: 16px 12px 6px; display: flex; align-items: center; gap: 7px; width: 100%; background: none;
  border: 0; font-family: inherit; cursor: pointer; text-align: left;
}
.co-nav-section-title:hover { color: var(--co-text); }
.co-nav-section-title .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.co-nav-section-title .caret { margin-left: auto; font-size: 11px; color: var(--co-muted); transition: transform .15s; }
.co-nav-sec.is-collapsed .caret { transform: rotate(-90deg); }
.co-nav-sec.is-collapsed .co-nav-group { display: none; }
.co-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: var(--co-radius-sm);
  color: #334155; font-weight: 500; position: relative; transition: background .12s, color .12s; white-space: nowrap; overflow: hidden;
}
.co-nav a i { font-size: 17px; width: 20px; text-align: center; flex: 0 0 20px; color: var(--co-muted); }
.co-nav a span { overflow: hidden; text-overflow: ellipsis; }
.co-nav a:hover { background: var(--co-subtle); color: var(--co-text); }
.co-nav a.is-active { background: var(--co-primary-50); color: var(--co-primary-600); font-weight: 600; }
.co-nav a.is-active i { color: var(--co-primary); }
.co-nav a.is-active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--co-primary);
}
.co-nav a .co-tag {
  margin-left: auto; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  padding: 2px 6px; border-radius: 20px; background: var(--co-accent-50); color: var(--co-accent-600); flex: 0 0 auto;
}
.co-nav-empty { padding: 16px 12px; color: var(--co-muted); font-size: 13px; }

/* ---------- User ---------- */
.co-user { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--co-border); flex: 0 0 auto; }
.co-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; background: var(--co-accent); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.co-user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.co-user-meta .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-user-meta .rl { font-size: 11px; color: var(--co-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Topbar ---------- */
.co-topbar {
  height: var(--co-topbar-h); background: var(--co-surface); border-bottom: 1px solid var(--co-border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.co-icon-btn {
  width: 38px; height: 38px; border-radius: var(--co-radius-sm); border: 1px solid transparent; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: #475569; cursor: pointer; font-size: 18px;
  transition: background .12s; position: relative;
}
.co-icon-btn:hover { background: var(--co-subtle); }
.co-topbar-title { font-weight: 600; font-size: 14px; color: var(--co-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-topbar-spacer { flex: 1; }
.co-badge-count {
  position: absolute; top: 4px; right: 4px; background: var(--co-danger); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* Dropdown menu of the topbar (no Bootstrap needed). */
.hz-menu { position: relative; }
.hz-bell { position: relative; }
.hz-bell-badge {
  position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--co-danger, #DC2626); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
.hz-notif { padding: 12px 0; border-bottom: 1px solid var(--co-border); }
.hz-notif:last-of-type { border-bottom: 0; }
.hz-notif-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hz-notif-title { font-weight: 600; color: inherit; text-decoration: none; }
.hz-notif-open { display: inline; margin: 0; }
button.hz-notif-title { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
button.hz-notif-title:hover { text-decoration: underline; }

/* Administración */
.hz-admin-user { grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.hz-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; }
.hz-check.is-locked { color: var(--co-muted); }
.hz-roles { border: 0; padding: 0; }
.hz-roles legend { font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.hz-inline-form { display: inline-block; margin: 6px 6px 0 0; }
.hz-center { text-align: center; }
.hz-muted { color: var(--co-muted); }
.hz-roles-matrix { margin-bottom: 18px; }
.hz-job { margin-bottom: 18px; }
.hz-comment-list { list-style: none; margin: 0 0 14px; padding: 0; }
.hz-comment { padding: 10px 0; border-bottom: 1px solid var(--co-border); }
.hz-comment-meta { font-size: 12.5px; color: var(--co-muted); margin-bottom: 4px; }
.hz-comment-body { white-space: pre-line; overflow-wrap: anywhere; }
.hz-comment-delete { margin-top: 6px; }
.hz-comment-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.hz-comment-form textarea { width: 100%; resize: vertical; }
.hz-comment-note { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--co-subtle); color: var(--co-muted); font-size: 12.5px; }
.hz-comment-form .co-btn { margin-top: 6px; }
.hz-job.is-alert { border-color: var(--co-danger, #b91c1c); }
.hz-job .hz-field-hint { padding: 0 16px; }
.hz-settings { margin-bottom: 18px; }
.hz-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--co-border); }
.hz-setting:last-child { border-bottom: 0; }
.hz-setting label { flex: 1 1 260px; font-size: 13.5px; font-weight: 600; color: #334155; }
.hz-setting .co-input { width: auto; min-width: 160px; }
.hz-setting .hz-field-error { flex-basis: 100%; }
.hz-temp-password { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; letter-spacing: .5px; }
.hz-notif.is-unread .hz-notif-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--co-primary); margin-right: 8px; }
.hz-notif-date { font-size: 12px; color: var(--co-muted); white-space: nowrap; }
.hz-notif-body { margin-top: 4px; font-size: 13.5px; white-space: pre-line; }
.hz-audit-changes { margin-top: 8px; font-size: 13px; }
.hz-import-form { display: grid; gap: 14px; max-width: 520px; }
.hz-import-field { display: grid; gap: 6px; }
.hz-import-field label { font-weight: 600; font-size: 13.5px; }
.hz-import-hint, .hz-import-busy { font-size: 12.5px; color: var(--co-muted); }
.hz-import-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.hz-import-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.hz-import-skipped { margin-top: 10px; }
.hz-import-skipped summary { cursor: pointer; font-size: 13px; color: var(--co-primary); }
.hz-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--co-surface);
  border: 1px solid var(--co-border); border-radius: var(--co-radius); box-shadow: var(--co-shadow-lg);
  padding: 6px; z-index: 40;
}
.hz-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--co-border); margin-bottom: 6px; }
.hz-menu-head .nm { font-weight: 600; }
.hz-menu-head .em { font-size: 12px; color: var(--co-muted); word-break: break-all; }
.hz-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--co-radius-sm); color: var(--co-text); font: inherit; text-align: left; cursor: pointer;
}
.hz-menu-item:hover { background: var(--co-subtle); }
.hz-menu-item i { color: var(--co-muted); }

/* ---------- Content ---------- */
.co-content { padding: 26px 30px 90px; max-width: 1520px; width: 100%; }
.co-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.co-breadcrumb { font-size: 12.5px; color: var(--co-muted); margin-bottom: 6px; }
.co-breadcrumb .sep { margin: 0 6px; opacity: .6; }
.co-page-title { font-size: 27px; font-weight: 800; letter-spacing: -.6px; margin: 0; }
.co-page-sub { color: var(--co-muted); margin: 6px 0 0; font-size: 14.5px; max-width: 880px; }

/* ---------- Buttons ---------- */
.co-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 13.5px; padding: 9px 16px; border-radius: var(--co-radius-sm); transition: .12s; white-space: nowrap;
  text-decoration: none;
}
.co-btn i { font-size: 15px; }
.co-btn:disabled { opacity: .55; cursor: not-allowed; }
.co-btn-primary { background: var(--co-primary); color: #fff; }
.co-btn-primary:hover { background: var(--co-primary-600); }
.co-btn-accent { background: var(--co-accent); color: #fff; }
.co-btn-accent:hover { background: var(--co-accent-600); }
.co-btn-danger { background: var(--co-danger); color: #fff; }
.co-btn-danger:hover { background: #DC2626; }
.co-btn-ghost { background: var(--co-surface); border-color: var(--co-border); color: var(--co-text); }
.co-btn-ghost:hover { background: var(--co-subtle); }
.co-btn-sm { padding: 6px 11px; font-size: 12.5px; }
.co-btn-block { width: 100%; justify-content: center; }

/* ---------- Cards ---------- */
.co-card {
  background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--co-radius);
  box-shadow: var(--co-shadow-sm); margin-bottom: 22px; overflow: hidden;
}
.co-card-head { padding: 16px 20px; border-bottom: 1px solid var(--co-border); }
.co-card-head.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.co-card-title { font-weight: 700; font-size: 15.5px; margin: 0; }
.co-card-sub { color: var(--co-muted); font-size: 13px; margin: 3px 0 0; }
.co-card-body { padding: 20px; }
.co-card-body.flush { padding: 0; }

/* ---------- Grid ---------- */
.co-grid { display: grid; gap: 18px; }
/* Without this, a child with long text pushes the grid out of its container. */
.co-grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two > * { min-width: 0; }
@media (max-width: 1200px) { .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) {
  .co-page-head { flex-wrap: wrap; row-gap: 12px; }
  .co-page-head select.co-input { max-width: 100%; }
}
@media (max-width: 900px) { .co-grid, .two { grid-template-columns: 1fr !important; } }

/* ---------- Stat ---------- */
.co-stat {
  background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--co-radius);
  padding: 18px 20px; box-shadow: var(--co-shadow-sm); position: relative; overflow: hidden;
}
.co-stat .ic { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.co-stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.co-stat .l { color: var(--co-muted); font-size: 13px; margin-top: 5px; }
.co-stat .d { font-size: 12px; font-weight: 600; margin-top: 9px; display: inline-flex; align-items: center; gap: 4px; }
.co-stat .d.up { color: var(--co-success); }
.co-stat .d.down { color: var(--co-danger); }
.co-stat .d.warn { color: var(--co-warning); }
.tint-blue { background: var(--co-primary-50); color: var(--co-primary); }
.tint-green { background: var(--co-accent-50); color: var(--co-accent); }
.tint-amber { background: #FEF3C7; color: #B45309; }
.tint-red { background: #FEE2E2; color: #DC2626; }
.tint-cyan { background: #E0F2FE; color: #0284C7; }
.tint-violet { background: #EDE9FE; color: #6D28D9; }
.tint-slate { background: #F1F5F9; color: #475569; }

/* ---------- Tables ---------- */
.co-table-wrap { overflow-x: auto; }
.co-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.co-table thead th {
  background: #F8FAFC; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--co-muted); padding: 13px 16px; border-bottom: 1px solid var(--co-border); white-space: nowrap;
}
.co-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--co-border); vertical-align: middle; }
.co-table tbody tr:nth-child(even) { background: #FBFCFE; }
.co-table tbody tr:hover { background: var(--co-primary-50); }
.co-table .lnk { color: var(--co-primary); font-weight: 600; cursor: pointer; }
.co-table .lnk:hover { text-decoration: underline; }

/* ---------- Badges ---------- */
.co-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.co-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.co-badge.no-dot::before { display: none; }
.bdg-green { background: var(--co-accent-50); color: var(--co-accent-600); }
.bdg-amber { background: #FEF3C7; color: #B45309; }
.bdg-red { background: #FEE2E2; color: #DC2626; }
.bdg-blue { background: var(--co-primary-50); color: var(--co-primary-600); }
.bdg-cyan { background: #E0F2FE; color: #0369A1; }
.bdg-violet { background: #EDE9FE; color: #6D28D9; }
.bdg-slate { background: var(--co-subtle); color: #475569; }

/* ---------- Progress ---------- */
.co-progress { height: 7px; border-radius: 5px; background: var(--co-subtle); overflow: hidden; min-width: 70px; }
.co-progress span { display: block; height: 100%; border-radius: 5px; background: var(--co-primary); }
.co-progress.green span { background: var(--co-success); }
.co-progress.amber span { background: var(--co-warning); }
.co-progress.red span { background: var(--co-danger); }
.co-progress.violet span { background: var(--co-violet); }

/* ---------- Tabs, lists, timeline ---------- */
.co-pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.co-pill-tabs button {
  border: 1px solid var(--co-border); background: #fff; border-radius: 30px; padding: 8px 16px; font-size: 13px;
  font-weight: 600; cursor: pointer; color: #475569; font-family: inherit; transition: .12s; display: inline-flex; align-items: center; gap: 7px;
}
.co-pill-tabs button:hover { background: var(--co-subtle); }
.co-pill-tabs button.active { background: var(--co-primary); border-color: var(--co-primary); color: #fff; }
.text-muted { color: var(--co-muted) !important; }
.co-dl { display: grid; grid-template-columns: 160px 1fr; gap: 9px 18px; margin: 0; font-size: 13.5px; }
.co-dl dt { color: var(--co-muted); font-weight: 600; }
.co-dl dd { margin: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #EEF2F6; font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: #475569; }
.kv b { text-align: right; }
.co-alert-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--co-border); }
.co-alert-item:last-child { border-bottom: 0; }
.co-alert-item .ai-ic { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.co-alert-item .ai-body { flex: 1; min-width: 0; }
.co-alert-item .ai-title { font-weight: 600; font-size: 13.5px; }
.co-alert-item .ai-meta { font-size: 12px; color: var(--co-muted); margin-top: 2px; }
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--co-border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--co-primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--co-primary-100);
}
.tl-item.done::before { background: var(--co-success); box-shadow: 0 0 0 2px var(--co-accent-50); }
.tl-item.next::before { background: var(--co-warning); box-shadow: 0 0 0 2px #FEF3C7; }
.tl-item .t { font-weight: 700; font-size: 13.5px; }
.tl-item .d { font-size: 12px; color: var(--co-muted); margin-top: 2px; }
.tl-h { display: grid; grid-auto-flow: column; gap: 0; align-items: stretch; overflow-x: auto; padding-bottom: 6px; }
.tl-h .st { min-width: 150px; border-top: 3px solid var(--co-border); padding: 12px 14px 0; font-size: 12.5px; }
.tl-h .st.done { border-top-color: var(--co-success); }
.tl-h .st.now { border-top-color: var(--co-warning); }
.tl-h .st .t { font-weight: 700; font-size: 13px; }
.tl-h .st .d { color: var(--co-muted); margin-top: 3px; }
.vacio { padding: 34px 20px; text-align: center; color: var(--co-muted); font-size: 13.5px; }

/* ---------- Notes ---------- */
.note { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 9px; padding: 13px 16px; font-size: 13px; color: #92400E; display: flex; gap: 10px; margin-bottom: 16px; }
.note.info { background: var(--co-primary-50); border-color: var(--co-primary-100); color: #1E3A8A; }
.note.ok { background: var(--co-accent-50); border-color: #A7F3D0; color: #065F46; }
.note.danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.note.violet { background: #F5F3FF; border-color: #DDD6FE; color: #5B21B6; }
.note i { font-size: 16px; flex: 0 0 auto; margin-top: 1px; }
.note b { font-weight: 700; }

/* ---------- Forms ---------- */
.co-input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--co-border); border-radius: 7px;
  font-family: inherit; font-size: 14px; background: #fff; color: var(--co-text);
}
.co-input:focus { outline: 2px solid var(--co-primary-100); border-color: var(--co-primary); }
.co-input.is-invalid { border-color: var(--co-danger); }
.fl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.fl select { border: 1px solid #CBD5E1; border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #fff; }
.frm label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin: 10px 0 4px; }
.frm input, .frm select, .frm textarea { width: 100%; border: 1px solid #CBD5E1; border-radius: 8px; padding: 7px 10px; font-size: 13.5px; box-sizing: border-box; font-family: inherit; }
.hz-field { margin-bottom: 14px; }
.hz-field label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.hz-field-error { color: #B91C1C; font-size: 12.5px; margin-top: 4px; }
.hz-field-hint { color: var(--co-muted); font-size: 12px; margin-top: 4px; }

/* ---------- Modal and toasts (HZ.modal, HZ.toast) ---------- */
.co-modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.co-modal { background: #fff; border-radius: 12px; width: min(780px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--co-shadow-lg); }
.co-modal.is-sm { width: min(460px, 100%); }
.co-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--co-border); display: flex; align-items: center; justify-content: space-between; }
.co-modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.co-x { border: 0; background: none; font-size: 17px; color: var(--co-muted); cursor: pointer; }
.co-modal-body { padding: 22px; overflow-y: auto; }
.co-modal-foot { padding: 14px 22px; border-top: 1px solid var(--co-border); display: flex; gap: 10px; justify-content: flex-end; }
#co-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.co-toast {
  background: #0F172A; color: #fff; border-radius: 9px; padding: 12px 16px; font-size: 13.5px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--co-shadow-lg); animation: hz-toast-in .2s ease-out; max-width: 420px;
}
.co-toast.ok { background: #065F46; }
.co-toast.error { background: #991B1B; }
.co-toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes hz-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.leaflet-container { font-family: inherit; }

/* ---------- Sign-in pages (login, company, error without a session) ---------- */
.hz-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.hz-auth-card {
  width: min(420px, 100%); background: var(--co-surface); border: 1px solid var(--co-border);
  border-radius: 14px; box-shadow: var(--co-shadow); padding: 30px 30px 26px;
}
.hz-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.hz-auth h1 { font-size: 21px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 6px; }
.hz-auth p.sub { color: var(--co-muted); margin: 0 0 20px; }
.hz-auth-foot { margin-top: 18px; font-size: 12px; color: var(--co-muted); text-align: center; }
.hz-choice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hz-choice label {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--co-border);
  border-radius: var(--co-radius-sm); cursor: pointer; font-weight: 600;
}
.hz-choice label:hover { background: var(--co-subtle); }
.hz-choice input { accent-color: var(--co-primary); }

/* ---------- Phone: the sidebar becomes a drawer ---------- */
@media (max-width: 760px) {
  .co-sidebar, body.co-collapsed .co-sidebar {
    width: var(--co-sidebar-w); flex-basis: auto; transform: translateX(-100%); transition: transform .18s; z-index: 60;
  }
  body.co-mnav .co-sidebar { transform: none; box-shadow: 0 0 40px rgba(15, 23, 42, .35); }
  body.co-mnav::after { content: ''; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 59; }
  .co-main, body.co-collapsed .co-main { margin-left: 0; }
  .co-topbar { height: auto; min-height: 56px; padding: 8px 12px; gap: 8px; }
  .co-content { padding: 16px 14px 60px; }
  .co-page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  select.co-input { min-width: 0 !important; max-width: 100%; }
  .tl-h { grid-auto-flow: row; }
}
