/* way2tolet console. Same brand tokens as the tenant map. */
[hidden] { display: none !important; }

:root {
  --teal: #0E6E5E;
  --teal-bright: #2FBEA2;
  --ochre: #B8701A;
  --slate: #3A5A7A;
  --ink: #0B1D19;
  --paper: #F4F7F5;
  --line: #E1E9E5;
  --muted: #5C6B66;
  --faint: #8A9995;
  --danger: #A83A2C;
  --ok: #1F7A4C;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11,29,25,.06), 0 4px 14px rgba(11,29,25,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 'IBM Plex Sans', system-ui, sans-serif; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }
h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
h2 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; }
.error { color: var(--danger); font-size: 13px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { display: block; font-size: 15px; line-height: 1.1; }
.brand span { display: block; font-size: 11px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.brand--side strong { color: #fff; }

/* ---- sign-in --------------------------------------------------------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate__card {
  width: min(420px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.gate__card h1 { margin-top: 8px; font-size: 22px; }
.gate__card p { margin: 0; }
.gate__google { min-height: 44px; }
.gate__dev { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.gate__dev label { font-size: 12px; color: var(--muted); }

/* ---- shell ----------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: var(--ink); color: #DCE7E3; padding: 20px 16px; display: flex; flex-direction: column; gap: 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 9px; color: #B7C7C2; text-decoration: none; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--teal); color: #fff; }
.pill { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--teal-bright); color: var(--ink); }
.side__me { margin-top: auto; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; }
.side__me img { width: 32px; height: 32px; border-radius: 50%; }
.side__me strong { display: block; color: #fff; font-size: 13px; }
.side__me .btn { grid-column: 1 / -1; }

.content { padding: 24px 28px; min-width: 0; }
.content__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page { display: flex; flex-direction: column; gap: 16px; }

/* ---- blocks ---------------------------------------------------------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.stat strong { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; }
.stat span { font-size: 12px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input, .toolbar select, .field input, .field select, .field textarea, .gate__dev input {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.toolbar input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal-bright); outline-offset: 0; border-color: transparent; }

.btn {
  font: inherit; font-weight: 500; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.btn:hover { background: var(--paper); }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn--primary:hover { background: #0B5A4D; }
.btn--danger { color: var(--danger); border-color: #E8C8C3; }
.btn--danger:hover { background: #FBF1EF; }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.18); color: #DCE7E3; }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--sm { padding: 5px 9px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: default; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td.actions { white-space: nowrap; text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--paper); color: var(--muted); }
.tag--DOMESTIC { background: #E3F0EC; color: var(--teal); }
.tag--COMMERCIAL { background: #F6EAD9; color: var(--ochre); }
.tag--INDUSTRIAL { background: #E3EAF2; color: var(--slate); }
.tag--ACTIVE { background: #E2F3E9; color: var(--ok); }
.tag--PENDING_REVIEW { background: #FBF1D9; color: #8A5A0A; }
.tag--REJECTED, .tag--BLOCKED, .tag--DELETED { background: #FBE7E4; color: var(--danger); }
.tag--INACTIVE, .tag--SUSPENDED { background: #EEF1F0; color: var(--muted); }
.tag--SUPER_ADMIN, .tag--ADMIN, .tag--SUPPORT { background: #0B1D19; color: #fff; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* ---- dialog ---------------------------------------------------------- */
dialog {
  border: 0; border-radius: 16px; padding: 22px; width: min(460px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(11,29,25,.25);
}
dialog::backdrop { background: rgba(11,29,25,.45); }
dialog h2 { font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field span { font-size: 12px; color: var(--muted); }
.field textarea { min-height: 84px; resize: vertical; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
}
.toast--error { background: var(--danger); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side__me { margin-top: 0; display: none; }
  .content { padding: 16px; }
}
