:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1c1f24;
  --muted: #69707d;
  --line: #dfe3e8;
  --brand: #f47b20;
  --brand-dark: #22252b;
  --danger: #dc2626;
  --shadow: 0 10px 28px rgba(20, 24, 31, .08);
  --radius: 8px;
}

[data-theme="dark"] {
  --bg: #15171b;
  --surface: #202329;
  --surface-2: #2b3038;
  --text: #f4f6f8;
  --muted: #aab0ba;
  --line: #39404a;
  --brand-dark: #f7f7f8;
  --shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
}
button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
button.warn { background: var(--danger); }
button.icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline-color: var(--brand);
}
textarea { min-height: 84px; resize: vertical; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}
.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #111;
  font-weight: 900;
}
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: #1f2228;
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nav { display: grid; gap: 8px; }
.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  text-align: left;
  color: #d9dde5;
}
.nav button.active, .nav button:hover { background: rgba(244, 123, 32, .16); color: #fff; }
.main { min-width: 0; }
.topbar {
  height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.content { padding: 22px; display: grid; gap: 18px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.metric strong { display: block; font-size: 26px; margin-top: 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.toolbar > * { min-width: 160px; flex: 1; }
.request-card {
  display: grid;
  gap: 12px;
  border-left: 5px solid var(--brand);
}
.request-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-Solicitada { background: #dbeafe; color: #1d4ed8; }
.status-Visualizada { background: #e5e7eb; color: #4b5563; }
.status-Separando { background: #fef3c7; color: #a16207; }
.status-Localizada { background: #dcfce7; color: #15803d; }
.status-Parcialmente { background: #ffedd5; color: #c2410c; }
.status-Peca { background: #fee2e2; color: #b91c1c; }
.status-Pronta { background: #ede9fe; color: #6d28d9; }
.status-Entregue { background: #bbf7d0; color: #166534; }
.status-Cancelada { background: #d1d5db; color: #1f2937; }
.priority-Urgente { border-color: #dc2626; color: #dc2626; }
.priority-Alta { border-color: #f47b20; color: #c2410c; }
.priority-Normal { border-color: var(--line); color: var(--muted); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 20;
}
.modal.open { display: flex; }
.modal-box {
  width: min(980px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--line);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photos img { width: 112px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.timeline { display: grid; gap: 10px; }
.timeline div { border-left: 3px solid var(--brand); padding-left: 10px; }
.request-item { gap: 12px; }
.inventory-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.stock-results {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}
.stock-result {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stock-result span { color: var(--muted); font-size: 13px; }
.stock-selected {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 10px 12px;
}
#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 40;
}
.toast {
  background: #1f2228;
  color: #fff;
  border-radius: 8px;
  padding: 11px 13px;
  box-shadow: var(--shadow);
  max-width: 340px;
}
.hide { display: none !important; }
.error { color: var(--danger); font-size: 13px; }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-105%); transition: .2s; z-index: 30; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .inventory-search { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
}

/* Identidade Casa de Notebook — interface segura 1.1.0 */
body{background:radial-gradient(circle at 100% 0,rgba(244,123,32,.055),transparent 28%),var(--bg)}
.login{background:radial-gradient(circle at 12% 10%,#65301a 0,transparent 28%),radial-gradient(circle at 90% 90%,#332218 0,transparent 30%),#111214}
.login-panel{position:relative;overflow:hidden;width:min(460px,100%);padding:38px;border-color:rgba(255,255,255,.15);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.48)}
.login-panel::before{content:"";position:absolute;width:180px;height:180px;border-radius:50%;right:-95px;top:-95px;background:rgba(244,123,32,.14)}
.login-panel h2{margin:0 0 3px}
.mark{overflow:hidden;width:48px;height:48px;border:1px solid #ffd5bd;border-radius:14px;background:#fff0e7}
.mark img{width:100%;height:100%;object-fit:contain}
.sidebar{background:linear-gradient(180deg,#17181b,#202126);border-right:1px solid #313237}
.sidebar>.brand{padding-bottom:18px;border-bottom:1px solid #34363b}
.nav button{min-height:44px;border:1px solid transparent;border-radius:10px}
.nav button.active{border-color:rgba(244,123,32,.27);background:linear-gradient(90deg,rgba(244,123,32,.2),rgba(244,123,32,.06))}
.topbar{height:74px;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(12px)}
.content{padding:26px;gap:20px}
.card{border-radius:16px;padding:20px;box-shadow:0 12px 32px rgba(16,21,29,.06)}
.metric{position:relative;overflow:hidden;min-height:122px}
.metric::after{content:"";position:absolute;width:78px;height:78px;border-radius:50%;right:-28px;top:-28px;background:rgba(244,123,32,.09)}
.request-card{border-left:0;position:relative;overflow:hidden}
.request-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(#f47b20,#ff9a62)}
button:not(.secondary):not(.warn):not(.icon){background:linear-gradient(135deg,#f47b20,#ff9255);color:#171717;font-weight:800;box-shadow:0 7px 18px rgba(244,123,32,.2)}
.stock-result{box-shadow:none!important}
@media(max-width:900px){.content{padding:14px}.topbar{height:66px}.login-panel{padding:30px 24px}}
