:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #172026;
  --muted: #63727c;
  --line: #dce5e8;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #d97706;
  --danger: #b91c1c;
  --shadow: 0 18px 40px rgba(23, 32, 38, 0.08);
}

/* Final console overrides. Kept at the end so the original scaffold cannot win specificity by order. */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { padding: 18px 14px; background: var(--primary); }
.brand { padding: 6px 8px 18px; margin-bottom: 0; }
.brand-mark { width: 38px; height: 38px; background: var(--accent); color: var(--primary); }
.workspace-card { margin: 2px 8px 16px; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.07); }
.workspace-card span { display: block; color: rgba(255,255,255,.62); font-size: 11px; }
.workspace-card strong { display: block; margin-top: 2px; font-size: 13px; }
.nav a { display: flex; gap: 10px; align-items: center; border-radius: 7px; font-weight: 600; }
.nav span { width: 22px; color: var(--accent); text-align: center; }
.main { padding: 22px 24px 40px; }
.topbar { min-height: 58px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 24px; line-height: 1.2; }
.header-logo { font-size:18px; font-weight:bold; letter-spacing:0.5px; font-family:'Meiryo','Yu Gothic',sans-serif; }
.topbar .header-logo { display: inline-flex; margin-top: 6px; padding: 3px 10px; border-radius: 4px; background: #C9A955; color: #FFF; line-height: 1.25; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.primary-action, .secondary-action, button { border: 1px solid transparent; border-radius: 7px; padding: 8px 13px; min-height: 36px; background: var(--primary); }
.secondary-action { background: #fff; color: var(--primary); border-color: var(--line); }
.data-panel { padding: 0; overflow: hidden; }
.data-panel .panel-head { padding: 16px 16px 0; }
.compact-head { margin-bottom: 10px; }
.panel-head h2 { font-size: 17px; }
.record-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.console-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-tile { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.stat-tile span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-tile strong { display: block; margin-top: 7px; font-size: 28px; line-height: 1; }
.stat-tile small { display: block; margin-top: 8px; color: var(--muted); }
.stat-tile.attention { border-color: #f3cf93; background: #fffaf2; }
.toolbar { grid-template-columns: minmax(240px, 1fr) 170px 120px auto; gap: 10px; padding: 0 16px 14px; }
label { font-size: 12px; }
input, select, textarea { border-radius: 6px; padding: 8px 10px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76,199,235,.15); outline: none; }
table { min-width: 860px; }
th, td { padding: 10px 12px; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: #f3f6fa; color: #526174; font-size: 11px; text-transform: uppercase; }
td { font-size: 13px; }
.table-main-link { display: block; font-weight: 800; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.badge { min-height: 24px; padding: 1px 8px; background: #f0f2f5; color: #4d5968; font-size: 11px; }
.badge-blue { background: var(--accent-soft); color: var(--primary); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.status-dot.ok { background: var(--success); }
.status-dot.warn { background: var(--warning); }
.icon-link { padding: 6px 9px; border-radius: 7px; color: var(--primary); font-weight: 700; }
.record-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.record-header h2 { margin: 3px 0 8px; font-size: 21px; }
.record-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.record-meta span { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef3f8; color: var(--muted); font-size: 12px; font-weight: 700; }
.tab-shell { overflow: hidden; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 2px; padding: 10px 10px 0; background: #f3f6fa; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { min-height: 36px; padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; background: transparent; color: var(--muted); white-space: nowrap; }
.tab:hover { background: #e9eff6; color: var(--primary); }
.tab.active { background: #fff; border-color: var(--line); color: var(--primary); }
.tab-panel { display: none; padding: 18px; }
.tab-panel.active { display: block; }
.form-grid { gap: 14px; }
.section-title { padding: 7px 11px; border-left: 4px solid var(--accent); border-radius: 0 5px 5px 0; background: var(--surface-soft); color: var(--primary); }
.danger-zone { background: #fffafa; }
.danger { background: var(--danger); }

@media (max-width: 1024px) {
  .console-grid, .metric-grid, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr 150px 110px auto; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { width: 248px; }
  .main { padding: 16px; }
  .topbar-actions { display: none; }
  .console-grid, .metric-grid, .form-grid, .toolbar { grid-template-columns: 1fr; }
  .record-header { align-items: flex-start; flex-direction: column; }
  .button-row { width: 100%; }
  .button-row a, .button-row button { flex: 1; text-align: center; }
}

.user-chip {
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.user-chip strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.user-chip span {
  color: var(--muted);
  font-size: 11px;
}

.auth-body {
  min-height: 100vh;
  background: #eef3f9;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 520px;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px;
  background: linear-gradient(135deg, rgba(16, 42, 100, 0.96), rgba(16, 42, 100, 0.82));
  color: #fff;
}


.auth-visual-premium {
  justify-content: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand strong {
  display: block;
  font-size: 16px;
}

.auth-brand small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.auth-copy {
  max-width: 760px;
}


.login-premium-logo-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 14px;
}

.login-lcs-logo {
  display: block;
  width: min(1040px, 76vw);
  max-width: none;
  height: auto;
}

.login-premium-badge {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 4px;
  background: #C9A955;
  color: #FFF;
  font-family: 'Meiryo','Yu Gothic',sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.5px;
  line-height: 1.25;
  white-space: nowrap;
}

.auth-copy .eyebrow {
  color: var(--accent);
  font-weight: 800;
}

.auth-copy h1 {
  margin: 8px 0 12px;
  font-size: 38px;
  line-height: 1.2;
}


.auth-copy .login-premium-copy {
  margin: 0;
  font-size: 40px;
  line-height: 1.32;
}

.auth-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.auth-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-stats span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(430px, calc(100% - 40px));
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-head {
  margin-bottom: 26px;
}

.login-head h2 {
  margin: 2px 0 0;
  font-size: 30px;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-form label span {
  font-size: 14px;
}

.login-form input {
  min-height: 44px;
  font-size: 16px;
}

.password-field {
  display: flex;
  gap: 8px;
}

.password-field input {
  min-width: 0;
}

.password-toggle {
  width: 88px;
  background: #eef3f8;
  color: var(--primary);
  border-color: var(--line);
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  font-size: 16px;
}

.auth-error {
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid #f0b8b2;
  border-radius: 7px;
  background: #fff5f5;
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 260px;
    padding: 24px;
  }

  .auth-copy h1 {
    font-size: 32px;
  }

  .login-card {
    margin: 24px 0;
  }
}

/* Retool-inspired operations console refresh */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f2f6fb;
  --ink: #172033;
  --muted: #637083;
  --line: #d0d8e4;
  --primary: #102a64;
  --primary-dark: #173879;
  --accent: #4cc7eb;
  --accent-soft: #e8f8fc;
  --danger: #c0392b;
  --success: #2f9e66;
  --warning: #d9901a;
  --shadow: 0 10px 30px rgba(16, 42, 100, 0.08);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

.shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  padding: 18px 14px;
  background: var(--primary);
}

.brand {
  padding: 6px 8px 18px;
  margin-bottom: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: var(--primary);
}

.workspace-card {
  margin: 2px 8px 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.workspace-card span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.workspace-card strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 7px;
  font-weight: 600;
}

.nav span {
  width: 22px;
  color: var(--accent);
  text-align: center;
}

.main {
  padding: 22px 24px 40px;
}

.topbar {
  min-height: 58px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  font-size: 24px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.primary-action,
.secondary-action,
button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 13px;
  min-height: 36px;
  background: var(--primary);
}

.primary-action:hover,
button:hover {
  background: var(--primary-dark);
}

.secondary-action {
  background: #fff;
  color: var(--primary);
  border-color: var(--line);
}

.panel,
.tab-shell,
.record-header,
.danger-zone,
.stat-tile,
.metric {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.data-panel {
  padding: 0;
  overflow: hidden;
}

.data-panel .panel-head {
  padding: 16px 16px 0;
}

.compact-head {
  margin-bottom: 10px;
}

.panel-head h2 {
  font-size: 17px;
}

.record-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-tile {
  padding: 15px;
}

.stat-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-tile strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
  line-height: 1;
}

.stat-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.stat-tile.attention {
  border-color: #f3cf93;
  background: #fffaf2;
}

.toolbar {
  grid-template-columns: minmax(240px, 1fr) 170px 120px auto;
  gap: 10px;
  padding: 0 16px 14px;
}

label {
  font-size: 12px;
}

input,
select,
textarea {
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 199, 235, 0.15);
  outline: none;
}

table {
  min-width: 860px;
}

th,
td {
  padding: 10px 12px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6fa;
  color: #526174;
  font-size: 11px;
  text-transform: uppercase;
}

td {
  font-size: 13px;
}

.table-main-link {
  display: block;
  font-weight: 800;
}

td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.badge {
  min-height: 24px;
  padding: 1px 8px;
  background: #f0f2f5;
  color: #4d5968;
  font-size: 11px;
}

.badge-blue {
  background: var(--accent-soft);
  color: var(--primary);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.ok {
  background: var(--success);
}

.status-dot.warn {
  background: var(--warning);
}

.icon-link {
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--primary);
  font-weight: 700;
}

.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.record-header h2 {
  margin: 3px 0 8px;
  font-size: 21px;
}

.record-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.record-meta span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab-shell {
  overflow: hidden;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 10px 10px 0;
  background: #f3f6fa;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.tab:hover {
  background: #e9eff6;
  color: var(--primary);
}

.tab.active {
  background: #fff;
  border-color: var(--line);
  color: var(--primary);
}

.tab-panel {
  display: none;
  padding: 18px;
}

.tab-panel.active {
  display: block;
}

.form-grid {
  gap: 14px;
}

.section-title {
  padding: 7px 11px;
  border-left: 4px solid var(--accent);
  border-radius: 0 5px 5px 0;
  background: var(--surface-soft);
  color: var(--primary);
}

.danger-zone {
  background: #fffafa;
}

.danger {
  background: var(--danger);
}

@media (max-width: 1024px) {
  .console-grid,
  .metric-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr 150px 110px auto;
  }
}

@media (max-width: 760px) {
  .topbar-actions {
    display: none;
  }

  .console-grid,
  .metric-grid,
  .form-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .record-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row {
    width: 100%;
  }

  .button-row a,
  .button-row button {
    flex: 1;
    text-align: center;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #102326;
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  margin-bottom: 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  font-weight: 800;
}

.brand small,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  margin: 0;
}

.brand small {
  color: #a7bec2;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: #e6f0f1;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 28px;
}

.primary-action,
.secondary-action,
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.primary-action {
  margin-left: auto;
}

.secondary-action {
  background: #e8eff1;
  color: var(--ink);
}

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric,
.panel,
.danger-zone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 20px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 140px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fbfdfe;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fbfc;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e6f4f1;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.actions {
  text-align: right;
}

.icon-link {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 8px;
  background: #e8eff1;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.compact {
  margin-bottom: 20px;
}

.wide {
  grid-column: 1 / -1;
}

.toggle {
  align-self: end;
  min-height: 43px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.toggle input {
  width: 18px;
  height: 18px;
}

.section-title {
  color: var(--primary-dark);
  font-weight: 800;
  margin: 20px 0 12px;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #166534;
  margin-bottom: 16px;
  font-weight: 700;
}

.danger-zone {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border-color: #fecaca;
}

.danger-zone p {
  margin: 4px 0 0;
  color: var(--muted);
}

.danger {
  background: var(--danger);
}

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

  .sidebar {
    position: fixed;
    z-index: 5;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .icon-button {
    display: inline-grid;
    place-items: center;
  }

  .main {
    padding: 18px;
  }

  .metric-grid,
  .form-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .primary-action {
    display: none;
  }

  .panel-head,
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* End-of-file overrides for the Retool-inspired console refresh. */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { padding: 18px 14px; background: var(--primary); }
.brand { padding: 6px 8px 18px; margin-bottom: 0; }
.brand-mark { width: 38px; height: 38px; background: var(--accent); color: var(--primary); }
.workspace-card { margin: 2px 8px 16px; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.07); }
.workspace-card span { display: block; color: rgba(255,255,255,.62); font-size: 11px; }
.workspace-card strong { display: block; margin-top: 2px; font-size: 13px; }
.nav a { display: flex; gap: 10px; align-items: center; border-radius: 7px; font-weight: 600; }
.nav span { width: 22px; color: var(--accent); text-align: center; }
.main { padding: 22px 24px 40px; }
.topbar { min-height: 58px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 24px; line-height: 1.2; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.primary-action, .secondary-action, button { border: 1px solid transparent; border-radius: 7px; padding: 8px 13px; min-height: 36px; background: var(--primary); }
.secondary-action { background: #fff; color: var(--primary); border-color: var(--line); }
.data-panel { padding: 0; overflow: hidden; }
.data-panel .panel-head { padding: 16px 16px 0; }
.compact-head { margin-bottom: 10px; }
.panel-head h2 { font-size: 17px; }
.record-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.console-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-tile { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.stat-tile span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-tile strong { display: block; margin-top: 7px; font-size: 28px; line-height: 1; }
.stat-tile small { display: block; margin-top: 8px; color: var(--muted); }
.stat-tile.attention { border-color: #f3cf93; background: #fffaf2; }
.toolbar { grid-template-columns: minmax(240px, 1fr) 170px 120px auto; gap: 10px; padding: 0 16px 14px; }
label { font-size: 12px; }
input, select, textarea { border-radius: 6px; padding: 8px 10px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76,199,235,.15); outline: none; }
table { min-width: 860px; }
th, td { padding: 10px 12px; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: #f3f6fa; color: #526174; font-size: 11px; text-transform: uppercase; }
td { font-size: 13px; }
.table-main-link { display: block; font-weight: 800; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.badge { min-height: 24px; padding: 1px 8px; background: #f0f2f5; color: #4d5968; font-size: 11px; }
.badge-blue { background: var(--accent-soft); color: var(--primary); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.status-dot.ok { background: var(--success); }
.status-dot.warn { background: var(--warning); }
.icon-link { padding: 6px 9px; border-radius: 7px; color: var(--primary); font-weight: 700; }
.record-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.record-header h2 { margin: 3px 0 8px; font-size: 21px; }
.record-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.record-meta span { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef3f8; color: var(--muted); font-size: 12px; font-weight: 700; }
.tab-shell { overflow: hidden; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 2px; padding: 10px 10px 0; background: #f3f6fa; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { min-height: 36px; padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; background: transparent; color: var(--muted); white-space: nowrap; }
.tab:hover { background: #e9eff6; color: var(--primary); }
.tab.active { background: #fff; border-color: var(--line); color: var(--primary); }
.tab-panel { display: none; padding: 18px; }
.tab-panel.active { display: block; }
.form-grid { gap: 14px; }
.section-title { padding: 7px 11px; border-left: 4px solid var(--accent); border-radius: 0 5px 5px 0; background: var(--surface-soft); color: var(--primary); }
.danger-zone { background: #fffafa; }
.danger { background: var(--danger); }

@media (max-width: 1024px) {
  .console-grid, .metric-grid, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr 150px 110px auto; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { width: 248px; }
  .main { padding: 16px; }
  .topbar-actions { display: none; }
  .console-grid, .metric-grid, .form-grid, .toolbar { grid-template-columns: 1fr; }
  .record-header { align-items: flex-start; flex-direction: column; }
  .button-row { width: 100%; }
  .button-row a, .button-row button { flex: 1; text-align: center; }
}


/* Map PoC */
.map-stats { margin-top: 2px; }
.map-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 210px);
}
.map-side,
.map-panel {
  min-width: 0;
}
.map-side {
  padding: 16px;
}
.map-panel {
  padding: 0;
  overflow: hidden;
}
.fleet-map {
  width: 100%;
  min-height: 620px;
  height: calc(100vh - 220px);
  background: #e7eef2;
}
.map-error {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}
.map-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-line {
  display: inline-block;
  width: 24px;
  height: 4px;
  border-radius: 999px;
}
.legend-line.raw { background: #2563eb; }
.legend-line.matched { background: #06b6d4; }
.track-list {
  display: grid;
  gap: 8px;
}
.track-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.track-item:hover,
.track-item.active {
  border-color: var(--accent);
  background: #fffaf2;
}
.track-item strong {
  font-size: 13px;
}
.track-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.leaflet-popup-content {
  color: #172026;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .map-workspace { grid-template-columns: 1fr; }
  .fleet-map { min-height: 520px; height: 58vh; }
}

.track-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.track-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.track-badge.linked {
  background: #e6f4f1;
  color: var(--primary);
}
.track-item small {
  color: var(--muted);
  font-size: 11px;
}

.map-filter {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.map-filter label.device-auto-selected select {
  display: none;
}
.map-auto-device {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.map-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.map-filter-actions {
  display: flex;
  gap: 8px;
}
.map-filter-actions button,
.map-filter-actions a {
  flex: 1;
  justify-content: center;
  text-align: center;
}
@media (max-width: 1024px) {
  .map-filter-grid { grid-template-columns: 1fr; }
}

.history-days {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.history-days-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.history-days-head strong {
  font-size: 13px;
}
.history-days-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.history-day-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.history-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.history-day:hover,
.history-day.active {
  border-color: var(--accent);
  background: #fffaf2;
}
.history-day small {
  color: var(--muted);
  font-size: 10px;
}
.empty-small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.latest-location-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  background: transparent;
  border: 0;
}
.latest-location-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 4px solid #ffffff;
  border-radius: 50% 50% 50% 8px;
  background: #0891b2;
  box-shadow: 0 8px 22px rgba(8, 145, 178, 0.42);
  transform: rotate(-45deg);
}
.latest-location-pin::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
}
.latest-location-label {
  display: block;
  max-width: 82px;
  padding: 2px 6px;
  border: 1px solid rgba(8, 145, 178, 0.24);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f5666;
  box-shadow: 0 5px 14px rgba(23, 32, 38, 0.16);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-hover-tooltip {
  padding: 6px 8px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #172026;
  box-shadow: 0 8px 20px rgba(23, 32, 38, 0.14);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.map-panel {
  position: relative;
}
.map-update-status {
  position: absolute;
  z-index: 500;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(23, 32, 38, 0.12);
  font-size: 11px;
  font-weight: 800;
}

.device-status-panel {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.device-status-body {
  display: grid;
  gap: 8px;
}
.device-status-row {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfc;
}
.device-status-row strong {
  color: var(--ink);
  font-size: 12px;
}
.device-status-row span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.device-status-row.displayed {
  border-color: rgba(37, 99, 235, 0.26);
  background: #eff6ff;
}

.management-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}
.user-toolbar {
  grid-template-columns: minmax(220px, 1fr) 180px 220px auto auto;
}
.management-stats .stat-tile strong {
  font-size: 24px;
}
@media (max-width: 1024px) {
  .management-toolbar,
  .user-toolbar {
    grid-template-columns: 1fr;
  }
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}
@media (max-width: 760px) {
  .role-check-grid { grid-template-columns: 1fr; }
}

.sidebar {
  display: flex;
  flex-direction: column;
}
.nav-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.inline-code {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.system-gear-link {
  justify-content: center;
  min-height: 52px;
  padding: 8px;
}
.system-gear-link span {
  width: auto;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}
.system-gear-link:hover span {
  color: var(--accent);
}

.system-tabs-shell .tabs a.tab {
  text-decoration: none;
}
.permission-role-stack {
  display: grid;
  gap: 14px;
}
.permission-role-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.permission-role-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 10px;
}
.permission-matrix th,
.permission-matrix td {
  min-width: 128px;
  text-align: center;
}
.permission-matrix th:first-child,
.permission-matrix td:first-child {
  min-width: 84px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
}
.permission-check label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.system-save-row {
  justify-content: flex-end;
  padding: 14px 18px 18px;
}
.version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}
.version-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.version-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.version-grid strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}
@media (max-width: 760px) {
  .version-grid { grid-template-columns: 1fr; }
}

.permission-help {
  margin: 0 18px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.permission-role {
  min-width: 150px;
}
.permission-role-heading .badge {
  margin-top: 0;
}
.permission-check.permission-default {
  background: #fafafa;
}
.permission-table th small {
  display: block;
  margin-top: 3px;
  text-transform: none;
  white-space: nowrap;
}

.stats-panel {
  overflow: hidden;
}
.stats-toolbar {
  grid-template-columns: 150px minmax(260px, 1fr) 170px 170px auto;
  align-items: end;
}
.stats-toolbar label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.stats-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.stats-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -2px;
}
.stats-swatch.raw { background: #2563eb; }
.stats-swatch.osrm { background: #06b6d4; }
.daily-distance-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 12px;
  min-height: 340px;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
}
.daily-distance-bar {
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}
.bar-stack {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  height: 240px;
  padding: 10px 5px 0;
  border-bottom: 1px solid var(--line);
}
.bar {
  position: relative;
  display: block;
  width: 22px;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
}
.bar.raw { background: #2563eb; }
.bar.osrm { background: #06b6d4; }
.bar.raw em {
  transform: translateX(-82%);
}
.bar.osrm em {
  transform: translateX(-18%);
}
.bar em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  color: #172026;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.daily-distance-bar strong {
  font-size: 12px;
  line-height: 1.2;
}
.daily-distance-bar small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
@media (max-width: 860px) {
  .stats-toolbar {
    grid-template-columns: 1fr;
  }
  .daily-distance-chart {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }
}

.daily-distance-chart-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  min-height: 340px;
  padding: 30px 16px 18px;
  border-top: 1px solid var(--line);
}
.distance-axis {
  position: relative;
  height: 240px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.axis-unit {
  position: absolute;
  top: -22px;
  right: 8px;
  color: #172026;
}
.axis-tick {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  white-space: nowrap;
}
.axis-tick::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 6px;
  border-top: 1px solid var(--line);
}
.daily-distance-chart-shell .daily-distance-chart {
  min-height: 0;
  padding: 0;
  border-top: 0;
}
@media (max-width: 860px) {
  .daily-distance-chart-shell {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 30px 12px 16px;
  }
}

.latest-location-icon {
  cursor: pointer;
}

.latest-location-icon.highlighted .latest-location-pin {
  border-color: #111827;
  background: #a855f7;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.38), 0 10px 24px rgba(17, 24, 39, 0.28);
}
.latest-location-icon.highlighted .latest-location-pin::before {
  background: #111827;
}
.latest-location-icon.highlighted .latest-location-label {
  border-color: rgba(17, 24, 39, 0.46);
  background: #a855f7;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(17, 24, 39, 0.6);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.28);
}

.device-toolbar {
  grid-template-columns: minmax(260px, 1fr) 210px 150px 160px 120px auto;
  align-items: end;
}
.device-table .battery-meter {
  position: relative;
  width: 112px;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f7;
}
.device-table .battery-meter span {
  display: block;
  height: 100%;
  background: #16a34a;
}
.device-table .battery-meter.mid span { background: #d97706; }
.device-table .battery-meter.low span { background: #dc2626; }
.device-table .battery-meter strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
}
.table-main-link.subtle {
  font-weight: 800;
}
.form-action-cell {
  display: flex;
  align-items: end;
  min-height: 68px;
}
.full-field {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}
.full-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.full-field textarea {
  width: 100%;
  resize: vertical;
}
@media (max-width: 980px) {
  .device-toolbar { grid-template-columns: 1fr; }
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.pagination-size,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-size span,
.pagination-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.pagination-size select {
  min-width: 78px;
  height: 34px;
  padding: 4px 8px;
}
.pagination-actions button,
.pagination-pages button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #172026;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.pagination-actions button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.55;
}
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pagination-pages button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.pagination-gap {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 760px) {
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .pagination-actions {
    justify-content: space-between;
  }
  .pagination-pages {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.map-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.map-qr-tile {
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 10px;
}
.map-qr-code {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}
.map-qr-code img {
  display: block;
  width: 88px;
  height: 88px;
}
@media (max-width: 1180px) {
  .map-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .map-stats {
    grid-template-columns: 1fr;
  }
}

.public-status-page {
  min-height: 100vh;
  background: #f3f6f8;
}
.public-status-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}
.public-status-card {
  width: min(720px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 38, 0.12);
}
.public-status-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.public-status-head h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}
.public-expired-message {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}
.public-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.public-status-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}
.public-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.public-status-grid strong {
  display: block;
  margin-top: 5px;
  word-break: break-word;
}
.public-map-link {
  margin-top: 16px;
}
.public-status-foot {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 640px) {
  .public-status-grid { grid-template-columns: 1fr; }
  .public-status-card { padding: 18px; }
}

.public-device-map {
  width: 100%;
  height: 320px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
}
@media (max-width: 640px) {
  .public-device-map { height: 280px; }
}


.premium-module-panel {
  max-width: 980px;
}

.premium-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.premium-module-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.premium-module-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.premium-module-card strong {
  font-size: 18px;
}

.premium-module-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .premium-module-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium module shortcuts shown in the Basic header. */
.basic-premium-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.basic-premium-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #c9a955;
  border-radius: 7px;
  background: #fff;
  color: #102a64;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.basic-premium-nav a:hover,
.basic-premium-nav a:focus-visible {
  background: #102a64;
  color: #fff;
  outline: none;
}

.basic-premium-nav + .topbar-actions {
  margin-left: 0;
}

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
  }

  .basic-premium-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    overflow-x: auto;
    padding-top: 8px;
  }
}
