/* Revive — Alvorada Tech
   Paleta: sol (laranja) sobre ondas (azul). */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --sun: #ff8a1f;
  --sun-2: #ffb547;
  --sea: #2f7bff;
  --sea-2: #22b8f0;
  --ok: #2fbf71;
  --warn: #f5a524;
  --bad: #f04f5a;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg-2: #0d1424;
  --surface: #111a2d;
  --surface-2: #16213a;
  --surface-3: #1c2945;
  --line: rgba(160, 185, 230, .09);
  --line-2: rgba(160, 185, 230, .16);
  --text: #e8eefb;
  --text-2: #a8b5cf;
  --text-3: #6f7e9c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --glow: rgba(255, 138, 31, .18);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #edf1f8;
  --line: rgba(20, 40, 80, .08);
  --line-2: rgba(20, 40, 80, .15);
  --text: #121a2c;
  --text-2: #4c5a75;
  --text-3: #8592ab;
  --shadow: 0 10px 30px rgba(20, 40, 80, .08);
  --glow: rgba(255, 138, 31, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(47, 123, 255, .35); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }

/* ------------------------------------------------------------- sidebar */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-logo { width: 42px; height: 42px; filter: drop-shadow(0 6px 14px var(--glow)); }
.brand-name { font: 700 20px/1 var(--font-display); letter-spacing: .2px; }
.brand-sub { font-size: 11.5px; color: var(--text-3); letter-spacing: .6px; text-transform: uppercase; margin-top: 4px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button {
  display: flex; align-items: center; gap: 12px;
  border: 0; background: transparent; color: var(--text-2);
  padding: 10px 12px; border-radius: 10px; text-align: left;
  transition: background .2s var(--ease), color .2s;
  position: relative;
}
.nav button:hover { background: var(--surface); color: var(--text); }
.nav button.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nav button.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: linear-gradient(var(--sun-2), var(--sun));
}
.nav .badge-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px var(--glow); animation: pulse 1.4s infinite; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.admin-chip {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2);
}
.admin-chip svg { flex: none; margin-top: 2px; }
.admin-chip b { color: var(--text); display: block; font-weight: 600; }
.admin-chip button { margin-top: 6px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 12px; padding: 4px 6px; }

/* ---------------------------------------------------------------- main */
.main { overflow-y: auto; padding: 30px 38px 120px; scroll-behavior: smooth; outline: none; }
.view { max-width: 1180px; margin: 0 auto; animation: rise .35s var(--ease); }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-head h1 { font: 700 28px/1.15 var(--font-display); margin: 0 0 6px; letter-spacing: -.2px; }
.view-head p { margin: 0; color: var(--text-2); max-width: 680px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; color: var(--sun); margin-bottom: 8px; }

.boot { height: 70vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--text-2); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--sun); animation: spin .8s linear infinite; }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h2 { font: 650 15.5px/1.3 var(--font-display); margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.card h2 svg { color: var(--sun); }
.card .sub { color: var(--text-3); font-size: 13px; margin: 0 0 16px; }
.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)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .actionbar { left: 76px; } .g2, .g3 { grid-template-columns: 1fr; } .app { grid-template-columns: 76px 1fr; } .brand div, .nav span, .sidebar-foot { display: none; } }

/* Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 34px 36px;
  background:
    radial-gradient(600px 240px at 88% -20%, rgba(255, 160, 50, .32), transparent 60%),
    radial-gradient(500px 260px at 100% 120%, rgba(47, 123, 255, .28), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.hero h1 { font: 700 32px/1.15 var(--font-display); margin: 0 0 10px; max-width: 620px; letter-spacing: -.3px; }
.hero p { color: var(--text-2); margin: 0 0 22px; max-width: 560px; font-size: 15px; }
.hero-art { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); width: 170px; opacity: .95; filter: drop-shadow(0 18px 40px var(--glow)); }
@media (max-width: 1000px) { .hero-art { display: none; } }

.action-card {
  display: flex; gap: 16px; align-items: flex-start; text-align: left; width: 100%;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 22px; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.action-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.action-card .ic {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 138, 31, .18), rgba(255, 181, 71, .08)); color: var(--sun);
}
.action-card.blue .ic { background: linear-gradient(135deg, rgba(47, 123, 255, .2), rgba(34, 184, 240, .08)); color: var(--sea-2); }
.action-card h3 { margin: 2px 0 4px; font: 650 16.5px var(--font-display); }
.action-card p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.action-card .go { margin-left: auto; color: var(--text-3); align-self: center; }

/* Discos */
.disk { display: flex; flex-direction: column; gap: 10px; }
.disk-top { display: flex; align-items: center; gap: 10px; }
.disk-top .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.disk-top b { font-weight: 650; }
.disk-top small { color: var(--text-3); display: block; font-size: 12px; }
.meter { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sea), var(--sea-2)); transition: width .6s var(--ease); }
.meter.hot > i { background: linear-gradient(90deg, var(--sun), var(--bad)); }
.disk-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }

/* --------------------------------------------------------------- tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile {
  display: flex; align-items: center; gap: 11px; text-align: left; padding: 11px 13px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); transition: all .18s var(--ease); min-width: 0; position: relative;
}
.tile:hover { border-color: var(--line-2); color: var(--text); }
.tile .ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); }
.tile .tt { min-width: 0; }
.tile .tt b { display: block; color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tt small { display: block; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .chk {
  margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; color: transparent; transition: all .15s;
}
.tile.on { border-color: rgba(255, 138, 31, .55); background: linear-gradient(135deg, rgba(255, 138, 31, .12), rgba(255, 138, 31, .03)); color: var(--text); }
.tile.on .ic { background: rgba(255, 138, 31, .18); color: var(--sun); }
.tile.on .chk { background: var(--sun); border-color: var(--sun); color: #fff; }
.tile.cloud .ic { color: var(--sea-2); }
.tile .rm { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3); display: none; place-items: center; padding: 0; }
.tile:hover .rm { display: grid; }

.section-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .7px; margin: 16px 0 9px; }
.section-label:first-of-type { margin-top: 0; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13.5px;
  transition: all .18s var(--ease); white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(135deg, var(--sun-2), var(--sun) 55%, #ff6a1a);
  box-shadow: 0 8px 22px -6px rgba(255, 122, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn.blue { border: 0; color: #fff; background: linear-gradient(135deg, var(--sea-2), var(--sea)); box-shadow: 0 8px 22px -8px rgba(47, 123, 255, .6); }
.btn.danger { border-color: rgba(240, 79, 90, .4); color: #ff8a92; background: rgba(240, 79, 90, .08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* -------------------------------------------------------------- inputs */
.input {
  height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2);
  padding: 0 12px; outline: none; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(47, 123, 255, .18); }
.input-icon { position: relative; display: flex; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 36px; width: 100%; }
select.input { padding-right: 30px; }

.seg.full { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; }
.seg.full button { padding: 6px 2px; font-size: 12.5px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); font-weight: 600; }

.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-child { border-top: 0; }
.switch-row .txt b { display: block; font-weight: 600; font-size: 13.5px; }
.switch-row .txt small { color: var(--text-3); font-size: 12.5px; }
.switch { flex: none; width: 38px; height: 22px; border-radius: 22px; background: var(--surface-3); position: relative; transition: background .2s; margin-top: 1px; border: 1px solid var(--line-2); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch.on { background: var(--sun); border-color: var(--sun); }
.switch.on::after { transform: translateX(16px); }

.cb { width: 19px; height: 19px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: transparent; transition: all .12s; padding: 0; }
.cb.on { background: var(--sun); border-color: var(--sun); color: #fff; }
.cb.part { background: var(--sun); border-color: var(--sun); color: #fff; }

/* ------------------------------------------------------------ progress */
.progress-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
@media (max-width: 1000px) { .progress-wrap { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 10px 10px; border-radius: 10px; color: var(--text-3); position: relative; }
.steps li .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-size: 12px; font-weight: 700; }
.steps li.done { color: var(--text-2); }
.steps li.done .dot { background: rgba(47, 191, 113, .15); border-color: transparent; color: var(--ok); }
.steps li.now { color: var(--text); background: var(--surface-2); font-weight: 600; }
.steps li.now .dot { border-color: var(--sun); color: var(--sun); box-shadow: 0 0 0 4px var(--glow); }
.steps li.now .dot::after { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--sun); animation: spin .9s linear infinite; }

.big-pct { font: 700 46px/1 var(--font-display); letter-spacing: -1px; }
.big-pct small { font-size: 20px; color: var(--text-3); font-weight: 600; margin-left: 2px; }
.bar { height: 12px; border-radius: 10px; background: var(--surface-3); overflow: hidden; position: relative; margin: 14px 0 6px; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--sea), var(--sea-2) 40%, var(--sun-2) 75%, var(--sun)); transition: width .35s var(--ease); }
.bar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shimmer 1.4s infinite; }
.bar.indet > i { width: 35% !important; animation: indet 1.3s ease-in-out infinite; }
.current { font: 12.5px var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; height: 19px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat small { color: var(--text-3); font-size: 12px; display: block; }
.stat b { font: 700 19px/1.3 var(--font-display); }

.log { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; height: 200px; overflow-y: auto; font: 12.5px/1.65 var(--mono); }
.log div { display: flex; gap: 10px; color: var(--text-2); animation: fadein .25s; }
.log time { color: var(--text-3); flex: none; }
.log .step { color: var(--sea-2); font-weight: 600; }
.log .warn { color: var(--warn); }
.log .error { color: var(--bad); }
.log .success { color: var(--ok); font-weight: 600; }

/* ------------------------------------------------------------- results */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1000px) { .summary { grid-template-columns: repeat(2, 1fr); } }
.sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.sum small { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.sum b { font: 700 25px/1.25 var(--font-display); display: block; margin-top: 4px; }
.sum.hl { background: linear-gradient(135deg, rgba(255, 138, 31, .16), rgba(255, 138, 31, .03)), var(--surface); border-color: rgba(255, 138, 31, .3); }
.sum.hl b { color: var(--sun-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.tabs button.on { color: var(--text); border-bottom-color: var(--sun); }
.tabs .count { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); padding: 5px 11px; border-radius: 20px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chip:hover { border-color: var(--line-2); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: .7; font-variant-numeric: tabular-nums; }

.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; transition: border-color .2s; animation: fadein .3s; }
.group.has-sel { border-color: rgba(255, 138, 31, .35); }
.group-head { display: flex; gap: 14px; align-items: center; padding: 12px 14px; }
.thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; color: var(--text-3); border: 0; padding: 0; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.media::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.0); transition: background .2s; }
.thumb.media:hover::after { background: rgba(0,0,0,.25); }
.group-title { min-width: 0; flex: 1; }
.group-title b { display: block; font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-title small { color: var(--text-3); font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill.cloud { background: rgba(34, 184, 240, .13); color: var(--sea-2); }
.pill.local { background: rgba(160, 185, 230, .1); }
.pill.warn { background: rgba(245, 165, 36, .14); color: var(--warn); }
.pill.keep { background: rgba(47, 191, 113, .14); color: var(--ok); }
.pill.del { background: rgba(240, 79, 90, .13); color: #ff8a92; }
.waste { text-align: right; flex: none; }
.waste b { display: block; font: 700 15px var(--font-display); color: var(--sun-2); }
.waste small { color: var(--text-3); font-size: 11.5px; }

.files { border-top: 1px solid var(--line); }
.file { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto 72px auto; gap: 12px; align-items: center; padding: 8px 14px 8px 16px; border-top: 1px solid var(--line); transition: background .12s; }
.file:first-child { border-top: 0; }
.file:hover { background: var(--surface-2); }
.file.sel { background: rgba(240, 79, 90, .05); }
.file.sel .fpath b { text-decoration: line-through; text-decoration-color: rgba(240, 79, 90, .6); }
.fpath { min-width: 0; }
.fpath b { display: block; font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpath small { display: block; font: 11.5px var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.fdate { color: var(--text-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.factions { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.file:hover .factions { opacity: 1; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table td { padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.table tr:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: rgba(47, 191, 113, .12); color: var(--ok); }
.empty h3 { margin: 0 0 6px; color: var(--text); font: 650 18px var(--font-display); }

.more { display: flex; justify-content: center; padding: 14px; }

/* ----------------------------------------------------------- actionbar */
.actionbar {
  position: fixed; left: 248px; right: 0; margin-inline: auto; width: max-content; bottom: 20px;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
  animation: rise .3s var(--ease); z-index: 20; max-width: calc(100vw - 300px);
}
.actionbar .sel-info { white-space: nowrap; }
.actionbar .sel-info b { font: 700 15px var(--font-display); }
.actionbar .sel-info small { display: block; color: var(--text-3); font-size: 12px; }
.actionbar[hidden] { display: none; }

/* ------------------------------------------------------- clean targets */
.targets { display: flex; flex-direction: column; }
.target { display: grid; grid-template-columns: 22px 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.target:first-child { border-top: 0; }
.target .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.target.on .ic { background: rgba(255, 138, 31, .15); color: var(--sun); }
.target.locked { opacity: .55; cursor: default; }
.target .tt b { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.target .tt small { color: var(--text-3); font-size: 12.5px; display: block; }
.target .sz { text-align: right; }
.target .sz b { font: 700 15px var(--font-display); display: block; }
.target .sz small { color: var(--text-3); font-size: 12px; }

.banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.banner.ok { background: rgba(47, 191, 113, .08); border-color: rgba(47, 191, 113, .3); }
.banner.ok .ic { color: var(--ok); }
.banner.info { background: rgba(47, 123, 255, .07); border-color: rgba(47, 123, 255, .25); }
.banner.info .ic { color: var(--sea-2); }
.banner.warn { background: rgba(245, 165, 36, .07); border-color: rgba(245, 165, 36, .3); }
.banner.warn .ic { color: var(--warn); }
.banner .ic { flex: none; }
.banner b { display: block; }
.banner small { color: var(--text-2); }

/* --------------------------------------------------------------- modal */
.modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: rgba(4, 8, 18, .6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; animation: fadein .2s; padding: 20px; }
.modal { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: pop .25s var(--ease); overflow: hidden; }
.modal.wide { width: min(980px, 100%); }
.modal-body { padding: 24px; }
.modal-body h3 { margin: 0 0 8px; font: 700 19px var(--font-display); display: flex; align-items: center; gap: 10px; }
.modal-body p { color: var(--text-2); margin: 0 0 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--line); }
.preview { background: #000; display: grid; place-items: center; max-height: 72vh; }
.preview img, .preview video { max-width: 100%; max-height: 72vh; display: block; }
.preview audio { width: 90%; margin: 40px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; margin: 12px 0 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }

/* --------------------------------------------------------------- toast */
.toasts { position: fixed; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: slidein .3s var(--ease); font-size: 13.5px; }
.toast.ok svg { color: var(--ok); }
.toast.warn svg { color: var(--warn); }
.toast.error svg { color: var(--bad); }
.toast svg { flex: none; }

.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.about p { color: var(--text-2); }
.about a { color: var(--sea-2); }
.kbd { font: 12px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line-2); }

/* ------------------------------------------------------------ animações */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes indet { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--glow); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------- web extras */
.hint { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 13px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.hint svg { flex: none; color: var(--sea-2); margin-top: 1px; }
.tool-link { text-decoration: none; color: inherit; }
.privacy { display: flex; gap: 14px; align-items: center; }
.privacy .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(47, 191, 113, .12); color: var(--ok); flex: none; }
.root-empty { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; color: var(--text-2); }
.root-empty b { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }
.cbx { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }

/* -------------------------------------------------- tamanho e gráfico */
.fsize { font: 600 12.5px var(--font); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.chart-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 1000px) { .chart-body { grid-template-columns: 1fr; } }
.share { padding-right: 24px; border-right: 1px solid var(--line); }
@media (max-width: 1000px) { .share { border-right: 0; padding-right: 0; } }
.share-num { font: 700 40px/1 var(--font-display); letter-spacing: -1px; }
.share-txt { color: var(--text-2); font-size: 13px; margin: 6px 0 12px; }
.share-bar { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; }
.share-bar i { display: block; height: 100%; background: var(--sun); border-radius: 4px; }
.share-legend { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.share-legend span { display: flex; align-items: center; gap: 8px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.dup { background: var(--sun); }
.sw.uni { background: var(--surface-3); border: 1px solid var(--line-2); }
.cbars { display: flex; flex-direction: column; gap: 2px; }
.cbar { display: grid; grid-template-columns: 190px minmax(0, 1fr) 52px 92px 92px; gap: 12px; align-items: center; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: var(--text); transition: background .15s; }
.cbar:hover, .cbar.on { background: var(--surface-2); }
.cbar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.cbar-label svg { flex: none; color: var(--text-3); }
.cbar-track { height: 14px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cbar-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--sun); transition: width .5s var(--ease); }
.cbar.on .cbar-track i, .cbar:hover .cbar-track i { background: var(--sun-2); }
.cbar-pct { font: 700 13px var(--font-display); text-align: right; font-variant-numeric: tabular-nums; }
.cbar-val { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cbar-sub { font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1200px) { .cbar { grid-template-columns: 150px minmax(0, 1fr) 48px 86px; } .cbar-sub { display: none; } }
.chart-table { margin-top: 14px; }
.chart-table summary { cursor: pointer; color: var(--text-3); font-size: 12.5px; }

/* -------------------------------------------------- linha clicável */
.file[data-act], .row-click { cursor: pointer; user-select: none; }
.file[data-act] .fpath small { user-select: text; }
.row-click.sel td { background: rgba(240, 79, 90, .05); }
.modal-foot { flex-wrap: wrap; }

/* ------------------------------------------------ relatório da limpeza */
.report-head { display: flex; gap: 14px; align-items: center; }
.report-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.report-tiles .stat.hl { background: linear-gradient(135deg, rgba(255, 138, 31, .16), rgba(255, 138, 31, .03)), var(--surface-2); border-color: rgba(255, 138, 31, .3); }
.report-tiles .stat.hl b { color: var(--sun-2); }
.report-tiles b.bad { color: var(--bad); }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 8px; }
@media (max-width: 760px) { .report-cols, .report-tiles { grid-template-columns: 1fr 1fr; } .report-cols { grid-template-columns: 1fr; } }
.table.mini td, .table.mini th { padding: 7px 10px; font-size: 12.5px; }
.rbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px 64px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; }
.rbar span:first-child { display: flex; gap: 7px; align-items: center; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar b { text-align: right; font-variant-numeric: tabular-nums; }
.rbar small { color: var(--text-3); text-align: right; }
.report-list { max-height: 34vh; overflow: auto; border-radius: var(--radius); }
.report-info { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.modal.wide .report { max-height: 78vh; overflow: auto; }
.print-only { display: none; }
@media print {
  body { overflow: visible; background: #fff; }
  body > *:not(.print-only) { display: none !important; }
  .print-only { display: block; color: #111; color-scheme: light;
    --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #f5f7fb; --surface-3: #e6ebf3;
    --line: rgba(20, 40, 80, .12); --line-2: rgba(20, 40, 80, .2); --text: #111; --text-2: #444; --text-3: #666; --shadow: none; }
  .print-only .table th { background: #f0f3f8; }
  .print-only .report-tiles .stat.hl { background: #fff4ea; }
  .print-only .report-tiles .stat.hl b { color: #c45f00; }
  .print-only tr { break-inside: avoid; }
  .print-only .report { max-height: none; overflow: visible; }
  .print-only .report-list { max-height: none; overflow: visible; }
  .print-only .table, .print-only .stat { background: #fff; border-color: #ddd; color: #111; }
  .print-only .muted, .print-only small { color: #555 !important; }
  .print-only .report-info { white-space: normal; max-width: none; }
}

.steps-list { margin: 10px 0 12px; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 10px; }
.steps-list b { color: var(--text); }

/* ------------------------------------------------------- conta (SaaS) */
.conta-chip { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.conta-nome { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conta-chip small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conta-chip .pill.plano { align-self: flex-start; margin-top: 4px; background: rgba(255, 138, 31, .15); color: var(--sun-2); }
.conta-aviso { margin-top: 6px; color: var(--warn); font-size: 12px; }
.conta-aviso a { color: var(--sun-2); font-weight: 600; }
.conta-links { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.conta-links a, .conta-links button { color: var(--text-2); font-size: 12px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-decoration: none; }
.conta-links a:hover, .conta-links button:hover { color: var(--text); }

/* Revive 1.0 · links de conta no menu (mesmo visual das telas) */
.nav a {
  display: flex; align-items: center; gap: 12px; color: var(--text-2); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; position: relative; transition: background .2s var(--ease), color .2s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--sun-2), var(--sun)); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
