:root {
  --ink: #080909;
  --ink-2: #121513;
  --panel: #ffffff;
  --paper: #f7f4ec;
  --line: #e6dcc9;
  --muted: #766f62;
  --gold: #d6a83d;
  --gold-2: #f3d77e;
  --danger: #c74032;
  --ok: #188650;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(214,168,61,.15), transparent 28%), var(--paper);
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.stark-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) minmax(280px, 318px);
}
.stark-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  color: #fff;
  background: linear-gradient(180deg, #050606, #151713);
  border-right: 1px solid rgba(214,168,61,.35);
}
.brand-logo {
  width: 100%;
  height: 128px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  border: 1px solid rgba(214,168,61,.35);
  margin-bottom: 20px;
}
.stark-sidebar nav { display: grid; gap: 8px; }
.stark-sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: rgba(255,255,255,.75);
  background: transparent;
  border-radius: 8px;
  text-align: left;
}
.stark-sidebar nav button.active, .stark-sidebar nav button:hover {
  color: var(--gold-2);
  background: rgba(214,168,61,.14);
}
.user-box {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 5px;
  padding: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
}
.user-box span { color: rgba(255,255,255,.62); font-size: 12px; }
.user-box button { color: #fff; background: transparent; text-align: left; padding: 0; }
.workspace { min-width: 0; padding: 24px; }
.topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.search input { width: 100%; border: 0; outline: 0; background: transparent; }
.gold-button, .install-small {
  min-height: 42px;
  padding: 0 18px;
  color: #1b1303;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border: 1px solid #b8841e;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(120, 75, 7, .16);
}
.install-small { background: #151713; color: var(--gold-2); }
.outline-button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--danger);
  background: #fff;
  border: 1px solid rgba(199,64,50,.35);
  border-radius: 8px;
  font-weight: 700;
}
.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.page-title > div { min-width: 220px; }
.page-title h1 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: 0; }
.page-title p { margin: 8px 0 0; color: var(--muted); }
.quick-actions {
  display: grid;
  grid-template-columns: 132px repeat(4, minmax(112px, 1fr));
  gap: 8px;
  width: min(680px, 100%);
}
.quick-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--gold-2);
  background: linear-gradient(160deg, #080909, #171914);
  border: 1px solid rgba(214,168,61,.65);
  border-radius: 8px;
  text-align: left;
}
.quick-actions b { font-size: 22px; font-weight: 300; }
.quick-actions span { font-weight: 800; }
.quick-actions small { display: block; color: rgba(243,215,126,.72); font-size: 11px; }
.quick-actions .type-chip {
  display: grid;
  align-content: center;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  border-color: var(--line);
}
.quick-actions .type-chip small { color: var(--muted); }
.quick-actions .type-chip.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { min-height: 86px; resize: vertical; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-grid article, .insights article, .table-panel, .workshop-list article, .client-grid article, .settings article {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(45,34,12,.06);
}
.kpi-grid article { padding: 18px; display: grid; gap: 8px; }
.kpi-grid span, .kpi-grid small { color: var(--muted); font-size: 12px; }
.kpi-grid strong { font-size: 28px; }
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.lane {
  min-height: 360px;
  padding: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.lane header span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #fff2ce;
  border-radius: 999px;
  font-size: 12px;
}
.os-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}
.os-card.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.os-card b, .os-card span, .os-card small { display: block; }
.os-card small { color: var(--muted); }
.os-card img, .thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  background: #eee8dc;
  display: grid;
  place-items: center;
}
.insights {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.insights article { padding: 18px; }
.insights h2, .table-head h2, .settings h2 { margin: 0 0 12px; font-size: 18px; }
.insights p {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  color: var(--muted);
}
.orders-page { display: grid; gap: 14px; }
.pedido-type-panel {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) repeat(5, minmax(112px, 1fr));
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pedido-type-panel button {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
}
.new-os-main {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-2);
  background: #080909;
  border: 1px solid rgba(214,168,61,.65);
}
.new-os-main b { font-size: 24px; font-weight: 300; }
.new-os-main span { font-weight: 800; }
.pedido-filter {
  display: grid;
  gap: 5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}
.pedido-filter span { color: var(--muted); font-size: 12px; }
.pedido-filter.active {
  border-color: var(--gold);
  background: #fff9eb;
  box-shadow: inset 0 0 0 1px var(--gold);
}
.table-panel { padding: 16px; }
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.os-table { display: grid; gap: 8px; }
.os-row {
  display: grid;
  grid-template-columns: 78px 1.4fr .9fr .9fr .9fr .8fr 210px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.os-row > button {
  color: var(--gold);
  background: #111;
  border-radius: 8px;
  min-height: 34px;
  font-weight: 800;
}
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff9eb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.row-actions .danger { color: var(--danger); }
.workshop-list { display: grid; gap: 14px; }
.workshop-list article { padding: 16px; }
.workshop-list header {
  display: grid;
  grid-template-columns: 100px 1fr 120px;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.steps button {
  min-height: 70px;
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: left;
}
.steps button.done {
  color: var(--ok);
  border-style: solid;
  background: #edfff5;
}
.steps span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: #fff;
  font-size: 12px;
}
.detail-panel {
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: auto;
  padding: 22px;
  background: #fff;
  border-left: 1px solid var(--line);
}
.empty-detail { display: none; }
.detail-panel h2 { margin: 0 36px 6px 0; }
.close-detail {
  float: right;
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.status-chip, .chip {
  display: inline-flex;
  padding: 6px 10px;
  color: #704b00;
  background: #fff2ce;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}
.customer { display: grid; gap: 5px; margin: 18px 0; color: var(--muted); }
.customer b { color: var(--ink); }
.photo-preview, .photo-empty {
  width: 100%;
  height: 168px;
  margin-bottom: 18px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee8dc;
  border: 1px solid var(--line);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { display: grid; place-items: center; color: var(--muted); }
dl { display: grid; gap: 8px; margin: 0 0 16px; }
dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0e8dc;
}
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; }
.detail-steps { display: grid; gap: 8px; margin-bottom: 14px; }
.detail-steps p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}
.detail-steps span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f3ead7;
  color: #7b590d;
  font-weight: 800;
}
.detail-panel > button:not(.close-detail), .detail-panel select { margin-top: 8px; width: 100%; }
.client-grid, .settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.client-grid article, .settings article { padding: 16px; display: grid; gap: 8px; }
.user-row {
  display: grid;
  grid-template-columns: 1fr 1fr 110px 100px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.user-row button { min-height: 34px; border-radius: 8px; background: #fff2ce; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(214,168,61,.25), transparent 35%), #050606;
}
.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  color: #fff;
  background: #111310;
  border: 1px solid rgba(214,168,61,.42);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.38);
}
.login-card img { width: 100%; max-height: 140px; object-fit: contain; background: #000; border-radius: 8px; }
.login-card h1 { margin: 4px 0 0; }
.login-card p, .login-card small { color: rgba(255,255,255,.66); margin: 0; }
.login-card input { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
.install-button { min-height: 42px; color: var(--gold-2); background: transparent; border: 1px solid rgba(214,168,61,.5); border-radius: 8px; }
.error { color: #ff958b; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.56);
}
.modal-card {
  width: min(860px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  background: var(--paper);
  border-radius: 10px;
}
.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.modal-card header button { width: 36px; height: 36px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.type-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.type-picker button {
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}
.type-picker button:hover {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.type-picker strong { font-size: 18px; }
.type-picker span { color: var(--muted); line-height: 1.35; }
.type-picker small {
  width: max-content;
  padding: 5px 8px;
  color: #704b00;
  background: #fff2ce;
  border-radius: 999px;
  font-weight: 800;
}
.modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-form label { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
.modal-form .wide, .service-fields { grid-column: 1 / -1; }
.service-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.service-fields h3 { grid-column: 1 / -1; margin: 10px 0 0; }
.check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  background: #fbf7ee;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.check input { width: auto; }
.upload {
  padding: 14px;
  background: #fff9eb;
  border: 1px dashed var(--gold);
  border-radius: 8px;
}
.upload input { border: 0; padding: 0; background: transparent; }
.wide { width: 100%; }
.empty { color: var(--muted); }
.photo-modal img { max-width: 100%; border-radius: 8px; }
.bottom-nav { display: none; }
@media (max-width: 1380px) {
  .stark-app { grid-template-columns: 210px minmax(0,1fr); }
  .page-title { display: grid; align-items: start; }
  .quick-actions { width: 100%; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
  .detail-panel:not(.empty-detail) { position: fixed; right: 0; width: min(380px, 100vw); z-index: 20; box-shadow: -20px 0 40px rgba(0,0,0,.12); }
}
@media (max-width: 1180px) {
  .stark-app { grid-template-columns: 210px minmax(0,1fr); }
  .detail-panel { position: fixed; right: 0; width: min(380px, 100vw); z-index: 20; box-shadow: -20px 0 40px rgba(0,0,0,.12); }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-actions { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .pedido-type-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board { overflow-x: auto; grid-template-columns: repeat(5, 190px); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .stark-app { display: block; padding-bottom: 70px; }
  .stark-sidebar { display: none; }
  .workspace { padding: 16px 16px 104px; }
  .topbar { grid-template-columns: 1fr; }
  .page-title { display: grid; }
  .quick-actions, .kpi-grid, .insights, .client-grid, .settings, .pedido-type-panel, .type-picker { grid-template-columns: 1fr; }
  .quick-actions { width: 100%; }
  .quick-actions button, .pedido-type-panel button { min-height: 48px; }
  .board { grid-template-columns: 1fr; overflow: visible; }
  .lane { min-height: auto; }
  .detail-panel { display: none; }
  .os-row { grid-template-columns: 70px 1fr; }
  .os-row span:nth-of-type(n+2), .os-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .modal-form, .service-fields { grid-template-columns: 1fr; }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    background: rgba(8,9,9,.96);
    border-top: 1px solid rgba(214,168,61,.35);
  }
  .bottom-nav button {
    min-height: 62px;
    color: rgba(255,255,255,.72);
    background: transparent;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 11px;
  }
  .bottom-nav button.active { color: var(--gold-2); }
}
