

:root {
  --bg: #f0f4fb;
  --bg-card: #ffffff;
  --ink: #16233d;
  --ink-2: #516079;
  --ink-3: #8a94ab;
  --line: #e3e9f5;
  --side-1: #0a1a3c;
  --side-2: #1565c0;
  --accent: #2F61ED;
  --accent-2: #5b8cf5;
  --accent-soft: #e8efff;
  --ok: #16a34a;
  --ok-soft: #e5f9ee;
  --warn: #f59e0b;
  --warn-soft: #fff4df;
  --bad: #ef4444;
  --bad-soft: #fdeaea;
  --info: #2563eb;
  --info-soft: #e8efff;
  --r: 16px;
  --shadow: 0 6px 24px rgba(13, 71, 161, 0.07);
  --shadow-2: 0 18px 50px rgba(10, 40, 90, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; }
.ic.xs { width: 14px; height: 14px; }
.ic.xl { width: 46px; height: 46px; opacity: 0.4; }

.login-wrap {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(1000px 600px at 15% -10%, #0d47a1 0%, transparent 55%),
    radial-gradient(900px 700px at 110% 110%, #1d4ed8 0%, transparent 50%),
    linear-gradient(150deg, #071229 0%, #0b1e4a 60%, #081428 100%);
  overflow: hidden;
}
.login-bg-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; }
.orb-a { width: 380px; height: 380px; background: #38bdf8; top: -80px; left: -60px; }
.orb-b { width: 420px; height: 420px; background: #2563eb; bottom: -120px; right: -80px; }

.login-card {
  position: relative; width: min(420px, calc(100vw - 40px));
  background: rgba(255,255,255,0.97);
  border-radius: 24px; padding: 34px 32px;
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 16px;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.logo-mark { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; filter: drop-shadow(0 6px 14px rgba(47,97,237,0.4)); }
.logo-mark.sm { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 2px rgba(255,255,255,0.22); filter: none; }
.login-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.login-sub { font-size: 12.5px; color: var(--ink-3); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.2px; }
.field .req { color: var(--bad); font-style: normal; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 13px; background: #fbfcff; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,97,237,0.15);
  background: #fff;
}
.pwd-row { position: relative; display: flex; }
.pwd-row input { width: 100%; }
.pwd-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); padding: 6px; border-radius: 8px; }
.pwd-toggle:hover { color: var(--accent); background: var(--accent-soft); }

.login-error {
  background: var(--bad-soft); color: #b91c1c; border: 1px solid #fca5a5;
  padding: 9px 12px; border-radius: 10px; font-size: 13px;
}

.remember-row {
  display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--ink-2); margin: 1px 0 3px;
}
.remember-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 8px 20px rgba(47,97,237,0.32);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(47,97,237,0.45); }
.btn-ghost { background: #eef2fb; color: var(--ink-2); }
.btn-ghost:hover { background: #e3eaf8; color: var(--ink); }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,0.3); }
.btn-warn { background: var(--warn); color: #fff; box-shadow: 0 6px 16px rgba(245,158,11,0.3); }
.btn-bad { background: var(--bad); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: var(--ink-2); background: #eef2fb; transition: background 0.15s, color 0.15s;
  position: relative;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }

.app { display: flex; height: 100vh; }

.sidebar {
  width: 250px; flex: none;
  background: linear-gradient(175deg, var(--side-2) 0%, var(--side-1) 70%);
  color: #fff; display: flex; flex-direction: column;
  box-shadow: 6px 0 30px rgba(6, 18, 45, 0.3);
  position: relative; z-index: 5;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; }
.side-brand-text b { display: block; font-size: 15.5px; letter-spacing: 0.2px; }
.side-brand-text span { font-size: 11px; color: rgba(255,255,255,0.5); }

.side-nav { flex: 1; min-height: 0; padding: 6px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 12px;
  color: rgba(255,255,255,0.66); font-weight: 600; font-size: 13.5px;
  transition: background 0.15s, color 0.15s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(91,140,245,0.35), rgba(47,97,237,0.55));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}
.nav-item .nav-badge {
  margin-left: auto; background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}
.nav-item .nav-badge.amber { background: var(--warn); color: #3b2500; }
.nav-item.nav-off { opacity: .42; filter: grayscale(1); }
.nav-item.nav-off:hover { opacity: .62; }
.nav-item.nav-off .nav-badge { display: none; }

.side-user {
  flex: none;
  margin: 12px; padding: 12px; border-radius: 14px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 10px;
}
.side-user .who { flex: 1; min-width: 0; text-align: left; border-radius: 8px; padding: 3px 5px; }
.side-user .who:hover { background: rgba(255,255,255,0.08); }
.side-user .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 11px; color: rgba(255,255,255,0.55); }
.side-user .icon-btn { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); width: 32px; height: 32px; }
.side-user .icon-btn:hover { background: rgba(239,68,68,0.35); color: #fff; }
.avatar-btn { position: relative; flex: none; border-radius: 50%; padding: 0; line-height: 0; }
.avatar-btn::after {
  content: "📷"; position: absolute; inset: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  background: rgba(8,22,52,0.72); color: #fff; opacity: 0; transition: opacity 0.15s;
}
.avatar-btn:hover::after { opacity: 1; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  overflow: hidden; position: relative; object-fit: cover;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lvl1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar.lvl2 { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.avatar.lvl3 { background: linear-gradient(135deg, #38bdf8, #2563eb); }

.avatar-wrap { position: relative; flex: none; }
.avatar-wrap .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2.5px solid var(--bg-card);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.dot.offline { background: #c9d2e3; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 66px; flex: none; background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 16px;
}
.topbar-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.page-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.m-nav-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg-card); color: var(--accent);
  box-shadow: 0 2px 8px rgba(6, 18, 45, 0.14);
  cursor: pointer;
}
.m-nav-btn:hover { background: #fff; border-color: var(--accent); }
.m-nav-btn svg { width: 17px; height: 17px; display: block; }
.side-backdrop { display: none; }

.side-ver {
  margin: 0 12px 12px; padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-ver-text { font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 600; white-space: nowrap; }
.side-update-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.side-update-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }
.side-update-btn.pending {
  background: #f59e0b; color: #1a1a1a; border-color: transparent;
}
.side-update-btn.pending:hover { background: #fbbf24; }
.side-update-btn:disabled { opacity: 0.5; cursor: default; }

.online-wrap { position: relative; }
.online-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--ok-soft); color: #15803d;
  font-size: 12.5px; font-weight: 700; padding: 5px 13px 5px 8px; border-radius: 99px;
  border: 1px solid #b7f0cd; cursor: pointer; font-family: inherit;
  max-width: 46vw;
}
.online-pill:hover { border-color: #8ee0ab; }
.online-pill.off { background: #eef1f8; color: var(--ink-3); border-color: var(--line); }
.online-faces { display: inline-flex; align-items: center; }
.online-faces .avatar { margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.online-faces .avatar:first-child { margin-left: 0; }
.online-names {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 26vw;
}
.avatar.xs { width: 24px; height: 24px; font-size: 9.5px; }
.online-drop {
  position: absolute; right: 0; top: 46px; width: 300px; max-height: 380px;
  overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-2); z-index: 320; padding: 8px;
}
.online-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
}
.online-row.me { background: var(--accent-soft); }
.online-row .or-who { flex: 1; min-width: 0; }
.online-row .or-who b {
  display: block; font-size: 13px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.online-row .or-who span { font-size: 11.5px; color: var(--ink-3); }

.bell-wrap { position: relative; }
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800;
  border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid #fff;
}
.bell-drop {
  position: absolute; right: 0; top: 46px; width: 340px; max-height: 380px;
  overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-2); z-index: 320; padding: 8px;
}
.bell-item {
  display: flex; gap: 10px; padding: 10px 11px; border-radius: 10px;
  font-size: 13px; line-height: 1.4; cursor: pointer;
}
.bell-item:hover { background: var(--accent-soft); }
.bell-item .bi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.bell-item small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
.bell-empty { padding: 18px; text-align: center; color: var(--ink-3); font-size: 13px; }

.content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }
.page { display: flex; flex-direction: column; gap: 18px; animation: fadeIn 0.22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.seg { display: inline-flex; background: #e6ecf9; border-radius: 12px; padding: 4px; gap: 3px; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); transition: background 0.15s, color 0.15s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(13,71,161,0.12); }
.seg-n {
  font-style: normal; background: var(--accent); color: #fff; font-size: 10.5px;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.seg-btn:not(.active) .seg-n { background: #c5d2ee; color: #3c5a94; }

.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px;
}
.card-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--ink);
}
.card-title .ic { color: var(--accent); }
.card-title .spacer { flex: 1; }
.card-title .mt, .card-title.mt { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid-2.eq { grid-template-columns: 1fr 1fr; }
.chart.chart-lg { height: 300px; }

.chart.reg-chart-tall { height: 300px; } .reg-chart-sm { height: 200px; } .reg-extra-charts { margin-top: 0; }
.reg-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.reg-chart-legend .reg-lg { display: inline-flex; align-items: center; gap: 6px; }
.reg-chart-legend .reg-lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.reg-chart-legend .reg-lg b { color: var(--ink); font-weight: 700; }
.reg-chart-legend .reg-lg-total { margin-left: auto; font-weight: 700; color: var(--ink); }
.reg-preview-row { gap: 20px; }
.reg-preview-row > .card { min-width: 0; }
@media (max-width: 860px) { .reg-chart-legend .reg-lg-total { margin-left: 0; } .chart.reg-chart-tall { height: 260px; } .chart.reg-chart-sm { height: 180px; } .chart.chart-lg { height: 250px; } }

@media (max-width: 760px) {
  .m-nav-btn { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; position: fixed; z-index: 10; top: 0; left: 0; right: auto; bottom: auto; height: 100vh; height: 100svh; overflow: hidden; }
  .sidebar.open { transform: translateX(0); box-shadow: 6px 0 30px rgba(6, 18, 45, 0.5); }
  .side-backdrop { display: none; position: fixed; inset: 0; background: rgba(8, 20, 45, 0.45); z-index: 9; }
  .side-backdrop.visible { display: block; }
  .sidebar .side-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .side-user { margin-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-backdrop { padding: 10px; align-items: flex-start; }
  .modal { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .modal-head { padding: 14px 16px 0; }
  .modal-body { padding: 12px 16px; }
  .modal-foot { padding: 10px 16px 14px; }
  .row-2 { grid-template-columns: 1fr; }
  .reg-table { font-size: 11px; table-layout: fixed; width: 100%; }
  .reg-table td { padding: 3px 4px; height: auto; overflow-wrap: anywhere; }
  .reg-table td:first-child { width: auto; }
  .reg-table td:last-child { width: 42px; }
  .reg-preview-row { gap: 12px; }
  #modal-profile .modal { width: calc(100% - 24px); max-width: none; margin: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  #modal-profile .modal-body { padding: 12px 14px; max-height: none; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #modal-profile .modal-foot { position: sticky; bottom: 0; background: var(--bg-card); }
  #modal-profile .profile-photo { justify-content: center; text-align: center; }
  #modal-profile .pf-actions { justify-content: center; width: 100%; }
  .card-title { flex-wrap: wrap; }
  #reg-capture { display: block; width: 100%; min-width: 0; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .reg-preview-row > .card { min-width: 0; overflow: hidden; }
}

@media (min-width: 761px) {
  .m-nav-btn { display: none; }
  .side-backdrop { display: none !important; }
  .sidebar { transform: none !important; }
}

@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tiles.mini { grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.tile::after {
  content: ""; position: absolute; right: -22px; top: -22px; width: 76px; height: 76px;
  border-radius: 50%; background: var(--accent-soft);
}
.tile .t-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-3); }
.tile .t-value { font-size: 27px; font-weight: 800; margin-top: 5px; letter-spacing: -0.5px; position: relative; z-index: 1; }
.tile .t-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tile.accent::after { background: #d9e5ff; }
.tile.ok::after { background: #d3f5e0; }
.tile.warn::after { background: #ffe9c2; }
.tile.bad::after { background: #ffd9d9; }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.task-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; position: relative;
  transition: transform 0.14s, box-shadow 0.15s, border-color 0.15s;
}
.task-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(13,71,161,0.12); border-color: #c8d6f2; }
.task-card.urgent { border-color: #fca5a5; background: linear-gradient(180deg, #fff7f7, #fff 60px); }
.task-card.urgent::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px;
  background: var(--bad); border-radius: 0 4px 4px 0;
}
.task-card.overdue { border-color: #fbbf24; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  letter-spacing: 0.2px;
}
.chip.p-required { background: var(--bad-soft); color: #b91c1c; }
.chip.p-regular { background: var(--info-soft); color: #1d4ed8; }
.chip.p-optional { background: #eef1f8; color: var(--ink-2); }
.chip.urgent { background: var(--bad); color: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.7; } }
.chip.s-new { background: var(--accent-soft); color: var(--accent); }
.chip.s-seen { background: #e0f2fe; color: #0369a1; }
.chip.s-in_progress { background: var(--warn-soft); color: #b45309; }
.chip.s-await_accept { background: var(--ok-soft); color: #15803d; }
.chip.s-blocked { background: #eceff5; color: #475569; }
.chip.s-closed { background: #e8e8ee; color: var(--ink-2); }
.chip.deadline { background: var(--warn-soft); color: #b45309; }
.chip.deadline.late { background: var(--bad-soft); color: #b91c1c; }
.chip.repeat { background: var(--info-soft); color: #1d4ed8; }
.chip.msg { background: #dde7ff; color: #1e40af; }

.task-title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.task-desc {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-people { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.task-people .arrow { color: var(--ink-3); }
.task-people b { color: var(--ink); font-weight: 600; }
.task-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.task-foot .spacer { flex: 1; }

.progress { height: 6px; background: #e8edf7; border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 3px; transition: width 0.3s; }
.progress.ok > i { background: linear-gradient(90deg, #4ade80, var(--ok)); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-3);
  background: var(--bg-card); border: 1.5px dashed var(--line); border-radius: var(--r);
}
.empty p { margin-top: 10px; font-size: 14px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lvl-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: #fff; }
.lvl-chip.lvl1 { background: #d97706; }
.lvl-chip.lvl2 { background: #1565c0; }
.lvl-chip.lvl3 { background: #2563eb; }

.pyramid { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; }
.pyr-tier { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; position: relative; padding: 10px 0; }
.pyr-tier + .pyr-tier::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 20px; background: linear-gradient(#b9cbf2, #8fb3ef);
}
.pyr-node {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-card); border: 1.5px solid var(--line); border-radius: 99px;
  padding: 7px 16px 7px 12px; box-shadow: var(--shadow); position: relative;
}
.pyr-node.me { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,97,237,0.14); }
.pyr-node.on { border-color: #b7f0cd; }
.pyr-node b { display: block; font-size: 13px; }
.pyr-node span { font-size: 11px; color: var(--ink-3); }
.pyr-node > .dot { position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.person-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.person-card.me { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,97,237,0.14); }
.person-top { display: flex; gap: 12px; align-items: center; }
.person-top .p-name { font-weight: 700; font-size: 14.5px; }
.person-top .p-pos { font-size: 12px; color: var(--ink-2); }
.person-top .p-ver {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; border-radius: 6px;
  background: rgba(47,97,237,0.12); color: var(--accent);
  vertical-align: middle; white-space: nowrap;
}
.person-state { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.person-state.on { color: #15803d; font-weight: 600; }
.person-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--ink-3); padding: 9px 12px;
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #eef2f9; color: var(--ink-2); }
.table tr:hover td { background: #f7faff; }
.table td b { color: var(--ink); font-weight: 600; }

.table tbody tr.grp-row td {
  background: #eaf1ff; color: var(--accent); font-size: 12px;
  padding-top: 15px; border-bottom: 0;
}
.table tbody tr.sub-row td {
  background: #f6f9ff; color: var(--ink-3); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; padding-top: 9px; padding-bottom: 7px;
}
.table tbody tr.sub-row-client td { color: var(--accent); }
.table tbody tr.grp-row:hover td { background: #eaf1ff; }
.table tbody tr.sub-row:hover td { background: #f6f9ff; }

.month-nav { display: inline-flex; gap: 4px; align-items: center; }
.month-nav .btn { min-width: 34px; min-height: 34px; padding: 7px 10px; font-size: 18px; line-height: 1; border: 1.5px solid #b8c7e8; background: #eef2fb; color: var(--ink); }
.inline-field input[type="week"],
.inline-field input[type="month"] { min-width: 145px; }
.rep-grid th.rg-client, .rep-grid td.rg-client {
  position: sticky; left: 0; z-index: 2; background: #fff;
  min-width: 150px; max-width: 210px;
}
.rep-grid thead th { padding: 6px 4px; text-align: center; vertical-align: top; }
.rep-grid th.rg-client { text-align: left; padding-left: 12px; }
.rg-head { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 44px; }
.rg-day { font-size: 12px; font-weight: 700; color: var(--accent); cursor: pointer; }
.rg-dow { font-size: 9.5px; color: var(--ink-3); text-transform: uppercase; }
.rg-btns { display: flex; gap: 2px; height: 17px; }
.rg-btn {
  width: 17px; height: 17px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
  color: var(--ink-3); cursor: pointer;
}
.rg-btn .ic { width: 11px; height: 11px; }
.rg-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.rg-btn:disabled { opacity: .3; cursor: default; }
.rep-grid td { text-align: center; padding: 5px 4px; cursor: pointer; }
.rep-grid tr.rg-group td {
  background: #eaf1ff; color: var(--accent); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; text-align: left; cursor: default;
}
.rg-cell {
  display: inline-block; min-width: 46px; padding: 3px 5px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700;
}
.rg-cell.full { background: var(--ok-soft); color: #15803d; }
.rg-cell.part { background: #fff2e2; color: #c2410c; }
.rg-cell.none { background: #f2f5fa; color: #aab3c5; font-weight: 600; }

.fill-form { display: grid; gap: 5px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.fill-grp {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent); margin-top: 8px;
}
.fill-row { display: grid; grid-template-columns: 1fr 64px 10px 64px 46px; gap: 7px; align-items: center; }
.fill-name { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill-row input {
  padding: 6px 8px; font-size: 13px; border: 1px solid var(--line);
  border-radius: 8px; text-align: center; width: 100%;
}
.fill-row input:focus { border-color: var(--accent); outline: none; background: #fff; }
.fill-sep { text-align: center; color: var(--ink-3); }
.fill-unc { text-align: center; font-size: 12px; font-weight: 700; }
.fill-tot {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.status-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status-tag.s1 { background: var(--ok-soft); color: #15803d; }
.status-tag.s2 { background: var(--warn-soft); color: #b45309; }
.status-tag.s3 { background: var(--bad-soft); color: #b91c1c; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #f2f6fc; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 7px 12px; color: var(--ink-3); min-width: 260px;
}
.search-box input { border: none; outline: none; background: none; width: 100%; font-size: 13px; color: var(--ink); }

.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 46px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar .hb-label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .hb-track { height: 9px; background: #e9eef9; border-radius: 5px; overflow: hidden; }
.hbar .hb-fill { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.hbar .hb-fill.alt { background: linear-gradient(90deg, #38bdf8, #2563eb); }
.hbar .hb-fill.ok { background: linear-gradient(90deg, #4ade80, var(--ok)); }
.hbar .hb-val { text-align: right; font-weight: 700; color: var(--ink); }

.chart { width: 100%; height: 240px; }
.chart svg { width: 100%; height: 100%; display: block; }
.donut-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chart.donut { width: 200px; height: 200px; flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; flex: 1; min-width: 150px; }
.donut-legend .dl { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.donut-legend .dl i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .dl b { margin-left: auto; color: var(--ink); }
.donut-legend .dl .dl-pct { color: var(--ink-3); font-weight: 600; font-size: 11.5px; }

.shift-count {
  font-family: Consolas, "SF Mono", monospace; font-weight: 700; font-size: 14px;
}
.shift-count.high { color: #1565c0; }
.shift-count.medium { color: #d97706; }
.shift-count.low { color: var(--ink-3); }

.shift-cell { min-width: 260px; }
.shift-none { color: var(--ink-3); }
.shift-detail-row {
  display: flex; align-items: center; gap: 6px; padding: 3px 0;
  font-size: 12px; line-height: 1.3; flex-wrap: wrap;
  border-bottom: 1px solid #f1f4fa;
}
.shift-detail-row:last-of-type { border-bottom: none; }
.shift-date-badge {
  background: var(--accent); color: #fff; border-radius: 5px;
  padding: 1px 6px; font-size: 11px; font-weight: 700; white-space: nowrap;
  font-family: Consolas, "SF Mono", monospace;
}
.shift-info { color: var(--ink); font-weight: 500; white-space: nowrap; }
.shift-func { color: var(--accent); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.shift-time { color: var(--ink-3); font-size: 11.5px; font-family: Consolas, "SF Mono", monospace; white-space: nowrap; }
.btn-more-shifts {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft); color: var(--accent); border: none; border-radius: 7px;
  padding: 4px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
  font-family: inherit; margin-top: 5px; transition: background .15s, color .15s;
}
.btn-more-shifts:hover { background: var(--accent); color: #fff; }

.table tbody tr.emp-sub td {
  background: #f8faff; border-bottom: 2px solid var(--line);
  padding: 6px 12px; font-size: 12px;
}
.table tbody tr.emp-sub .cmt { color: var(--ink-2); }

.cmt-none { color: var(--ink-3); opacity: .7; font-style: italic; }
.cmt-ic { color: var(--ink-3); opacity: .55; vertical-align: -2px; margin-right: 5px; }

.table tbody tr.z-even > td { background: #f8fbff; }
.table tbody tr.z-odd > td { background: #fff; }
.table tbody tr.z-even:hover > td,
.table tbody tr.z-odd:hover > td { background: #eef4ff; }

.table tbody tr.emp-zirat > td {
  background: #e8f5e9; border-bottom: 2px solid #c8e6c9;
  padding: 6px 12px; font-size: 12px; color: #1b5e20;
}
.table tbody tr.emp-zirat:hover > td { background: #dff0d8; }
.table tbody tr.emp-zirat .zirat-main { font-weight: 700; }
.table tbody tr.emp-zirat .zirat-sep { color: #81c784; margin: 0 8px; }

#ef-zirat-fields[hidden] { display: none; }

.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--accent); }
.table th .sort-ic { font-size: 10px; opacity: .5; margin-left: 4px; }
.table th.sorted { color: var(--accent); }

.table td.num { width: 46px; text-align: center; color: var(--ink-3); font-weight: 700; }
.table td.gender { text-align: center; font-weight: 700; }
.table td.mono { white-space: nowrap; }
.filter-bar #emp-add { margin-left: auto; }
.table th.sorted .sort-ic { opacity: 1; }

.btn-act {
  border: none; border-radius: 7px; padding: 4px 10px;
  font-size: 11.5px; font-family: inherit; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s;
}
.ba-edit { background: var(--accent-soft); color: var(--accent); }
.ba-edit:hover { background: var(--accent); color: #fff; }
.ba-del { background: var(--bad-soft); color: #b91c1c; }
.ba-del:hover { background: var(--bad); color: #fff; }
.ba-restore { background: var(--ok-soft); color: #15803d; }
.ba-restore:hover { background: var(--ok); color: #fff; }
.ba-purge { background: var(--bad-soft); color: #b91c1c; }
.ba-purge:hover { background: #7f1d1d; color: #fff; }
.td-actions { white-space: nowrap; }
.td-actions .btn-act + .btn-act { margin-left: 6px; }
.sub-actions { display: inline-flex; gap: 6px; margin-right: 8px; vertical-align: middle; }
.sub-sep { color: var(--line); margin-right: 8px; }
.mono { font-family: Consolas, "SF Mono", monospace; font-size: 12.5px; }
.table td.birth { white-space: nowrap; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.filter-bar .inline-field { font-size: 12.5px; }
.filter-bar .mini-select { padding: 7px 10px; font-size: 12.5px; }
.filter-bar input[type="date"] {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px;
  background: #f2f6fc; outline: none; font-size: 12.5px;
}
.filter-bar input[type="date"]:focus { border-color: var(--accent); background: #fff; }

.inc-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.inc-toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.inc-branch-name { font-weight: 800; color: var(--ink); }
.inc-branch-full { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.inc-reason { max-width: 340px; white-space: pre-wrap; }
.inc-status { display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #eef2f8; color: var(--ink-3); white-space: nowrap; }
.inc-status.done { background: var(--ok-soft); color: #15803d; }
.inc-status.open { background: var(--warn-soft); color: #b45309; }
.inc-status-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inc-status-cell .btn-act { white-space: nowrap; }
.inc-launch-done { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inc-launch-done .ic { width: 12px; height: 12px; }
.inc-comment-cell { min-width: 260px; }
.inc-comment-wrap { display: flex; flex-direction: column; gap: 4px; }
.inc-comment {
  width: 100%; min-height: 34px; max-height: 180px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 9px;
  background: #f8fafe; font: inherit; font-size: 12.5px; line-height: 1.35;
  color: var(--ink); outline: none;
}
.inc-comment:focus { border-color: var(--accent); background: #fff; }
.inc-comment-foot { display: flex; align-items: center; gap: 8px; min-height: 14px; }
.inc-save-state { font-size: 11px; color: var(--ok); font-weight: 700; }
.inc-sync-error { color: #b91c1c; font-weight: 700; }

.emp-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-right: 10px; }
.badge-count {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.badge-count.b-named { background: var(--ok-soft); color: #15803d; }
.badge-count.b-unnamed { background: var(--warn-soft); color: #b45309; }
.badge-count.b-unknown { background: #f1f5f9; color: var(--ink-3); }

.load-more { display: flex; align-items: center; gap: 12px; padding: 14px 0 2px; }

.profile-photo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.table tbody tr.grp-even td { background: #f0f7ff; }
.table tbody tr.grp-odd td { background: #fff; }
.table tbody tr.grp-first td { border-top: 2px solid #b8d4ee; }
.table tbody tr.grp-first td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.bc-main { color: var(--ink); font-weight: 700; }
.bc-sub { color: var(--ink-3); }
.bc-sub::before { content: "└ "; color: #b0bec5; }
.type-badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  border: 1.5px solid transparent; white-space: nowrap;
}
.type-badge.tb-df { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.type-badge.tb-zdf { background: #f3e5f5; color: #6a1b9a; border-color: #ce93d8; }
.type-badge.tb-atz { background: #e0f2f1; color: #00695c; border-color: #80cbc4; }
.type-badge.tb-undef { background: #f5f5f5; color: #616161; border-color: #bdbdbd; }

.mini-select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px;
  background: #f2f6fc; font-size: 13px; font-weight: 600; color: var(--ink-2); outline: none;
}
.mini-select:focus { border-color: var(--accent); background: #fff; }
.fmt-select { padding: 5px 8px; font-size: 11.5px; font-weight: 700; }

.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; align-items: end;
}
.form-grid .btn { height: 42px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(8, 20, 45, 0.45); z-index: 70; animation: fadeIn 0.15s; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(520px, 100vw);
  background: var(--bg-card); z-index: 80; display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(8, 20, 45, 0.25);
  animation: slideIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes slideIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 9px; background: #fbfcff; }

.d-title { font-size: 19px; font-weight: 800; line-height: 1.3; }
.d-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.d-block {
  background: #fbfcff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
}
.d-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-3); margin-bottom: 9px; }
.d-people { display: flex; gap: 18px; flex-wrap: wrap; }
.d-person { display: flex; gap: 9px; align-items: center; }
.d-person b { display: block; font-size: 13px; }
.d-person span { font-size: 11.5px; color: var(--ink-3); }
.d-desc { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; }

.d-items { display: flex; flex-direction: column; gap: 7px; }
.d-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px;
}
.d-item .idx { width: 22px; height: 22px; border-radius: 7px; background: #e9effc; color: var(--accent);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.d-item.done { background: var(--ok-soft); border-color: #b7f0cd; color: #166534; }
.d-item.done .idx { background: var(--ok); color: #fff; }
.d-item.locked { opacity: 0.55; }
.d-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.d-item .it-text { flex: 1; }
.d-item.done .it-text { text-decoration: line-through; }
.d-item .when { font-size: 11px; color: var(--ink-3); }

.d-status-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }

.msgs { display: flex; flex-direction: column; gap: 9px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.msg { display: flex; gap: 9px; align-items: flex-start; }
.msg .bubble {
  background: #fff; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px;
  padding: 9px 12px; font-size: 13px; line-height: 1.45; max-width: 85%;
}
.msg .who { font-size: 11px; color: var(--ink-3); margin-bottom: 3px; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble {
  background: var(--accent-soft); border-color: #c9dafc;
  border-radius: 13px 4px 13px 13px;
}
.msg.me .txt { text-align: right; }
.msg-form { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.msg-form input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 13px;
  outline: none; background: #fff;
}
.msg-form input:focus { border-color: var(--accent); }
.msg-clip { flex: none; color: var(--ink-3); }
.msg-clip:hover { color: var(--accent); background: var(--accent-soft); }

.msg-hint { display: block; margin-top: 7px; }

.file-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--accent-soft); border: 1px solid #c9dafc; color: var(--accent);
  padding: 5px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  max-width: 100%;
}
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { background: #dbe7fe; }
.msg .bubble .file-chip { margin-top: 7px; }
.file-list { display: flex; flex-direction: column; gap: 9px; }
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-meta { font-size: 11.5px; color: var(--ink-3); }
.attach-chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  background: var(--accent-soft); border: 1px solid #c9dafc; color: var(--accent);
  border-radius: 9px; padding: 5px 6px 5px 10px; font-size: 12.5px; font-weight: 600;
}
.attach-chip span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip .icon-btn { color: var(--ink-3); background: transparent; }
.attach-chip .icon-btn:hover { color: var(--bad); background: var(--bad-soft); }
.attach-chip.att-add {
  background: transparent; border: 1px dashed var(--accent); color: var(--accent);
  font-family: inherit; cursor: pointer; padding: 5px 11px;
}
.attach-chip.att-add:hover { background: var(--accent-soft); border-style: solid; }
.attach-chip.att-limit {
  background: var(--bg-2, #f2f4f9); border: 1px solid var(--line); color: var(--ink-3);
  font-weight: 600;
}
.field input[type=file] { padding: 9px 11px; font-size: 13px; color: var(--ink-2); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 11px; font-size: 12.5px; position: relative; padding-bottom: 13px; }
.tl-item::before {
  content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-item .tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-top: 3px; flex: none; z-index: 1; box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item .tl-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.tl-item .tl-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.tl-item .tl-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.tl-item small { display: block; color: var(--ink-3); font-size: 11px; }
.tl-item b { font-weight: 600; color: var(--ink); }

.blocked-note {
  background: #eef2fb; border: 1px solid #c5d2ee; color: #3c5a94;
  padding: 10px 13px; border-radius: 11px; font-size: 13px; line-height: 1.45;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 20, 45, 0.55); z-index: 170;
  display: grid; place-items: center; padding: 20px; animation: fadeIn 0.15s;
}
#modal-ask {
  z-index: 190;
}
#modal-regitem, #modal-reggroup, #modal-repclient, #modal-repgroup {
  z-index: 180;
}
#modal-delreq {
  z-index: 185;
}
.modal {
  background: var(--bg-card); border-radius: 20px; width: min(640px, 100%);
  max-height: calc(100vh - 60px); display: flex; flex-direction: column;
  box-shadow: var(--shadow-2); animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal.narrow { width: min(460px, 100%); }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
}
.modal-head h2 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 16px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
  padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid var(--line);
}
.hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.inline-field { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.inline-field input {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 11px; background: #fff; outline: none;
}
.inline-field input:focus { border-color: var(--accent); }

.date-pick-row { display: inline-flex; align-items: center; gap: 6px; }
.date-pick-main { display: flex; flex-direction: column; min-width: 150px; }
.dp-title { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.dp-sub { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.date-pick-row .dp-btn { min-width: 34px; min-height: 34px; padding: 7px 10px; font-size: 18px; line-height: 1; border: 1.5px solid #b8c7e8; background: #eef2fb; color: var(--ink); }
.date-pick-row .dp-input { min-width: 140px; }

.dp-cal-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 7px 12px; cursor: pointer; font-family: inherit; text-align: left;
  min-width: 168px; max-width: 260px; overflow: hidden; flex: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dp-cal-half { min-width: 0; max-width: none; flex: 1 1 150px; }
.dp-cal-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(47, 97, 237, 0.12); }
.dp-cal-btn .dp-sub { display: inline-flex; align-items: center; gap: 5px; }
.dp-cal-btn .cal-ic { color: var(--accent); flex: none; }

.cal-field { display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 220px; align-self: center; }
.cal-err { display: block; font-size: 12px; font-weight: 700; color: #e11d48; margin: 3px 0 0; }
.cal-trigger.err { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12); }
.cal-field .cal-label { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.field .cal-field { width: 100%; max-width: 220px; }
.cal-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding: 8px 11px; cursor: pointer; font-family: inherit;
  min-width: 132px; max-width: 200px; overflow: hidden;
  height: 36px; min-height: 36px; max-height: 36px;
  flex: none; align-self: center; line-height: 1;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field .cal-trigger { width: 100%; max-width: 200px; }
.cal-trigger:hover { border-color: var(--accent); }
.cal-trigger:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 97, 237, 0.12); outline: none; }
.cal-trigger .cal-trigger-text { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; min-width: 0; line-height: 1.2; max-height: 1.3em; }
.cal-trigger .cal-trigger-text.empty { color: var(--ink-3); font-weight: 600; }
.cal-trigger .ic { color: var(--accent); flex: none; }

.cal-pop {
  position: fixed; z-index: 220;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-2); padding: 12px 14px 14px; width: 268px;
  animation: pop 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.cal-title { font-size: 13.5px; font-weight: 800; color: var(--ink); flex: 1; text-align: center; }
.cal-nav {
  width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; font-size: 16px; line-height: 1;
  display: grid; place-items: center; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cal-nav:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ink-3); padding: 2px 0; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid.months { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.cal-cell {
  border: none; background: transparent; border-radius: 9px;
  min-height: 32px; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.cal-cell.blank { cursor: default; pointer-events: none; }
.cal-cell:hover:not(.blank):not(.picked):not(.mcell) { background: var(--accent-soft); color: var(--accent); }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.cal-cell.in-week { background: var(--accent-soft); color: var(--accent); }
.cal-cell.picked, .cal-cell.picked:hover { background: var(--accent); color: #fff; box-shadow: none; }
.cal-cell.mcell {
  min-height: 40px; border: 1.5px solid var(--line); background: #fbfcff;
  font-size: 12px; padding: 4px;
}
.cal-cell.mcell:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cal-cell.mcell.picked, .cal-cell.mcell.picked:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal-cell.mcell.today { border-color: var(--accent); color: var(--accent); }
.cal-foot { margin-top: 8px; text-align: center; }
.cal-hint { font-size: 11px; color: var(--ink-3); }

.switch-row { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch-row input { display: none; }
.switch {
  width: 40px; height: 22px; border-radius: 99px; background: #c5d2ee; position: relative;
  transition: background 0.18s; flex: none;
}
.switch::after {
  content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; top: 2.5px; left: 3px; transition: left 0.18s; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { left: 20px; }
.switch-label { font-size: 13px; color: var(--ink-2); }
.switch-row.sm .switch-label { font-size: 12.5px; }

.prio-radios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.prio-opt { cursor: pointer; }
.prio-opt input { display: none; }
.prio-card {
  display: flex; flex-direction: column; gap: 4px; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcff;
  transition: border-color 0.15s, box-shadow 0.15s; height: 100%;
}
.prio-card b { font-size: 12.5px; }
.prio-card i { font-style: normal; font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.prio-opt input:checked + .prio-required { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(239,68,68,0.14); background: var(--bad-soft); }
.prio-opt input:checked + .prio-regular { border-color: var(--info); box-shadow: 0 0 0 3px rgba(37,99,235,0.14); background: var(--info-soft); }
.prio-opt input:checked + .prio-optional { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,97,237,0.14); background: var(--accent-soft); }

.items-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.items-head > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.items-editor { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.item-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 6px 8px;
}
.item-row .item-idx {
  width: 24px; height: 24px; border-radius: 8px; background: #e9effc; color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
}
.item-row input { flex: 1; border: none; outline: none; background: none; padding: 6px 4px; font-size: 13.5px; }
.item-row .item-del { opacity: 0.5; }
.item-row:hover .item-del { opacity: 1; }
.item-row:only-child .item-del { visibility: hidden; }

.toasts {
  position: fixed; top: 18px; right: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 36px));
}
.toast {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 15px; box-shadow: var(--shadow-2); display: flex; gap: 11px;
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1); cursor: pointer;
  border-left: 4px solid var(--accent);
}
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.bad { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--info); }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.out { animation: toastOut 0.2s forwards; }
@keyframes toastOut { to { transform: translateX(40px); opacity: 0; } }
.toast .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.toast.ok .t-ic { background: var(--ok-soft); color: var(--ok); }
.toast.warn .t-ic { background: var(--warn-soft); color: var(--warn); }
.toast.bad .t-ic { background: var(--bad-soft); color: var(--bad); }
.toast.info .t-ic { background: var(--info-soft); color: var(--info); }
.toast b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.toast span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.toast small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c3d0ea; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a8bce0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.cheat-grid { display: grid; gap: 16px; }
.cheat-card .card-title { flex-wrap: wrap; }
.cheat-card .btn-act { flex: none; }
.cheat-body {
  white-space: pre-wrap; word-break: break-word;
  font-size: 13.5px; line-height: 1.65; color: var(--ink-2);
}
.cheat-body a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cheat-body a:hover { text-decoration: underline; }

.chip.acc-private { background: #eef1f8; color: var(--ink-2); }
.chip.acc-shared { background: var(--warn-soft); color: #b45309; }
.chip.acc-public { background: var(--ok-soft); color: #15803d; }
.chip.acc-foreign { background: var(--accent-soft); color: var(--accent); }
.cheat-card.foreign { border-left: 3px solid var(--accent); }

.share-list {
  max-height: 210px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; background: #fff;
}
.share-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.share-row:hover { background: #f2f5fb; }
.share-row input { accent-color: var(--accent); width: 15px; height: 15px; }
.share-row span { display: flex; flex-direction: column; line-height: 1.3; }
.share-row small { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }

.file-zone {
  display: block; cursor: pointer; user-select: none;
  border: 1.5px dashed #b9c8e6; border-radius: 14px;
  background: #fbfcff; padding: 15px 14px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.file-zone:hover { border-color: var(--accent); background: #fff; }
.file-zone.drop-hot {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(47, 97, 237, 0.14);
}
.fz-idle, .fz-picked { display: flex; align-items: center; gap: 12px; }
.fz-ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.fz-ic.ok { background: var(--ok-soft); color: var(--ok); }
.fz-txt {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1;
  font-size: 13px; color: var(--ink-3);
}
.fz-txt b {
  font-size: 13.5px; font-weight: 700; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fz-picked .fz-txt b { color: var(--ink); }
.fz-txt small { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.fz-clear { flex: none; color: var(--ink-3); }
.fz-clear:hover { color: var(--bad); background: var(--bad-soft); }

.fz-more {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px dashed var(--accent); background: #fff; color: var(--accent);
  border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.fz-more:hover { background: var(--accent-soft); border-style: solid; }
.drop-hot .msg-form, .msg-form.drop-hot, .drawer-body.drop-hot {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 97, 237, 0.14);
}

.fz-list { gap: 4px; }
.fz-item { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fz-item b { flex: 1; min-width: 0; }
.fz-item small { flex: none; }
.fz-total { font-size: 11.5px; font-weight: 700; color: var(--accent); }

.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attach-list .attach-chip { margin-top: 0; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 195;
  display: grid; place-items: center;
  background: rgba(10, 26, 60, 0.72);
  backdrop-filter: blur(2px);
  pointer-events: none;
  animation: fadeIn 0.15s;
}
.do-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 44px 58px;
  background: #fff; border: 3px dashed var(--accent);
  border-radius: 22px; box-shadow: var(--shadow-2);
}
.do-card b { font-size: 21px; font-weight: 800; color: var(--ink); }
.do-card small { font-size: 14px; color: var(--accent); font-weight: 700; }
.do-ic {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.do-ic .ic { width: 34px; height: 34px; }

.boot-screen {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  background:
    radial-gradient(1000px 600px at 15% -10%, #0d47a1 0%, transparent 55%),
    radial-gradient(900px 700px at 110% 110%, #1d4ed8 0%, transparent 50%),
    linear-gradient(150deg, #071229 0%, #0b1e4a 60%, #081428 100%);
}
.boot-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 44px; border-radius: 24px; background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-2);
}
.boot-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.boot-sub { font-size: 12.5px; color: var(--ink-3); }
.boot-bar {
  width: 180px; height: 5px; margin-top: 8px; overflow: hidden;
  background: var(--line); border-radius: 99px;
}
.boot-bar i {
  display: block; width: 45%; height: 100%; border-radius: 99px;
  background: var(--accent); animation: bootSlide 1.1s ease-in-out infinite;
}
@keyframes bootSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.cm-list { display: flex; flex-direction: column; gap: 8px; }
.cm-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 13px;
  padding: 9px 11px; background: #fbfcff;
}
.cm-row:hover { border-color: #c9dafc; background: #fff; }
.cm-key {
  flex: none; min-width: 64px; text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
  padding: 7px 8px; border-radius: 9px;
  background: #eef1f8; color: var(--ink-3); border: 1px solid var(--line);
}
.cm-key.on { background: var(--accent-soft); color: var(--accent); border-color: #c9dafc; }
.cm-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-title b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-title small { font-size: 11.5px; color: var(--ink-3); }
.cm-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.cm-tools select {
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding: 7px 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); outline: none;
}
.cm-tools select:focus { border-color: var(--accent); }
.cm-tools .icon-btn { color: var(--ink-3); }
.cm-tools .icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.cm-tools .icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.cm-hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 12px; line-height: 1.5; }

#reg-capture { background: #fff; display: inline-block; padding: 4px; }
.reg-table {
  border-collapse: collapse; background: #fff; width: 100%;
  font-size: 13px; color: #000; font-family: Arial, sans-serif;
}
.reg-table td {
  border: 1px solid #000; padding: 4px 6px; height: 24px;
}
.reg-table td:first-child { width: 260px; }
.reg-table td:last-child { width: 55px; text-align: right; font-weight: normal; }
.reg-table .reg-main td { font-weight: bold; border-top: 2px solid #000; }
.reg-table .reg-sub td:first-child { font-style: italic; }
.reg-table .reg-final td { font-weight: bold; border-top: 2px solid #000; }

.media-view { z-index: 120; background: rgba(5, 12, 28, 0.84); padding: 24px; }
.mv-wrap { position: relative; width: min(1100px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mv-stage { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.mv-stage img, .mv-stage video { max-width: 100%; max-height: calc(100vh - 130px); border-radius: 14px; background: #0b1528; object-fit: contain; }
.mv-stage iframe.mv-pdf { width: 100%; height: calc(100vh - 140px); border: 0; border-radius: 14px; background: #fff; }
.mv-name { color: #c9d4ea; font-size: 12.5px; font-weight: 600; text-align: center; word-break: break-all; max-width: 100%; }
.mv-close { position: absolute; top: -8px; right: -8px; z-index: 2; color: #fff; background: rgba(255,255,255,0.1); }
.mv-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
.mv-fail { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #e8eefc; text-align: center; padding: 24px; }
.mv-fail small { color: #9db0d0; word-break: break-all; max-width: 420px; }
.media-link { cursor: pointer; }

.cv-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cv-body {
  background: #fbfcff; border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 16px; min-height: 100px; overflow: auto;
}
.map-card { display: flex; flex-direction: column; gap: 10px; }
.map-wrap { height: clamp(420px, calc(100vh - 330px), 780px); border-radius: 14px; overflow: hidden; background: #d9e3f5; position: relative; }
.map-foot { padding-top: 2px; display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.map-credit { font-size: 12px; color: var(--ink-3); }
.map-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.map-credit a:hover { color: var(--accent); }
.map-pin { width: 46px; height: 56px; padding: 0; border: 0; background: none; cursor: pointer; position: absolute; display: block; filter: drop-shadow(0 7px 12px rgba(19,42,86,.28)); }
.map-pin:hover { filter: drop-shadow(0 9px 16px rgba(19,42,86,.38)) brightness(1.04); }
.map-pin:focus-visible { outline: 3px solid rgba(47,97,237,.35); outline-offset: 2px; border-radius: 20px; }
.map-pin-bg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--accent); stroke: #fff; stroke-width: 2; }
.map-pin-num { position: absolute; left: 0; right: 0; top: 8px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px rgba(0,0,0,.18); }
#map-legend { gap: 10px; }
.map-lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-lg i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
#page-map:fullscreen { padding: 14px; background: var(--bg); overflow: auto; }
#page-map:fullscreen .map-card { flex: 1; min-height: 0; }
#page-map:fullscreen .map-wrap { flex: 1; height: auto; min-height: 0; border-radius: 0; }
.map-card:fullscreen { width: 100vw; height: 100vh; padding: 12px; background: var(--bg); border-radius: 0; }
.map-card:fullscreen .map-wrap { height: calc(100vh - 74px); border-radius: 0; }
.client-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.client-row { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.client-row:last-child { border-bottom: 0; }
.client-row.active { background: var(--accent-soft); border-radius: 8px; }
.client-row b { font-size: 13.5px; }
.client-row .hint { margin-left: auto; }
.client-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.client-empty { padding: 12px 4px; color: var(--ink-3); font-size: 12.5px; }
.branch-pop .maplibregl-popup-content { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 14px 36px rgba(19,42,86,.2); font-family: inherit; }
.branch-pop .maplibregl-popup-tip { border-top-color: #fff; }
.branch-pop-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.branch-pop-addr { margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); max-width: 240px; }
.branch-pop-city { margin-top: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); text-transform: uppercase; }
.branch-pop-format { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.branch-pop-format b { color: var(--accent); }
.branch-pop-contacts { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); max-width: 280px; max-height: 210px; overflow: auto; }
.bpc-title { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.branch-pop-contact { display: flex; flex-direction: column; gap: 1px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.branch-pop-contact:last-child { border-bottom: 0; }
.bpc-line { display: flex; align-items: baseline; gap: 6px; }
.bpc-type { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; }
.bpc-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.bpc-phone { font-size: 12px; font-weight: 600; color: var(--accent); }
.map-popup b { display: block; font-size: 13px; color: var(--ink); }
.map-popup span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.map-popup a { display: inline-block; margin-top: 7px; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.map-popup a:hover { text-decoration: underline; }
#map-cities { flex-wrap: wrap; max-width: 100%; }
#map-cities .seg-btn { white-space: nowrap; }
#map-cities .seg-btn .seg-n { margin-left: 6px; }
@media (max-width: 760px) {
  #map-cities { width: 100%; justify-content: center; }
  #map-cities .seg-btn { flex: 0 1 auto; }
  .map-wrap { height: clamp(340px, calc(100vh - 300px), 620px); }
  .map-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
}
#price-edit-toggle.on { background: var(--accent); border-color: transparent; color: #fff; }
#price-edit-toggle.on:hover { background: #2553d6; color: #fff; }
#pf-win-btn.on { background: var(--accent); color: #fff; }
#pf-win-btn.on:hover { background: #2553d6; color: #fff; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.geo-btn {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  background: #f2f6ff; color: var(--accent); border-radius: 9px; padding: 4px 9px;
  font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.geo-btn:hover { background: #e7eeff; border-color: #c8d6f6; }
.geo-btn.none { color: var(--ink-3); background: #f6f7fb; }
.geo-info-list { display: flex; flex-direction: column; gap: 8px; }
.geo-info-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  gap: 8px; align-items: center;
}
.geo-info-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 13px; color: var(--ink); outline: none;
}
.geo-info-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.geo-info-shared { font-size: 12px; white-space: nowrap; gap: 6px; }
.geo-info-row .btn-act { padding: 5px 8px; }
.shop-info-summary { color: var(--ink-2); font-size: 12px; margin-bottom: 4px; }
.shop-info-more { white-space: nowrap; }
.shop-info-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.shop-info-meta b { color: var(--ink); font-size: 15px; }
.shop-info-list { display: flex; flex-direction: column; margin-top: 6px; }
.shop-info-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.shop-info-row span:first-child { color: var(--ink-2); font-weight: 700; }
.shop-info-row:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .geo-info-row { grid-template-columns: 1fr; }
  .geo-info-shared { justify-content: flex-start; }
  .shop-info-row { grid-template-columns: 1fr; gap: 3px; }
}

.sit-list { display: flex; flex-direction: column; }
.sit-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 13px 8px; background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font: inherit; color: inherit; transition: background .15s;
}
.sit-item:last-child { border-bottom: 0; }
.sit-item:hover { background: var(--accent-soft); border-radius: 10px; }
.sit-date {
  flex: 0 0 auto; min-width: 52px; text-align: center; font-weight: 700; font-size: 13px;
  color: var(--accent); background: var(--accent-soft); border-radius: 9px; padding: 7px 6px;
}
.sit-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sit-main b { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sit-main small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sit-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.sit-files { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.sit-st {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}
.sit-st.ok { background: var(--ok-soft); color: #15803d; }
.sit-st.open { background: var(--warn-soft); color: #b45309; }
.sit-empty { padding: 22px 8px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.sit-meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sit-block { margin-bottom: 14px; }
.sit-block b { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 5px; }
.sit-block p { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.sit-block.sit-res p { color: #15803d; }
.sit-files-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sit-media {
  display: block; width: 108px; height: 82px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); background: #000; cursor: zoom-in;
}
.sit-media-audio { max-width: 100%; }
.sit-media img { width: 108px; height: 82px; object-fit: cover; border-radius: 9px; display: block; }

.wt-pending { padding: 4px 0 6px; }
.wt-pending b { display: block; font-size: 15px; margin-bottom: 4px; }
.wt-pending p { margin: 0 0 12px; }
.wt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.wt-progress { font-weight: 600; color: #5b6780; }
.wt-list { display: flex; flex-direction: column; gap: 8px; }
.wt-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e8edf7; border-radius: 12px; background: #fff; flex-wrap: wrap; }
.wt-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wt-name { font-weight: 600; }
.wt-sub { font-size: 12px; color: #8a94ab; }
.wt-row-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.wt-row-side .sit-files-grid { flex-basis: 100%; justify-content: flex-end; }
.wt-row-done { background: #f8fafc; }
.wt-empty-note { padding: 8px 2px; color: #8a94ab; }
.wt-user-row { cursor: pointer; }
.wt-row-side { margin-left: auto; }
.wt-row-side .sit-files-grid { margin-left: auto; }
.wt-phone { font-weight: 700; color: var(--accent); }
.wt-phone-copy { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--accent); vertical-align: middle; display: inline-flex; }
.wt-phone-copy:hover { opacity: .75; }
.wt-city { font-weight: 700; color: var(--accent); user-select: none; -webkit-user-select: none; }
.wt-done-line { display: inline-flex; align-items: center; gap: 8px; }
.wt-undo { border: 0; background: #eef2fb; color: #8a94ab; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wt-undo:hover { background: #fdecec; color: #d64545; }
.wt-pool-note { padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; background: #eef2fb; color: #5b6780; }
.wt-pool-note.warn { background: #fff6e5; color: #8a5a00; border: 1px solid #f3ddb0; }
.wt-pool-note.bad { background: #fdecec; color: #c0392b; border: 1px solid #f3c1c1; }
.wt-shot { position: fixed; inset: 0; z-index: 350; background: rgba(15, 23, 42, 0.92); display: flex; flex-direction: column; cursor: crosshair; animation: fadeIn 0.15s; }
.wt-shot-hint { padding: 10px 16px; text-align: center; font-size: 13px; color: #cbd5e1; background: rgba(0, 0, 0, 0.35); user-select: none; }
.wt-shot-stage { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; }
.wt-shot-img { max-width: 100%; max-height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.wt-shot-rect { position: absolute; border: 2px solid var(--accent); background: rgba(47, 97, 237, 0.18); pointer-events: none; }

.wt-stats-header { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.wt-stats-header .select { min-width: 220px; }
.wt-stats-table-wrap { overflow-x: auto; }
.wt-stats-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wt-stats-table th, .wt-stats-table td { padding: 10px 6px; border-bottom: 1px solid #e8edf7; text-align: left; }
.wt-stats-table th { font-weight: 600; color: #5b6780; background: #f8fafc; position: sticky; top: 0; }
.wt-stats-table tbody tr:hover { background: #f8fafc; }
.wt-stats-table .empty { text-align: center; color: #8a94ab; padding: 24px; }
.wt-stats-table td .btn + .btn, .wt-stats-table td .btn + .sit-st, .wt-stats-table td .sit-st + .btn { margin-left: 6px; }
.wt-stats-table td .btn.sm { padding: 6px 9px; }
.wt-stats-table td { white-space: nowrap; }
.wt-stats-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8edf7; }
.wt-stats-page { font-size: 13px; color: #5b6780; min-width: 80px; text-align: center; }

.lightbox {
  position: fixed; inset: 0; z-index: 260; background: rgba(8, 20, 45, 0.85);
  display: grid; place-items: center; padding: 24px; animation: fadeIn 0.15s;
}
.lightbox img, .lightbox video, .lightbox audio {
  max-width: 100%; max-height: 86vh; border-radius: 12px; background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); cursor: zoom-out; display: block;
}
.lightbox video { max-height: 82vh; }
.lightbox audio { width: min(560px, 90vw); }
.lightbox iframe {
  width: min(900px, 92vw); height: 82vh; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.lightbox .lightbox-unsupported {
  color: #fff; text-align: center; font-size: 14px; max-width: 320px;
}
.lightbox .lightbox-unsupported a { color: var(--accent-2); }
.lightbox .lightbox-close {
  position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, 0.92);
  color: #1c2740;
}



@media (max-width: 760px) {

  body { font-size: 13px; }
  .content { padding: 14px 12px 24px; }
  .page-head { gap: 10px; }
  .seg-btn { padding: 8px 10px; font-size: 12px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .btn.sm { padding: 7px 10px; font-size: 12px; }
  .ic { width: 16px; height: 16px; }
  .ic.xs { width: 12px; height: 12px; }
  .ic.xl { width: 36px; height: 36px; }


  .topbar { padding: 0 10px; height: 52px; }
  .topbar-title { flex: 1; min-width: 0; }
  .topbar-title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-title .page-sub { display: none; }
  .topbar-right { gap: 8px; }
  .online-pill .online-names { display: none; }
  .online-pill { padding: 6px 10px; }


  .sidebar { width: 280px; }
  .side-brand { padding: 16px 14px; }
  .side-brand-text b { font-size: 14px; }
  .nav-item { padding: 10px 12px; font-size: 12.5px; gap: 9px; }


  .card { border-radius: 12px; padding: 14px; }
  .card-title { font-size: 15px; gap: 10px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
  .table th, .table td { padding: 8px 10px; font-size: 12px; }


  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { padding: 14px 16px; }
  .tile .t-value { font-size: 22px; }
  .tile .t-label { font-size: 10.5px; }


  .task-grid { grid-template-columns: 1fr; gap: 10px; }
  .task-card { padding: 12px; }
  .task-title { font-size: 14px; }
  .task-desc { font-size: 12px; -webkit-line-clamp: 3; }


  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .field input, .field select, .field textarea { padding: 12px 13px; font-size: 16px;  }
  .select { padding: 12px 13px; font-size: 16px; }


  .modal { width: calc(100% - 24px); max-width: none; margin: 12px; max-height: calc(100vh - 24px); }
  .modal-body { max-height: 50vh; overflow-y: auto; }
  .modal-foot { flex-wrap: wrap; gap: 8px; }
  .modal-foot .btn { flex: 1; min-width: 120px; }


  .online-drop, .bell-drop { width: calc(100vw - 24px); right: -12px; max-width: none; }
  .online-drop { right: -12px; }


  .table-wrap { margin: 0 -12px; padding: 0 12px; width: calc(100% + 24px); }


  .btn { min-height: 44px;  }
  .icon-btn { width: 40px; height: 40px; }


  .seg { gap: 2px; padding: 3px; }
  .seg-btn { padding: 7px 10px; font-size: 11.5px; }


  .wt-stats-table { font-size: 12px; }
  .wt-stats-table th, .wt-stats-table td { padding: 8px 8px; }
  .wt-stats-header { flex-direction: column; gap: 8px; }
  .wt-stats-header .select { min-width: 100%; width: 100%; }


  .wt-row { flex-direction: column; gap: 8px; align-items: flex-start; }
  .wt-row-main { width: 100%; flex-wrap: wrap; gap: 6px; }
  .wt-row-side { width: 100%; justify-content: flex-start; margin-top: 4px; }


  .cheat-grid { grid-template-columns: 1fr; gap: 10px; }
  .cheat-card { padding: 12px; }


  .emp-row { flex-direction: column; gap: 8px; align-items: flex-start; }
  .emp-main { width: 100%; flex-wrap: wrap; gap: 6px; }
  .emp-side { width: 100%; justify-content: flex-start; }


  .login-card { width: calc(100vw - 24px); padding: 24px 20px; }
  .logo-mark { width: 44px; height: 44px; }
  .login-title { font-size: 20px; }


  .wt-stats-pagination { flex-wrap: wrap; gap: 8px; }
  .wt-stats-page { order: -1; width: 100%; text-align: center; }


  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }


  .drawer { width: calc(100% - 12px); }


  .empty { padding: 30px 16px; }
  .empty .ic.xl { width: 36px; height: 36px; }
  .empty p { font-size: 13px; }
}


@media (min-width: 761px) and (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .task-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .content { padding: 18px 20px; }
  .table-wrap { overflow-x: auto; }
}


@media print {
  .sidebar, .topbar, .m-nav-btn, .side-backdrop, .modal-backdrop, .toasts, .bell-wrap, .online-wrap { display: none !important; }
  .main { flex: 1; }
  .content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  table { min-width: 100%; }
  .modal, .lightbox { display: none !important; }
}

.delreq-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.delreq-row:last-child { border-bottom: none; }
.delreq-actions { display: flex; gap: 6px; flex-shrink: 0; }

#info-tabs { background: #dbe4f6; border: 1px solid #c7d4ea; padding: 5px; gap: 5px; }
#info-tabs .seg-btn { padding: 9px 18px; font-size: 13px; font-weight: 600; }
#info-tabs .seg-btn.active { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(13,71,161,.28); }
#info-tabs .seg-btn.active .ic { color: #fff; }

.client-form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.client-form-head b { font-size: 14px; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 46px; height: 38px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.color-preview { width: 24px; height: 24px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; background: #EC4899; }

.regmanage-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.regmanage-toolbar .hint { font-size: 12px; }
#modal-regmanage .modal-body, #modal-repmanage .modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.regmanage-list { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1 1 auto; max-height: calc(100vh - 280px); overflow: auto; padding-right: 2px; }
.regmanage-kind { color: var(--ink-3); font-weight: 600; }
.regmanage-head .btn, .regmanage-actions .btn { white-space: nowrap; }
.regmanage-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-card); flex: 0 0 auto; }
.regmanage-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f6f9ff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.regmanage-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.regmanage-head .hint { font-size: 12px; color: var(--ink-3); }
.regmanage-items { display: flex; flex-direction: column; }
.regmanage-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--line); }
.regmanage-item:first-child { border-top: none; }
.regmanage-item-name { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regmanage-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.regmanage-actions .btn { padding: 5px 7px; }
.regmanage-empty { padding: 10px 12px; font-size: 12.5px; color: var(--ink-3); }
.regmanage-danger { color: var(--bad) !important; }
@media (max-width: 760px) {
  .regmanage-list { max-height: 52vh; }
  .regmanage-head { align-items: flex-start; }
  .regmanage-head .spacer { display: none; }
  .regmanage-head .btn { font-size: 11px; padding: 5px 7px; }
}

.ss { position: relative; }
.ss .ss-input { width: 100%; padding-left: 36px; padding-right: 34px; }
.ss .ss-input:disabled { background: #f2f4f9; color: var(--ink-3); cursor: not-allowed; }
.ss .ss-ic, .ss .ss-caret { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.ss .ss-ic { left: 12px; }
.ss .ss-caret { right: 12px; }
.ss-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  max-height: 280px; overflow: auto; background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 6px;
}
.ss-group {
  position: sticky; top: 0; z-index: 1;
  padding: 7px 8px 5px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-3);
  background: #fff;
}
.ss-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%;
  padding: 7px 10px; border-radius: 8px; text-align: left;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.ss-item span { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.ss-item:hover, .ss-item.active { background: var(--accent-soft); color: var(--accent); }
.ss-empty { padding: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.mini-ss { width: 240px; }
.mini-ss .ss-input { padding: 7px 30px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: #f2f6fc; }
.mini-ss .ss-input:focus { background: #fff; }
.mini-ss .ss-ic { left: 9px; }
.mini-ss .ss-caret { right: 9px; }
.mini-ss .ss-menu { font-size: 12.5px; }
#page-drive .head-actions { flex-wrap: wrap; justify-content: flex-end; }
.drive-drop { margin-bottom: 14px; }
.drive-crumbs { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; min-height: 34px; }
.drive-crumb { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.drive-crumb:hover { background: var(--accent-soft); color: var(--accent); }
.drive-crumb.current { color: var(--ink); }
.drive-sep { color: var(--ink-3); font-size: 12px; }
.drive-table td { vertical-align: middle; }
.drive-name-btn { display: inline-flex; align-items: center; gap: 8px; text-align: left; font-weight: 700; color: var(--ink); }
.drive-name-btn:hover { color: var(--accent); }
.drive-name-btn .ic { color: var(--accent); flex: 0 0 auto; }
.drive-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.drive-actions .btn-act { white-space: nowrap; }
.drive-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: #eef2f9; color: var(--ink-2); white-space: nowrap; }
.drive-badge.owner { background: #e8f8ee; color: #15803d; }
.drive-badge.editor { background: #e7f0ff; color: #1d4ed8; }
.drive-badge.reader { background: #f1f5f9; color: #475569; }
.drive-badge.shared { background: #fff5db; color: #a16207; }
.drive-group td { background: #f7f9fd; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-3); }
.drive-share-note { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.drive-share-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.drive-share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.drive-share-user { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.drive-share-user b { font-size: 13px; }
.drive-share-user span { font-size: 11.5px; color: var(--ink-3); }
.drive-share-role { width: 150px; flex: 0 0 auto; }
@media (max-width: 760px) {
  .drive-share-role { width: 120px; }
  .drive-actions { justify-content: flex-start; }
}
