/* Kavior OS - estilos */
:root {
  --destaque: #ff8a1f;
  --destaque-txt: #1a1206;
  --fonte: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --raio: 8px;
  --barra: 48px;
  --desfoque: blur(28px) saturate(160%);
  /* tema escuro (padrao) */
  --txt: #f3f3f5;
  --txt2: #b8bac2;
  --txt3: #8a8d96;
  --janela: rgba(36, 37, 43, .86);
  --janela-solida: #24252b;
  --conteudo: #1c1d22;
  --superficie: rgba(255, 255, 255, .055);
  --superficie2: rgba(255, 255, 255, .085);
  --hover: rgba(255, 255, 255, .07);
  --ativo: rgba(255, 255, 255, .045);
  --borda: rgba(255, 255, 255, .085);
  --borda-forte: rgba(255, 255, 255, .14);
  --barra-fundo: rgba(26, 27, 32, .78);
  --menu: rgba(40, 41, 48, .9);
  --sombra: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --sombra-leve: 0 8px 24px rgba(0, 0, 0, .35);
  --selecao: color-mix(in srgb, var(--destaque) 26%, transparent);
  --selecao-borda: color-mix(in srgb, var(--destaque) 55%, transparent);
  color-scheme: dark;
}
:root[data-tema="claro"] {
  --txt: #1b1b1f;
  --txt2: #4b4d55;
  --txt3: #767984;
  --janela: rgba(243, 243, 246, .88);
  --janela-solida: #f3f3f6;
  --conteudo: #fbfbfc;
  --superficie: rgba(0, 0, 0, .035);
  --superficie2: rgba(0, 0, 0, .06);
  --hover: rgba(0, 0, 0, .05);
  --ativo: rgba(0, 0, 0, .035);
  --borda: rgba(0, 0, 0, .09);
  --borda-forte: rgba(0, 0, 0, .15);
  --barra-fundo: rgba(238, 239, 243, .82);
  --menu: rgba(249, 249, 251, .94);
  --sombra: 0 18px 50px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .12);
  --sombra-leve: 0 8px 24px rgba(0, 0, 0, .16);
  color-scheme: light;
}
:root[data-transparencia="nao"] {
  --desfoque: none;
  --janela: var(--janela-solida);
  --barra-fundo: var(--janela-solida);
  --menu: var(--janela-solida);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 14px/1.4 var(--fonte);
  color: var(--txt);
  background: #0b0f1c;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: default; }
svg { display: block; }
::selection { background: var(--selecao); }
.oculto { display: none !important; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-bottom-color: var(--borda-forte);
  border-radius: 6px;
  padding: 6px 10px;
  outline: none;
  user-select: text;
}
input:focus, select:focus, textarea:focus { border-bottom: 2px solid var(--destaque); padding-bottom: 5px; }
select option { background: var(--janela-solida); }

/* Botoes */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--borda); border-radius: 6px;
  background: var(--superficie2); padding: 6px 14px; min-height: 32px;
}
.btn:hover { background: var(--hover); border-color: var(--borda-forte); }
.btn:active { opacity: .8; }
.btn.primario { background: var(--destaque); color: var(--destaque-txt); border-color: transparent; font-weight: 600; }
.btn.primario:hover { filter: brightness(1.08); }
.btn.perigo { color: #ff6b6b; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.ico-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: 6px; background: transparent; color: var(--txt);
}
.ico-btn:hover { background: var(--hover); }
.ico-btn[disabled] { opacity: .35; pointer-events: none; }
.ico-btn svg { width: 17px; height: 17px; }

/* Papel de parede */
#papel {
  position: fixed; inset: 0; background-size: cover; background-position: center;
  transition: filter .5s;
}
.pp-kavior {
  background:
    radial-gradient(circle at 72% 36%, rgba(255, 170, 80, .55) 0, rgba(255, 120, 30, .22) 9%, transparent 30%),
    radial-gradient(ellipse at 20% 110%, rgba(255, 120, 40, .35), transparent 55%),
    radial-gradient(ellipse at 90% -10%, rgba(80, 90, 220, .35), transparent 50%),
    linear-gradient(160deg, #0b1024 0%, #18123a 45%, #3a1d3f 75%, #6b2f2a 100%);
}
.pp-kanopus {
  background:
    radial-gradient(circle at 30% 34%, rgba(130, 200, 255, .55) 0, rgba(60, 140, 255, .22) 9%, transparent 30%),
    radial-gradient(ellipse at 85% 110%, rgba(40, 120, 255, .35), transparent 55%),
    linear-gradient(200deg, #050b1c 0%, #0b1d45 50%, #11366b 80%, #1d5c8f 100%);
}
.pp-aurora {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(46, 230, 170, .45), transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(120, 80, 255, .5), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 90, 160, .35), transparent 50%),
    linear-gradient(180deg, #060818, #0c1330 60%, #1a1238);
}
.pp-grafite { background: radial-gradient(ellipse at 50% 0%, #3a3d46 0%, #1d1f25 55%, #121317 100%); }
.pp-areia {
  background:
    radial-gradient(ellipse at 75% 25%, rgba(255, 200, 140, .9), transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(255, 160, 120, .6), transparent 55%),
    linear-gradient(160deg, #fbe9d7, #f6cfae 50%, #eab08a);
}
.pp-oceano {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(120, 230, 255, .55), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 90, 200, .6), transparent 55%),
    linear-gradient(170deg, #0a4a7a, #0b6e99 45%, #0c8fa8 75%, #17b3a6);
}
.pp-estrela { position: absolute; width: 24vmin; height: 24vmin; opacity: .9; filter: drop-shadow(0 0 40px rgba(255, 150, 60, .65)); pointer-events: none; }
.pp-kavior .pp-estrela { left: calc(72% - 12vmin); top: calc(36% - 12vmin); }
.pp-kanopus .pp-estrela { left: calc(30% - 9vmin); top: calc(34% - 9vmin); width: 18vmin; height: 18vmin; filter: drop-shadow(0 0 40px rgba(90, 170, 255, .7)); }

/* Tela de bloqueio */
#bloqueio {
  position: fixed; inset: 0; z-index: 100000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .18);
  transition: opacity .35s;
}
#bloqueio .relogio-grande { text-align: center; transition: transform .45s, opacity .35s; text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
#bloqueio .hora { font-size: clamp(64px, 12vw, 120px); font-weight: 600; letter-spacing: -2px; line-height: 1; }
#bloqueio .data { font-size: clamp(16px, 2.2vw, 22px); margin-top: 10px; opacity: .95; }
#bloqueio .dica { position: absolute; bottom: 48px; font-size: 13px; opacity: .8; }
#bloqueio .entrar { display: none; flex-direction: column; align-items: center; gap: 14px; }
#bloqueio.modo-entrar { background: rgba(0, 0, 0, .35); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
#bloqueio.modo-entrar .relogio-grande, #bloqueio.modo-entrar .dica { display: none; }
#bloqueio.modo-entrar .entrar { display: flex; animation: surgir .35s ease; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, #ffb25c, var(--destaque) 55%, #c2410c);
  font-size: 46px; font-weight: 600; color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.avatar.pequeno { width: 32px; height: 32px; font-size: 14px; box-shadow: none; }
.entrar .nome { font-size: 26px; font-weight: 600; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.entrar form { display: flex; gap: 0; margin-top: 6px; }
.entrar input {
  width: 260px; height: 36px; background: rgba(255, 255, 255, .14); color: #fff;
  border: 1px solid rgba(255, 255, 255, .25); border-right: 0; border-radius: 6px 0 0 6px;
}
.entrar input::placeholder { color: rgba(255, 255, 255, .7); }
.entrar input:focus { border-bottom: 2px solid var(--destaque); background: rgba(255, 255, 255, .2); }
.entrar button {
  width: 40px; height: 36px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, .2); color: #fff; display: grid; place-items: center;
}
.entrar button:hover { background: rgba(255, 255, 255, .3); }
.entrar button svg { width: 18px; height: 18px; }
.entrar .erro { min-height: 20px; font-size: 13px; color: #ffd0c2; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); text-align: center; max-width: 340px; }
.entrar .servidor { font-size: 12px; opacity: .75; }
@keyframes surgir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tremer { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.tremer { animation: tremer .3s; }

/* Area de trabalho */
#area {
  position: fixed; left: 0; top: 0; right: 0; bottom: var(--barra);
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, var(--ic-alt, 96px));
  grid-auto-columns: var(--ic-larg, 84px);
  gap: 4px; padding: 8px; align-content: start;
}
.ic-area {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px 4px; border-radius: 4px; border: 1px solid transparent;
  color: #fff; text-align: center; font-size: 12px; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .6);
}
.ic-area .img { width: var(--ic-tam, 44px); height: var(--ic-tam, 44px); display: grid; place-items: center; }
.ic-area .img svg, .ic-area .img img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.ic-area .rot { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.ic-area:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .12); }
.ic-area.sel { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .3); }
.ic-area.sel .rot { -webkit-line-clamp: 6; }
.ic-area.alvo { background: var(--selecao); border-color: var(--selecao-borda); }
.solte-aqui { outline: 2px dashed var(--destaque); outline-offset: -6px; }

/* Barra de tarefas */
#barra {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--barra); z-index: 50000;
  background: var(--barra-fundo); backdrop-filter: var(--desfoque); -webkit-backdrop-filter: var(--desfoque);
  border-top: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: center;
}
#barra .apps { display: flex; gap: 4px; align-items: center; height: 100%; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 340px); }
.bt-barra {
  position: relative; width: 44px; height: 40px; flex: none;
  border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center;
}
.bt-barra:hover { background: var(--hover); }
.bt-barra:active .ic { transform: scale(.86); }
.bt-barra .ic { width: 26px; height: 26px; transition: transform .12s; }
.bt-barra .ic svg { width: 100%; height: 100%; }
.bt-barra::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; width: 0; height: 3px; border-radius: 3px;
  background: var(--txt3); transform: translateX(-50%); transition: width .18s, background .18s;
}
.bt-barra.aberto::after { width: 6px; }
.bt-barra.foco { background: var(--superficie2); }
.bt-barra.foco::after { width: 16px; background: var(--destaque); }
#bt-iniciar .ic svg { filter: drop-shadow(0 0 4px rgba(255, 140, 40, .45)); }
#bandeja {
  position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 2px; padding-right: 0;
}
.bandeja-item {
  height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: 6px;
  border: 0; background: transparent; font-size: 12px; color: var(--txt);
}
.bandeja-item:hover { background: var(--hover); }
.bandeja-item svg { width: 16px; height: 16px; }
#relogio { flex-direction: column; justify-content: center; align-items: flex-end; gap: 0; line-height: 1.3; padding: 0 10px; }
#mostrar-area { width: 8px; height: 100%; border: 0; background: transparent; border-left: 1px solid var(--borda); margin-left: 4px; }
#mostrar-area:hover { background: var(--hover); }
#bandeja-ram { font-variant-numeric: tabular-nums; }
#bandeja-ram .mini-barra { width: 34px; height: 5px; border-radius: 3px; background: var(--superficie2); overflow: hidden; }
#bandeja-ram .mini-barra i { display: block; height: 100%; background: var(--destaque); width: 0; transition: width .5s; }

/* Paineis flutuantes (menu iniciar, calendario) */
.painel {
  position: fixed; z-index: 60000; background: var(--menu);
  backdrop-filter: var(--desfoque); -webkit-backdrop-filter: var(--desfoque);
  border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra);
  animation: subir .18s ease-out;
}
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
#iniciar { left: 50%; bottom: calc(var(--barra) + 10px); width: min(640px, calc(100vw - 16px)); height: min(700px, calc(100vh - var(--barra) - 24px)); margin-left: calc(min(640px, calc(100vw - 16px)) / -2); display: flex; flex-direction: column; }
#iniciar .topo { padding: 24px 32px 10px; }
#iniciar .busca-ini { position: relative; }
#iniciar .busca-ini svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--txt3); }
#iniciar .busca-ini input { width: 100%; height: 36px; padding-left: 38px; border-radius: 18px; }
#iniciar .busca-ini input:focus { padding-bottom: 6px; border-bottom-width: 1px; border-color: var(--destaque); }
#iniciar .meio { flex: 1; overflow-y: auto; padding: 8px 32px; }
#iniciar h3 { font-size: 14px; font-weight: 600; margin: 12px 0 10px; display: flex; justify-content: space-between; }
.grade-apps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.app-ini {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
  border: 0; border-radius: 6px; background: transparent; font-size: 12px; text-align: center;
}
.app-ini:hover { background: var(--hover); }
.app-ini .ic { width: 32px; height: 32px; }
.app-ini .ic svg { width: 100%; height: 100%; }
.recentes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.item-lista {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px;
  border: 0; background: transparent; text-align: left; min-width: 0;
}
.item-lista:hover, .item-lista.sel { background: var(--hover); }
.item-lista .ic { width: 30px; height: 30px; flex: none; }
.item-lista .ic svg { width: 100%; height: 100%; }
.item-lista .tx { min-width: 0; }
.item-lista .t1 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-lista .t2 { font-size: 11.5px; color: var(--txt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vazio { color: var(--txt3); font-size: 13px; padding: 10px 2px; }
#iniciar .rodape {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 48px;
  background: var(--ativo); border-top: 1px solid var(--borda); border-radius: 0 0 var(--raio) var(--raio);
}
#iniciar .usuario { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 6px; }

/* Menus de contexto */
.menu-ctx {
  position: fixed; z-index: 70000; min-width: 220px; padding: 4px;
  background: var(--menu); backdrop-filter: var(--desfoque); -webkit-backdrop-filter: var(--desfoque);
  border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-leve);
  animation: aparecer .12s ease-out;
}
@keyframes aparecer { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.menu-ctx button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 12px; border: 0; border-radius: 4px;
  background: transparent; text-align: left; font-size: 13px;
}
.menu-ctx button:hover { background: var(--hover); }
.menu-ctx button[disabled] { opacity: .4; pointer-events: none; }
.menu-ctx button svg { width: 16px; height: 16px; flex: none; }
.menu-ctx button .atalho { margin-left: auto; color: var(--txt3); font-size: 12px; padding-left: 24px; }
.menu-ctx button .vazio-ic { width: 16px; flex: none; }
.menu-ctx hr { border: 0; border-top: 1px solid var(--borda); margin: 4px 2px; }

/* Janelas */
.janela {
  position: fixed; display: flex; flex-direction: column; min-width: 320px; min-height: 200px;
  background: var(--janela); backdrop-filter: var(--desfoque); -webkit-backdrop-filter: var(--desfoque);
  border: 1px solid var(--borda-forte); border-radius: var(--raio); box-shadow: var(--sombra);
  overflow: hidden; animation: abrir .16s ease-out;
}
.janela.inativa { box-shadow: var(--sombra-leve); }
.janela.inativa .titulo { opacity: .7; }
.janela.max { border-radius: 0; border: 0; }
.janela.min { display: none; }
.janela.fechando { animation: fechar .12s ease-in forwards; }
@keyframes abrir { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fechar { to { opacity: 0; transform: scale(.96); } }
.janela .titulo { height: 34px; flex: none; display: flex; align-items: center; padding-left: 12px; gap: 10px; }
.janela .titulo .ic { width: 16px; height: 16px; flex: none; }
.janela .titulo .ic svg { width: 100%; height: 100%; }
.janela .titulo .txt { flex: 1; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.janela .titulo .extras { display: flex; }
.janela .controles { display: flex; align-self: stretch; }
.janela .controles button {
  width: 46px; height: 100%; border: 0; background: transparent; display: grid; place-items: center; color: var(--txt);
}
.janela .controles button svg, .janela .titulo .extras button svg { width: 15px; height: 15px; }
.janela .controles button:hover { background: var(--hover); }
.janela .controles .bt-fechar:hover { background: #c42b1c; color: #fff; }
.janela .titulo .extras button { width: 40px; height: 34px; border: 0; background: transparent; display: grid; place-items: center; }
.janela .titulo .extras button:hover { background: var(--hover); }
.janela .corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.redim { position: absolute; z-index: 5; }
.redim.n { top: -3px; left: 8px; right: 8px; height: 7px; cursor: n-resize; }
.redim.s { bottom: -3px; left: 8px; right: 8px; height: 7px; cursor: s-resize; }
.redim.e { right: -3px; top: 8px; bottom: 8px; width: 7px; cursor: e-resize; }
.redim.w { left: -3px; top: 8px; bottom: 8px; width: 7px; cursor: w-resize; }
.redim.ne { right: -3px; top: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.redim.nw { left: -3px; top: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.redim.se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: se-resize; }
.redim.sw { left: -3px; bottom: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.janela.max .redim { display: none; }
body.arrastando iframe, body.arrastando video { pointer-events: none; }
body.arrastando { cursor: default; }
#encaixe {
  position: fixed; z-index: 40000; border-radius: var(--raio); pointer-events: none;
  background: color-mix(in srgb, var(--destaque) 16%, transparent); border: 2px solid var(--selecao-borda);
  backdrop-filter: blur(6px); transition: all .12s;
}

/* Explorador */
.exp { display: flex; flex-direction: column; height: 100%; }
.exp-ferr { display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-bottom: 1px solid var(--borda); flex-wrap: wrap; }
.exp-ferr .sep { width: 1px; height: 22px; background: var(--borda-forte); margin: 0 6px; }
.exp-ferr .btn-txt { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; }
.exp-ferr .btn-txt:hover { background: var(--hover); }
.exp-ferr .btn-txt svg { width: 17px; height: 17px; }
.exp-ferr .btn-txt[disabled] { opacity: .35; pointer-events: none; }
.exp-ferr .direita { margin-left: auto; display: flex; gap: 2px; }
.exp-nav { display: flex; align-items: center; gap: 4px; padding: 6px 10px; }
.exp-end {
  flex: 1; height: 32px; display: flex; align-items: center; gap: 0; padding: 0 6px; min-width: 0;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 6px; overflow: hidden;
}
.exp-end .migalha { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.exp-end .mg { border: 0; background: transparent; padding: 3px 6px; border-radius: 4px; white-space: nowrap; font-size: 13px; }
.exp-end .mg:hover { background: var(--hover); }
.exp-end .sep-mg { width: 14px; height: 14px; color: var(--txt3); flex: none; }
.exp-end input { flex: 1; border: 0; background: transparent; padding: 0 4px; height: 30px; }
.exp-end input:focus { border: 0; padding-bottom: 0; }
.exp-end .ic-mg { width: 18px; height: 18px; margin: 0 4px 0 2px; flex: none; }
.exp-busca { width: 220px; position: relative; }
.exp-busca input { width: 100%; height: 32px; padding-left: 30px; }
.exp-busca svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--txt3); }
.exp-meio { flex: 1; display: flex; min-height: 0; }
.exp-lado { width: 200px; flex: none; overflow-y: auto; padding: 6px; border-right: 1px solid var(--borda); }
.exp-lado .item-lado {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-radius: 4px;
  background: transparent; text-align: left; font-size: 13px; position: relative;
}
.exp-lado .item-lado:hover { background: var(--hover); }
.exp-lado .item-lado.ativo { background: var(--superficie2); }
.exp-lado .item-lado.ativo::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--destaque); }
.exp-lado .item-lado .ic { width: 18px; height: 18px; flex: none; }
.exp-lado .item-lado .ic svg { width: 100%; height: 100%; }
.exp-lado hr { border: 0; border-top: 1px solid var(--borda); margin: 6px 4px; }
.exp-conteudo { flex: 1; overflow: auto; background: var(--conteudo); position: relative; outline: none; }
.exp-conteudo.icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); align-content: start; gap: 4px; padding: 10px; }
.exp-item { border: 1px solid transparent; border-radius: 4px; }
.exp-conteudo.icones .exp-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; text-align: center; font-size: 12.5px; }
.exp-conteudo.icones .exp-item .img { width: 96px; height: 72px; display: grid; place-items: center; }
.exp-conteudo.icones .exp-item .img svg { width: 56px; height: 56px; }
.exp-conteudo.icones .exp-item .img img { max-width: 96px; max-height: 72px; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); object-fit: cover; }
.exp-conteudo.icones .exp-item .nome { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.exp-conteudo.icones .exp-item .det { display: none; }
.exp-conteudo.lista { padding: 0 6px 6px; }
.exp-cab, .exp-conteudo.lista .exp-item { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 140px 90px; align-items: center; gap: 8px; }
.exp-cab { position: sticky; top: 0; z-index: 1; background: var(--conteudo); padding: 6px 10px; font-size: 12px; color: var(--txt2); border-bottom: 1px solid var(--borda); }
.exp-cab span { cursor: default; }
.exp-cab span:hover { color: var(--txt); }
.exp-conteudo.lista .exp-item { padding: 4px 10px; font-size: 13px; }
.exp-conteudo.lista .exp-item .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.exp-conteudo.lista .exp-item .img { width: 20px; height: 20px; flex: none; }
.exp-conteudo.lista .exp-item .img svg, .exp-conteudo.lista .exp-item .img img { width: 20px; height: 20px; object-fit: cover; }
.exp-conteudo.lista .exp-item .nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-conteudo.lista .exp-item .det { color: var(--txt2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-conteudo.lista .exp-item .det.num { text-align: right; }
.exp-item:hover { background: var(--hover); }
.exp-item.sel { background: var(--selecao); border-color: var(--selecao-borda); }
.exp-item.recortado { opacity: .5; }
.exp-item.alvo { background: var(--selecao); outline: 2px solid var(--destaque); }
.exp-item input.renomear { width: 100%; padding: 2px 4px; font-size: 12.5px; text-align: inherit; }
.exp-status { height: 28px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 12px; color: var(--txt2); border-top: 1px solid var(--borda); }
.exp-vazio { position: absolute; inset: 0; display: grid; place-items: center; color: var(--txt3); font-size: 13px; pointer-events: none; text-align: center; }
.exp-carregando { position: absolute; top: 0; left: 0; height: 2px; width: 30%; background: var(--destaque); animation: carregar 1s infinite ease-in-out; }
@keyframes carregar { from { left: -30%; } to { left: 100%; } }
.selecao-retangulo { position: absolute; border: 1px solid var(--selecao-borda); background: var(--selecao); pointer-events: none; z-index: 3; }

/* Notificacoes */
#notificacoes { position: fixed; right: 12px; bottom: calc(var(--barra) + 12px); z-index: 80000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.notif {
  width: 340px; padding: 12px 14px; border-radius: var(--raio); background: var(--menu);
  backdrop-filter: var(--desfoque); -webkit-backdrop-filter: var(--desfoque);
  border: 1px solid var(--borda); box-shadow: var(--sombra-leve); animation: entrarDir .2s ease-out;
  display: flex; gap: 12px; align-items: flex-start;
}
.notif .ic { width: 20px; height: 20px; flex: none; color: var(--destaque); }
.notif .ic svg { width: 100%; height: 100%; }
.notif .t1 { font-weight: 600; font-size: 13px; }
.notif .t2 { font-size: 12.5px; color: var(--txt2); margin-top: 2px; word-break: break-word; }
.notif.erro .ic { color: #ff6b6b; }
.notif .progresso { height: 4px; border-radius: 2px; background: var(--superficie2); margin-top: 8px; overflow: hidden; }
.notif .progresso i { display: block; height: 100%; width: 0; background: var(--destaque); transition: width .2s; }
.notif .fechar-notif { margin-left: auto; width: 24px; height: 24px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; flex: none; }
.notif .fechar-notif:hover { background: var(--hover); }
.notif .fechar-notif svg { width: 14px; height: 14px; }
@keyframes entrarDir { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* Dialogos */
.fundo-modal { position: fixed; inset: 0; z-index: 90000; background: rgba(0, 0, 0, .35); display: grid; place-items: center; animation: aparecer .12s; }
.modal {
  width: min(460px, calc(100vw - 32px)); background: var(--janela-solida); border: 1px solid var(--borda-forte);
  border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden;
}
.modal .mcorpo { padding: 22px 24px 18px; }
.modal h2 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.modal p { margin: 0 0 10px; color: var(--txt2); word-break: break-word; }
.modal input[type="text"] { width: 100%; margin-top: 4px; }
.modal .mrodape { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; background: var(--ativo); border-top: 1px solid var(--borda); }
.modal .mrodape .btn { min-width: 110px; justify-content: center; }
.modal.grande { width: min(720px, calc(100vw - 32px)); }
.props { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13px; }
.props .k { color: var(--txt3); }
.props .v { word-break: break-all; user-select: text; }
.props-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.props-topo .ic { width: 44px; height: 44px; flex: none; }
.props-topo .ic svg { width: 100%; height: 100%; }
.seletor { height: 340px; display: flex; flex-direction: column; border: 1px solid var(--borda); border-radius: 6px; overflow: hidden; margin: 8px 0 12px; }
.seletor .snav { display: flex; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--borda); font-size: 13px; }
.seletor .snav .caminho { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; color: var(--txt2); }
.seletor .slista { flex: 1; overflow-y: auto; padding: 4px; background: var(--conteudo); }
.seletor .item-lista { width: 100%; padding: 5px 8px; }
.seletor .item-lista .ic { width: 22px; height: 22px; }
.linha-form { display: flex; gap: 8px; align-items: center; }
.linha-form label { color: var(--txt2); font-size: 13px; flex: none; }
.linha-form input { flex: 1; }

/* Bloco de notas */
.notas { display: flex; flex-direction: column; height: 100%; }
.barra-menu { display: flex; gap: 2px; padding: 2px 6px; flex: none; }
.barra-menu button { border: 0; background: transparent; padding: 4px 10px; border-radius: 4px; font-size: 13px; }
.barra-menu button:hover, .barra-menu button.aberto { background: var(--hover); }
.notas textarea {
  flex: 1; resize: none; border: 0; border-radius: 0; background: var(--conteudo); padding: 10px 14px;
  font: 14px/1.5 ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; outline: none; user-select: text;
  border-top: 1px solid var(--borda);
}
.notas textarea:focus { border-bottom: 0; padding-bottom: 10px; }
.notas textarea.sem-quebra { white-space: pre; overflow-x: auto; }
.barra-status { height: 26px; flex: none; display: flex; align-items: center; gap: 0; font-size: 12px; color: var(--txt2); border-top: 1px solid var(--borda); }
.barra-status span { padding: 0 14px; border-right: 1px solid var(--borda); }

/* Visualizadores */
.visor { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #0e0e11; }
:root[data-tema="claro"] .visor { background: #eceef2; }
.visor .palco { flex: 1; overflow: hidden; display: grid; place-items: center; position: relative; min-height: 0; }
.visor .palco img { max-width: 100%; max-height: 100%; transition: transform .15s; transform-origin: center; }
.visor .palco.zoom { overflow: auto; place-items: start center; }
.visor .palco.zoom img { max-width: none; max-height: none; }
.visor .ferr { height: 46px; flex: none; display: flex; align-items: center; justify-content: center; gap: 4px; border-top: 1px solid var(--borda); background: var(--janela-solida); }
.visor .ferr .info { font-size: 12px; color: var(--txt2); margin: 0 10px; min-width: 60px; text-align: center; }
.visor .seta-lado { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.visor .palco:hover .seta-lado { opacity: 1; }
.visor .seta-lado svg { width: 20px; height: 20px; }
.visor .seta-lado.esq { left: 10px; }
.visor .seta-lado.dir { right: 10px; }
.visor video { max-width: 100%; max-height: 100%; background: #000; }
.visor audio { width: min(520px, 90%); }
.visor-audio { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.visor-audio .ic { width: 120px; height: 120px; }
.visor-audio .ic svg { width: 100%; height: 100%; }
.quadro { flex: 1; border: 0; width: 100%; background: #fff; }

/* Navegador */
.nav-quadro { flex: 1; border: 0; width: 100%; background: #111; display: block; }
.nav-espera { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--conteudo); text-align: center; padding: 20px; }
.nav-espera .ic { width: 72px; height: 72px; animation: girarLento 6s linear infinite; }
.nav-espera .ic svg { width: 100%; height: 100%; }
.nav-espera .t1 { font-size: 17px; font-weight: 600; }
.nav-espera .t2 { color: var(--txt2); font-size: 13px; max-width: 420px; }
.giro { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--superficie2); border-top-color: var(--destaque); animation: girarLento .8s linear infinite; }
@keyframes girarLento { to { transform: rotate(360deg); } }

/* Gerenciador de tarefas */
.tm { display: flex; height: 100%; }
.tm-lado { width: 56px; flex: none; padding: 6px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--borda); }
.tm-lado button { width: 44px; height: 40px; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; position: relative; }
.tm-lado button:hover { background: var(--hover); }
.tm-lado button.ativo { background: var(--superficie2); }
.tm-lado button.ativo::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--destaque); }
.tm-lado button svg { width: 19px; height: 19px; }
.tm-conteudo { flex: 1; overflow-y: auto; padding: 18px 22px; background: var(--conteudo); }
.tm-conteudo h2 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; }
.card .ct { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--txt2); }
.card .cv { font-size: 26px; font-weight: 600; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.card .cs { font-size: 12px; color: var(--txt3); font-variant-numeric: tabular-nums; }
.card canvas { width: 100%; height: 64px; margin-top: 10px; display: block; }
.barra-uso { height: 6px; border-radius: 3px; background: var(--superficie2); overflow: hidden; margin-top: 10px; }
.barra-uso i { display: block; height: 100%; background: var(--destaque); border-radius: 3px; transition: width .4s; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; font-weight: 500; color: var(--txt2); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--borda); }
.tabela td { padding: 8px 10px; border-bottom: 1px solid var(--borda); }
.tabela tr:hover td { background: var(--hover); }
.tabela .nm { display: flex; align-items: center; gap: 10px; }
.tabela .nm .ic { width: 20px; height: 20px; }
.tabela .nm .ic svg { width: 100%; height: 100%; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.pilula { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px; border-radius: 10px; background: var(--superficie2); }
.pilula::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--txt3); }
.pilula.ligado::before { background: #33d17a; }
.pilula.ligando::before { background: #f6c343; }
.pilula.desligado::before { background: #8a8d96; }

/* Configuracoes */
.cfg { display: flex; height: 100%; }
.cfg-lado { width: 240px; flex: none; padding: 14px 10px; overflow-y: auto; }
.cfg-perfil { display: flex; align-items: center; gap: 12px; padding: 8px 10px 16px; }
.cfg-perfil .avatar { width: 56px; height: 56px; font-size: 24px; }
.cfg-perfil .t1 { font-weight: 600; }
.cfg-perfil .t2 { font-size: 12px; color: var(--txt3); }
.cfg-lado .item-lado { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; position: relative; }
.cfg-lado .item-lado:hover { background: var(--hover); }
.cfg-lado .item-lado.ativo { background: var(--superficie2); }
.cfg-lado .item-lado.ativo::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--destaque); }
.cfg-lado .item-lado svg { width: 18px; height: 18px; }
.cfg-conteudo { flex: 1; overflow-y: auto; padding: 18px 28px 28px 12px; }
.cfg-conteudo h2 { font-size: 26px; font-weight: 600; margin: 0 0 18px; }
.cfg-bloco { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); margin-bottom: 4px; }
.cfg-linha { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; min-height: 64px; }
.cfg-linha + .cfg-linha { border-top: 1px solid var(--borda); }
.cfg-linha .t1 { font-size: 14px; }
.cfg-linha .t2 { font-size: 12px; color: var(--txt3); margin-top: 2px; }
.cfg-titulo { font-size: 14px; font-weight: 600; margin: 22px 0 8px; }
.previa-pp { width: 100%; aspect-ratio: 16 / 9; max-width: 360px; border-radius: var(--raio); position: relative; overflow: hidden; box-shadow: var(--sombra-leve); margin: 4px 0 14px; background-size: cover; background-position: center; }
.grade-pp { display: grid; grid-template-columns: repeat(auto-fill, 112px); gap: 8px; padding: 14px 18px; }
.op-pp { width: 112px; height: 64px; border-radius: 6px; border: 2px solid transparent; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.op-pp.ativo { border-color: var(--destaque); }
.op-pp:hover { filter: brightness(1.1); }
.op-pp .pp-estrela { width: 22px; height: 22px; }
.op-pp.pp-kavior .pp-estrela { left: calc(72% - 11px); top: calc(36% - 11px); }
.op-pp.pp-kanopus .pp-estrela { left: calc(30% - 9px); top: calc(34% - 9px); width: 18px; height: 18px; }
.cores { display: flex; gap: 8px; flex-wrap: wrap; }
.cor { width: 30px; height: 30px; border-radius: 6px; border: 2px solid transparent; display: grid; place-items: center; color: #fff; }
.cor.ativo { border-color: var(--txt); }
.cor svg { width: 16px; height: 16px; }
.segmentado { display: inline-flex; background: var(--superficie2); border-radius: 6px; padding: 2px; }
.segmentado button { border: 0; background: transparent; padding: 5px 14px; border-radius: 5px; font-size: 13px; }
.segmentado button.ativo { background: var(--janela-solida); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.chave { width: 40px; height: 20px; border-radius: 10px; border: 1px solid var(--txt2); background: transparent; position: relative; flex: none; }
.chave::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--txt2); transition: left .15s; }
.chave.ligada { background: var(--destaque); border-color: var(--destaque); }
.chave.ligada::after { left: 23px; background: var(--destaque-txt); }

/* Calculadora */
.calc { display: flex; flex-direction: column; height: 100%; padding: 6px; gap: 4px; }
.calc .visor-calc { padding: 8px 12px 4px; text-align: right; flex: none; }
.calc .expr { font-size: 13px; color: var(--txt3); min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc .valor { font-size: 40px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; user-select: text; }
.calc .teclas { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.calc .teclas button { border: 1px solid var(--borda); border-radius: 5px; background: var(--superficie2); font-size: 16px; }
.calc .teclas button:hover { background: var(--hover); }
.calc .teclas button.num { background: var(--superficie); font-weight: 600; }
.calc .teclas button.igual { background: var(--destaque); color: var(--destaque-txt); border-color: transparent; font-size: 20px; }

/* Calendario */
#calendario { right: 12px; bottom: calc(var(--barra) + 10px); width: 320px; padding: 16px; }
#calendario .cal-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#calendario .cal-topo strong { font-size: 14px; }
#calendario .cal-hoje { font-size: 13px; color: var(--txt2); padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--borda); }
#calendario .cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; }
#calendario .cal-grade .dsem { color: var(--txt3); padding: 6px 0; }
#calendario .cal-grade .dia { width: 34px; height: 34px; margin: 1px auto; display: grid; place-items: center; border-radius: 50%; }
#calendario .cal-grade .dia.fora { color: var(--txt3); opacity: .6; }
#calendario .cal-grade .dia.hoje { background: var(--destaque); color: var(--destaque-txt); font-weight: 700; }

/* Barras de rolagem */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--superficie2); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--txt3); }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--superficie2) transparent; }

@media (max-width: 760px) {
  .exp-lado, .exp-busca { display: none; }
  .grade-apps { grid-template-columns: repeat(4, 1fr); }
  .recentes { grid-template-columns: 1fr; }
  #iniciar .topo, #iniciar .meio { padding-left: 16px; padding-right: 16px; }
  #iniciar .rodape { padding: 0 16px; }
  .cfg-lado { width: 64px; }
  .cfg-lado .item-lado span, .cfg-perfil .tx { display: none; }
  .exp-cab, .exp-conteudo.lista .exp-item { grid-template-columns: minmax(140px, 1fr) 90px; }
  .exp-cab span:nth-child(3), .exp-cab span:nth-child(4), .exp-conteudo.lista .exp-item .det:nth-child(3), .exp-conteudo.lista .exp-item .det:nth-child(4) { display: none; }
  #bandeja-ram { display: none; }
  #barra .apps { max-width: calc(100vw - 110px); justify-content: flex-start; }
  #barra { justify-content: flex-start; padding-left: 6px; }
}
