/* Login, painel de detalhes do pedido, avisos e peças gerais das páginas. */

/* ───────── Login ───────── */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 4.5vw, 64px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at -10% 115%, rgba(52, 209, 127, 0.08), transparent 60%),
    radial-gradient(760px 460px at 115% -15%, rgba(255, 79, 79, 0.07), transparent 60%),
    var(--bg-raised);
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 70%);
  pointer-events: none;
}

.login-hero > * {
  position: relative;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-stretch: 68%;
  font-weight: 900;
  font-size: 17px;
}

.login-headline {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(52px, 7.4vw, 118px);
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.login-headline em {
  font-style: normal;
  color: var(--ok);
}

.login-lead {
  max-width: 48ch;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 16px;
}

.login-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
}

.sample {
  --tone: var(--ok);
  --tone-soft: var(--ok-soft);
  --tone-line: var(--ok-line);
  display: grid;
  gap: 4px;
  padding: 0 0 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--tone-line);
  overflow: hidden;
  font-size: 12px;
}

.sample.is-warn {
  --tone: var(--warn);
  --tone-soft: var(--warn-soft);
  --tone-line: var(--warn-line);
}

.sample.is-late {
  --tone: var(--late);
  --tone-soft: var(--late-soft);
  --tone-line: var(--late);
  background: linear-gradient(180deg, rgba(255, 79, 79, 0.14), transparent 50%), var(--surface);
}

.sample-fuse {
  height: 5px;
  background: var(--surface-3);
  margin-bottom: 6px;
}

.sample-fuse i {
  display: block;
  height: 100%;
  background: var(--tone);
  width: 20%;
}

.sample.is-warn .sample-fuse i {
  width: 74%;
}

.sample.is-late .sample-fuse i {
  width: 100%;
}

.sample-head,
.sample-name,
.sample-item,
.sample-mod {
  padding: 0 12px;
}

.sample-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sample-num {
  font-family: var(--font-display);
  font-stretch: 68%;
  font-weight: 800;
  font-size: 22px;
}

.sample-timer {
  padding: 2px 6px;
  border-radius: 7px;
  background: var(--tone-soft);
  color: var(--tone);
  font-weight: 600;
  font-size: 13px;
}

.sample.is-late .sample-timer {
  background: var(--late);
  color: #fff;
}

.sample-name {
  font-family: var(--font-display);
  font-stretch: 76%;
  font-weight: 750;
  font-size: 15px;
  text-transform: uppercase;
}

.sample-item {
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
}

.sample-mod {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
}

.sample-mod .mod-glyph {
  width: 18px;
  height: 18px;
  font-size: 12px;
  background: rgba(255, 79, 79, 0.17);
  color: var(--remove);
}

.login-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-3);
  font-size: 12.5px;
}

.login-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  display: grid;
  gap: 22px;
  width: min(420px, 100%);
}

.login-restaurant {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-weight: 600;
}

.login-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  color: var(--text);
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-title {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.login-error {
  min-height: 18px;
  color: var(--late);
  font-size: 13px;
}

.demo-block {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.demo-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-role {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  text-align: left;
  transition: background-color 0.15s, border-color 0.15s;
}

.demo-role:hover {
  background: var(--surface-2);
  border-color: var(--line-3);
}

.demo-role .i {
  width: 18px;
  height: 18px;
  margin-bottom: 6px;
  color: var(--text-2);
}

.demo-role strong {
  font-size: 13.5px;
}

.demo-role span {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-3);
}

.demo-role[aria-busy='true'] {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 960px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-hero {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 24px;
  }

  .login-samples,
  .login-lead {
    display: none;
  }

  .login-headline {
    font-size: clamp(40px, 11vw, 64px);
  }
}

/* ───────── Painel de detalhes do pedido ───────── */
.sk-block {
  height: 72px;
}

.sk-lg {
  height: 130px;
}

.od-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.od-timer {
  --tone: var(--ok);
  --tone-soft: var(--ok-soft);
  --tone-line: var(--ok-line);
  display: grid;
  gap: 7px;
  min-width: 136px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tone-soft);
  border: 1px solid var(--tone-line);
  color: var(--tone);
}

.od-timer.is-warn {
  --tone: var(--warn);
  --tone-soft: var(--warn-soft);
  --tone-line: var(--warn-line);
}

.od-timer.is-late {
  --tone: #fff;
  --tone-soft: var(--late);
  --tone-line: var(--late);
}

.od-timer-value {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.od-timer-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.od-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.od-facts dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.od-facts dd {
  margin: 3px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.od-gap {
  margin-top: 12px;
}

.od-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 24px 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.od-section span {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.od-items {
  font-size: 15px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.od-items .item-photo {
  width: 84px;
  height: 84px;
  border-radius: 12px;
}

.od-items .items {
  gap: 14px;
}

.od-payment {
  font-weight: 600;
}

.timeline {
  display: grid;
}

.tl-step {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 16px;
}

.tl-step::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 22px;
  bottom: 2px;
  width: 2px;
  background: var(--line-2);
}

.tl-step:last-child {
  padding-bottom: 0;
}

.tl-step:last-child::before {
  display: none;
}

.tl-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-3);
  background: var(--bg-raised);
  color: var(--bg);
}

.tl-dot .i {
  width: 12px;
  height: 12px;
  stroke-width: 3.2;
}

.tl-step.is-done .tl-dot {
  background: var(--text);
  border-color: var(--text);
}

.tl-step.is-done::before {
  background: var(--line-3);
}

.tl-step.is-current .tl-dot {
  box-shadow: 0 0 0 4px var(--info-soft);
  border-color: var(--info);
}

.tl-step.is-cancel .tl-dot {
  background: transparent;
  border-color: var(--late);
  color: var(--late);
}

.tl-label {
  font-weight: 650;
}

.tl-step:not(.is-done):not(.is-cancel) .tl-label {
  color: var(--text-3);
}

.tl-meta {
  color: var(--text-3);
  font-size: 12.5px;
  margin-top: 1px;
}

.tl-dur {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}

.tl-time {
  color: var(--text-2);
  font-size: 12.5px;
  padding-top: 2px;
}

.od-audit {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.od-audit summary {
  cursor: pointer;
  padding: 11px 14px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
}

.od-audit ul {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
  font-size: 12.5px;
}

.od-audit li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 2px 10px;
}

.od-audit li .faint {
  grid-column: 2;
}

@media (max-width: 560px) {
  .od-summary {
    grid-template-columns: 1fr;
  }
}

/* ───────── Avisos (sino) ───────── */
.notif-panel {
  position: fixed;
  left: calc(var(--rail-w) + 10px);
  bottom: 12px;
  z-index: 90;
  width: min(390px, calc(100vw - var(--rail-w) - 20px));
  max-height: min(580px, calc(100dvh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #1a1f26;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  animation: modal-in 0.16s var(--ease);
}

.notif-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  background: #1a1f26;
  border-bottom: 1px solid var(--line);
}

.notif-loading {
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--text-3);
}

.notif-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.notif-item:hover {
  background: var(--surface-2);
}

.notif-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--info);
}

.lvl-warn .notif-dot {
  background: var(--warn);
}

.lvl-critical .notif-dot {
  background: var(--late);
}

.notif-item:not(.is-unread) {
  opacity: 0.62;
}

.notif-text strong {
  display: block;
  font-weight: 650;
  font-size: 13.5px;
}

.notif-text span {
  display: block;
  color: var(--text-2);
  font-size: 12.5px;
}

.notif-item time {
  font-size: 11.5px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .notif-panel {
    left: 10px;
    right: 10px;
    bottom: 76px;
    width: auto;
  }
}

/* ───────── Diversos ───────── */
.fatal {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 100dvh;
  padding: 24px;
  text-align: center;
}

.fatal h1 {
  font-size: 22px;
}

.fatal p {
  color: var(--text-2);
  max-width: 460px;
}

.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
