/* GLPI MOBILE - Central de versoes | identidade Tecno it.
 * Fonte: Ubuntu (self-hosted). Cores extraidas do logotipo oficial:
 *   laranja #E54F13 (simbolo) · grafite #3C3C3D (lettering). Sem dependencias externas. */

@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ubuntu-400.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ubuntu-500.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ubuntu-700.woff2') format('woff2'); }

:root {
  --orange: #E54F13;
  --orange-strong: #C63F0E;
  --orange-soft: #FDEEE7;
  --graphite: #3C3C3D;
  --ink: #23262B;
  --muted: #6A7078;
  --surface: #FFFFFF;
  --surface-2: #FAFAFB;
  --bg: #F4F5F6;
  --line: #E6E8EC;
  --line-strong: #D5D8DE;
  --ok: #1E7A46;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,26,31,.05);
  --shadow-lg: 0 10px 34px rgba(23,26,31,.10), 0 3px 10px rgba(23,26,31,.05);
  --ring: 0 0 0 3px rgba(229,79,19,.32);
  --font: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --maxw: 960px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
/* Sticky footer: o conteudo cresce e empurra o rodape para o fim em qualquer tela. */
body > main { flex: 1 0 auto; width: 100%; }
::selection { background: var(--orange); color: #fff; }
a { color: var(--orange-strong); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--graphite); line-height: 1.15; letter-spacing: -.015em; margin: 0; }
:where(a, button, input, summary, [tabindex]):focus-visible { outline: none; border-radius: 8px; box-shadow: var(--ring); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Header ---------- */
.topbar { background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { height: 26px; width: auto; }
.brand__sep { width: 1px; height: 20px; background: var(--line-strong); }
.brand__product { font-weight: 700; font-size: 14px; letter-spacing: .06em; color: var(--graphite); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; border-radius: 8px; }
.nav__link:hover { color: var(--graphite); }
.nav__link[aria-current="page"] { color: var(--graphite); font-weight: 700; }
.nav__cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; margin-left: 6px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--graphite); font-size: 14px; font-weight: 700; }
.nav__cta:hover { color: var(--graphite); border-color: var(--graphite); background: var(--surface-2); }
.nav__cta[aria-current="page"] { background: var(--graphite); color: #fff; border-color: var(--graphite); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 8px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-strong); }
.hero__eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--orange); border-radius: 2px; }
.hero__title { font-size: clamp(38px, 7vw, 60px); font-weight: 700; margin: 16px 0 10px; }
.hero__lead { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 46ch; margin: 0; }

/* ---------- Card de estado (foco) ---------- */
.statuscard {
  margin: 34px 0 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 30px 32px;
  position: relative; overflow: hidden;
}
.statuscard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.pill--prep { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong); }
.pill--current { background: var(--orange-soft); color: var(--orange-strong); }
.statuscard__title { font-size: 24px; font-weight: 700; color: var(--graphite); margin: 14px 0 6px; }
.statuscard__version { font-size: 30px; font-weight: 700; color: var(--graphite); margin: 14px 0 6px; letter-spacing: -.02em; }
.statuscard__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.statuscard__meta b { color: var(--graphite); font-weight: 500; }
.statuscard__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Botoes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; font-family: var(--font); font-size: 15px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, transform .05s, color .15s; }
.btn:hover { color: inherit; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-strong); color: #fff; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn--ghost { background: var(--surface); color: var(--muted); border-color: var(--line-strong); cursor: not-allowed; }
.btn--secondary { background: var(--surface); color: var(--graphite); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface-2); color: var(--graphite); }

/* ---------- Linha de confianca + instalar (recolhido) ---------- */
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; color: var(--muted); font-size: 13.5px; }
.meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.meta-row span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: none; }

details.install { margin: 26px 0 0; border-top: 1px solid var(--line); padding-top: 6px; }
details.install summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 0; font-weight: 700; color: var(--graphite); font-size: 15px; }
details.install summary::-webkit-details-marker { display: none; }
details.install summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); font-weight: 400; line-height: 1; }
details.install[open] summary::after { content: "\2013"; }
.steps { margin: 4px 0 8px; padding-left: 20px; color: var(--ink); font-size: 14.5px; }
.steps li { margin: 7px 0; }
.steps code, code.inline { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .9em; font-family: ui-monospace, Consolas, monospace; }
.install__note { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.install__video { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; color: var(--muted); font-size: 13.5px; }
/* Quando houver o guia real: <video>/<img> ocupam a largura, cantos arredondados. */
.install__video video, .install__video img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }

/* ---------- SHA (recolhido) ---------- */
details.sha { margin-top: 8px; }
details.sha summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.checksum__row { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.checksum__value { flex: 1; min-width: 0; font-size: 12.5px; color: var(--graphite); word-break: break-all; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }
.checksum__copy { flex: none; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--graphite); font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: var(--font); }
.checksum__copy:hover { background: var(--surface-2); }
.changelog { margin: 14px 0 0; padding-left: 18px; color: var(--ink); font-size: 14px; }
.changelog li { margin: 4px 0; }

/* ---------- Anteriores (grid enxuto) ---------- */
.previous { margin-top: 30px; }
.section__title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.minicard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.minicard__ver { font-weight: 700; color: var(--graphite); }
.minicard__meta { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }

.history-link { margin: 30px 0 8px; font-size: 14.5px; font-weight: 500; }
.loading { color: var(--muted); font-size: 14px; padding: 6px 0; }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); }

/* ---------- Historico (timeline) ---------- */
.page-head { padding: 56px 0 6px; }
.page-head h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 700; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 52ch; }
.timeline { margin: 30px 0 0; display: grid; gap: 14px; }
.hitem { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.hitem__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hitem__ver { font-size: 17px; font-weight: 700; color: var(--graphite); }
.hitem__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- Login (GLPI) - split screen ---------- */
.auth-split {
  max-width: 920px; margin: 56px auto; display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.auth-brand { background: var(--graphite); color: #fff; padding: 44px 40px; display: flex; flex-direction: column; }
.auth-brand__icon { height: 64px; width: 64px; }
.auth-brand__eyebrow { margin-top: 26px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.auth-brand h2 { color: #fff; font-size: 23px; font-weight: 700; margin: 10px 0 10px; letter-spacing: -.01em; }
.auth-brand p { color: rgba(255,255,255,.68); font-size: 14.5px; margin: 0 0 26px; max-width: 32ch; }
.auth-features { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 13px; }
.auth-features li { display: flex; gap: 11px; align-items: flex-start; color: rgba(255,255,255,.88); font-size: 14px; line-height: 1.4; }
.auth-features li::before { content: ""; margin-top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: none; }

.auth-form { padding: 46px 40px; display: flex; flex-direction: column; }
.auth-form__title { font-size: 22px; font-weight: 700; }
.auth-form__sub { color: var(--muted); font-size: 14px; margin: 8px 0 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--graphite); margin-bottom: 7px; }
.field input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #A6ABB3; }
.field input:focus { outline: none; border-color: var(--orange); box-shadow: var(--ring); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 88px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { color: var(--graphite); background: var(--surface-2); }
.auth-form .btn { width: 100%; margin-top: 6px; }
.auth-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.auth-back { margin-top: 22px; font-size: 14px; font-weight: 500; }

@media (max-width: 760px) {
  .auth-split { grid-template-columns: 1fr; margin: 28px auto; max-width: 460px; }
  .auth-brand { padding: 28px 26px; }
  .auth-brand__icon { height: 52px; width: 52px; }
  .auth-brand p { margin-bottom: 20px; }
  .auth-features { gap: 10px; margin-top: 4px; }
  .auth-form { padding: 30px 26px; }
}

/* ---------- 404 ---------- */
.notfound { text-align: center; margin: 72px auto; max-width: 440px; }
.notfound__code { font-size: 72px; font-weight: 700; color: var(--orange); }
.notfound__msg { color: var(--muted); font-size: 17px; margin: 2px 0 22px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 64px; flex-shrink: 0; }
.footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__logo { height: 20px; width: auto; }
.footer__text { color: var(--muted); font-size: 13px; }
.footer__text b { color: var(--graphite); font-weight: 500; }
.footer__pkg { color: var(--muted); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }

/* ---------- Responsivo ---------- */
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .topbar__inner { min-height: 60px; gap: 8px; }
  .brand__logo { height: 24px; }
  .brand__sep, .brand__product { display: none; }
  .nav { gap: 0; }
  .nav__link { padding: 0 8px; font-size: 13px; }
  .nav__cta { padding: 0 13px; font-size: 13px; margin-left: 2px; }
  .hero { padding: 46px 0 4px; }
  .statuscard { padding: 24px 20px; }
  .footer .container { flex-direction: column; align-items: flex-start; min-height: 0; padding-top: 22px; padding-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
