/* ============================================================ Rangin UI */
@font-face { font-family: 'Vazirmatn'; src: local('Vazirmatn'), local('Vazirmatn Regular'), local('Vazir'); font-weight: 100 900; }

:root {
  --bg: #F3F5F9; --bg2: #EBEEF4; --card: #FFFFFF; --line: #E3E7EE; --line2: #D3D9E3; --text: #1C2330; --muted: #6B7587; --faint: #9AA3B2;
  --accent: #3E63DD; --accent2: #5B7BEA; --accent-soft: #E8EEFF; --ok: #1FAF6A; --amber: #E5B800; --warn: #F7850F; --danger: #E5484D; --info: #2E9BF0;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.05); --shadow-lg: 0 18px 50px rgba(16,24,40,.18);
  --r: 14px; --r-sm: 9px; --side: 236px; --top: 62px;
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'DejaVu Sans', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E1117; --bg2: #151A23; --card: #181D27; --line: #272E3B; --line2: #343C4C; --text: #E6EAF2; --muted: #98A2B5; --faint: #6D7688;
  --accent: #7B93F3; --accent2: #93A7F6; --accent-soft: #1F2742; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 18px 50px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
b { font-weight: 700; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .2px; direction: ltr; unicode-bidi: isolate; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.pad { padding: 16px 18px; }
.mt { margin-top: 22px; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.ic { flex: none; vertical-align: middle; }
.ic.flip { transform: rotate(180deg); }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------ status palette */
.st-white { --c: #F4F6F9; --s: #C3CCD8; --f: #334155; }
.st-yellow { --c: #FFE45C; --s: #F5C400; --f: #5C4300; }
.st-blue { --c: #5BB6FF; --s: #2E9BF0; --f: #06325A; }
.st-green { --c: #3DCB86; --s: #1FAF6A; --f: #053B25; }
.st-purple { --c: #A77BF0; --s: #8B5CF6; --f: #2A0E62; }
.st-orange { --c: #FF9F45; --s: #F7850F; --f: #522700; }
.st-black { --c: #2B303B; --s: #1C1F26; --f: #FFFFFF; }
.st-red { --c: #F2555A; --s: #E5484D; --f: #FFFFFF; }
:root[data-theme="dark"] .st-black { --c: #3A404D; --s: #5A6170; }
:root[data-theme="dark"] .st-white { --c: #E4E9F0; --s: #AEB8C6; }

.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 8px; border-radius: 99px; background: var(--c); color: var(--f); font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--s) 70%, transparent); line-height: 22px; }
.st-chip .st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.st-chip.st-black .st-dot, .st-chip.st-red .st-dot { background: #fff; box-shadow: none; }
.st-chip.big { font-size: 14px; padding: 4px 14px 4px 12px; }
.st-dotonly { display: inline-block; border-radius: 50%; background: var(--c); border: 2px solid var(--s); vertical-align: middle; }
.ship-bob { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }

/* ------------------------------------------------------------ boot / login */
.boot { height: 100vh; display: grid; place-items: center; }
.boot-dots { display: flex; gap: 8px; }
.boot-dots i { width: 12px; height: 12px; border-radius: 50%; animation: pulse 1s infinite ease-in-out; }
.boot-dots i:nth-child(1) { background: #F5C400; } .boot-dots i:nth-child(2) { background: #2E9BF0; animation-delay: .1s; } .boot-dots i:nth-child(3) { background: #1FAF6A; animation-delay: .2s; } .boot-dots i:nth-child(4) { background: #8B5CF6; animation-delay: .3s; } .boot-dots i:nth-child(5) { background: #F7850F; animation-delay: .4s; }
@keyframes pulse { 0%,100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

.login-wrap { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 20px; }
.login-bg { position: absolute; inset: 0; filter: blur(60px); opacity: .55; }
.login-bg .blob { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--c); animation: float 16s ease-in-out infinite; }
.login-bg .blob:nth-child(1) { top: -80px; right: 10%; } .login-bg .blob:nth-child(2) { top: 20%; left: -60px; animation-delay: -3s; } .login-bg .blob:nth-child(3) { bottom: -100px; left: 20%; animation-delay: -6s; }
.login-bg .blob:nth-child(4) { bottom: 10%; right: -80px; animation-delay: -9s; } .login-bg .blob:nth-child(5) { top: 45%; left: 45%; animation-delay: -2s; } .login-bg .blob:nth-child(6) { top: 5%; left: 35%; animation-delay: -12s; width: 220px; height: 220px; } .login-bg .blob:nth-child(7) { bottom: 30%; left: 70%; width: 200px; height: 200px; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.08); } 66% { transform: translate(-30px,25px) scale(.94); } }
.login-card { position: relative; width: 380px; max-width: 100%; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; padding: 32px 30px 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; text-align: center; animation: rise .5s cubic-bezier(.2,.8,.2,1); }
.login-card h1 { margin: 6px 0 0; font-size: 30px; letter-spacing: -.5px; }
.login-card p { margin: 0 0 10px; }
.login-card .field { text-align: right; }
.login-err { color: var(--danger); min-height: 20px; font-size: 13px; }
.login-foot { margin-top: 4px; }
.logo-big { display: grid; place-items: center; }
.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.logo-mark { position: relative; display: inline-block; flex: none; animation: spin 24s linear infinite; }
.logo-mark i { position: absolute; top: 50%; left: 50%; margin: -15% 0 0 -15%; border-radius: 50%; mix-blend-mode: multiply; opacity: .92; }
:root[data-theme="dark"] .logo-mark i { mix-blend-mode: screen; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; transition: grid-template-columns .25s; }
body.side-collapsed .shell { grid-template-columns: 70px 1fr; }
.sidebar { background: var(--card); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; padding: 16px 18px; height: var(--top); border-bottom: 1px solid var(--line); white-space: nowrap; }
.brand b { font-size: 19px; display: block; line-height: 1.2; } .brand small { color: var(--muted); display: block; font-size: 11.5px; }
.side-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; overflow: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; position: relative; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-item.on::before { content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--accent); }
.nav-item em { margin-inline-start: auto; font-style: normal; font-size: 11.5px; background: var(--bg2); color: var(--muted); padding: 0 8px; border-radius: 99px; }
.nav-item.on em { background: var(--accent); color: #fff; }
body.side-collapsed .nav-item span, body.side-collapsed .nav-item em, body.side-collapsed .brand div, body.side-collapsed .side-foot small { display: none; }
.side-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: var(--muted); }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
body.offline .conn-dot { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: var(--top); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 18px; background: var(--card); border-bottom: 1px solid var(--line); z-index: 20; }
.page-title { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.top-spacer, .tb-spacer { flex: 1; }
.offline-bar { display: none; background: var(--danger); color: #fff; padding: 6px 18px; font-size: 13px; gap: 8px; align-items: center; }
body.offline .offline-bar { display: flex; }
.content { flex: 1; overflow: auto; padding: 18px 22px 90px; scroll-behavior: smooth; }
.page { animation: pageIn .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 14px; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.gsearch { position: relative; display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; width: 300px; color: var(--muted); }
.gsearch .inp { border: 0; background: transparent; box-shadow: none; padding: 7px 0; }
.gsearch-res { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: none; padding: 6px; z-index: 50; min-width: 380px; }
.gsearch-res.open { display: block; animation: rise .18s; }
.gs-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; color: var(--text); }
.gs-item:hover { background: var(--bg); }
.gs-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; position: relative; flex: none; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.bell-count { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: none; place-items: center; padding: 0 4px; line-height: 18px; }
.bell-count.on { display: grid; animation: pop .3s; }
.bell.ring-anim .ic { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ring { 0%,80%,100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
@keyframes pop { from { transform: scale(.3); } 70% { transform: scale(1.2); } to { transform: scale(1); } }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; background: transparent; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 12px; text-align: right; }
.user-btn:hover { background: var(--bg); }
.user-btn b { display: block; font-size: 13px; line-height: 1.3; } .user-btn small { color: var(--muted); display: block; line-height: 1.3; }
.menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 190px; display: none; z-index: 60; }
.user-menu.open .menu, .more-wrap.open .menu { display: block; animation: rise .16s; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: right; }
.menu button:hover { background: var(--bg); }
.more-wrap { position: relative; }

/* ------------------------------------------------------------ basic controls */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-title { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-title .ic { color: var(--muted); }
.card-title small { font-weight: 400; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s, box-shadow .15s; color: var(--text); }
.btn:hover { background: var(--bg); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #d43c41; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; padding: 10px; font-size: 15px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; font-size: 13px; }
.link.danger { color: var(--danger); }
.inp { width: 100%; border: 1px solid var(--line2); background: var(--card); border-radius: var(--r-sm); padding: 7px 11px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 37px; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.inp:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.inp.err { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.inp.num { text-align: left; font-variant-numeric: tabular-nums; }
.inp.sm { width: 70px; min-height: 30px; padding: 3px 8px; }
.inp.color { padding: 2px; height: 37px; }
select.inp { padding-inline-end: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7587' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; }
textarea.inp { resize: vertical; line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field.wide { grid-column: span 2; }
.field-label { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.field-label .req { color: var(--danger); }
.field-help { color: var(--muted); font-size: 11.8px; line-height: 1.5; }
.field.attn .dp-inp { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--card)); }
.hint-ic { color: var(--faint); display: inline-flex; cursor: help; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; align-items: start; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid > .full { grid-column: 1 / -1; }
.row-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; white-space: nowrap; font-size: 13px; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.money { display: flex; gap: 6px; }
.money .inp:first-child { flex: 1; min-width: 0; }
.money .cur { width: 92px; flex: none; }
.sub-head { font-weight: 700; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line2); margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 99px; background: var(--bg2); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 21px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge.role { background: var(--accent-soft); color: var(--accent); }
.info-note, .warn-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin: 0; }
.info-note { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 85%, var(--text)); }
.warn-note { background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.info-note .ic, .warn-note .ic { margin-top: 3px; }
.banner { align-items: center; }
.banner .btn { margin-inline-start: auto; }
.ok-text { color: var(--ok); font-weight: 600; } .late-text { color: var(--danger); font-weight: 600; } .warn-text { color: var(--warn); font-weight: 600; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; color: var(--faint); text-align: center; }
.empty p { margin: 0; color: var(--muted); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.sw-track { width: 42px; height: 24px; border-radius: 99px; background: var(--line2); position: relative; transition: background .2s; flex: none; }
.sw-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s cubic-bezier(.3,1.4,.6,1); }
.switch input:checked + .sw-track { background: var(--accent); }
.switch input:checked + .sw-track .sw-knob { inset-inline-start: 21px; }
.sw-label { font-weight: 600; }
.seg { display: inline-flex; background: var(--bg2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .15s, color .15s; }
.seg-btn.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: color .15s, border-color .2s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count { background: var(--bg2); color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: 11.5px; }
.tab.on .tab-count { background: var(--accent-soft); color: var(--accent); }
.tab-body { padding-top: 14px; }

/* avatar */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; flex: none; box-shadow: 0 0 0 2px var(--card); letter-spacing: -.5px; line-height: 1; }
.avatar.inactive { filter: grayscale(1); opacity: .6; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-inline-start: -7px; }
.person { display: flex; align-items: center; gap: 9px; }
.person b { display: block; line-height: 1.3; } .person small { color: var(--muted); }

/* ------------------------------------------------------------ toolbar & status filter */
.toolbar { display: flex; align-items: flex-end; gap: 10px 12px; padding: 12px 14px; flex-wrap: wrap; }
.toolbar.sub { margin-bottom: 12px; }
.toolbar p { margin: 0; max-width: 760px; }
.tb-search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; max-width: 340px; border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 0 10px; color: var(--muted); background: var(--card); align-self: flex-end; }
.tb-search .inp { border: 0; box-shadow: none !important; padding-inline: 0; }
.tb-item { display: flex; flex-direction: column; gap: 3px; min-width: 128px; }
.tb-item > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tb-item .inp { min-height: 35px; padding-top: 5px; padding-bottom: 5px; }
.tb-item .dp { width: 138px; }
.toolbar .chk { align-self: center; padding-bottom: 2px; }
.status-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sf-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line2); background: var(--card); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-weight: 600; font-size: 13px; transition: all .15s; color: var(--muted); }
.sf-btn .st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid var(--s); }
.sf-btn b { background: var(--bg2); color: var(--muted); padding: 0 7px; border-radius: 99px; font-size: 11.5px; }
.sf-btn:hover { border-color: var(--s, var(--accent)); color: var(--text); }
.sf-btn.on { background: var(--c, var(--accent-soft)); color: var(--f, var(--accent)); border-color: var(--s, var(--accent)); box-shadow: 0 3px 10px color-mix(in srgb, var(--s, var(--accent)) 30%, transparent); }
.sf-btn.on b { background: rgba(255,255,255,.55); color: inherit; }
.sf-all.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.sf-hint { margin-inline-start: 6px; }

/* ------------------------------------------------------------ tables */
.table-card { overflow-x: auto; }
.tbl.projects td { white-space: nowrap; }
.tbl.projects .title-cell { white-space: normal; min-width: 210px; }
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; font-size: 13px; }
.tbl.compact tbody tr { cursor: default; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sorted { color: var(--accent); }
.row-anim { animation: rowIn .35s both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.row-alarm td:first-child { box-shadow: inset -4px 0 0 var(--danger); }
.title-cell a { font-weight: 700; display: block; }
.title-cell a:hover { color: var(--accent); }
.title-cell small { color: var(--muted); }
.prog-cell { min-width: 140px; }
.prog-cell small { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.last-cell { max-width: 230px; }
.last-cell .ln-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.last-cell small { color: var(--faint); }
.tbl-foot { padding: 8px 14px; font-size: 12.5px; }
.alarm-pill { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 700; font-size: 12px; padding: 1px 9px; border-radius: 99px; animation: alarm 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes alarm { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 35%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.al-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.al-ic.lv-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); animation: alarm 1.6s infinite; }
.al-ic.lv-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.al-ic.lv-info { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.ship-badge { display: inline-flex; color: var(--info); animation: bob 2s ease-in-out infinite; }

/* progress */
.pbar { position: relative; height: 8px; background: var(--bg2); border-radius: 99px; overflow: visible; }
.pbar.thin { height: 5px; margin: 6px 0 2px; }
.pbar-fill { height: 100%; border-radius: 99px; background: var(--ok); width: 0; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: right; }
.lvl-p50 .pbar-fill { background: linear-gradient(90deg, var(--amber), var(--ok)); }
.lvl-p80 .pbar-fill { background: linear-gradient(90deg, var(--warn), var(--amber)); }
.lvl-over .pbar-fill { background: var(--danger); }
.pbar-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--card); border-radius: 2px; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring-arc { transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
.ring-txt b { font-size: 14px; } .ring-txt small { font-size: 9.5px; color: var(--muted); max-width: 54px; }
.ring-ph { width: 74px; height: 74px; border-radius: 50%; border: 2px dashed var(--line2); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--faint); flex: none; }
.ring-ph small { font-size: 10px; }

/* ------------------------------------------------------------ kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kb-col { background: var(--bg2); border-radius: var(--r); padding: 10px; min-height: 300px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.kb-col.drop-target { border-color: color-mix(in srgb, var(--s) 60%, transparent); }
.kb-col.drop-ok { background: color-mix(in srgb, var(--c) 22%, var(--bg2)); border-color: var(--s); }
.kb-head { display: flex; align-items: center; gap: 7px; padding: 4px 4px 10px; flex-wrap: wrap; }
.kb-head .st-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--s); }
.kb-head small { color: var(--muted); flex-basis: 100%; font-size: 11.5px; line-height: 1.4; order: 5; }
.kb-head em { margin-inline-start: auto; font-style: normal; background: var(--card); border-radius: 99px; padding: 0 9px; font-weight: 700; font-size: 12px; }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card { display: block; background: var(--card); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--s); box-shadow: var(--shadow); cursor: grab; transition: transform .15s, box-shadow .15s; animation: rowIn .3s both; }
.kb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,24,40,.12); }
.kb-card.dragging { opacity: .45; transform: rotate(2deg); }
.kb-card.alarm { border-inline-start-color: var(--danger); }
.kb-top { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.kb-top .al-ic { margin-inline-start: auto; width: 22px; height: 22px; }
.kb-title { display: block; margin: 2px 0; line-height: 1.5; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

/* ------------------------------------------------------------ project detail */
.pd-head { padding: 14px 18px 12px; border-top: 5px solid var(--s); }
.pd-head-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-titles h1 { margin: 0; font-size: 21px; line-height: 1.4; }
.pd-code { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tr-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-btn { border-color: color-mix(in srgb, var(--s) 55%, var(--line2)); }
.tr-btn .st-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid var(--s); }
.tr-btn:hover { background: color-mix(in srgb, var(--c) 25%, var(--card)); border-color: var(--s); }
.stepper { display: flex; margin-top: 14px; gap: 0; overflow-x: auto; padding-bottom: 2px; }
.step { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; animation: rise .4s both; animation-delay: var(--d); }
.step::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step.done::before, .step.cur::before { background: linear-gradient(-90deg, var(--line2), var(--s)); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 3px solid var(--line2); z-index: 1; color: var(--f); transition: all .3s; }
.step.done .step-dot { background: var(--c); border-color: var(--s); }
.step.cur .step-dot { background: var(--c); border-color: var(--s); box-shadow: 0 0 0 5px color-mix(in srgb, var(--s) 25%, transparent); animation: curPulse 2s infinite; }
@keyframes curPulse { 0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 25%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--s) 8%, transparent); } }
.step-lbl { font-weight: 700; font-size: 12.5px; margin-top: 4px; color: var(--muted); }
.step.cur .step-lbl, .step.done .step-lbl { color: var(--text); }
.step small { color: var(--muted); font-size: 11px; min-height: 16px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.pd-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-card { padding: 16px 18px 18px; border-top: 3px solid var(--sc); }
.muted-card { opacity: .93; }
.sec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--s); }
.sec-note { margin-inline-start: auto; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); padding: 0 10px; border-radius: 99px; font-weight: 600; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line2); border-radius: 99px; padding: 3px 12px 3px 10px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; color: var(--muted); }
.cal-chip input { display: none; }
.cal-chip::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--cc); }
.cal-chip.on { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 12%, var(--card)); color: var(--text); }
.ltpanel { display: flex; flex-direction: column; gap: 10px; }
.lt-row { background: var(--bg); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.lt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lt-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.lt-dates .arrow { color: var(--faint); }
.hol-box { margin-top: 8px; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.hol-box.warn { background: color-mix(in srgb, var(--warn) 11%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); animation: rise .3s; }
.hol-box.ok { background: color-mix(in srgb, var(--ok) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.hol-title { font-weight: 700; display: flex; align-items: center; gap: 4px; }
.hol-box ul { margin: 4px 0 8px; padding-inline-start: 18px; }
.cal-sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 4px; }
.ltpanel.compact .lt-row { padding: 8px 10px; }
.adj-box ul { margin: 4px 0 8px; padding-inline-start: 18px; font-size: 13px; }
.save-bar { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 140%); z-index: 40; transition: transform .35s cubic-bezier(.2,1.2,.4,1); width: min(820px, calc(100vw - var(--side) - 60px)); margin-left: calc(var(--side) / -2); }
.save-bar:not(.on) { visibility: hidden; transition: transform .35s, visibility 0s .35s; }
.save-bar.on { transform: translate(-50%, 0); }
.save-inner { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--card); padding: 10px 12px 10px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); }
.save-inner small { color: color-mix(in srgb, var(--card) 65%, transparent); }
.save-inner .btn-ghost { color: var(--card); }
.save-inner .btn-ghost:hover { background: rgba(255,255,255,.1); }
.trk { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.trk + .trk { border-top: 1px dashed var(--line); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); white-space: nowrap; }
.kv b { text-align: left; font-weight: 600; }
.people { display: flex; flex-direction: column; gap: 8px; }
.guide { padding-inline-start: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.trans-head { display: flex; align-items: center; gap: 10px; }
.trans-arrow { font-size: 20px; color: var(--faint); }
.sub-card { background: var(--bg); border-radius: 12px; padding: 12px; border: 1px solid var(--line); }
.sub-card h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 13.5px; }

/* feed */
.composer { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.composer-top { display: flex; align-items: center; gap: 10px; }
.composer-top .dp { width: 150px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feed { display: flex; flex-direction: column; gap: 0; position: relative; }
.feed::before { content: ''; position: absolute; top: 10px; bottom: 10px; inset-inline-start: 26px; width: 2px; background: var(--line); }
.feed-item { display: flex; gap: 12px; padding: 10px 8px; position: relative; animation: rowIn .35s both; }
.feed-ic { flex: none; width: 38px; display: grid; place-items: center; z-index: 1; }
.feed-sym { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--f); border: 2px solid var(--s); }
.feed-body { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; border-inline-start: 3px solid var(--sc); box-shadow: var(--shadow); }
.feed-item.k-system .feed-body, .feed-item.k-milestone .feed-body { background: var(--bg); box-shadow: none; }
.feed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.feed-text { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.85; }

/* history / planned */
.delay { font-weight: 700; } .delay.late { color: var(--danger); } .delay.ok { color: var(--ok); }
.stage-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 14px; gap: 2px; }
.stage-bar.big { height: 34px; }
.sb-seg { background: var(--c); color: var(--f); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; min-width: 4px; animation: grow .8s both; transform-origin: right; }

/* project timeline */
.ptl { position: relative; margin: 26px 0 6px; user-select: none; }
.ptl-bg { position: absolute; inset: -20px 120px 22px 0; pointer-events: none; }
.ptl-bg > * { pointer-events: auto; }
.ptl-tick { position: absolute; top: 0; bottom: 0; border-inline-start: 1px dashed var(--line2); }
.ptl-tick span { position: absolute; top: -2px; inset-inline-start: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ptl-hol { position: absolute; top: 18px; bottom: 0; background: color-mix(in srgb, var(--hc) 14%, transparent); }
.ptl-today { position: absolute; top: 10px; bottom: -6px; width: 2px; background: var(--danger); z-index: 3; }
.ptl-today span { position: absolute; bottom: -18px; transform: translateX(50%); font-size: 10.5px; color: var(--danger); font-weight: 700; white-space: nowrap; }
.ptl-rows { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.ptl-row { display: flex; align-items: center; gap: 0; }
.ptl-lbl { width: 120px; flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.ptl-lane { position: relative; flex: 1; height: 30px; }
.ptl-lane.events { height: 34px; }
.ptl-seg { position: absolute; top: 6px; height: 18px; border-radius: 6px; background: var(--c); border: 1px solid var(--s); animation: grow .7s both; transform-origin: right; }
.ptl-plan { position: absolute; top: 5px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 13%, transparent); border: 1.5px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.ptl-plan.proj { border-style: dashed; background: transparent; }
.ptl-fill { position: absolute; top: 9px; height: 12px; border-radius: 6px; background: var(--ok); animation: grow 1s both; transform-origin: right; pointer-events: none; }
.ptl-fill.lvl-p50 { background: var(--amber); } .ptl-fill.lvl-p80 { background: var(--warn); } .ptl-fill.lvl-over { background: var(--danger); }
.ptl-th { position: absolute; top: -6px; font-size: 9.5px; color: var(--muted); transform: translateX(50%); }
.ptl-th::after { content: ''; position: absolute; top: 14px; left: 50%; width: 1.5px; height: 22px; background: var(--muted); opacity: .5; }
.ptl-ghost { position: absolute; top: 2px; bottom: 2px; width: 0; border-inline-start: 2px dashed var(--faint); }
.ptl-flag, .ptl-done { position: absolute; top: 3px; transform: translateX(50%); color: var(--text); background: var(--card); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--line); z-index: 2; }
.ptl-done.late { color: var(--danger); border-color: var(--danger); } .ptl-done.ok { color: var(--ok); border-color: var(--ok); }
.ptl-ev { position: absolute; top: 5px; transform: translateX(50%); width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--s); display: grid; place-items: center; z-index: 2; color: var(--text); transition: transform .15s; cursor: default; }
.ptl-ev:hover { transform: translateX(50%) scale(1.25); z-index: 5; }
.ptl-ev.k-note { width: 14px; height: 14px; top: 9px; background: var(--c); }
.ptl-ev em { position: absolute; top: -9px; inset-inline-end: -8px; font-size: 9px; font-style: normal; background: var(--text); color: var(--card); border-radius: 99px; padding: 0 4px; line-height: 14px; }
.ptl-axis { display: flex; justify-content: space-between; padding-inline-start: 120px; font-size: 11px; color: var(--muted); margin-top: 22px; }

/* tooltips */
.tip { position: fixed; top: 0; left: 0; z-index: 1000; max-width: 360px; background: #1C2330; color: #EEF1F6; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.7; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
:root[data-theme="dark"] .tip { background: #2A3140; }
.tip.in { opacity: 1; }
.tip b { color: #fff; }
.tip small, .tip .muted { color: #A9B2C3; }
.tip p { margin: 4px 0; white-space: pre-wrap; }
.tip .st-chip { font-size: 11px; line-height: 18px; }
.tip-update + .tip-update { border-top: 1px solid rgba(255,255,255,.12); margin-top: 6px; padding-top: 6px; }
.tu-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tu-proj { color: #C9D2E3; font-size: 12px; }
.tu-cost { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); color: #FFE45C; }
.tip-sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; }
.tip-list div { margin: 2px 0; }
.tip .pbar { margin: 6px 0; background: rgba(255,255,255,.15); }

/* ------------------------------------------------------------ modal / drawer / toast */
.modal-back, .drawer-back { position: fixed; inset: 0; background: rgba(15,20,30,.42); z-index: 200; display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.modal-back.in, .drawer-back.in { opacity: 1; }
.modal { background: var(--card); border-radius: 18px; width: 520px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(16px) scale(.97); transition: transform .25s cubic-bezier(.2,1.2,.4,1); }
.modal-wide { width: 820px; }
.modal-back.in .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-start; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-direction: row-reverse; }
.confirm-text { margin: 0; line-height: 1.9; }
.drawer-back { place-items: stretch; justify-items: end; padding: 0; }
.drawer { width: 440px; max-width: 100vw; height: 100vh; background: var(--bg); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); justify-self: end; }
.drawer-back.in .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; display: flex; align-items: center; gap: 4px; flex: 1; }
.alert-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 12px; }
.alert-list.compact { padding: 0; }
.alert-card { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; border-inline-start: 4px solid var(--lc); animation: rowIn .3s both; --lc: var(--info); }
.alert-card.lv-warn { --lc: var(--warn); } .alert-card.lv-danger { --lc: var(--danger); }
.alert-card.read { opacity: .6; }
.ac-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--lc) 13%, transparent); color: var(--lc); flex: none; }
.ac-body { flex: 1; min-width: 0; }
.ac-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ac-body p { margin: 4px 0; font-size: 13px; line-height: 1.75; }
.ac-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 18px; left: 18px; z-index: 900; display: flex; flex-direction: column-reverse; gap: 8px; width: 380px; max-width: calc(100vw - 36px); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; box-shadow: var(--shadow-lg); border-inline-start: 4px solid var(--tc); transform: translateX(-120%); opacity: 0; transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .3s; cursor: pointer; --tc: var(--info); }
.toast.in { transform: none; opacity: 1; }
.toast.out { transform: translateX(-120%); opacity: 0; }
.t-ok { --tc: var(--ok); } .t-error, .t-danger { --tc: var(--danger); } .t-warn { --tc: var(--warn); }
.toast-ic { color: var(--tc); margin-top: 2px; }
.toast-body { flex: 1; font-size: 13px; line-height: 1.7; }
.toast-body b { display: block; }
.toast-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; }

/* date picker / user picker */
.dp { position: relative; display: flex; }
.dp-inp { padding-inline-end: 34px; text-align: right; }
.dp-btn { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; }
.dp-btn:hover { color: var(--accent); }
.dp-pop { position: fixed; z-index: 700; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; animation: rise .16s; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.dp-cell { aspect-ratio: 1; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 13px; position: relative; display: grid; place-items: center; }
.dp-cell:hover { background: var(--bg); }
.dp-cell.blank { cursor: default; }
.dp-cell.fri { color: var(--danger); }
.dp-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 700; }
.dp-cell.sel { background: var(--accent); color: #fff; font-weight: 700; }
.dp-cell.hol::after { content: ''; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--hc); }
.dp-cell.hol { background: color-mix(in srgb, var(--hc) 10%, transparent); }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.upick { position: relative; }
.upick-box { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 37px; border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 4px 8px; padding-inline-end: 28px; cursor: pointer; background: var(--card); }
.upick.disabled .upick-box { background: var(--bg); cursor: not-allowed; }
.upick-caret { position: absolute; inset-inline-end: 9px; top: 11px; color: var(--muted); }
.uchip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg2); border-radius: 99px; padding: 1px 4px 1px 9px; font-size: 12.5px; font-weight: 600; }
.uchip-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: grid; padding: 2px; border-radius: 50%; }
.uchip-x:hover { color: var(--danger); }
.upick-pop { position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 80; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; max-height: 280px; overflow: auto; animation: rise .15s; }
.upick-item { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: right; }
.upick-item:hover { background: var(--bg); }
.upick-item span { flex: 1; font-weight: 600; } .upick-item small { color: var(--muted); }
.upick-item.on { background: var(--accent-soft); }
.upick-item.on .ic { color: var(--accent); }
.upick-item.dim { opacity: .55; }

/* ------------------------------------------------------------ dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; animation: rise .45s both; display: flex; flex-direction: column; gap: 2px; }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; } .kpi:nth-child(5) { animation-delay: .2s; } .kpi:nth-child(6) { animation-delay: .25s; } .kpi:nth-child(7) { animation-delay: .3s; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16,24,40,.1); }
.kpi::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--kc); opacity: .09; }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--kc) 15%, transparent); color: var(--kc); }
.kpi-num { font-size: 26px; white-space: nowrap; font-weight: 800; letter-spacing: -.5px; line-height: 1.3; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); }
.kpi-spark { position: absolute; bottom: 10px; inset-inline-end: 12px; opacity: .8; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-grid > .card { animation: rise .5s both; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
.dash-grid > .card:first-child { grid-column: span 2; }
.river { display: flex; height: 56px; border-radius: 12px; overflow: hidden; gap: 3px; }
.river-seg { background: var(--c); color: var(--f); display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 26px; line-height: 1.2; transition: flex .4s, filter .15s; animation: grow .8s both; transform-origin: right; }
.river-seg:hover { filter: brightness(1.06) saturate(1.1); }
.river-seg b { font-size: 18px; } .river-seg small { font-size: 11px; font-weight: 600; opacity: .85; }
.river-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.river-legend span { display: inline-flex; align-items: center; gap: 6px; }
.river-legend .st-dotonly { width: 11px; height: 11px; }
.due-list, .hol-list, .mini-feed, .team-load { display: flex; flex-direction: column; gap: 6px; }
.due-item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; transition: background .15s; }
.due-item:hover, .mf-item:hover, .tl-exp:hover { background: var(--bg); }
.due-date { width: 64px; text-align: center; flex: none; line-height: 1.3; background: var(--bg2); border-radius: 10px; padding: 4px; }
.due-date b { display: block; font-size: 13px; } .due-date small { color: var(--muted); font-size: 10.5px; }
.due-date.late { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.due-body { flex: 1; min-width: 0; } .due-body b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hol-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; border-inline-start: 4px solid var(--hc); background: color-mix(in srgb, var(--hc) 7%, var(--card)); }
.hol-item > div:first-child { flex: 1; } .hol-item b { display: block; font-size: 13px; }
.hol-when { text-align: left; font-size: 12.5px; font-weight: 600; } .hol-when small { display: block; color: var(--muted); font-weight: 400; }
.mf-item { display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.mf-head { display: flex; align-items: center; gap: 6px; } .mf-head b { font-size: 13px; }
.mf-item p { margin: 2px 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-exp { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.tle-body { flex: 1; min-width: 0; }
.tle-name { display: flex; align-items: center; gap: 6px; } .tle-name b { font-size: 13px; }
.tle-n { font-size: 18px; }
.mini-river { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; margin-top: 4px; background: var(--bg2); }
.mini-river i { background: var(--c); border-inline-start: 1px solid var(--s); animation: grow .7s both; transform-origin: right; }
.mini-river.big { height: 22px; border-radius: 6px; }
.mini-river.big i { display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: var(--f); }
.donut { position: relative; flex: none; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.donut-center b { font-size: 22px; } .donut-center small { color: var(--muted); }
.donut-seg { transition: stroke-dasharray 1s cubic-bezier(.2,.8,.2,1); }
.donut-seg:hover { stroke-width: 30; }
.donut-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.welcome { padding: 40px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.welcome h2 { margin: 6px 0 0; font-size: 26px; } .welcome p { max-width: 640px; color: var(--muted); margin: 0; line-height: 1.9; }
.welcome-art { display: flex; gap: 8px; }
.welcome-art i { width: 26px; height: 64px; border-radius: 13px; background: var(--c); border: 2px solid var(--s); animation: bars 1.8s ease-in-out infinite; }
@keyframes bars { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.welcome-steps { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.wstep { width: 200px; padding: 18px 14px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; transition: transform .2s, border-color .2s; background: var(--card); }
.wstep:hover { transform: translateY(-3px); border-color: var(--accent); }
.wstep b { position: absolute; top: -12px; background: var(--accent); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.wstep .ic { color: var(--accent); }
.welcome-demo { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line2); display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* charts */
.chart { width: 100%; position: relative; }
.chart-svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.bar-anim { transform-box: fill-box; transform-origin: bottom; animation: barUp .7s cubic-bezier(.2,.8,.2,1) both; transition: opacity .15s; }
.bar-anim:hover { opacity: .8; }
@keyframes barUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.line-anim { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.area-anim { animation: fadeIn 1.4s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pt { transition: r .15s; } .pt:hover { r: 6; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; } .lg-item i { width: 10px; height: 10px; border-radius: 3px; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hb-row { display: grid; grid-template-columns: minmax(100px, 40%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hb-row.clickable { cursor: pointer; }
.hb-label { display: flex; align-items: center; gap: 7px; min-width: 0; } .hb-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; } .hb-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb-txt small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 12px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: right; }
.hb-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; } .hb-val small { color: var(--muted); font-weight: 400; }
.funnel { display: flex; flex-direction: column; gap: 6px; }
.fn-row { display: flex; align-items: center; gap: 12px; animation: rise .5s both; }
.fn-bar { height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; min-width: 40px; transition: width .6s; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.fn-label { font-size: 13px; font-weight: 600; white-space: nowrap; } .fn-label small { display: block; color: var(--muted); font-weight: 400; }
.delta { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow: auto; }
.dl-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 92px; gap: 10px; align-items: center; font-size: 12.5px; padding: 3px 4px; border-radius: 8px; cursor: pointer; }
.dl-row:hover { background: var(--bg); }
.dl-label { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.5; }
.dl-track { position: relative; height: 14px; }
.dl-zero { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1.5px; background: var(--line2); }
.dl-fill { position: absolute; top: 0; height: 100%; border-radius: 4px; animation: fadeIn .6s both; }
.dl-fill.late { right: 50%; background: linear-gradient(-90deg, color-mix(in srgb, var(--danger) 50%, transparent), var(--danger)); }
.dl-fill.early { left: 50%; background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 50%, transparent), var(--ok)); }
:root[dir="rtl"] .dl-fill.late, [dir="rtl"] .dl-fill.late { right: auto; left: 50%; transform-origin: left; }
[dir="rtl"] .dl-fill.early { left: auto; right: 50%; }
.dl-val { font-weight: 700; text-align: left; } .dl-val.late { color: var(--danger); } .dl-val.early { color: var(--ok); }
.spark { display: block; }

/* reports */
.rep-body { display: flex; flex-direction: column; gap: 14px; }
.rep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rep-grid > .card { animation: rise .45s both; min-width: 0; }
.rep-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dest-field { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; border-top: 3px solid var(--kc); display: flex; flex-direction: column; animation: rise .4s both; }
.stat small { color: var(--muted); font-weight: 600; } .stat b { font-size: 21px; line-height: 1.5; } .stat span { font-size: 12px; }
.stat-act { display: flex; align-items: center; justify-content: center; }
.quick-range { display: flex; gap: 2px; align-self: center; }
.stage-avg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sa-item { display: flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--c) 18%, var(--card)); border-radius: 10px; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--s) 40%, transparent); }
.sa-item .st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s); }
.sa-item span { flex: 1; font-weight: 600; font-size: 12.5px; } .sa-item b { font-size: 16px; } .sa-item small { color: var(--muted); }
.exp-river { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.rep-grid .tbl td, .rep-grid .tbl th { white-space: nowrap; }

/* ------------------------------------------------------------ timeline (gantt) */
.tl-summary { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-chip { border: 1px solid var(--line2); background: var(--card); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.tl-chip b { color: var(--text); }
.tl-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tl-chip.q-p50 { --q: var(--amber); } .tl-chip.q-p80 { --q: var(--warn); } .tl-chip.q-over { --q: var(--danger); } .tl-chip.q-unpaid { --q: #94A3B8; } .tl-chip.q-ship, .tl-chip.q-customs { --q: var(--info); }
.tl-chip[class*="q-"]::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--q); margin-inline-end: 6px; }
.tl-card { overflow: hidden; }
.tl-scroll { overflow: auto; max-height: calc(100vh - 290px); position: relative; }
.tl-grid { min-width: calc(var(--W) + 270px); position: relative; }
.tl-row { display: flex; border-bottom: 1px solid var(--line); min-height: 58px; animation: rowIn .35s both; }
.tl-row:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.tl-headrow { position: sticky; top: 0; z-index: 6; background: var(--card); min-height: 46px; animation: none; }
.tl-label { width: 270px; flex: none; position: sticky; inset-inline-start: 0; z-index: 5; background: var(--card); border-inline-end: 1px solid var(--line); padding: 7px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-label.head { justify-content: center; font-weight: 700; color: var(--muted); }
.tl-label b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-label:hover b { color: var(--accent); }
.tl-l1, .tl-l3 { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.tl-l1 .st-chip { font-size: 10.5px; line-height: 17px; padding: 0 7px; }
.tl-l3 small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-pct { margin-inline-start: auto; font-weight: 800; font-size: 12px; }
.tl-pct.lvl-ok { color: var(--ok); } .tl-pct.lvl-p50 { color: #B08D00; } .tl-pct.lvl-p80 { color: var(--warn); } .tl-pct.lvl-over { color: var(--danger); }
.tl-lane { position: relative; flex: none; }
.tl-head { position: relative; height: 46px; }
.tl-month { position: absolute; top: 4px; font-weight: 700; font-size: 12px; padding-inline-start: 6px; border-inline-start: 1.5px solid var(--line2); height: 40px; white-space: nowrap; }
.tl-day { position: absolute; bottom: 2px; text-align: center; font-size: 10px; color: var(--faint); }
.tl-day.today { color: var(--danger); font-weight: 800; }
.tl-head .tl-now { position: absolute; bottom: 0; transform: translateX(50%); background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; z-index: 2; box-shadow: 0 2px 8px color-mix(in srgb, var(--danger) 40%, transparent); }
.tl-body { position: relative; }
.tl-bands-wrap { position: absolute; top: 0; bottom: 0; inset-inline-start: 270px; pointer-events: none; z-index: 0; }
.tl-bands { position: relative; height: 100%; }
.tl-bands > * { pointer-events: auto; }
.tl-mline { position: absolute; top: 0; bottom: 0; border-inline-start: 1px dashed var(--line); }
.tl-hol { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--hc) 13%, transparent) 0 6px, color-mix(in srgb, var(--hc) 6%, transparent) 6px 12px); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 4; box-shadow: 0 0 10px color-mix(in srgb, var(--danger) 60%, transparent); animation: todayGlow 2.4s ease-in-out infinite; }
@keyframes todayGlow { 50% { box-shadow: 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); } }
.tl-row .tl-lane { z-index: 1; }
.tl-cust { position: absolute; top: 9px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 11%, transparent); border: 1.5px solid color-mix(in srgb, var(--ok) 40%, transparent); animation: grow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: right; }
.tl-cust.proj { border-style: dashed; }
.tl-cust span { position: absolute; bottom: 1px; inset-inline-end: 22px; font-size: 10.5px; color: color-mix(in srgb, var(--ok) 70%, var(--text)); font-weight: 700; white-space: nowrap; }
.tl-sup { position: absolute; top: 20px; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: right; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); }
.tl-sup-fill { height: 100%; border-radius: 99px; background: var(--ok); position: relative; overflow: hidden; }
.tl-sup-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 2.2s infinite; }
@keyframes shimmer { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.tl-sup-fill.lvl-p50 { background: linear-gradient(-90deg, var(--ok), var(--amber)); } .tl-sup-fill.lvl-p80 { background: linear-gradient(-90deg, var(--amber), var(--warn)); } .tl-sup-fill.lvl-over { background: linear-gradient(-90deg, var(--warn), var(--danger)); }
.tl-wait { position: absolute; top: 21px; height: 12px; border-radius: 99px; background: repeating-linear-gradient(-45deg, color-mix(in srgb, #94A3B8 35%, transparent) 0 5px, transparent 5px 10px); border: 1px dashed #94A3B8; display: flex; align-items: center; justify-content: flex-end; color: #64748B; }
.tl-wait .ic { width: 12px; margin: 0 2px; }
.tl-th { position: absolute; top: 17px; width: 2px; height: 20px; background: var(--card); border: 1px solid var(--faint); border-radius: 2px; transform: translateX(50%); z-index: 2; }
.tl-th.hit { background: var(--warn); border-color: var(--warn); }
.tl-ghost { position: absolute; top: 8px; height: 42px; border-inline-start: 2px dashed var(--faint); }
.tl-ghost.sup { top: 16px; height: 22px; }
.tl-flag { position: absolute; top: 5px; transform: translateX(50%); color: var(--ok); z-index: 3; }
.tl-flag.late { color: var(--danger); animation: bob 1.4s infinite; }
.tl-start { position: absolute; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); transform: translateX(50%); box-shadow: 0 0 0 3px var(--card); z-index: 2; }
.tl-mile { position: absolute; top: 15px; transform: translateX(50%); width: 24px; height: 24px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.18); z-index: 3; color: var(--text); transition: transform .15s; }
.tl-mile:hover { transform: translateX(50%) scale(1.2); }
.tl-mile.pay { color: #AB6400; } .tl-mile.ship { color: var(--info); } .tl-mile.customs { color: #8B5CF6; }
.tl-mile.ship.moving { animation: sail 2.4s ease-in-out infinite; }
@keyframes sail { 0%,100% { transform: translateX(50%) translateY(0) rotate(-4deg); } 50% { transform: translateX(50%) translateY(-3px) rotate(4deg); } }
.tl-mile.done.ok { color: var(--ok); box-shadow: 0 0 0 2px var(--ok); } .tl-mile.done.late { color: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.tl-dot { position: absolute; top: 3px; transform: translateX(50%); min-width: 11px; height: 11px; border-radius: 99px; background: var(--accent); border: 2px solid var(--card); z-index: 3; font-size: 8px; color: #fff; display: grid; place-items: center; line-height: 1; padding: 0 2px; transition: transform .15s; }
.tl-dot:hover { transform: translateX(50%) scale(1.5); z-index: 6; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); padding: 0 4px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { display: inline-block; }
.lg-cust { width: 22px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1.5px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.lg-sup { width: 22px; height: 8px; border-radius: 99px; background: linear-gradient(-90deg, var(--ok), var(--warn)); }
.lg-wait { width: 22px; height: 8px; border-radius: 99px; border: 1px dashed #94A3B8; background: repeating-linear-gradient(-45deg, #CBD5E1 0 3px, transparent 3px 6px); }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.lg-hol { width: 16px; height: 12px; background: repeating-linear-gradient(45deg, #F2B8BA 0 3px, #FBE3E4 3px 6px); border-radius: 2px; }
.zoom { display: flex; align-items: center; gap: 2px; }

/* ------------------------------------------------------------ calendar */
.type-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); border-radius: 99px; padding: 3px 11px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); align-self: center; }
.type-chip input { display: none; }
.type-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.heat-card { overflow-x: auto; }
.heat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.heat-head .card-title { margin: 0; }
.heat-wrap { display: flex; gap: 6px; }
.heat-wd { display: grid; grid-template-rows: 20px repeat(7, 16px); row-gap: 3px; font-size: 9.5px; color: var(--muted); }
.heat-wd span:first-child { grid-row: 2; }
.heat-months { position: relative; height: 20px; font-size: 10.5px; color: var(--muted); }
.heat-months span { position: absolute; top: 0; white-space: nowrap; }
.heat-grid { display: flex; gap: 3px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell { width: 16px; height: 16px; border-radius: 3px; background: var(--bg2); display: block; cursor: pointer; animation: pop .4s both; transition: transform .1s; }
.heat-cell:hover { transform: scale(1.35); }
.heat-cell.blank { visibility: hidden; }
.heat-cell.l1 { background: color-mix(in srgb, var(--ok) 30%, var(--bg2)); } .heat-cell.l2 { background: color-mix(in srgb, var(--ok) 55%, var(--bg2)); } .heat-cell.l3 { background: color-mix(in srgb, var(--ok) 80%, var(--bg2)); } .heat-cell.l4 { background: #0E7A47; }
.heat-cell.sel { box-shadow: 0 0 0 2px var(--accent); }
.heat-scale { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.heat-scale .heat-cell { cursor: default; animation: none; width: 12px; height: 12px; }
.cal-grid-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.cal-card { padding: 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head h3 { margin: 0; min-width: 150px; text-align: center; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 118px; border: 1px solid var(--line); border-radius: 10px; padding: 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: border-color .15s, box-shadow .15s; background: var(--card); overflow: hidden; min-width: 0; }
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.out { background: transparent; border-style: dashed; opacity: .4; cursor: default; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.sel { background: var(--accent-soft); border-color: var(--accent); }
.cal-cell.fri .cal-dnum b { color: var(--danger); }
.cal-cell.hol { background: color-mix(in srgb, #E5484D 4%, var(--card)); }
.cal-dnum { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.cal-dnum b { font-size: 15px; } .cal-dnum small { color: var(--faint); font-size: 10px; white-space: nowrap; }
.cal-hol { font-size: 10.5px; color: color-mix(in srgb, var(--hc) 80%, var(--text)); background: color-mix(in srgb, var(--hc) 12%, transparent); border-radius: 5px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-hol.big { font-size: 13px; padding: 4px 10px; margin: 6px 0; }
.cal-ev { display: flex; align-items: center; gap: 4px; font-size: 11px; line-height: 19px; border-radius: 5px; padding: 0 5px; background: color-mix(in srgb, var(--c) 30%, var(--card)); border-inline-start: 3px solid var(--s); overflow: hidden; white-space: nowrap; transition: transform .12s; animation: rowIn .3s both; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { transform: translateX(-2px); }
.cal-ev.t-due { background: transparent; border: 1px dashed var(--s); border-inline-start-width: 3px; border-inline-start-style: solid; }
.cal-ev.st-black, .cal-ev.st-red { color: var(--text); }
.cal-more { font-size: 10.5px; color: var(--muted); padding-inline-start: 4px; }
.day-panel { position: sticky; top: 0; max-height: calc(100vh - 120px); overflow: auto; }
.day-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.day-item { display: block; border: 1px solid var(--line); border-inline-start: 4px solid var(--s); border-radius: 10px; padding: 8px 10px; transition: background .15s; }
.day-item:hover { background: var(--bg); }
.di-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.day-item p { margin: 4px 0; font-size: 13px; white-space: pre-wrap; }

/* ------------------------------------------------------------ team & settings */
.group-title { display: flex; align-items: center; gap: 8px; margin: 8px 4px 10px; font-size: 15px; }
.group-title small { background: var(--bg2); color: var(--muted); border-radius: 99px; padding: 0 9px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.member { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--mc); animation: rise .4s both; }
.member.inactive { opacity: .6; }
.member-top { display: flex; align-items: center; gap: 12px; }
.member-top b { display: block; font-size: 15px; } .member-top small { display: block; color: var(--muted); }
.member-actions { margin-inline-start: auto; display: flex; }
.member-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; background: var(--bg); border-radius: 10px; padding: 6px; }
.member-stats b { display: block; font-size: 18px; } .member-stats small { color: var(--muted); }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 18px; font-size: 13px; color: var(--muted); }
.role-legend b { color: var(--text); }
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cp { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line2); cursor: pointer; transition: transform .15s; }
.cp.on { box-shadow: 0 0 0 2px var(--text); transform: scale(1.12); }
.set-body { display: flex; flex-direction: column; gap: 14px; }
.set-card p { line-height: 1.85; }
.alert-set { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--ac); margin-bottom: 8px; }
.alert-set b { display: block; } .alert-set small { display: block; line-height: 1.7; max-width: 640px; }
.alert-set .inp.num { width: 90px; }
.chips-edit { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 2px 6px 2px 10px; font-weight: 700; }
.chip-x button { border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; }
.opt-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.opt-row p { margin: 6px 0 0; padding-inline-start: 52px; font-size: 13px; }
.reason-list { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.reason { display: flex; gap: 6px; }
.hol-editor { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.cal-side { display: flex; flex-direction: column; gap: 6px; }
.cal-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: right; transition: all .15s; }
.cal-item i { width: 14px; height: 14px; border-radius: 50%; background: var(--cc); flex: none; }
.cal-item b { display: block; font-size: 13px; } .cal-item small { color: var(--muted); }
.cal-item.on { border-color: var(--cc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc) 30%, transparent); }
.year-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.bulk { margin: 12px 0; } .bulk summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.bulk .btn { margin-top: 6px; }
.danger-zone { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.url-list { padding-inline-start: 18px; } .url-list code { background: var(--bg2); padding: 3px 10px; border-radius: 8px; font-size: 14px; user-select: all; }
.flow-help { display: flex; flex-direction: column; gap: 6px; }
.fh-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, var(--card)); }
.fh-item .st-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--s); }
.fh-item b { width: 60px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .gsearch { width: 220px; }
}
@media (max-width: 1000px) {
  .pd-grid, .cal-grid-wrap, .hol-editor { grid-template-columns: 1fr; }
  .pd-side { position: static; }
  .dash-grid, .rep-grid { grid-template-columns: 1fr; }
  .span2, .dash-grid > .card:first-child { grid-column: auto; }
  .shell { grid-template-columns: 70px 1fr; }
  .nav-item span, .nav-item em, .brand div, .side-foot small { display: none; }
  .gsearch { display: none; }
  .save-bar { width: calc(100vw - 110px); margin-left: 35px; }
}
@media print {
  .sidebar, .topbar, .toolbar, .save-bar, .toasts { display: none !important; }
  .shell { display: block; } .main { height: auto; } .content { overflow: visible; }
}

/* ------------------------------------------------------------ v1.1: shipment, roles */
.ship-badge.with-text { gap: 4px; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--info) 12%, transparent); border-radius: 99px; padding: 1px 8px; align-items: center; white-space: nowrap; animation: none; }
.ship-badge.with-text .ic { animation: bob 2s ease-in-out infinite; }
.ship-badge.customs { color: #8B5CF6; background: color-mix(in srgb, #8B5CF6 12%, transparent); }
.transit-pill { margin-inline-start: 8px; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); padding: 0 8px; border-radius: 99px; }
.ship-btn { border-color: color-mix(in srgb, var(--info) 55%, var(--line2)); color: color-mix(in srgb, var(--info) 80%, var(--text)); }
.ship-btn:hover { background: color-mix(in srgb, var(--info) 10%, var(--card)); border-color: var(--info); }
.ship-btn .ic { animation: bob 2s ease-in-out infinite; }
.ro-tag { display: inline-flex !important; align-items: center; gap: 3px; color: var(--muted); background: var(--bg2); border-radius: 99px; padding: 0 7px; margin-top: 2px; width: max-content; }
.tl-transit { position: absolute; top: 25px; height: 5px; border-radius: 99px; background: repeating-linear-gradient(-90deg, var(--info) 0 8px, transparent 8px 14px); opacity: .85; z-index: 2; }
.tl-transit.moving { animation: transitFlow 1.2s linear infinite; background-size: 28px 100%; }
@keyframes transitFlow { from { background-position: 0 0; } to { background-position: -28px 0; } }
.ptl-transit { position: absolute; top: 11px; height: 8px; border-radius: 99px; background: repeating-linear-gradient(-90deg, var(--info) 0 8px, color-mix(in srgb, var(--info) 25%, transparent) 8px 14px); }
.ptl-transit.moving { animation: transitFlow 1.2s linear infinite; background-size: 28px 100%; }
.ptl-plane { position: absolute; top: -9px; inset-inline-end: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); color: var(--info); display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.ptl-transit.moving .ptl-plane { animation: bob 1.8s ease-in-out infinite; }
.lg-transit { width: 22px; height: 5px; border-radius: 99px; background: repeating-linear-gradient(-90deg, var(--info) 0 5px, transparent 5px 9px); }
.tbl.grants td { vertical-align: middle; }
.tbl.grants .grant-pick { min-width: 260px; }
.tbl.grants tbody tr, .tbl.roles-tbl tbody tr { cursor: default; }
.tbl.roles-tbl td { white-space: normal; font-size: 12.5px; }
.rep-scope { align-self: center; display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================ v1.2: purchases, shipments, hubs, payments */
.modal-xl { width: 1040px; }
.badge.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.purple-text { color: #8B5CF6; font-weight: 600; }
.ro-val { padding: 8px 2px; font-weight: 700; }
.multi-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #6E56CF; background: color-mix(in srgb, #6E56CF 11%, transparent); padding: 0 7px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; }
.transit-pill.big { font-size: 13px; padding: 3px 12px; margin: 6px 0 0; }
.pu-list { display: flex; flex-direction: column; gap: 12px; }
.pu-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line2); }
.pu-bar > b { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.pu-card, .hub-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--ok) 3%, var(--card)); display: flex; flex-direction: column; gap: 8px; animation: rowIn .35s both; }
.hub-card { background: color-mix(in srgb, #8B5CF6 5%, var(--card)); border-color: color-mix(in srgb, #8B5CF6 25%, var(--line)); }
.pu-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pu-head > b { font-size: 14.5px; }
.pu-num { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.stage-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 99px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.stage-chip.k-info { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.stage-chip.k-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.stage-chip.k-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.stage-chip.k-purple { background: color-mix(in srgb, #8B5CF6 14%, transparent); color: #8B5CF6; }
.route-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.pu-track { display: flex; flex-direction: column; gap: 3px; }
.pu-pays { display: flex; flex-direction: column; gap: 4px; }
.pu-pays > .badge { align-self: flex-start; }
.pay-tbl td { padding: 4px 8px; }
.pay-tbl .num { direction: ltr; text-align: end; }
.leg-line { font-size: 12.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--text); }
.pu-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-members { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-mem { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.hub-mem small { color: var(--muted); }
.hub-mem.k-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } .hub-mem.k-ok .ic { color: var(--ok); }
.hub-mem.k-info .ic { color: var(--info); }
.pay-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--info) 3%, var(--card)); }
.pay-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-sum { font-size: 13px; }
.pay-bar { width: 140px; }
.si-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.si-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); background: var(--card); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 13px; position: relative; }
.si-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.si-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.si-chip.on .si-dot { background: #fff; }
.si-grid { margin-top: 10px; }
.hub-pick { display: flex; flex-direction: column; gap: 4px; }
.chk-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.chk-row.on { border-color: var(--accent); background: var(--accent-soft); }
.chk-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.pu-table td, .pu-table th { padding: 6px 8px; }
.pu-table .num { direction: ltr; text-align: end; }
.side-pus { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; border-top: 1px dashed var(--line2); padding-top: 8px; }
.side-pu { display: grid; grid-template-columns: 1fr 90px; gap: 8px; align-items: center; font-size: 12px; }
.side-pu > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* project timeline */
.ptl-pay { position: absolute; top: 50%; transform: translate(50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 1.5px #AB6400; color: #AB6400; display: grid; place-items: center; z-index: 4; }
.ptl-wait { position: absolute; top: 7px; height: 16px; border-radius: 99px; background: repeating-linear-gradient(-45deg, color-mix(in srgb, #8B5CF6 25%, transparent) 0 5px, transparent 5px 10px); border: 1px dashed #8B5CF6; color: #8B5CF6; display: flex; align-items: center; justify-content: flex-end; padding: 0 2px; }
.ptl-num { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 10px; }
.ptl-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* purchase timeline: one thin lane per purchase / hub */
.tl-subbar { position: absolute; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); }
.tl-subbar.proj { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text) 8%, transparent) 0 4px, transparent 4px 8px); }
.tl-sublbl { position: absolute; font-size: 10.5px; color: var(--muted); white-space: nowrap; line-height: 10px; transform: translateY(-1px); pointer-events: none; }
.tl-sublbl em { color: var(--warn); font-style: normal; } .tl-sublbl em.ok { color: var(--info); }
.tl-transit.sub { height: 4px; }
.tl-submile { position: absolute; transform: translateX(50%); width: 16px; height: 16px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); z-index: 3; color: var(--info); }
.tl-submile.pay { color: #AB6400; } .tl-submile.customs { color: #8B5CF6; }
.tl-hubwait { position: absolute; height: 10px; border-radius: 99px; background: repeating-linear-gradient(-45deg, color-mix(in srgb, #8B5CF6 30%, transparent) 0 4px, transparent 4px 8px); border: 1px dashed #8B5CF6; }
/* settings: data & network */
.merge-res { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.merge-res.done { background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.merge-res ul { margin: 6px 0; padding-inline-start: 20px; }
.mode-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-item { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.mode-item.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 6%, var(--card)); }
.mode-item b { display: flex; align-items: center; gap: 6px; }
.fp { font-size: 11px; word-break: break-all; }
.table-scroll.short { max-height: 300px; overflow: auto; }
@media (max-width: 900px) { .mode-list { grid-template-columns: 1fr; } .modal-xl { width: 100%; } }
