/* win98.css - IT Helper
   Layout moderno (sidebar fixa + conteúdo). Identidade Windows 98 na PALETA
   (teal, azul-marinho) e nas FONTES (Tahoma), agora em um tema escuro. */

:root {
  --teal: #16b3b3;
  --teal-dk: #0c7d7d;
  --navy-a: #0a1f6e;
  --navy-b: #1e6fd0;
  --bg: #23262d;         /* fundo do conteúdo */
  --sidebar: #1a1d23;    /* barra lateral */
  --surface: #2c313a;    /* cards / fieldset */
  --surface-2: #1c1f26;  /* inputs / saídas / tabelas */
  --panel: #2c313a;
  --line: #3b414c;
  --line-soft: #333944;
  --ink: #e8eaed;
  --muted: #9aa1ac;
  --sel: #1e6fd0;
  --ok: #4bd873;
  --warn: #e8bf3b;
  --err: #ef6b6b;
  --font: "Tahoma", "MS Sans Serif", "Segoe UI", Arial, sans-serif;
  --mono: "Consolas", "Courier New", monospace;
  --sidebar-w: 258px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; font-family: var(--font); font-size: 13px; color: var(--ink); background: var(--bg); }
body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.bevel-out { background: var(--surface); border: 1px solid var(--line); }
.bevel-in { background: var(--surface-2); border: 1px solid var(--line); }

code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 12px; }

/* ---------------- App shell ---------------- */
#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

/* ------ Sidebar ------ */
#sidebar { display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); min-height: 0; }
.brand {
  display: flex; align-items: center; gap: 10px; padding: 15px 15px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dk));
  border-bottom: 1px solid #0a5b5b;
}
.brand .mark { width: 30px; height: 30px; flex: none; display: block; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.brand b { font-size: 16px; letter-spacing: .3px; color: #fff; }
.brand small { display: block; font-size: 10px; font-weight: normal; color: #d6fbfb; margin-top: 1px; }

.side-search { padding: 12px 12px 6px; }
.side-search input { width: 100%; font-size: 12.5px; }

#nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; min-height: 0; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 6px; }
.nav-group > h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); padding: 5px 9px; font-weight: bold; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 11px; margin: 2px 0; font-family: var(--font); font-size: 13.5px; color: var(--ink);
  background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer; line-height: 1.15;
}
.nav-item .ico { width: 22px; text-align: center; font-size: 17px; flex: none; }
.nav-item:hover { background: #262b33; }
.nav-item:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.nav-item.active { background: linear-gradient(90deg, var(--navy-a), var(--navy-b)); color: #fff; border-color: #0a3a8a; }
.nav-item.active .ico { filter: drop-shadow(0 1px 0 rgba(0,0,0,.5)); }

.side-foot { padding: 10px 14px; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 6px; }

/* ------ Main ------ */
#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#topbar {
  display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px;
  background: linear-gradient(90deg, var(--navy-a), var(--navy-b)); color: #fff;
  border-bottom: 1px solid #071a54; flex: none;
}
#btn-menu { display: none; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); width: 32px; height: 30px; font-size: 16px; border-radius: 5px; cursor: pointer; }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumb .c-ico { font-size: 18px; }
.crumb .c-title { font-size: 15px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 15px; font-size: 12.5px; }
.dns-ind { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 5px 9px; border-radius: 5px; }
.dns-ind:hover { background: rgba(255,255,255,.14); }
#clock { font-variant-numeric: tabular-nums; opacity: .95; }

#content { flex: 1; overflow-y: auto; padding: 24px 30px; background: var(--bg); min-height: 0; }
.content-inner { max-width: 1120px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 21px; letter-spacing: .2px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------------- Components ---------------- */
.led { width: 9px; height: 9px; display: inline-block; border-radius: 50%; border: 1px solid rgba(0,0,0,.4); }
.led.ok { background: #2ad157; } .led.warn { background: #e5b700; } .led.err { background: #e0403f; } .led.off { background: #6a7078; }

button, .btn {
  font-family: var(--font); font-size: 12.5px; background: #363c46; border: 1px solid var(--line);
  padding: 7px 15px; min-height: 32px; cursor: pointer; color: var(--ink); border-radius: 5px;
}
button:hover, .btn:hover { background: #3f4653; }
button:active, .btn:active { background: #2c313a; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
button:disabled { color: #6b7178; cursor: default; background: #2c313a; }
button.primary { font-weight: bold; color: #05201f; border-color: var(--teal-dk); background: linear-gradient(180deg, #22c9c9, var(--teal)); }
button.primary:hover { background: linear-gradient(180deg, #2ad4d4, var(--teal)); }
button.primary:active { background: var(--teal-dk); color: #fff; }

.btn-mini { font-size: 10.5px; padding: 2px 8px; min-height: 0; border-radius: 4px; background: #363c46; margin-left: 6px; }

input[type=text], input[type=number], input[type=url], select, textarea {
  font-family: var(--font); font-size: 13px; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); padding: 7px 9px; min-height: 32px; border-radius: 5px;
}
input::placeholder, textarea::placeholder { color: #6f757e; }
textarea { font-family: var(--mono); resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
input[type=file] { font-size: 12px; padding: 6px; color: var(--muted); }
input[type=file]::file-selector-button { font-family: var(--font); background: #363c46; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
label { font-size: 12.5px; }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); width: 15px; height: 15px; vertical-align: -2px; }

fieldset { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
legend { padding: 0 7px; font-size: 12.5px; font-weight: bold; color: var(--teal); }

.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 11px; }
.row:last-child { margin-bottom: 0; }
.grow { flex: 1; min-width: 140px; }

.out { background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px;
  padding: 11px; overflow: auto; white-space: pre-wrap; word-break: break-word; min-height: 44px; max-height: 360px; color: var(--ink); }
.out.term { background: #0c0e0b; color: #d6d6d6; border-color: #000; }
.out.term .ok { color: #4fe06a; } .out.term .err { color: #ff6b6b; } .out.term .dim { color: #7a808a; }

table.grid { border-collapse: collapse; width: 100%; background: var(--surface-2); font-size: 12px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
table.grid th { background: #313742; text-align: left; padding: 8px 10px; font-weight: bold; border-bottom: 1px solid var(--line); }
table.grid td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); }
table.grid tr:hover td { background: #262b33; }

.kv { display: grid; grid-template-columns: 190px 1fr; gap: 5px 16px; font-size: 12.5px; background: var(--surface-2); padding: 12px; border-radius: 6px; border: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { font-family: var(--mono); word-break: break-all; }

.tag { display: inline-block; padding: 2px 9px; font-size: 10.5px; font-weight: bold; border-radius: 999px; border: 1px solid transparent; }
.tag.ok { background: rgba(43,209,87,.16); color: #63e089; border-color: rgba(43,209,87,.4); }
.tag.warn { background: rgba(229,183,0,.16); color: #f0cf5c; border-color: rgba(229,183,0,.4); }
.tag.err { background: rgba(239,107,107,.16); color: #ff8a8a; border-color: rgba(239,107,107,.4); }
.tag.info { background: rgba(30,111,208,.18); color: #74a8f0; border-color: rgba(30,111,208,.45); }

.hint { font-size: 12px; color: #e6d99a; background: rgba(229,183,0,.09); border: 1px solid rgba(229,183,0,.3); border-radius: 6px; padding: 10px 12px; margin: 11px 0; }
.hint::before { content: "💡 "; }

.pbar { height: 22px; position: relative; background: #1c1f26; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.pbar .fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: linear-gradient(90deg, var(--teal), var(--navy-b)); transition: width .2s linear; }

.speed-big { font-family: var(--mono); font-size: 38px; font-weight: bold; text-align: center; background: #0c0e0b; color: #4fe06a; padding: 18px 8px; border-radius: 7px; }
.speed-big small { font-size: 14px; color: #37a84f; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 13px; }
.tool-card { display: flex; gap: 12px; align-items: center; padding: 15px; cursor: pointer; text-align: left; min-height: 62px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.tool-card:hover { border-color: var(--teal); box-shadow: 0 3px 12px rgba(22,179,179,.15); background: #232830; }
.tool-card .glyph { font-size: 26px; width: 36px; text-align: center; }
.tool-card b { display: block; font-size: 13.5px; }
.tool-card span.desc { font-size: 11px; color: var(--muted); }

::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: var(--sidebar); }
::-webkit-scrollbar-thumb { background: #454b56; border-radius: 6px; border: 3px solid var(--sidebar); }
::-webkit-scrollbar-thumb:hover { background: #565d6a; }

#toast-host { position: fixed; right: 14px; bottom: 14px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }

#boot { position: fixed; inset: 0; background: #0c0e0b; color: #cfcfcf; font-family: var(--mono); font-size: 13px; padding: 28px; z-index: 999; }
#boot .logo { color: #fff; font-weight: bold; font-size: 16px; margin-bottom: 12px; }

#backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }

@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; }
  #btn-menu { display: inline-block; }
  #sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 2px 0 14px rgba(0,0,0,.4); }
  #sidebar.open { transform: translateX(0); }
  #backdrop.show { display: block; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { font-weight: bold; margin-top: 6px; }
  #content { padding: 16px 15px; }
}
