/* InfoTech Docs — Design tokens + base */
:root {
  /* Brand */
  --brand-navy: #1E3A5F;
  --brand-navy-deep: #14274A;
  --brand-red: #C8253A;
  --brand-blue: #1976D2;
  --brand-blue-soft: #E8F1FB;

  /* Neutrals */
  --bg: #F5F6F8;
  --bg-elev: #FFFFFF;
  --bg-subtle: #FAFBFC;
  --border: #E4E7EC;
  --border-strong: #CFD4DB;
  --text: #1B2230;
  --text-2: #4A5568;
  --text-3: #768192;
  --text-disabled: #A6AEBC;

  /* Status */
  --success: #1F8A52;
  --success-bg: #E6F5EC;
  --warning: #B96B0E;
  --warning-bg: #FCF1E0;
  --danger: #B42318;
  --danger-bg: #FCE9E7;
  --info: #1A6FB0;
  --info-bg: #E6F1F9;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;

  /* Radius */
  --r-1: 4px; --r-2: 6px; --r-3: 8px; --r-4: 12px; --r-5: 16px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 2px 6px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --sh-3: 0 8px 20px rgba(16,24,40,.08), 0 2px 6px rgba(16,24,40,.04);
  --sh-4: 0 16px 40px rgba(16,24,40,.12);

  /* Type */
  --ff-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ff-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: var(--text); }
.mono { font-family: var(--ff-mono); font-feature-settings: "tnum"; }

/* App shell */
.app { display: grid; grid-template-columns: 248px 1fr; grid-template-rows: 56px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-4);
  padding: 0 var(--s-5); background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top:0; z-index: 30;}
.brand { display: flex; align-items: center; gap: var(--s-3); width: 220px; }
.brand img { height: 28px; width: auto; }
.brand .title { font-weight: 700; color: var(--brand-navy); letter-spacing: .2px; }
.brand .subtitle { font-size: 11px; color: var(--text-3); margin-top: -2px; }

.search-bar { flex: 1; max-width: 640px; display: flex; align-items: center; gap: var(--s-2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-3); padding: 6px 12px;
  color: var(--text-3); cursor: pointer; transition: border-color .15s; }
.search-bar:hover { border-color: var(--border-strong); }
.search-bar .kbd { margin-left: auto; font-size: 11px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-elev); color: var(--text-3); font-family: var(--ff-mono); }

.topbar-right { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-2); background: transparent; border: 1px solid transparent; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--bg); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--brand-red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; display:flex; align-items:center; justify-content:center; }

.user-chip { display: flex; align-items: center; gap: var(--s-2); padding: 4px 8px; border-radius: var(--r-3); cursor: pointer; }
.user-chip:hover { background: var(--bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.user-chip .meta { line-height: 1.1; }
.user-chip .name { font-weight: 600; font-size: 13px; }
.user-chip .role { font-size: 11px; color: var(--text-3); }

/* Sidebar */
.sidebar { background: var(--bg-elev); border-right: 1px solid var(--border); padding: var(--s-4) var(--s-3);
  overflow-y: auto; height: calc(100vh - 56px); position: sticky; top: 56px; }
.nav-group { margin-bottom: var(--s-5); }
.nav-group .label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3);
  padding: 0 var(--s-3); margin-bottom: var(--s-2); }
.nav-item { display: flex; align-items: center; gap: var(--s-3); padding: 8px 12px; border-radius: var(--r-2);
  color: var(--text); cursor: pointer; font-size: 13.5px; position: relative; user-select: none; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--brand-blue-soft); color: var(--brand-navy); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  background: var(--brand-navy); border-radius: 2px; }
.nav-item .badge { margin-left: auto; background: var(--bg); color: var(--text-2); font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 8px; min-width: 20px; text-align: center; }
.nav-item.active .badge { background: var(--brand-navy); color: #fff; }
.nav-item .soon { margin-left: auto; font-size: 10px; color: var(--warning); background: var(--warning-bg);
  padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.nav-children { padding-left: 24px; margin-top: 2px; }
.nav-child { display: flex; align-items: center; gap: var(--s-2); padding: 6px 12px; border-radius: var(--r-2);
  color: var(--text-2); cursor: pointer; font-size: 13px; }
.nav-child:hover { background: var(--bg); color: var(--text); }
.nav-child.active { color: var(--brand-navy); font-weight: 600; background: var(--bg); }
.nav-child .badge { margin-left: auto; background: var(--bg); color: var(--text-2); font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 8px; }

/* Content */
.main { padding: var(--s-5) var(--s-6); min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px 0; color: var(--text); letter-spacing: -.2px; }
.page-head .crumb { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.page-head .actions { display: flex; gap: var(--s-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-2);
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text); font-weight: 500;
  font-size: 13px; transition: all .15s; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.btn.primary:hover { background: var(--brand-navy-deep); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.lg { padding: 10px 18px; font-size: 14px; }

/* Cards */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-3); }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-body { padding: 16px 18px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-bottom: var(--s-5); }
.kpi { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-3); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.kpi .val { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1; }
.kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.kpi .ic { position: absolute; top: 14px; right: 14px; opacity: .25; color: var(--brand-navy); }
.kpi.soon { background: linear-gradient(180deg, #fff 0%, #FAFBFC 100%); }
.kpi.soon::after { content: "Скоро"; position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700;
  color: var(--warning); background: var(--warning-bg); padding: 2px 8px; border-radius: 10px; }

/* Tables */
.table-wrap { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-3); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 10px 14px;
  background: var(--bg-subtle); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--bg-subtle); cursor: pointer; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
  border-top: 1px solid var(--border); background: var(--bg-subtle); font-size: 12px; color: var(--text-3); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600;
  border-radius: 10px; line-height: 16px; }
.badge.gray { background: var(--bg); color: var(--text-2); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.navy { background: #E6EAF2; color: var(--brand-navy); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--s-4); }
.tab { padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent;
  cursor: pointer; user-select: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-navy); border-bottom-color: var(--brand-navy); font-weight: 600; }
.tab .count { font-weight: 500; color: var(--text-3); margin-left: 4px; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 12px 14px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-3); margin-bottom: var(--s-4); align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > .lbl { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.input, .select, .textarea { background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--r-2);
  padding: 7px 10px; font-size: 13px; outline: none; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(25,118,210,.15); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.input.search { padding-left: 32px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23768192' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat; background-position: 10px center; }

/* Stepper */
.stepper { display: flex; align-items: stretch; gap: 0; padding: 8px 4px 4px; }
.step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 0 8px; position: relative; text-align: center; }
.step + .step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; background: var(--border-strong); z-index: 0; }
.step .head { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; position: relative; z-index: 1; }
.step .circle { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--text-3); border: 2px solid var(--border-strong); font-weight: 700; font-size: 13px; flex: none; }
.step.done .circle { background: var(--success); color: #fff; border-color: var(--success); }
.step.current .circle { background: #fff; color: var(--brand-blue); border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(25,118,210,.15); }
.step.rejected .circle { background: var(--danger); color: #fff; border-color: var(--danger); }
.step.done + .step::before, .step.current + .step::before { background: var(--success); }
.step .info { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; }
.step .role { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .3px; }
.step .who { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .ts { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.step.pending .who { color: var(--text-3); font-weight: 500; }
.step.current .who { color: var(--brand-navy); }

.mini-steps { display: inline-flex; align-items: center; gap: 4px; }
.mini-steps .dot { width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff; background: var(--border-strong); }
.mini-steps .dot.done { background: var(--success); }
.mini-steps .dot.cur { background: var(--brand-blue); box-shadow: 0 0 0 2px rgba(25,118,210,.2); }
.mini-steps .dot.rej { background: var(--danger); }

/* Misc */
.divider { height: 1px; background: var(--border); margin: var(--s-4) 0; }
.row { display: flex; gap: var(--s-3); align-items: center; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--s-3); }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.h-scroll { overflow-x: auto; }

/* Tag chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 11px; font-weight: 500;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text-2); }

/* Soon banner */
.soon-banner { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; background: linear-gradient(90deg, #FCF1E0 0%, #FFFAF0 100%);
  border: 1px solid #F3D9A6; border-radius: var(--r-3); margin-bottom: var(--s-5); }
.soon-banner .ic { width: 40px; height: 40px; border-radius: var(--r-2); background: var(--warning); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none; font-size: 18px; }
.soon-banner h3 { margin: 0 0 2px 0; color: var(--warning); font-size: 14px; }
.soon-banner p { margin: 0; color: var(--text-2); font-size: 13px; }

/* Login */
.login-shell { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(circle at 20% 0%, #E6EEF8 0%, transparent 50%),
  radial-gradient(circle at 100% 100%, #F4E6E8 0%, transparent 40%),
  var(--bg); padding: var(--s-5); }
.login-card { width: 420px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-4);
  box-shadow: var(--sh-3); padding: 32px 32px 28px; }
.login-card .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card .logo img { height: 36px; }
.login-card h2 { margin: 0 0 4px 0; font-size: 20px; }
.login-card p.muted { margin: 0 0 22px 0; }
.field-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row label { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* Chat widget */
.chat-fab { position: fixed; bottom: 88px; right: 24px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand-navy); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-3); cursor: pointer; border: none; z-index: 50; transition: transform .15s; }
.chat-fab:hover { transform: scale(1.05); background: var(--brand-navy-deep); }
.chat-panel { position: fixed; bottom: 88px; right: 24px; width: 400px; height: 600px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-4); box-shadow: var(--sh-4); z-index: 60;
  display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 14px 16px; background: var(--brand-navy); color: #fff; display: flex; align-items: center; gap: 10px; }
.chat-head .ctx { font-size: 11px; opacity: .7; margin-top: 2px; }
.chat-body { flex: 1; padding: 14px; overflow-y: auto; background: var(--bg-subtle); display: flex; flex-direction: column; gap: 10px;}
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.bubble.user { background: var(--brand-blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.bot .open-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 10px;
  background: var(--brand-blue-soft); color: var(--brand-navy); border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--bg-elev); }
.chat-suggest .chip { cursor: pointer; }
.chat-suggest .chip:hover { background: var(--brand-blue-soft); border-color: var(--brand-blue-soft); color: var(--brand-navy); }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--bg-elev); }
.chat-input input { flex: 1; border: 1px solid var(--border-strong); border-radius: 18px; padding: 8px 14px; font-size: 13px; outline: none; }
.chat-input input:focus { border-color: var(--brand-blue); }
.chat-send { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-blue); color: #fff;
  border: none; display: flex; align-items: center; justify-content: center; }

/* Search modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(20, 27, 45, .45); backdrop-filter: blur(2px); z-index: 70;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 96px; }
.search-modal { width: min(720px, 90vw); background: var(--bg-elev); border-radius: var(--r-4); box-shadow: var(--sh-4); overflow: hidden; }
.search-modal .head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-modal input { flex: 1; border: none; outline: none; font-size: 15px; padding: 4px; }
.search-modal .body { max-height: 60vh; overflow-y: auto; padding: 8px 0; }
.sg-group { padding: 8px 0; }
.sg-group .sg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-3); padding: 0 16px; margin-bottom: 4px; letter-spacing: .6px; }
.sg-item { display: flex; gap: 10px; padding: 8px 16px; align-items: center; cursor: pointer; }
.sg-item:hover { background: var(--bg-subtle); }
.sg-item .sg-ic { width: 28px; height: 28px; border-radius: var(--r-2); background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 13px; }
.sg-item .sg-meta { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* Notification popover */
.popover { position: absolute; top: 50px; right: 16px; width: 360px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--sh-3); z-index: 40; overflow: hidden; }
.popover .head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.popover .head h4 { margin: 0; font-size: 14px; }
.notif { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--bg-subtle); }
.notif:last-child { border-bottom: none; }
.notif .ic { width: 30px; height: 30px; border-radius: var(--r-2); background: var(--brand-blue-soft); color: var(--brand-navy); display: flex; align-items: center; justify-content: center; flex: none; }
.notif .txt { font-size: 13px; }
.notif .ts { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Toast */
.toast-wrap { position: fixed; top: 70px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--success);
  border-radius: var(--r-2); box-shadow: var(--sh-2); padding: 12px 14px; min-width: 280px; max-width: 380px; font-size: 13px;
  animation: slideIn .25s ease-out; }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Type-tile */
.tile { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-3); padding: 18px 20px;
  cursor: pointer; transition: all .15s; position: relative; overflow: hidden;}
.tile:hover { border-color: var(--brand-navy); box-shadow: var(--sh-2); }
.tile .tile-ic { width: 40px; height: 40px; border-radius: var(--r-2); background: var(--brand-blue-soft);
  color: var(--brand-navy); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.tile h4 { margin: 0 0 4px 0; font-size: 14px; }
.tile .meta { font-size: 12px; color: var(--text-3); }
.tile .count { position: absolute; top: 16px; right: 18px; font-size: 13px; font-weight: 700; color: var(--text-2); }

/* Calendar */
.cal { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-3); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-subtle); }
.cal-head div { padding: 10px; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; border-right: 1px solid var(--border); }
.cal-head div:last-child { border-right: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 95px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; position: relative; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell .num { font-size: 12px; color: var(--text-2); font-weight: 600; }
.cal-cell.dim .num { color: var(--text-disabled); }
.cal-cell.today .num { background: var(--brand-navy); color: #fff; padding: 1px 6px; border-radius: 10px; }
.trip-pill { background: var(--brand-blue-soft); color: var(--brand-navy); font-size: 11px; padding: 2px 6px;
  border-radius: 4px; margin-top: 4px; border-left: 2px solid var(--brand-blue); cursor: pointer; }
.trip-pill.green { background: var(--success-bg); color: var(--success); border-left-color: var(--success); }
.trip-pill.red { background: var(--danger-bg); color: var(--danger); border-left-color: var(--danger); }

/* PDF viewer placeholder */
.pdf-view { background: #fff; border: 1px solid var(--border); border-radius: var(--r-3); height: 560px;
  display: flex; flex-direction: column; overflow: hidden; }
.pdf-view .ph-page { background: #fff; margin: 18px auto; width: 80%; padding: 36px 42px; box-shadow: var(--sh-2); border: 1px solid var(--border); }
.pdf-view .ph-page h5 { text-align: center; margin: 0 0 18px 0; }
.pdf-view .ph-line { height: 8px; background: #EEF1F5; border-radius: 3px; margin-bottom: 10px; }
.pdf-view .ph-line.s { width: 60%; }
.pdf-view .ph-line.m { width: 80%; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.kban-col { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-3); padding: 10px; }
.kban-col h4 { margin: 4px 6px 10px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.kban-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-2); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.kban-card:hover { box-shadow: var(--sh-2); }
.kban-card .t { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.kban-card .m { font-size: 12px; color: var(--text-3); }

/* Route builder */
.route-canvas { background: var(--bg-subtle); border: 1px dashed var(--border-strong); border-radius: var(--r-3);
  padding: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; min-height: 220px; }
.route-node { background: #fff; border: 1px solid var(--border); border-radius: var(--r-3); padding: 12px 14px; min-width: 180px;
  box-shadow: var(--sh-1); position: relative; }
.route-node .role { font-size: 11px; color: var(--text-3); font-weight: 600; }
.route-node .who { font-weight: 600; font-size: 13px; margin: 2px 0; }
.route-node .due { font-size: 11px; color: var(--text-3); }
.route-arrow { color: var(--text-3); font-size: 18px; }
.route-node.start { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.route-node.end { background: var(--success); color: #fff; border-color: var(--success); }

/* Drop zone */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--r-3); padding: 26px; text-align: center;
  background: var(--bg-subtle); color: var(--text-3); }
.dropzone strong { color: var(--text); }

/* Util */
.spread { display: flex; gap: var(--s-4); align-items: flex-start; }
.spread > .main-col { flex: 1; min-width: 0; }
.spread > .side-col { width: 320px; flex: none; }

/* Responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .spread { flex-direction: column; }
  .spread > .side-col { width: 100%; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .brand .subtitle { display: none; }
  .search-bar { display: none; }
  .main { padding: var(--s-4); }
  .kpis { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .kanban { grid-template-columns: 1fr; }
}
