@font-face { font-family: "Inter"; src: url("fonts/inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #07090d;
  --panel: rgba(16, 19, 26, .92);
  --panel-solid: #10131a;
  --field: #0b0e14;
  --ink: #f2f4f7;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, .12);
  --accent: #ff6a00;
  --accent-2: #ff8f1f;
  --glow: rgba(255, 106, 0, .38);
  --edge: rgba(255, 122, 26, .45);
  --err: #ff7b6b;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 16px/1.4 "Inter", system-ui, sans-serif; overflow-x: hidden; }

/* fundo: foto da impressora com degradê para o preto */
.hero { position: absolute; inset: 0 0 auto 0; height: 300px; z-index: 0; pointer-events: none;
  background: url("img/bg.jpg") 78% 30% / cover no-repeat; opacity: .75; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 13, .55) 0%, rgba(7, 9, 13, 0) 30%, var(--bg) 100%); }
body[data-screen="login"] .hero { height: 470px; opacity: 1; background-position: 80% 20%; }
body[data-screen="home"] .hero { height: 330px; }

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; display: grid; gap: 16px; align-content: start;
  padding: max(14px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); min-height: 100vh; }

/* ------- tipografia ------- */
h1, h2 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
.accent { color: var(--accent); }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.eyebrow { margin: 0; color: var(--muted); font-size: 14px; }

/* ------- painéis (vidro escuro com borda laranja) ------- */
.panel, form.panel { position: relative; background: var(--panel); border-radius: 18px; padding: 18px; display: grid; gap: 14px;
  box-shadow: inset 0 0 0 1px var(--edge), 0 10px 40px rgba(0, 0, 0, .55), 0 0 28px rgba(255, 106, 0, .08);
  backdrop-filter: blur(6px); }
.panel::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .85; }

/* ------- login ------- */
.login { display: grid; gap: 14px; padding-top: 6px; }
.login .logo { width: min(64%, 270px); height: auto; display: block; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .6)); }
.tagline { margin: 6px 0 0; font: italic 400 24px/1.15 "Segoe Script", "Brush Script MT", "Snell Roundhand", "Dancing Script", cursive; color: #eee; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.tagline::after { content: ""; display: block; width: 92px; height: 3px; margin-top: 8px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), transparent); transform: rotate(-4deg); }
.login .spacer { height: 124px; }
.login-title { text-align: center; }
.login-title h1 { font-size: 26px; }

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field { position: relative; display: grid; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 12px; min-height: 58px; padding: 8px 46px 8px 48px; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.field > .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; color: var(--accent); }
.field small { font-size: 12px; color: var(--muted); line-height: 1; }
.field input { font: inherit; font-size: 16px; color: var(--ink); background: transparent; border: 0; outline: 0; padding: 2px 0 0; width: 100%; }
.field .eye { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; }
.field .eye svg { width: 22px; height: 22px; }

input, select, textarea { font: inherit; color: var(--ink); }
.plain input, .plain textarea { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); width: 100%; }
.plain input:focus, .plain textarea:focus, .search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
textarea { min-height: 88px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 84px; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

button { font: inherit; cursor: pointer; border: 0; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 17px; color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 6px 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn svg { width: 22px; height: 22px; margin-left: auto; }
.btn.center svg { margin-left: 0; }
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.btn.danger { background: transparent; color: var(--err); box-shadow: inset 0 0 0 1px var(--err); font-weight: 600; }
.btn.small { min-height: 42px; font-size: 15px; padding: 0 14px; }
button:disabled { opacity: .5; }
.err { margin: 0; min-height: 1.2em; color: var(--err); font-size: 14px; text-align: center; }

/* ------- rodapé de marca ------- */
.brand-foot { display: grid; justify-items: center; gap: 6px; padding: 18px 0 4px; text-align: center; }
.brand-foot img { width: 104px; height: auto; margin-bottom: 2px; opacity: .92; }
.brand-foot strong { font-size: 11px; letter-spacing: .2em; font-weight: 600; color: #d9dde5; }
.brand-foot span { font-size: 9.5px; letter-spacing: .12em; color: var(--muted); }

/* ------- barra superior / home ------- */
.appbar { display: flex; align-items: center; gap: 10px; }
.appbar .logo { height: 46px; width: auto; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .6)); }
.appbar .grow { flex: 1; }
.chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: rgba(8, 10, 14, .7); box-shadow: inset 0 0 0 1px var(--line); text-align: left; color: var(--ink); }
.chip .avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chip .avatar svg { width: 20px; height: 20px; }
.chip b { display: block; font-size: 14px; line-height: 1.1; font-weight: 600; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { font-size: 12px; color: var(--muted); }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; background: transparent; color: var(--ink); display: grid; place-items: center; }
.iconbtn svg { width: 24px; height: 24px; }

.welcome { padding-top: 62px; display: grid; gap: 2px; }
.greeting { display: grid; gap: 2px; padding: 4px 2px 0; }
.greeting h2 { font-size: 26px; font-weight: 800; }
.greeting p { margin: 0; color: #d4d9e2; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: grid; align-content: start; gap: 6px; min-height: 164px; padding: 16px 14px 14px; text-align: left; color: var(--ink); border-radius: 16px;
  background: linear-gradient(160deg, rgba(26, 24, 24, .95), rgba(10, 12, 16, .95)); box-shadow: inset 0 0 0 1px var(--edge), 0 0 22px rgba(255, 106, 0, .08); }
.tile .ico { width: 38px; height: 38px; color: var(--accent); margin-bottom: 4px; }
.tile b { font-size: 16px; font-weight: 700; line-height: 1.2; }
.tile b em { display: block; font-style: normal; font-weight: 400; font-size: 14px; }
.tile span { font-size: 13px; color: var(--muted); line-height: 1.3; padding-right: 22px; }
.tile .go { position: absolute; right: 12px; bottom: 12px; width: 22px; height: 22px; color: var(--accent); }
.tile:disabled { opacity: .55; }
.tile:disabled .go { display: none; }
.soon { position: absolute; right: 12px; top: 12px; font-size: 11px; padding: 3px 8px; border-radius: 99px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tile:not(:disabled):active { transform: scale(.98); }

/* ------- telas internas ------- */
.top { display: flex; align-items: center; gap: 10px; }
.top h2 { flex: 1; }
.top .back { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-solid); color: var(--accent); box-shadow: inset 0 0 0 1px var(--edge); display: grid; place-items: center; }
.top .back svg { width: 24px; height: 24px; }
.inner-logo { height: 34px; width: auto; justify-self: end; }

.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--accent); }
.search input { width: 100%; padding: 14px 14px 14px 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-solid); font-size: 16px; }

.list { display: grid; gap: 10px; }
.item { display: grid; gap: 3px; padding: 14px 16px; text-align: left; color: var(--ink); border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.item:active { box-shadow: inset 0 0 0 1px var(--accent); }
.item strong { font-weight: 600; }
.item small { color: var(--muted); font-size: 13px; }
.item.off { opacity: .55; }
.tag { justify-self: start; font-size: 12px; padding: 2px 9px; border-radius: 99px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.actions { display: grid; gap: 10px; }

#toast { position: fixed; z-index: 10; left: 16px; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto; padding: 14px 16px;
  border-radius: 12px; background: #1c1f27; color: var(--ink); text-align: center; box-shadow: inset 0 0 0 1px var(--edge), 0 8px 30px rgba(0, 0, 0, .6); }
