/* BreezeHost — folha de estilo do painel.
 *
 * A identidade é a do site: ameixa e âmbar, tema claro por padrão, Open Sans e
 * sombra chapada (sem desfoque) com o botão afundando ao ser pressionado. O
 * painel e a vitrine precisam parecer o mesmo produto, então as variáveis, os
 * raios e o tempo das transições são os mesmos do site.
 *
 * Exceção deliberada: o console fica escuro nos dois temas. É um terminal, e
 * log de servidor se lê melhor em fundo escuro.
 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

:root {
  --plum:      #4d1e54;
  --plum-d:    #3a1640;
  --plum-l:    #6e2ed8;
  --plum-soft: #a480db;
  --amber:     #ffa600;
  --amber-l:   #ffb833;
  --amber-d:   #c95406;

  --bg:        #ffffff;
  --bg-2:      #f7f5f8;
  --bg-3:      #efeaf1;
  --card:      #ffffff;
  --card-2:    #faf8fb;
  --text:      #2b1430;
  --muted:     #6b5570;
  --faint:     #9b819f;
  --line:      #e4dce6;
  --line-2:    #d3c6d6;

  --ok:        #1f8a5f;
  --ok-bg:     #e6f6ee;
  --warn:      #b06d00;
  --warn-bg:   #fff4e0;
  --bad:       #c2334d;
  --bad-bg:    #fdecef;

  --drop:      0 8px 0 rgba(77, 30, 84, .16);
  --drop-sm:   0 4px 0 rgba(77, 30, 84, .14);

  --r-sm:   8px;
  --r:      16px;
  --r-pill: 64px;
  --ease:   cubic-bezier(.22, 1, .36, 1);

  --body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* O console é escuro mesmo no tema claro. */
  --term-bg:   #1a0f1e;
  --term-fg:   #f0e6f3;
  --term-dim:  #b9a4bf;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:     #150d18;
    --bg-2:   #1d1221;
    --bg-3:   #271830;
    --card:   #1d1221;
    --card-2: #241528;
    --text:   #f4ecf6;
    --muted:  #b9a4bf;
    --faint:  #8d7794;
    --line:   #33203a;
    --line-2: #452c4d;
    --plum:      #c9a3d4;
    --plum-soft: #8d6bbf;
    --ok-bg:   #12301f;
    --warn-bg: #3a2608;
    --bad-bg:  #3a1420;
    --drop:    0 8px 0 rgba(0, 0, 0, .45);
    --drop-sm: 0 4px 0 rgba(0, 0, 0, .42);
  }
}
:root[data-theme="dark"] {
  --bg: #150d18; --bg-2: #1d1221; --bg-3: #271830; --card: #1d1221; --card-2: #241528;
  --text: #f4ecf6; --muted: #b9a4bf; --faint: #8d7794; --line: #33203a; --line-2: #452c4d;
  --plum: #c9a3d4; --plum-soft: #8d6bbf;
  --ok-bg: #12301f; --warn-bg: #3a2608; --bad-bg: #3a1420;
  --drop: 0 8px 0 rgba(0,0,0,.45); --drop-sm: 0 4px 0 rgba(0,0,0,.42);
}

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

body {
  background: var(--bg-2);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--plum-l); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.22; margin: 0 0 .6rem; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-3); padding: .1rem .3rem; border-radius: 5px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--faint); }
.dim { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hide-sm { display: inline; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ----------------------------------------------------------------- marca */

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand strong { font-weight: 800; color: var(--amber-d); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--plum-l), var(--plum));
  box-shadow: 0 3px 0 rgba(58, 22, 64, .28);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 9px 7px auto 7px; height: 3px; border-radius: 3px;
  background: var(--amber); box-shadow: 0 6px 0 var(--amber-l);
}
.brand-lg { font-size: 1.3rem; margin-bottom: 1.5rem; }
.tag {
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--amber-d); background: var(--warn-bg);
  padding: .2rem .5rem; border-radius: var(--r-pill);
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-admin { border-bottom: 3px solid var(--amber); }
.topnav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.topnav a { color: var(--muted); font-size: .93rem; font-weight: 700; }
.topnav a.ativo, .topnav a:hover { color: var(--text); text-decoration: none; }
.topnav a.ativo { box-shadow: 0 3px 0 var(--amber); }
.topuser { display: flex; align-items: center; gap: .8rem; font-size: .9rem; color: var(--muted); font-weight: 700; }
.topuser form { margin: 0; }

/* -------------------------------------------------- cabeçalho do servidor */

.server-head { background: var(--card); border-bottom: 1px solid var(--line); }
.server-head-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding-top: 1.4rem; padding-bottom: 1rem; flex-wrap: wrap;
}
.server-head h1 { font-size: 1.45rem; margin-bottom: .4rem; }
.server-sub { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 0; font-size: .9rem; }
.power { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }

.tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: .7rem .9rem; color: var(--muted); font-size: .93rem; font-weight: 700;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.ativo { color: var(--plum-l); border-bottom-color: var(--amber); }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 1.4rem 1.5rem; margin: 1.3rem 0;
  box-shadow: var(--drop);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .9rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.card-head h1, .card-head h2, .card-head h3 { margin: 0; }
.card-tight { padding: .9rem 1rem; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }

.stat {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .9rem 1rem;
}
.stat-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.stat-value { font-size: 1.45rem; font-weight: 800; margin-top: .2rem; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .8rem; color: var(--faint); font-weight: 600; }

.bar { height: 8px; background: var(--bg-3); border-radius: var(--r-pill); overflow: hidden; margin-top: .6rem; }
.bar i { display: block; height: 100%; background: var(--plum-l); transition: width .3s var(--ease); }
.bar.alto i { background: var(--amber); }
.bar.critico i { background: var(--bad); }

/* --------------------------------------------------------------- botões */

.btn {
  --btn-bg: var(--plum);
  --btn-fg: #ffffff;
  --btn-drop: rgba(58, 22, 64, .32);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.3rem; border: 0; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--body); font-weight: 800; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--btn-drop);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .2s var(--ease);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--btn-drop); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* O primário é âmbar, como o "Começar a usar" do site. */
.btn-primary { --btn-bg: var(--amber); --btn-fg: #3a1640; --btn-drop: rgba(201, 84, 6, .45); }
.btn-ok      { --btn-bg: var(--ok); --btn-fg: #ffffff; --btn-drop: rgba(16, 92, 61, .4); }
.btn-danger  { --btn-bg: var(--bad); --btn-fg: #ffffff; --btn-drop: rgba(130, 28, 48, .4); }
.btn-ghost {
  --btn-bg: var(--card); --btn-fg: var(--text); --btn-drop: transparent;
  border: 1px solid var(--line-2); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--plum-soft); background: var(--bg-2); filter: none; }
.btn-ghost:active { transform: translateY(1px); box-shadow: none; }
.btn-sm { padding: .4rem .75rem; font-size: .84rem; box-shadow: 0 3px 0 var(--btn-drop); }
.btn-sm:active { transform: translateY(3px); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ formulário */

label { display: block; font-size: .84rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: .7rem .85rem; font: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--plum-l);
  box-shadow: 0 0 0 3px rgba(110, 46, 216, .16);
}
textarea { resize: vertical; min-height: 100px; font-family: var(--mono); font-size: .88rem; }
.field { margin-bottom: 1rem; }
.field-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.field-row > * { flex: 1 1 180px; }
.field-hint { font-size: .8rem; color: var(--faint); margin-top: .3rem; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; margin: .5rem 0; font-weight: 600; }
.check input { width: auto; margin-top: .25rem; accent-color: var(--plum-l); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1rem; margin: 0 0 1rem; background: var(--card-2); }
legend { font-size: .76rem; font-weight: 800; color: var(--amber-d); text-transform: uppercase; letter-spacing: .1em; padding: 0 .45rem; }

/* ---------------------------------------------------------------- avisos */

.flash {
  border-radius: var(--r-sm); padding: .85rem 1rem; margin: 1.1rem 0;
  border: 1px solid var(--line-2); background: var(--card);
  font-size: .93rem; font-weight: 600; box-shadow: var(--drop-sm);
}
.flash-sucesso { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.flash-erro { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.aviso {
  border-left: 5px solid var(--amber); background: var(--warn-bg); color: var(--warn);
  padding: .85rem 1rem; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .91rem; font-weight: 600; margin: 1rem 0;
}
.aviso-perigo { border-left-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  padding: .25rem .6rem; border-radius: var(--r-pill);
  background: var(--bg-3); color: var(--muted);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-running, .chip-active, .chip-paid, .chip-approved { background: var(--ok-bg); color: var(--ok); }
.chip-offline, .chip-pending, .chip-queued { background: var(--bg-3); color: var(--faint); }
.chip-starting, .chip-stopping, .chip-installing, .chip-restoring_backup { background: var(--warn-bg); color: var(--warn); }
.chip-suspended, .chip-install_failed, .chip-failed, .chip-expired, .chip-pending_deletion { background: var(--bad-bg); color: var(--bad); }

.copy {
  font-family: var(--mono); font-size: .88rem; font-weight: 700; color: var(--text);
  background: var(--bg-3); border: 1px dashed var(--line-2);
  border-radius: var(--r-sm); padding: .25rem .55rem; cursor: pointer;
}
.copy:hover { border-style: solid; border-color: var(--plum-soft); }
.copy.copiado { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }

/* --------------------------------------------------------------- tabelas */

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .7rem; border-bottom: 1px solid var(--line); }
th { font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
tbody tr:hover { background: var(--card-2); }
td.acoes { text-align: right; white-space: nowrap; }
.tabela-rolagem { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.tabela-rolagem table { font-size: .9rem; }

/* --------------------------------------------------------------- console */

.console {
  background: var(--term-bg); color: var(--term-fg);
  border: 1px solid var(--plum-d); border-radius: var(--r);
  font-family: var(--mono); font-size: .84rem; line-height: 1.55;
  padding: 1rem 1.1rem; height: 440px; overflow-y: auto; white-space: pre-wrap;
  word-break: break-word;
}
.console .l-erro { color: #ff9aa8; }
.console .l-aviso { color: var(--amber-l); }
.console .l-info { color: var(--term-dim); }
.console .l-sistema { color: var(--plum-soft); font-weight: 700; }
.console-forma { display: flex; gap: .6rem; margin-top: .8rem; }
.console-forma input { font-family: var(--mono); }
.console-estado { display: flex; align-items: center; gap: .5rem; }

/* -------------------------------------------------------------- arquivos */

.crumbs { display: flex; gap: .4rem; align-items: center; font-size: .92rem; flex-wrap: wrap; font-weight: 700; }
.crumbs span { color: var(--faint); }
.arquivos td:first-child { width: 30px; }
.arquivos .nome { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.icone { width: 18px; text-align: center; color: var(--faint); }
.icone-pasta { color: var(--amber-d); }
.dropzone {
  border: 2px dashed var(--line-2); border-radius: var(--r);
  padding: 1.3rem; text-align: center; color: var(--muted); font-size: .92rem; font-weight: 700;
  margin: 1.1rem 0; background: var(--card-2); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dropzone.ativo { border-color: var(--amber); background: var(--warn-bg); color: var(--amber-d); }
.editor { font-family: var(--mono); font-size: .87rem; min-height: 60vh; line-height: 1.55; }

/* --------------------------------------------------------------- gráfico */

.grafico { width: 100%; height: 130px; display: block; }
.grafico-legenda { display: flex; gap: 1.2rem; font-size: .78rem; color: var(--faint); margin-top: .4rem; font-weight: 700; }
.grafico-legenda i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }

/* ---------------------------------------------------- lista de servidores */

.lista-servidores { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.srv {
  display: block; background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 1.3rem; color: var(--text);
  box-shadow: var(--drop);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.srv:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 11px 0 rgba(77, 30, 84, .18); }
.srv-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .7rem; }
.srv-nome { font-weight: 800; font-size: 1.05rem; }
.srv-meta { display: flex; gap: 1rem; font-size: .83rem; color: var(--muted); flex-wrap: wrap; font-weight: 600; }

.vazio { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.vazio h3 { color: var(--text); }

/* ------------------------------------------------------------------ bare */

body.bare { display: grid; place-items: center; padding: 3rem 1rem; background: var(--bg-2); }
.bare-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 2rem;
  box-shadow: var(--drop);
}
.err-code { font-size: 3.4rem; color: var(--amber-d); margin-bottom: 0; }

/* ------------------------------------------------------------------ site */

body.site { background: var(--bg); }
.sitebar { background: var(--card); border-bottom: 1px solid var(--line); padding: 1rem 0; position: sticky; top: 0; z-index: 20; }
.sitebar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sitebar nav { display: flex; align-items: center; gap: 1.5rem; }
.sitebar nav a { color: var(--muted); font-weight: 700; font-size: .95rem; }
.sitebar nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 4.5rem 0 3rem; text-align: center; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); letter-spacing: -.03em; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.7rem; font-weight: 600; }
.hero-badges { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

.planos { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin: 2.2rem 0; }
.plano {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 1.7rem 1.5rem; display: flex; flex-direction: column; box-shadow: var(--drop);
}
.plano.destaque { border-color: var(--amber); box-shadow: 0 8px 0 rgba(201, 84, 6, .22); }
.plano-selo {
  display: inline-flex; align-self: flex-start; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--amber-d);
  background: var(--warn-bg); border-radius: var(--r-pill); padding: .3rem .8rem; margin-bottom: .6rem;
}
.plano h3 { font-size: 1.2rem; margin: .1rem 0 .2rem; }
.plano-preco { font-size: 2rem; font-weight: 800; margin: .8rem 0 .1rem; font-family: var(--mono); color: var(--plum-l); }
.plano-preco small { font-size: .85rem; font-weight: 700; color: var(--faint); font-family: var(--body); }
.plano ul { list-style: none; padding: 0; margin: 1.1rem 0; font-size: .92rem; flex: 1; }
.plano li { padding: .3rem 0; color: var(--muted); display: flex; gap: .5rem; font-weight: 600; }
.plano li::before { content: "✓"; color: var(--ok); font-weight: 800; }

.recursos { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); margin: 2.6rem 0; }
.recurso { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.3rem; box-shadow: var(--drop-sm); }
.recurso h3 { font-size: 1rem; }
.recurso p { font-size: .91rem; color: var(--muted); margin: 0; font-weight: 600; }

.sitefoot { background: var(--plum-d); color: #e9dcee; border-top: 0; padding: 2.4rem 0; margin-top: 3.5rem; font-size: .9rem; }
.sitefoot a { color: #f0e2f5; font-weight: 600; }
.sitefoot nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .8rem 0; }
.sitefoot .muted { color: #b396bd; }

.qr { background: #fff; padding: 14px; border-radius: var(--r-sm); display: inline-block; box-shadow: var(--drop-sm); }
.qr img { display: block; width: 220px; height: 220px; }

/* ----------------------------------------------------------------- admin */

.admin-shell { display: grid; grid-template-columns: 225px 1fr; min-height: calc(100vh - 62px); }
.admin-side { background: var(--card); border-right: 1px solid var(--line); padding: 1.2rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.admin-side a { padding: .55rem .8rem; border-radius: var(--r-sm); color: var(--muted); font-size: .92rem; font-weight: 700; }
.admin-side a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; }
.admin-side a.ativo { background: var(--warn-bg); color: var(--amber-d); }
.admin-main { padding: 1.6rem 1.8rem; max-width: 1100px; }

/* ------------------------------------------------------------ responsivo */

@media (max-width: 760px) {
  body { font-size: 15px; }
  .hide-sm { display: none; }
  .topbar { gap: .9rem; padding: .8rem 1rem; }
  .topnav { gap: 1rem; }
  .wrap { padding: 0 1rem; }
  .server-head-inner { flex-direction: column; align-items: stretch; }
  .power { justify-content: stretch; }
  .power .btn { flex: 1; }
  .card { padding: 1.1rem; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-main { padding: 1.1rem 1rem; }
  .console { height: 340px; font-size: .79rem; }
  .hero { padding: 2.8rem 0 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:active, .srv:hover { transform: none; }
}
