@font-face { font-family: 'HalatiLocal'; src: url('/assets/cairo.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }
:root {
--bg: #F6F4EE;
--surface: #FFFFFF;
--surface-2: #FBFAF6;
--line: #E7E3D8;
--line-strong: #D8D2C3;
--ink: #1F2A24;
--ink-2: #4C5852;
--ink-3: #7D877F;
--green-900: #12352A;
--green-800: #1B4A3A;
--green-700: #22604B;
--green-600: #2C7A5F;
--green-500: #3D9476;
--green-100: #E3F0EA;
--green-50: #F0F7F3;
--gold: #B98B2E;
--gold-100: #F7EEDB;
--red: #B9473A; --red-100: #F8E6E2;
--amber: #B7791F; --amber-100: #FBF0DC;
--blue: #2F6690; --blue-100: #E3EEF6;
--src-youtube: #D64535; --src-chroma: #3A4A8C; --src-tiktok: #1E1E1E; --src-telegram: #2A8BC4;
--radius: 14px; --radius-sm: 10px;
--shadow: 0 1px 2px rgba(23, 40, 32, .05), 0 4px 14px rgba(23, 40, 32, .05);
--shadow-lg: 0 10px 40px rgba(23, 40, 32, .14);
--font: 'IBM Plex Sans Arabic', 'HalatiLocal', 'Segoe UI', Tahoma, sans-serif;
--side: 248px;
color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg[aria-hidden] { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
svg.small { width: 14px; height: 14px; vertical-align: -2px; }
h2 svg[aria-hidden] { width: 18px; height: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--green-900); color: #DCE9E2; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #3D9476, #1B4A3A); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand b { display: block; font-size: 18px; color: #fff; letter-spacing: -.2px; }
.brand small { color: #9DBBAD; font-size: 12px; }
.nav-label { font-size: 11.5px; color: #7FA392; padding: 14px 12px 4px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #CFE0D7; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.nav a .badge { margin-inline-start: auto; background: var(--gold); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 20px; line-height: 19px; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #9DBBAD; }
.side-foot .who { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246,244,238,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; gap: 14px; align-items: center; }
.page { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.4px; line-height: 1.3; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--green-700); }
.gsearch { position: relative; flex: 1; max-width: 640px; }
.gsearch input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 44px 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.gsearch input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(61,148,118,.14); }
.gsearch > svg { position: absolute; right: 14px; top: 12px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.gsearch kbd { position: absolute; left: 10px; top: 11px; font: 12px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--surface-2); }
.suggest { position: absolute; top: 50px; inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; max-height: 420px; overflow: auto; }
.suggest.open { display: block; }
.suggest a, .suggest button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; border: 0; background: none; text-align: start; cursor: pointer; }
.suggest a:hover, .suggest .hl { background: var(--green-50); }
.suggest .kind { font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; flex: none; }
.top-actions { display: flex; gap: 8px; margin-inline-start: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h3 { margin: 0 0 12px; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h3 small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn.primary:hover { background: var(--green-800); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.on { background: var(--green-100); border-color: var(--green-500); color: var(--green-800); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--green-500); }
.chip.on { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.chip .c { font-size: 11.5px; opacity: .7; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.tag.sugg { background: var(--surface-2); color: var(--ink-2); border-style: dashed; border-color: var(--line-strong); }
.tag.person { background: var(--gold-100); color: #7A5A17; border-color: #EFDDB7; }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; opacity: .6; display: inline-flex; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.st-new { background: var(--blue-100); color: var(--blue); } .st-open { background: var(--green-100); color: var(--green-700); }
.st-pending { background: var(--amber-100); color: var(--amber); } .st-closed { background: #EEEDE8; color: var(--ink-3); }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.src i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.src-youtube i { background: var(--src-youtube); } .src-chroma i { background: var(--src-chroma); } .src-tiktok i { background: var(--src-tiktok); } .src-telegram i { background: var(--src-telegram); }
.srcdots { display: inline-flex; gap: 3px; } .srcdots i { width: 7px; height: 7px; border-radius: 50%; }
input.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
textarea.inp { resize: vertical; min-height: 90px; line-height: 1.7; }
input.inp:focus, select.inp:focus, textarea.inp:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(61,148,118,.12); }
label.fld { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .l { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.25; margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--ink-3); }
.kpi.accent { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; border-color: transparent; }
.kpi.accent .l, .kpi.accent .s { color: #A9C9BA; }
a.kpi:hover { border-color: var(--green-500); }
.statbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.statbar::-webkit-scrollbar { display: none; }
.stat { flex: 1 0 auto; min-width: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: start; transition: all .15s; position: relative; }
.stat:hover { border-color: var(--green-500); }
.stat .v { font-size: 21px; font-weight: 700; line-height: 1.3; }
.stat .l { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.stat .l i { width: 7px; height: 7px; border-radius: 50%; }
.stat.on { border-color: var(--green-700); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-700); }
.stat.bump .v { animation: bump .6s ease; }
@keyframes bump { 0% { color: var(--gold); transform: scale(1.12); } 100% { color: inherit; transform: none; } }
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.wcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; box-shadow: var(--shadow); }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--green-100), var(--gold-100)); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.vertical img { object-position: center 30%; }
.thumb .dur { position: absolute; bottom: 7px; left: 7px; background: rgba(15,25,20,.78); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; }
.thumb .kindb { position: absolute; top: 7px; right: 7px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--green-800); font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.thumb .ph svg { width: 26px; height: 26px; opacity: .5; margin: 0 auto 6px; display: block; }
.wbody { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wtitle { font-weight: 600; font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wmeta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.wexcerpt { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: #FCEBB6; color: inherit; border-radius: 3px; padding: 0 1px; }
.results { display: grid; gap: 10px; }
.rrow { display: grid; grid-template-columns: 168px 1fr; gap: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.rrow:hover { border-color: var(--green-500); box-shadow: var(--shadow); }
.rrow .thumb { border-radius: 10px; }
.rrow h4 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.5; }
.inbox { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 0; height: calc(100vh - 215px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ilist { border-inline-end: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.ilist-tools { position: sticky; top: 0; background: var(--surface); padding: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; z-index: 2; }
.titem { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .12s; }
.titem:hover { background: var(--surface-2); }
.titem.on { background: var(--green-50); }
.titem.unread .tname { font-weight: 700; }
.titem.unread::before { content: ''; position: absolute; right: 4px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; font-weight: 700; font-size: 15px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tname { font-size: 14px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.tname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttext { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmeta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 3px; }
.tview { display: flex; flex-direction: column; min-width: 0; }
.thead { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tmsgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.out { align-self: flex-end; background: var(--green-50); border-color: var(--green-100); }
.msg .mh { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; display: flex; gap: 8px; }
.msg .mt { white-space: pre-wrap; word-break: break-word; }
.treply { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.treply textarea { min-height: 64px; }
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.player { position: relative; background: #0F1A15; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-lg); }
.player.vertical { aspect-ratio: 9/16; height: auto; max-height: 72vh; width: min(100%, 405px); margin: 0 auto; background: #0F1A15; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .poster { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.player .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.player .poster .play { position: relative; width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: transform .15s; }
.player .poster:hover .play { transform: scale(1.06); }
.player .poster .play svg { width: 30px; height: 30px; color: var(--green-800); margin-inline-end: -4px; }
.player-tabs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wtitle-lg { font-size: 23px; line-height: 1.5; margin: 18px 0 8px; letter-spacing: -.3px; }
.desc { white-space: pre-wrap; color: var(--ink-2); line-height: 1.9; max-height: 280px; overflow: hidden; position: relative; }
.desc.open { max-height: none; }
.desc:not(.open)::after { content: ''; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--surface)); }
.copies { display: grid; gap: 8px; }
.copy { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.copy .cinfo { flex: 1; min-width: 0; }
.copy .cinfo b { display: block; font-size: 13.5px; }
.copy .cinfo span { font-size: 12px; color: var(--ink-3); }
.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.series-nav a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: var(--surface); display: block; }
.series-nav a:hover { border-color: var(--green-500); }
.series-nav small { display: block; color: var(--ink-3); font-size: 11.5px; }
.tr-seg { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.tr-seg:hover { background: var(--green-50); }
.tr-seg .t { font-size: 12px; color: var(--green-700); font-weight: 600; direction: ltr; text-align: right; padding-top: 2px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--amber-100); color: #6E4B12; font-size: 13px; border: 1px solid #F0DDB5; }
.notice.info { background: var(--blue-100); color: #1F4B6E; border-color: #CFE0EE; }
.notice.ok { background: var(--green-50); color: var(--green-800); border-color: var(--green-100); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--ink-3); font-size: 11px; }
.chart .bar:hover, .chart .seg:hover { opacity: .8; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: flex; border: 1px solid var(--line); }
.hbar .track b { display: block; height: 100%; background: var(--green-600); transition: width .6s ease; }
.hbar .track b.s { background: repeating-linear-gradient(135deg, #9CC7B4 0 4px, #C3DDD0 4px 8px); }
.tip { position: fixed; z-index: 99; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -110%); white-space: nowrap; display: none; }
.feed { display: grid; gap: 2px; }
.fitem { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.fitem:last-child { border-bottom: 0; }
.fitem .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.fitem .ic svg { width: 15px; height: 15px; }
.fitem time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.skel { background: linear-gradient(90deg, #EEEBE3 0%, #F6F4EE 50%, #EEEBE3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty .art { width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 26px; background: var(--green-50); display: grid; place-items: center; color: var(--green-600); border: 1px solid var(--green-100); }
.empty .art svg { width: 40px; height: 40px; }
.empty h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.empty p { margin: 0 auto 16px; max-width: 420px; color: var(--ink-3); }
.offline { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13.5px; z-index: 90; box-shadow: var(--shadow-lg); display: none; gap: 8px; align-items: center; }
.offline.show { display: flex; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 95; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; animation: tin .25s ease; max-width: 380px; }
.toast.ok { background: var(--green-800); } .toast.err { background: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.loading-bar { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 100; background: linear-gradient(90deg, var(--green-500), var(--gold)); transform-origin: right; transform: scaleX(0); transition: transform .3s; }
.loading-bar.on { transform: scaleX(.7); transition: transform 8s cubic-bezier(.1,.6,.2,1); }
.loading-bar.done { transform: scaleX(1); opacity: 0; transition: transform .2s, opacity .4s .2s; }
.modal-bg { position: fixed; inset: 0; background: rgba(18, 30, 24, .45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: 88vh; overflow: auto; padding: 20px 22px; }
.modal h2 { margin: 0 0 14px; font-size: 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.srccard { display: grid; gap: 12px; }
.srccard .hd { display: flex; align-items: center; gap: 12px; }
.srcicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.srcicon svg { width: 22px; height: 22px; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mini b { display: block; font-size: 18px; }
.mini span { font-size: 11.5px; color: var(--ink-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--green-500); } .dot.partial, .dot.syncing { background: var(--amber); } .dot.error { background: var(--red); } .dot.not_connected, .dot.ready { background: #B7B2A4; }
.hero { background: linear-gradient(140deg, var(--green-900) 0%, var(--green-800) 60%, #2B6450 100%); color: #fff; border-radius: 18px; padding: 30px 32px; position: relative; overflow: hidden; margin-bottom: 22px; }
.hero::after { content: ''; position: absolute; left: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(185,139,46,.28), transparent 70%); }
.hero h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.4px; }
.hero p { margin: 0; color: #BBD6C9; max-width: 640px; }
.hero .hstats { display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .hstats b { display: block; font-size: 24px; }
.hero .hstats span { font-size: 12.5px; color: #A9C9BA; }
.months { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mbtn { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; text-align: center; min-width: 70px; }
.mbtn b { display: block; font-size: 15px; }
.mbtn.on { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.sentinel { height: 40px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--ink); color: #D6E6DD; border-radius: 10px; padding: 12px; overflow: auto; max-height: 220px; direction: ltr; text-align: left; white-space: pre; }
.mob-nav { display: none; }
@media (max-width: 1100px) {
.kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.work-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
.app { grid-template-columns: 1fr; }
.side { display: none; }
.topbar { padding: 10px 14px; }
.page { padding: 18px 14px 96px; }
.page-head h1 { font-size: 22px; }
.g2, .g3 { grid-template-columns: 1fr; }
.span2 { grid-column: auto; }
.kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
.works { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.wbody { padding: 9px 10px 11px; }
.wtitle { font-size: 13.5px; }
.rrow { grid-template-columns: 110px 1fr; gap: 10px; padding: 10px; }
.inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
.inbox .tview { display: none; }
.inbox.reading .ilist { display: none; }
.inbox.reading .tview { display: flex; min-height: 70vh; }
.msg { max-width: 92%; }
.hero { padding: 22px 20px; }
.hero h1 { font-size: 22px; }
.gsearch kbd { display: none; }
.top-actions .btn span { display: none; }
.mob-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.mob-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; position: relative; }
.mob-nav a svg { width: 22px; height: 22px; }
.mob-nav a.on { color: var(--green-700); font-weight: 600; }
.mob-nav .badge { position: absolute; top: 0; left: calc(50% + 4px); background: var(--gold); color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; line-height: 16px; }
.toasts { left: 14px; right: 14px; bottom: 84px; }
.hbar { grid-template-columns: 96px 1fr 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }