/* Vidro sobre luz difusa: cartões translúcidos com desfoque, no espírito do macOS. */
:root {
  --bg: #eef2f8;
  --fg: #111418;
  --muted: #5c6470;
  --panel: rgba(255, 255, 255, .58);
  --panel-strong: rgba(255, 255, 255, .78);
  --edge: rgba(17, 20, 24, .08);
  --shine: rgba(255, 255, 255, .7);
  --blue: #0a84ff;
  --violet: #8e7cf0;
  --teal: #30b0c7;
  --ok: #1f9d55;
  --bad: #e5484d;
  --warn: #d98a00;
  --aura-a: #9cc8ff;
  --aura-b: #cdbdff;
  --aura-c: #9fe0ea;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --fg: #f2f4f8;
    --muted: #9aa3b2;
    --panel: rgba(30, 34, 44, .55);
    --panel-strong: rgba(36, 40, 52, .8);
    --edge: rgba(255, 255, 255, .09);
    --shine: rgba(255, 255, 255, .12);
    --aura-a: #1b3d75;
    --aura-b: #3a2d72;
    --aura-c: #164a55;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.45;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top, 0) max(16px, env(safe-area-inset-right, 0)) env(safe-area-inset-bottom, 0) max(16px, env(safe-area-inset-left, 0));
}
.aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aura i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .7; }
.aura i:nth-child(1) { width: 52vmax; height: 52vmax; left: -14vmax; top: -12vmax; background: var(--aura-a); }
.aura i:nth-child(2) { width: 44vmax; height: 44vmax; right: -12vmax; top: 4vmax; background: var(--aura-b); }
.aura i:nth-child(3) { width: 46vmax; height: 46vmax; left: 22vmax; bottom: -20vmax; background: var(--aura-c); }

.glass {
  background: var(--panel);
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--edge); border-radius: 22px;
  box-shadow: inset 0 1px 0 var(--shine), 0 14px 34px -22px rgba(0, 0, 0, .45);
}
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; font-size: 14px; font-weight: 650; }

/* login */
body.login { display: grid; place-items: center; padding-block: 24px; }
.login-box { width: min(100%, 400px); padding: 32px 28px; display: grid; gap: 10px; }
.form { display: grid; gap: 8px; margin-top: 10px; }
.form label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form input {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edge);
  background: var(--panel-strong); color: var(--fg); outline: none;
}
.form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 132, 255, .18); }
.form button, .ghost {
  font: inherit; font-weight: 600; border-radius: 12px; cursor: pointer;
}
.form button { margin-top: 8px; padding: 12px; border: 0; background: var(--blue); color: #fff; font-size: 16px; }
.form button:focus-visible, .ghost:focus-visible { outline: 3px solid rgba(10, 132, 255, .5); outline-offset: 2px; }
.erro { min-height: 1.2em; margin: 2px 0 0; color: var(--bad); font-size: 13px; }

/* painel */
.page { max-width: 1180px; margin: 0 auto; padding-block: 24px 48px; display: grid; gap: 18px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.head { display: grid; gap: 6px; min-width: 0; }
.lede { margin: 0; color: var(--muted); font-size: 16px; max-width: 62ch; }
.lede b { color: var(--fg); font-weight: 650; }
.ghost { padding: 8px 14px; background: var(--panel); border: 1px solid var(--edge); color: var(--fg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.aviso { margin: 0; padding: 12px 16px; color: var(--bad); font-weight: 500; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.kpi { padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.label { font-size: 13px; color: var(--muted); font-weight: 500; }
.big { font-size: clamp(26px, 3.2vw, 34px); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sub b { color: var(--fg); }
.kpi.hero { background: linear-gradient(140deg, rgba(10, 132, 255, .22), var(--panel)); }
.kpi.hero .big { color: var(--blue); }

.card { padding: 20px 22px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.note { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.solid { background: var(--blue); }
.sw.dash { background: rgba(10, 132, 255, .3); outline: 1px dashed var(--blue); outline-offset: -1px; }

.chart { position: relative; min-height: 280px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.tip {
  position: absolute; pointer-events: none; min-width: 170px; padding: 10px 12px; font-size: 12px; line-height: 1.6;
  background: var(--panel-strong); border: 1px solid var(--edge); border-radius: 14px;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .5);
  font-variant-numeric: tabular-nums;
}
.tip .t { font-weight: 650; color: var(--muted); }
.tip .r { display: flex; justify-content: space-between; gap: 16px; }

.two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.due { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.due li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--edge);
}
.date { text-align: center; line-height: 1; border-radius: 12px; padding: 7px 0; background: rgba(10, 132, 255, .14); }
.date .d { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.date .m { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.due .who { font-weight: 650; }
.due .det { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.due .val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.due .val small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.due li.hoje { border-color: rgba(217, 138, 0, .55); }
.due li.hoje .date { background: rgba(217, 138, 0, .2); }

.ring-box { display: grid; justify-items: center; gap: 10px; padding-block: 6px 4px; }
.ring { position: relative; width: 140px; height: 140px; }
.ring svg { width: 140px; height: 140px; }
.ring .pc { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.explica { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--edge); }
.explica p { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }

.table-box { overflow: auto; max-height: 440px; border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { position: sticky; top: 0; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px; white-space: nowrap; background: var(--panel-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--edge); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.tbl .num { text-align: right; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag.run { background: rgba(10, 132, 255, .15); color: var(--blue); }
.tag.done { background: rgba(31, 157, 85, .15); color: var(--ok); }
.tag.out { background: var(--edge); color: var(--muted); }

.foot { margin: 0; font-size: 12px; color: var(--muted); }
.sk { display: inline-block; min-width: 6ch; color: transparent; border-radius: 8px; background: var(--edge); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
