/* zubairmughal.cloud — design tokens ------------------------------------ */
:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --grid: rgba(12, 14, 20, .045);
  --glow-1: rgba(99, 102, 241, .22);
  --glow-2: rgba(168, 85, 247, .14);
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --surface-3: #eaeaef;
  --border: #e5e6eb;
  --border-strong: #d4d6dd;
  --fg: #0c0d12;
  --fg-2: #3a3d46;
  --muted: #6c707b;
  --faint: #9a9da6;
  --accent: #4f46e5;
  --accent-2: #9333ea;
  --accent-soft: rgba(79, 70, 229, .08);
  --accent-ring: rgba(79, 70, 229, .28);
  --accent-fg: #ffffff;
  --up: #15a34a;
  --down: #dc2626;
  --warn: #d97706;
  --shadow-sm: 0 1px 2px rgba(15, 17, 25, .05);
  --shadow-md: 0 1px 2px rgba(15, 17, 25, .04), 0 12px 32px -12px rgba(15, 17, 25, .14);
  --tile-l: 46%;
  --tile-a: .12;

  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08080b;
    --grid: rgba(255, 255, 255, .035);
    --glow-1: rgba(110, 106, 255, .26);
    --glow-2: rgba(180, 110, 255, .16);
    --surface: #101014;
    --surface-2: #16161b;
    --surface-3: #1e1e25;
    --border: #212128;
    --border-strong: #2e2e37;
    --fg: #ededf1;
    --fg-2: #c3c4cc;
    --muted: #8b8c96;
    --faint: #5f606a;
    --accent: #8f8cff;
    --accent-2: #c084fc;
    --accent-soft: rgba(143, 140, 255, .10);
    --accent-ring: rgba(143, 140, 255, .35);
    --accent-fg: #0b0b14;
    --up: #3ecf8e;
    --down: #f87171;
    --warn: #fbbf24;
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-md: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 40px -16px rgba(0, 0, 0, .7);
    --tile-l: 74%;
    --tile-a: .14;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08080b;
  --grid: rgba(255, 255, 255, .035);
  --glow-1: rgba(110, 106, 255, .26);
  --glow-2: rgba(180, 110, 255, .16);
  --surface: #101014;
  --surface-2: #16161b;
  --surface-3: #1e1e25;
  --border: #212128;
  --border-strong: #2e2e37;
  --fg: #ededf1;
  --fg-2: #c3c4cc;
  --muted: #8b8c96;
  --faint: #5f606a;
  --accent: #8f8cff;
  --accent-2: #c084fc;
  --accent-soft: rgba(143, 140, 255, .10);
  --accent-ring: rgba(143, 140, 255, .35);
  --accent-fg: #0b0b14;
  --up: #3ecf8e;
  --down: #f87171;
  --warn: #fbbf24;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-md: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 40px -16px rgba(0, 0, 0, .7);
  --tile-l: 74%;
  --tile-a: .14;
}

/* base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--sans);
  font-size: 14.5px; line-height: 1.55; letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent-ring); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* static backdrop: soft glow + fading grid */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}
.backdrop::after {
  content: ""; position: absolute; left: 50%; top: -280px; width: 1100px; height: 620px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 50%, var(--glow-1), transparent),
    radial-gradient(closest-side at 68% 45%, var(--glow-2), transparent);
  filter: blur(20px);
}

/* one-time entrance */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
.fade { opacity: 0; animation: fade .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .fade { animation: none; opacity: 1; }
  * { transition-duration: .01ms !important; }
}

/* buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--fg-2);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary {
  background: var(--fg); color: var(--bg); border-color: transparent;
}
.btn-primary:hover { background: color-mix(in srgb, var(--fg) 86%, var(--bg)); color: var(--bg); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.icon-btn { width: 34px; padding: 0; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }

/* theme toggle icon swap */
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* logo ----------------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: -.04em; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 6px 16px -6px var(--accent-ring);
}
.logo-text { font-weight: 600; letter-spacing: -.02em; font-size: 15px; }
.logo-text .dim { color: var(--faint); font-weight: 500; }

/* login ------------------------------------------------------------------------ */
.login-top { position: fixed; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 88px 16px 40px; }
.login-card {
  width: 100%; max-width: 392px; padding: 34px 30px 28px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-md);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0; margin: 0 0 14px; }
.eyebrow .lock { width: 13px; height: 13px; color: var(--accent); }
.login-card h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.035em; }
.login-card .lead { margin: 6px 0 24px; color: var(--muted); }
.field { margin-top: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--fg-2); margin-bottom: 7px; }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-strong); outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--fg) 15%); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-wrap .input { padding-right: 44px; }
.reveal-pass {
  position: absolute; right: 5px; top: 5px; width: 32px; height: 32px; border-radius: 7px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.reveal-pass:hover { background: var(--surface-2); color: var(--fg); }
.reveal-pass svg { width: 16px; height: 16px; }
.btn-submit { width: 100%; height: 42px; margin-top: 22px; font-size: 14px; border-radius: 10px; }
.btn-submit svg { transition: transform .2s var(--ease); }
.btn-submit:hover svg { transform: translateX(3px); }
.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--down) 9%, transparent); color: var(--down);
  border: 1px solid color-mix(in srgb, var(--down) 25%, transparent);
}
.login-foot { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.login-foot span::before { content: "●"; margin-right: 6px; color: var(--up); font-size: 8px; vertical-align: 2px; }

/* hub: top bar ------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.container, .topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.topbar-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-actions form { margin: 0; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--fg-2); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); text-transform: uppercase; }
.sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

/* hero */
.hero { padding: 56px 0 6px; }
.hero h1 { margin: 0; font-size: clamp(30px, 4.6vw, 46px); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
.grad { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 12px 0 0; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 20%, transparent); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 32px 0 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat { padding: 18px 20px; border-left: 1px solid var(--border); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat-label svg { width: 14px; height: 14px; color: var(--faint); }
.stat-value { white-space: nowrap; margin-top: 8px; font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; color: var(--faint); letter-spacing: -.02em; }
.stat-sub { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { margin-top: 10px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s var(--ease); }

/* toolbar */
.toolbar { position: sticky; top: 60px; z-index: 10; display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 12px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.search { position: relative; flex: 0 1 340px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 38px 0 35px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); outline: none; box-shadow: var(--shadow-sm); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: all .18s var(--ease); }
.chip:hover { color: var(--fg); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { margin-left: 5px; font-family: var(--mono); font-size: 11px; opacity: .6; }
#q-count { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }

/* sections */
section.group { margin-top: 30px; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.group-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.005em; color: var(--fg); }
.group-head .count { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.group-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); align-self: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.grid-compact { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }

/* cards */
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--accent-ring), transparent 40%, transparent 60%, color-mix(in srgb, var(--accent-2) 30%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.tile {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: -.04em;
  color: hsl(var(--h, 240) 70% var(--tile-l));
  background: hsl(var(--h, 240) 80% 60% / var(--tile-a));
  box-shadow: inset 0 0 0 1px hsl(var(--h, 240) 80% 60% / .18);
}
.card-id { flex: 1; min-width: 0; }
.card-title { font-weight: 600; font-size: 15px; letter-spacing: -.02em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub.mono { font-size: 12px; }
.card-desc { margin: 0; color: var(--fg-2); font-size: 13.5px; line-height: 1.55; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.path {
  display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0;
  padding: 7px 9px; border-radius: 8px; border: 1px dashed var(--border-strong); background: transparent;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted); cursor: pointer; text-align: left;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.path:hover { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
.path svg { width: 13px; height: 13px; flex: none; }
.path span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path.copied { color: var(--up); border-color: var(--up); }

.card.compact { padding: 15px; gap: 10px; }
.card.compact .tile { width: 32px; height: 32px; font-size: 11.5px; border-radius: 8px; }
.card.compact .card-title { font-size: 14px; }
.card.compact .card-desc { font-size: 13px; color: var(--muted); }

/* status */
.status {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  white-space: nowrap; transition: color .3s var(--ease), background-color .3s var(--ease);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.up { color: var(--up); background: color-mix(in srgb, var(--up) 9%, transparent); border-color: color-mix(in srgb, var(--up) 22%, transparent); }
.status.up::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.status.down { color: var(--down); background: color-mix(in srgb, var(--down) 9%, transparent); border-color: color-mix(in srgb, var(--down) 22%, transparent); }
.status.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 24%, transparent); }

/* processes table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-2); }
td { color: var(--fg-2); }
td.name { font-family: var(--mono); color: var(--fg); }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
tbody tr { transition: background-color .15s var(--ease); }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

.empty { padding: 48px 0; text-align: center; color: var(--muted); }
footer.site { margin-top: 64px; border-top: 1px solid var(--border); }
footer.site .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 32px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* responsive */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .toolbar { flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .container, .topbar-inner { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .grid, .grid-compact { grid-template-columns: 1fr; }
  .top-actions .user-name, .sep, #q-count, kbd { display: none; }
  .stat-value small { font-size: 12px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 20px; }
  .login-card { padding: 28px 22px 22px; }
}
