/* FIRSTPASS owner dashboard */
.admin { min-height: 100vh; background: var(--grime); }
.app[hidden], .login[hidden] { display: none; }

.login {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: var(--gut);
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(255,194,26,.07), transparent 70%),
    var(--grime);
}
.login__card {
  width: min(400px, 100%); display: grid; gap: 1.1rem;
  padding: 32px; border-radius: 20px; background: var(--grime-2); box-shadow: inset 0 0 0 1px var(--grime-3);
}
.login__card .brand { margin: 0 0 .6rem; }
.login__card h1 { font-weight: 800; font-stretch: 115%; font-size: 1.6rem; line-height: 1.1; }
.admin .field span { color: var(--muted-d); font-weight: 500; }
.admin .field input { min-height: 50px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--grime); box-shadow: inset 0 0 0 1.5px var(--grime-3); color: var(--paper); font-size: 1rem; }
.admin .field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tip-yellow); }
.login__note { color: var(--muted-d); font-size: .85rem; text-align: center; }

.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2rem;
  padding: 24px 18px; border-right: 1px solid var(--grime-3);
}
.side .brand { margin: 0 0 0 8px; }
.side__nav { display: grid; gap: 2px; }
.side__nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px;
  border-radius: 10px; color: var(--muted-d); text-decoration: none; font-weight: 500;
}
.side__nav a:hover { color: var(--paper); background: var(--grime-2); }
.side__nav a[aria-current="page"] { color: var(--paper); background: var(--grime-2); box-shadow: inset 0 0 0 1px var(--grime-3); }
.side__count { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--tip-yellow); color: var(--ink); font-size: .8rem; font-weight: 700; text-align: center; }
.side__count:empty { display: none; }
.side__site { margin-top: auto; padding: 0 12px; color: var(--muted-d); font-size: .9rem; }

.main { padding: clamp(24px, 4vw, 48px); min-width: 0; }
.main__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 28px; }
.main__head h1 { font-weight: 900; font-stretch: 130%; text-transform: uppercase; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: .9; }
.main__sub { margin-top: .5rem; color: var(--muted-d); }
.main__range { padding: .5rem .9rem; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--grime-3); font-size: .9rem; color: var(--muted-d); white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.kpi { padding: 20px; border-radius: 14px; background: var(--grime-2); box-shadow: inset 0 0 0 1px var(--grime-3); }
.kpi__num { font-weight: 800; font-stretch: 120%; font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__label { margin-top: .5rem; color: var(--muted-d); font-size: .9rem; }

.table { border-radius: 14px; background: var(--grime-2); box-shadow: inset 0 0 0 1px var(--grime-3); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1.4fr 1.6fr 1fr .7fr 1fr; gap: 16px; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--grime-3);
}
.row--head { border-top: 0; color: var(--muted-d); font-size: .85rem; font-weight: 500; }
.row__who strong { display: block; font-weight: 600; }
.row__who small { display: block; color: var(--muted-d); font-size: .82rem; }
.row__surf { display: flex; flex-wrap: wrap; gap: 6px; }
.row__surf span { padding: 2px 9px; border-radius: 99px; background: var(--grime-3); font-size: .82rem; }
.row__day { font-size: .92rem; }
.row__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.row.is-fresh { background: linear-gradient(90deg, rgba(255,194,26,.14), rgba(255,194,26,0) 70%); }
.row.is-fresh .row__who strong::after { content: "Just now"; margin-left: .6rem; padding: 1px 8px; border-radius: 99px; background: var(--tip-yellow); color: var(--ink); font-size: .72rem; font-weight: 700; vertical-align: 2px; }

.status { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: 3px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--new { color: var(--tip-yellow); box-shadow: inset 0 0 0 1px rgba(255,194,26,.4); }
.pill--quoted { color: var(--paper); box-shadow: inset 0 0 0 1px var(--grime-3); }
.pill--booked { color: #4fd187; box-shadow: inset 0 0 0 1px rgba(79,209,135,.35); }
.pill--done { color: var(--muted-d); box-shadow: inset 0 0 0 1px var(--grime-3); }
.confirm {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--tip-yellow); color: var(--ink); font-size: .82rem; font-weight: 700;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 1rem; padding: 14px var(--gut); border-right: 0; border-bottom: 1px solid var(--grime-3); }
  .side__nav, .side__site { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .row--head { display: none; }
  .row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .row__surf { grid-column: 1 / -1; order: 3; }
  .row__day { order: 4; color: var(--muted-d); }
  .status { order: 5; justify-self: end; }
}
