/* ============================================================ theme */ :root { --bg: #f4f5f9; --panel: #ffffff; --panel-2: #f8f9fc; --text: #161b26; --muted: #6b7385; --line: #e6e8ef; --accent: #4f46e5; --accent-2: #6366f1; --accent-soft: #eef0ff; --on-accent: #fff; --good: #15803d; --good-soft: #e8f6ee; --bad: #c2312f; --bad-soft: #fdecec; --warn: #b45309; --warn-soft: #fdf3e3; --chip: #eef0f6; --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.04); --shadow-lg: 0 10px 40px rgba(16,24,40,.12); --nav-w: 248px; color-scheme: light; } :root[data-theme=dark] { --bg: #0c0f16; --panel: #141923; --panel-2: #10141c; --text: #e7e9f0; --muted: #8e97aa; --line: #232a37; --accent: #818cf8; --accent-2: #a5b4fc; --accent-soft: #1d2140; --on-accent: #0c0f16; --good: #4ade80; --good-soft: #10291c; --bad: #f87171; --bad-soft: #2f1517; --warn: #fbbf24; --warn-soft: #2d230c; --chip: #1b2130; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark; } @media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bg: #0c0f16; --panel: #141923; --panel-2: #10141c; --text: #e7e9f0; --muted: #8e97aa; --line: #232a37; --accent: #818cf8; --accent-2: #a5b4fc; --accent-soft: #1d2140; --on-accent: #0c0f16; --good: #4ade80; --good-soft: #10291c; --bad: #f87171; --bad-soft: #2f1517; --warn: #fbbf24; --warn-soft: #2d230c; --chip: #1b2130; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark; } } /* ============================================================ base */ * { box-sizing: border-box; } html { font-size: 15px; -webkit-text-size-adjust: 100%; } body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-feature-settings: "cv11", "ss01"; } a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; } h1 { font-size: 1.55rem; margin: 0; letter-spacing: -.02em; } h2 { font-size: 1rem; margin: 0 0 .9rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; } h2 .ico { color: var(--muted); } code { font-size: .85em; background: var(--chip); padding: .1rem .35rem; border-radius: 5px; } .ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; } .ico.sm { width: 15px; height: 15px; vertical-align: -2px; } .ico.lg { width: 22px; height: 22px; } /* ============================================================ sidebar */ .layout { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--panel) calc(var(--nav-w) - 1px), var(--line) 0 var(--nav-w), transparent 0); } @media (max-width: 860px) { .layout { background: none; } } nav.side { background: var(--panel); border-right: 1px solid var(--line); padding: 1.1rem .85rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; z-index: 40; } .brand { display: flex; align-items: center; gap: .65rem; padding: .2rem .55rem 1.1rem; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; } .brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6366f1, #22c55e); box-shadow: 0 4px 14px rgba(99,102,241,.35); } .nav-section { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 1rem .7rem .4rem; } .nav-link { position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; transition: background .15s, color .15s; } .nav-link .ico { color: var(--muted); transition: color .15s, transform .15s; } .nav-link:hover { background: var(--chip); text-decoration: none; } .nav-link:hover .ico { color: var(--text); transform: translateX(1px); } .nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; } .nav-link.active .ico { color: var(--accent); } .nav-link.active::before { content: ""; position: absolute; left: -.85rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); } .nav-count { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; border-radius: 99px; font-size: .72rem; font-weight: 700; display: grid; place-items: center; background: var(--bad); color: #fff; } .nav-foot { margin-top: auto; padding-top: 1rem; display: flex; flex-direction: column; gap: .6rem; } .user-chip { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); } .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--accent-soft); color: var(--accent); flex: none; } .user-chip .who { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .user-chip a { margin-left: auto; color: var(--muted); display: grid; place-items: center; padding: .25rem; border-radius: 6px; } .user-chip a:hover { background: var(--chip); color: var(--text); } .theme-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; } .theme-toggle button { background: none; border: 0; color: var(--muted); padding: .35rem; border-radius: 7px; cursor: pointer; display: grid; place-items: center; } .theme-toggle button:hover { color: var(--text); } .theme-toggle button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); } /* mobile: top bar + bottom tabs + drawer */ .topbar, .tabbar, .scrim { display: none; } @media (max-width: 860px) { .layout { grid-template-columns: 1fr; } nav.side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); } body.nav-open nav.side { transform: none; } .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; } body.nav-open .scrim { opacity: 1; pointer-events: auto; } .topbar { display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 20; padding: .6rem .9rem; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); } .topbar .brand { padding: 0; font-size: 1rem; } .topbar .brand .logo { width: 28px; height: 28px; border-radius: 8px; } .icon-btn { background: none; border: 0; color: var(--text); padding: .4rem; border-radius: 8px; cursor: pointer; display: grid; place-items: center; } .icon-btn:hover { background: var(--chip); } .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); } .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .68rem; color: var(--muted); padding: .3rem 0; border-radius: 8px; position: relative; } .tabbar a:hover { text-decoration: none; } .tabbar a.active { color: var(--accent); font-weight: 600; } .tabbar a .dot-count { position: absolute; top: 0; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); } main { padding-bottom: 5.5rem !important; } } /* ============================================================ page */ main { padding: 1.6rem 2.2rem 3rem; max-width: 1440px; width: 100%; min-width: 0; } .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; } .page-head .sub { color: var(--muted); font-size: .9rem; margin-top: .25rem; } .page-head .actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } @media (max-width: 860px) { main { padding: 1rem .8rem; } h1 { font-size: 1.3rem; } } .grid { display: grid; gap: 1rem; } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } @media (max-width: 1150px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: 1fr 1fr; } } @media (max-width: 860px) { .cols-3, .cols-2 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } } @media (max-width: 480px) { .cols-4 { grid-template-columns: 1fr 1fr; gap: .6rem; } } .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); min-width: 0; } .card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; } .card-head h2 { margin: 0; } .mb { margin-bottom: 1rem; } .row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; } .spread { justify-content: space-between; } .muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; } .good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); } /* KPI tiles */ .kpi { position: relative; overflow: hidden; } .kpi .label { color: var(--muted); font-size: .82rem; font-weight: 500; display: flex; align-items: center; gap: .5rem; } .kpi .value { font-size: 1.65rem; font-weight: 700; margin: .35rem 0 .2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .kpi .sub { font-size: .82rem; color: var(--muted); line-height: 1.45; } .kpi .kpi-ico { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; } .tint-accent { background: var(--accent-soft); color: var(--accent); } .tint-good { background: var(--good-soft); color: var(--good); } .tint-bad { background: var(--bad-soft); color: var(--bad); } .tint-warn { background: var(--warn-soft); color: var(--warn); } .delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; padding: .05rem .4rem; border-radius: 6px; font-size: .78rem; } .delta.good { background: var(--good-soft); } .delta.bad { background: var(--bad-soft); } @media (max-width: 480px) { .kpi .value { font-size: 1.2rem; } .kpi .kpi-ico { width: 30px; height: 30px; top: .8rem; right: .8rem; } .kpi .kpi-ico .ico { width: 15px; height: 15px; } } /* tables */ .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -1.2rem; padding: 0 1.2rem; } table { width: 100%; border-collapse: collapse; font-size: .9rem; } th, td { padding: .6rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; } th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--panel-2); } thead th:first-child { border-top-left-radius: 8px; } thead th:last-child { border-top-right-radius: 8px; } th { border-bottom: 1px solid var(--line); } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } tbody tr { transition: background .12s; } tbody tr:hover td { background: var(--panel-2); } tbody tr:last-child td { border-bottom: 0; } td .desc { color: var(--muted); font-size: .78rem; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; } .tx-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; } .cell-main { display: flex; align-items: center; gap: .7rem; min-width: 0; } .cell-main > div { min-width: 0; } /* forms + buttons */ input, select, textarea, button { font: inherit; color: inherit; } input, select, textarea { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .65rem; min-width: 0; transition: border-color .15s, box-shadow .15s; } input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); } input[type=color] { padding: 2px; width: 2.4rem; height: 2.2rem; } button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--accent); color: var(--on-accent); border: 1px solid transparent; border-radius: var(--radius-sm); padding: .5rem .95rem; cursor: pointer; font-weight: 600; font-size: .9rem; transition: filter .15s, background .15s, transform .05s; white-space: nowrap; text-decoration: none !important; } button:hover, .btn:hover { filter: brightness(1.08); } button:active, .btn:active { transform: translateY(1px); } button:disabled { opacity: .6; cursor: progress; } button.secondary, .btn.secondary { background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); } button.secondary:hover, .btn.secondary:hover { background: var(--panel-2); filter: none; } button.danger, .btn.danger { background: transparent; color: var(--bad); border-color: var(--line); } button.danger:hover { background: var(--bad-soft); filter: none; } button.ghost, .btn.ghost { background: transparent; color: var(--muted); border-color: transparent; } button.ghost:hover, .btn.ghost:hover { background: var(--chip); color: var(--text); filter: none; } button.sm, .btn.sm { padding: .3rem .6rem; font-size: .8rem; border-radius: 7px; } button.icon, .btn.icon { padding: .4rem; } form.inline { display: inline; } .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; align-items: end; } .form-grid label, label.f { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--muted); font-weight: 500; } details > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; } details > summary::-webkit-details-marker { display: none; } details[open] > summary { margin-bottom: .9rem; } td select { padding: .3rem .4rem; font-size: .82rem; max-width: 175px; } /* segmented control (range buttons, filters) */ .seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; gap: 2px; } .seg button, .seg a { background: none; border: 0; color: var(--muted); padding: .28rem .65rem; border-radius: 7px; font-size: .8rem; font-weight: 600; box-shadow: none; } .seg button:hover, .seg a:hover { color: var(--text); filter: none; text-decoration: none; } .seg .on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); } /* bits */ .badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 600; background: var(--chip); color: var(--muted); white-space: nowrap; } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.accent { background: var(--accent-soft); color: var(--accent); } .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 3px; margin-right: .45rem; vertical-align: middle; flex: none; } .flash { display: flex; align-items: center; gap: .6rem; background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; } .flash .ico { color: var(--accent); } .alert { border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: linear-gradient(90deg, var(--bad-soft), var(--panel) 60%); } .alert h2 { color: var(--bad); } .progress { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; } .progress > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--good), color-mix(in srgb, var(--good) 70%, #22d3ee)); transition: width .6s ease; } .list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); } .list li:last-child { border-bottom: 0; } .list li .num, .list li > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; } .list a.cat { color: var(--text); display: flex; align-items: center; min-width: 0; } .list .bar { height: 4px; border-radius: 4px; background: var(--chip); margin-top: 5px; overflow: hidden; } .list .bar > div { height: 100%; border-radius: 4px; } .pager { display: flex; gap: .5rem; align-items: center; justify-content: center; margin-top: 1rem; } .empty { text-align: center; color: var(--muted); padding: 2rem 1rem; } .empty .ico { width: 34px; height: 34px; opacity: .5; margin-bottom: .4rem; } /* charts */ .chart-box { position: relative; height: 290px; } .chart-box.sm { height: 230px; } .chart-box.tall { height: 330px; } .donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; } .legend { display: flex; flex-direction: column; gap: .25rem; max-height: 210px; overflow-y: auto; } .legend button { display: flex; align-items: center; gap: .5rem; background: none; border: 0; padding: .3rem .4rem; border-radius: 7px; color: var(--text); font-weight: 500; font-size: .84rem; text-align: left; box-shadow: none; justify-content: flex-start; } .legend button:hover { background: var(--chip); filter: none; } .legend button.off { opacity: .4; text-decoration: line-through; } .legend button .v { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; } /* live numbers */ @keyframes flashUp { from { background: color-mix(in srgb, var(--good) 30%, transparent); } to { background: transparent; } } @keyframes flashDown { from { background: color-mix(in srgb, var(--bad) 30%, transparent); } to { background: transparent; } } .flash-up { animation: flashUp 1.6s ease-out; border-radius: 4px; } .flash-down { animation: flashDown 1.6s ease-out; border-radius: 4px; } .live-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); white-space: nowrap; } .live-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s infinite; } @keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } } .live-status:empty { display: none; }