:root {
  --bg: #f5fbff;
  --panel: #ffffff;
  --ink: #10243f;
  --muted: #5e728a;
  --line: #d9e7f2;
  --primary: #0b2d5f;
  --primary-dark: #071d3d;
  --accent: #0aa7a8;
  --danger: #a34034;
  --success: #2f6d4f;
  --shadow: 0 16px 40px rgba(47, 36, 31, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #f0ffff, var(--bg) 48%, #e7f0fa);
  min-height: 100vh;
}

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

.hidden { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(480px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.brand-block, .header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #082756;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark.small { width: 46px; height: 46px; border-radius: 14px; }
.logo-mark { overflow: hidden; background: #082756; box-shadow: 0 10px 28px rgba(11,45,95,0.18); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 6px 0 0; color: var(--muted); }
.version { color: var(--muted); font-size: 0.85rem; }
.page-version { display: inline-flex; margin-top: 6px; color: var(--muted); font-size: 0.82rem; font-weight: 750; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0;
  background: #f5ece4;
  padding: 6px;
  border-radius: 16px;
}

.tab {
  border: 0;
  border-radius: 12px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.tab.active { background: var(--panel); color: var(--primary); box-shadow: 0 6px 18px rgba(47, 36, 31, 0.08); }

.form-stack, .record-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,155,88,0.18); }
textarea { resize: vertical; }
small, .helper { color: var(--muted); font-weight: 500; font-size: 0.85rem; }

.primary, .secondary, .ghost, .danger {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 750;
}
.primary { background: var(--primary); color: white; }
.primary:hover { background: var(--primary-dark); }
.secondary { background: #f3e7dc; color: var(--primary); }
.ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
.danger { background: #f8e4df; color: var(--danger); }

.message { min-height: 22px; color: var(--danger); font-weight: 650; }

.app-shell { padding: 18px; max-width: 1500px; margin: 0 auto; }
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(47, 36, 31, 0.06);
  position: sticky;
  top: 10px;
  z-index: 5;
  backdrop-filter: blur(10px);
}
.header-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.nav {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  padding: 10px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow-x: auto;
}
.nav button {
  white-space: nowrap;
  border: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}
.nav button.active { background: var(--primary); color: white; }

.notice {
  background: #fff8db;
  border: 1px solid #eadf9a;
  color: #6f5b13;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.page { display: none; }
.page.active { display: grid; gap: 18px; }
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(47, 36, 31, 0.06);
}
.card { padding: 20px; }
.card span { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.card strong { display: block; font-size: 2.1rem; margin-top: 8px; }
.card small { display: block; margin-top: 6px; }

.panel { padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.record-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.compact-form { margin-bottom: 18px; }
.span-2 { grid-column: span 2; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.check-row input { width: auto; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.helper-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
  padding: 12px;
}
.helper-block strong { display: block; font-size: 1.05rem; }

.table-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.table-toolbar input { max-width: 420px; }
.filter-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-toolbar input,
.filter-toolbar select {
  width: auto;
  min-width: 190px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
td { font-size: 0.92rem; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f3e7dc;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 4px 4px 0;
}
.badge.green { background: #e3f2e9; color: var(--success); }
.badge.red { background: #fae7e2; color: var(--danger); }
.badge.gray { background: #eee9e6; color: var(--muted); }

.compact-list { display: grid; gap: 10px; margin-top: 12px; }
.compact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}
.compact-item strong { display: block; }
.compact-item small { display: block; margin-top: 3px; }

.list-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.list-editor-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fffaf6;
}
.list-editor-card textarea { min-height: 220px; margin: 12px 0; }

.picture-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.picture-strip img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }

@media (max-width: 980px) {
  .card-grid, .two-column, .list-editor-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .app-shell { padding: 12px; }
  .app-header, .page-heading { align-items: flex-start; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .card-grid, .two-column, .record-form, .list-editor-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .auth-card { padding: 22px; }
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  background: #f3e7dc;
  color: var(--primary);
  font-weight: 800;
}
.avatar.placeholder { line-height: 44px; text-align: center; }
.profile-preview {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fffaf6;
  display: inline-grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.profile-preview.placeholder { width: auto; min-width: 160px; }
.picture-strip.large img {
  width: 88px;
  height: 88px;
  border-radius: 14px;
}
.compact-heading { margin-bottom: 0; padding-bottom: 0; }
input[readonly] { background: #f7f1eb; color: var(--muted); }

.dashboard-card {
  text-align: left;
  border: 1px solid var(--line);
}
.dashboard-card:hover,
.compact-button:hover,
.clickable-row:hover {
  box-shadow: 0 10px 28px rgba(47, 36, 31, 0.10);
  transform: translateY(-1px);
}
.compact-button {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.clickable-row { cursor: pointer; }
.small-btn { padding: 6px 10px; border-radius: 10px; margin-left: 8px; }
.map-panel { display: grid; gap: 10px; }
.map-box {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #efe7df;
}
.detail-panel { display: grid; gap: 18px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffaf6;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.detail-grid strong { overflow-wrap: anywhere; }
.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.audit-section {
  margin-top: 10px;
  opacity: 0.62;
  font-size: 0.82rem;
}
.audit-section h3 {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.audit-section .detail-grid {
  gap: 8px;
}
.audit-section .detail-grid > div {
  padding: 8px;
  border-radius: 10px;
  background: #fffaf6;
}
.audit-section .detail-grid span {
  font-size: 0.68rem;
  margin-bottom: 4px;
}
.audit-section .detail-grid strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-button { border: 0; cursor: pointer; }
@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
  .map-box { min-height: 260px; }
}

.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.calendar-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf6;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.calendar-card h3 { font-size: 1rem; }
.date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.guest-list { margin: 8px 0 0; padding-left: 22px; color: var(--ink); }
.public-form-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 24px;
}
.public-form-card {
  width: min(860px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.success-box {
  border: 1px solid #cfe6d8;
  background: #eef8f2;
  color: var(--success);
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
}
.error-box {
  border: 1px solid #f2c7bd;
  background: #fff1ee;
  color: var(--danger);
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
}
@media (max-width: 720px) { .date-pair { grid-template-columns: 1fr; } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(35, 24, 16, 0.58);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(620px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}
.modal-card h2 { margin: 0; }
.choice-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffaf6;
}
.choice-row input { margin-top: 4px; }

/* Dashboard v2.0.8: simplified graphical view */
.dashboard-visual {
  display: grid;
  gap: 16px;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(135deg, #fffaf6, #f6e6d5);
}
.dashboard-hero h3 {
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  margin-top: 8px;
}
.dashboard-hero p { max-width: 760px; }
.dashboard-hero-action { white-space: nowrap; }
.dashboard-eyebrow {
  margin-top: 12px;
  color: var(--primary);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}
.dashboard-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}
.dashboard-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dashboard-keycards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-metric {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
  box-shadow: 0 10px 26px rgba(47, 36, 31, 0.06);
  display: grid;
  gap: 5px;
  min-height: 152px;
}
.dashboard-metric:hover,
.attention-item:hover,
.dashboard-pill:hover {
  box-shadow: 0 10px 28px rgba(47, 36, 31, 0.10);
  transform: translateY(-1px);
}
.dashboard-icon {
  font-size: 1.35rem;
}
.dashboard-metric strong {
  font-size: 2.2rem;
  line-height: 1;
}
.dashboard-metric span:not(.dashboard-icon) {
  color: var(--ink);
  font-weight: 850;
}
.dashboard-metric small { margin: 0; }
.dashboard-graphics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dashboard-chart-card { min-height: 190px; }
.large-percent {
  font-size: 2.25rem;
  color: var(--primary);
}
.progress-track {
  height: 18px;
  border-radius: 999px;
  background: #f0e2d7;
  overflow: hidden;
  margin: 20px 0 12px;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  min-width: 4px;
}
.dashboard-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.success-dot { background: var(--primary); }
.warn-dot { background: var(--accent); }
.dashboard-donut-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
}
.capacity-donut {
  --used: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) calc(var(--used) * 1%), #f0e2d7 0);
  position: relative;
  flex: none;
}
.capacity-donut::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: var(--panel);
}
.capacity-donut span {
  position: relative;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.4rem;
}
.dashboard-mini-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.dashboard-attention { padding: 18px; }
.attention-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.attention-item {
  border: 1px solid var(--line);
  background: #fffaf6;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 2px;
}
.attention-item strong {
  font-size: 1.35rem;
  color: var(--primary);
}
.attention-item span {
  color: var(--muted);
  font-weight: 750;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .dashboard-keycards,
  .dashboard-graphics,
  .attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-hero-action { width: fit-content; }
}

@media (max-width: 680px) {
  .dashboard-keycards,
  .dashboard-graphics,
  .attention-grid,
  .dashboard-donut-row { grid-template-columns: 1fr; }
}


/* v2.0.8 logo and phone-browser refinements */
.brand-block h1,
.header-title h1 { letter-spacing: -0.02em; }
.header-title p { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  body { background: #f5fbff; }
  .auth-shell,
  .public-form-shell { padding: 12px; place-items: start center; }
  .auth-card,
  .public-form-card {
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(11,45,95,0.10);
  }
  .brand-block,
  .header-title {
    align-items: flex-start;
    gap: 12px;
  }
  .brand-mark { width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto; }
  .brand-mark.small { width: 42px; height: 42px; border-radius: 13px; }
  .brand-block h1 { font-size: 1.35rem; }
  .brand-block p { font-size: 0.92rem; }
  .app-shell { padding: 8px; }
  .app-header {
    top: 0;
    border-radius: 0 0 20px 20px;
    margin: -8px -8px 10px;
    padding: 12px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .header-actions .secondary { padding: 9px 12px; }
  .nav {
    margin: 10px 0 14px;
    padding: 8px;
    border-radius: 16px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .nav button { padding: 10px 12px; font-size: 0.92rem; }
  .page-heading {
    gap: 12px;
    padding: 0 2px;
  }
  .page-heading h2 { font-size: 1.4rem; }
  .page-heading .primary,
  .page-heading .secondary,
  .page-heading .ghost,
  .page-heading .danger { width: 100%; }
  .panel { padding: 14px; border-radius: 16px; }
  .card { padding: 16px; border-radius: 16px; }
  label { font-size: 0.94rem; }
  input, select, textarea {
    min-height: 46px;
    border-radius: 13px;
    font-size: 16px;
  }
  textarea { min-height: 94px; }
  .primary, .secondary, .ghost, .danger {
    min-height: 46px;
    border-radius: 13px;
  }
  .form-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .form-actions button { width: 100%; }
  .filter-toolbar { display: grid; grid-template-columns: 1fr; }
  .filter-toolbar input,
  .filter-toolbar select,
  .filter-toolbar button { width: 100%; min-width: 0; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; border-collapse: separate; border-spacing: 0; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tbody tr {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 22px rgba(11,45,95,0.06);
  }
  td {
    border-bottom: 0;
    padding: 8px 4px;
    display: grid;
    grid-template-columns: minmax(92px, 32%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    overflow-wrap: anywhere;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  td[colspan] {
    display: block;
    grid-template-columns: 1fr;
    text-align: left;
  }
  td[colspan]::before { content: ''; display: none; }
  .table-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .table-actions button { width: 100%; }
  .picture-strip img { width: 60px; height: 60px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div { padding: 11px; }
  .date-pair { grid-template-columns: 1fr; }
  .calendar-card { padding: 12px; }
  .map-box { min-height: 260px; }
  .modal-backdrop { padding: 12px; }
  .modal-card { padding: 18px; border-radius: 20px; }
  .choice-row { align-items: flex-start; }
  .choice-row input { width: auto; min-height: 0; }
  .public-form-card .record-form { gap: 16px; }
  .public-form-card .helper { line-height: 1.45; }
  .success-box,
  .error-box { font-size: 0.95rem; }
}

@media (max-width: 420px) {
  td { grid-template-columns: 1fr; gap: 4px; }
  td::before { margin-bottom: 2px; }
  .dashboard-metric { min-height: 0; }
  .capacity-donut { width: 112px; height: 112px; }
}

/* v2.0.10 convention-specific accommodation availability */
.convention-availability-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  padding: 16px;
}
.convention-availability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.convention-slot-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.convention-slot-card h4 { margin: 0; color: var(--primary); }
.compact-check { margin: 0; padding: 0; font-size: 0.9rem; }
.compact-check input { min-height: 0; width: auto; }
.compact-table-wrap table { font-size: 0.92rem; }
@media (max-width: 760px) {
  .convention-availability-grid { grid-template-columns: 1fr; }
}

/* v2.0.14 usability refinements */
.header-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.user-menu { position: relative; }
.user-menu-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, 72vw);
}
.user-menu-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
  display: grid;
  gap: 6px;
}
.user-menu-panel button {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-radius: 11px;
  padding: 10px 12px;
  font-weight: 750;
}
.user-menu-panel button:hover { background: #f6efe9; }

.dashboard-shortcuts { padding: 18px; }
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.shortcut-button {
  border: 1px solid var(--line);
  background: #fffaf6;
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 12px;
  display: grid;
  gap: 6px;
  text-align: left;
  min-height: 92px;
}
.shortcut-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(47, 36, 31, 0.10);
}
.shortcut-button span { font-size: 1.45rem; }
.shortcut-button strong { font-size: 0.95rem; }

.guided-form { gap: 16px; }
.form-step-title {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f6fbff, #fffaf6);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
}
.form-step-title span {
  grid-row: span 2;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}
.form-step-title strong { color: var(--ink); }
.form-step-title small { display: block; }

.recommendation-panel {
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px;
}
.recommendation-panel:empty { display: none; }
.recommendation-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.recommendation-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 3px;
}
.recommendation-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(47,36,31,0.08); }
.recommendation-card strong { color: var(--primary); }
.recommendation-card span,
.recommendation-card small { color: var(--muted); }

.review-card { max-width: 620px; }
.review-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.review-list div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fffaf6;
}
.review-list dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.review-list dd {
  margin: 4px 0 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .compact-logout { display: none; }
  .user-menu { width: 100%; }
  .user-menu-button { width: 100%; justify-content: space-between; max-width: none; }
  .user-menu-panel { left: 0; right: auto; width: 100%; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .shortcut-button { min-height: 70px; }
  .form-step-title { grid-template-columns: 1fr; }
  .form-step-title span { width: fit-content; grid-row: auto; }
  .review-list { grid-template-columns: 1fr; }
}


/* v2.0.14 transportation and distance-filter refinements */
.filter-toolbar select#accommodation-filter-distance { min-width: 180px; }
.detail-grid div span + strong { white-space: pre-wrap; }

/* v2.0.16 assignment removal refinements */
.assignment-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.assignment-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(44, 87, 104, 0.06);
}
.mini-button {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.76rem;
}
@media (max-width: 720px) {
  .assignment-chip-list,
  .assignment-chip {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .assignment-chip .badge-button,
  .assignment-chip .mini-button {
    width: 100%;
  }
}

/* v2.0.18 linked Host/Delegate dashboard */
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 5px;
}

.contact-card strong {
  color: var(--ink);
}

.contact-card span {
  color: var(--brand-dark);
  font-weight: 700;
}

.contact-card small {
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}


/* v2.0.19 room capacity refinements */
.rooms-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  padding: 16px;
}
.room-list { display: grid; gap: 14px; margin-top: 12px; }
.room-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.room-card h4, .room-detail-card h4 { margin: 0; color: var(--primary); }
.room-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.room-detail-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--panel);
}
@media (max-width: 760px) {
  .room-card { grid-template-columns: 1fr; }
}

/* v2.0.23 phone-first usability refinements */
:root {
  --mobile-nav-height: 74px;
}

.empty-state,
tbody tr td[colspan] {
  color: var(--muted);
  font-weight: 700;
}

button,
.primary,
.secondary,
.ghost,
.danger,
.nav button,
.user-menu-button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-weight: 850;
  font-size: 1rem;
}

.section-toggle span:last-child {
  transition: transform 0.18s ease;
}

.mobile-collapsible.is-collapsed .section-toggle span:last-child {
  transform: rotate(-90deg);
}

.mobile-collapsible .collapsible-content {
  margin-top: 10px;
}

.mobile-collapsible.is-collapsed .collapsible-content {
  display: none;
}

.mobile-page-hint {
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.72);
  color: var(--muted);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 650;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  .app-shell {
    padding: 0 10px calc(var(--mobile-nav-height) + 16px);
    max-width: 100%;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 0 -10px 10px;
    border-radius: 0 0 22px 22px;
    border-left: 0;
    border-right: 0;
  }

  .header-title h1 {
    font-size: 1.18rem;
  }

  .header-subtitle,
  .header-actions > .version {
    display: none;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 -10px 30px rgba(11,45,95,0.13);
    z-index: 60;
    justify-content: space-around;
    overflow-x: auto;
    gap: 3px;
  }

  .nav button {
    flex: 1 0 74px;
    min-width: 74px;
    padding: 7px 4px;
    border-radius: 15px;
    font-size: 0.7rem;
    line-height: 1.1;
    display: grid;
    place-items: center;
    gap: 4px;
  }

  .nav button::before {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
  }

  .nav button[data-page="dashboard"]::before { content: '⌂'; }
  .nav button[data-page="accommodations"]::before { content: '🏠'; }
  .nav button[data-page="delegates"]::before { content: '📋'; }
  .nav button[data-page="users"]::before { content: '👥'; }
  .nav button[data-page="activity"]::before { content: '🕘'; }
  .nav button[data-page="conventions"]::before { content: '📍'; }
  .nav button[data-page="lists"]::before { content: '⚙'; }

  .page.active {
    gap: 12px;
  }

  .page-heading {
    background: rgba(245,251,255,0.92);
    position: sticky;
    top: 74px;
    z-index: 30;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(217,231,242,0.65);
    backdrop-filter: blur(10px);
  }

  .page-heading h2 {
    font-size: 1.25rem;
  }

  .page-heading p,
  .page-version {
    font-size: 0.82rem;
  }

  .heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .heading-actions button[data-toggle-filters] {
    order: -1;
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  .filter-toolbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    max-height: min(72vh, 620px);
    overflow: auto;
    z-index: 55;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
    padding: 16px;
    box-shadow: 0 -12px 34px rgba(11,45,95,0.18);
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-toolbar::before {
    content: 'Filters';
    display: block;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 900;
    padding-bottom: 2px;
  }

  .filter-toolbar.hidden {
    display: none !important;
  }

  .filter-toolbar input,
  .filter-toolbar select,
  .filter-toolbar button {
    min-height: 48px;
    width: 100%;
  }

  .panel {
    padding: 12px;
  }

  .dashboard-hero,
  .dashboard-shortcuts,
  .dashboard-attention {
    padding: 14px;
  }

  .dashboard-metric {
    min-height: 106px;
    padding: 14px;
    border-radius: 18px;
  }

  .dashboard-metric strong {
    font-size: 1.85rem;
  }

  .dashboard-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-pill {
    text-align: center;
    padding: 10px 6px;
    font-size: 0.85rem;
  }

  .shortcut-button {
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 62px;
  }

  .shortcut-button span {
    font-size: 1.3rem;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    position: relative;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 12px;
  }

  tbody tr.clickable-row::after {
    content: 'Tap to open';
    display: inline-flex;
    margin-top: 6px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 850;
  }

  td {
    grid-template-columns: 1fr;
    padding: 7px 2px;
  }

  td[data-label="Accommodation"],
  td[data-label="Request"],
  td[data-label="Name"] {
    padding-top: 2px;
  }

  td[data-label="Accommodation"]::before,
  td[data-label="Request"]::before,
  td[data-label="Name"]::before {
    display: none;
  }

  td[data-label="Accommodation"] strong,
  td[data-label="Request"] strong,
  td[data-label="Name"] strong {
    display: block;
    font-size: 1.05rem;
    color: var(--primary);
  }

  td[data-label="Actions"] {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 10px;
  }

  .table-actions {
    grid-template-columns: 1fr;
  }

  .table-actions .primary,
  .table-actions .secondary,
  .table-actions .ghost,
  .table-actions .danger {
    min-height: 44px;
  }

  .record-form.guided-form {
    gap: 12px;
  }

  .form-step-title {
    position: sticky;
    top: 146px;
    z-index: 20;
    box-shadow: 0 8px 22px rgba(11,45,95,0.08);
  }

  .record-form.guided-form label,
  .record-form.guided-form .rooms-card,
  .record-form.guided-form .calendar-card,
  .record-form.guided-form .map-panel,
  .record-form.guided-form .convention-availability-card,
  .record-form.guided-form #accommodation-assignment-wrap {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    padding: 12px;
  }

  .record-form.guided-form .form-actions {
    position: sticky;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 45;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 -8px 28px rgba(11,45,95,0.12);
  }

  .detail-panel > .panel-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-panel > .panel-heading .table-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-grid > div {
    background: #ffffff;
  }

  .detail-section {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: #fffaf6;
  }

  .detail-section.audit-section {
    opacity: 0.55;
  }

  .compact-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-form-shell {
    padding: 8px;
  }

  .public-form-card {
    border-radius: 20px;
    padding: 14px;
  }

  .public-form-card .brand-block {
    position: sticky;
    top: 0;
    z-index: 15;
    background: rgba(255,255,255,0.96);
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--line);
  }

  .public-form-card .form-step-title {
    top: 78px;
  }

  .public-form-card .form-actions {
    position: sticky;
    bottom: 8px;
    z-index: 25;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 -8px 28px rgba(11,45,95,0.12);
  }

  .modal-card {
    max-height: 88vh;
    overflow: auto;
  }
}

@media (min-width: 761px) {
  .section-toggle {
    pointer-events: none;
  }
  .section-toggle span:last-child {
    display: none;
  }
}

/* v2.0.25 responsive app-shell refinements */
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(10, 167, 168, 0.35);
  outline-offset: 2px;
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  color: var(--primary);
  background: radial-gradient(circle at top, #f0ffff, var(--bg) 58%, #e7f0fa);
  text-align: center;
}

.app-loading img {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(11, 45, 95, 0.2);
  animation: app-loading-pulse 1.25s ease-in-out infinite alternate;
}

.app-loading span {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes app-loading-pulse {
  to { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(11, 45, 95, 0.25); }
}

.nav-label-mobile,
.mobile-only-nav,
.mobile-more-menu,
.mobile-filter-close,
.mobile-page-hint {
  display: none;
}

.empty-state {
  min-height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  text-align: center;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: #edf7fb;
  font-size: 1.45rem;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  font-weight: 500;
}

.empty-row:hover {
  background: transparent;
}

.public-request-message:empty {
  display: none;
}

.info-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--primary);
  background: #edf7fb;
  border: 1px solid #cde7ef;
}

.public-success-screen {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 34px 20px;
  text-align: center;
}

.public-success-screen .success-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(47, 109, 79, 0.24);
}

.public-success-screen p {
  margin: 0;
}

.public-success-screen button {
  min-height: 48px;
  margin-top: 12px;
}

@media (min-width: 761px) and (max-width: 1024px) {
  .nav {
    flex-wrap: wrap;
    overflow: visible;
  }

  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .dashboard-keycards,
  .dashboard-graphics,
  .attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-header-height: 70px;
  }

  body {
    overscroll-behavior-y: none;
  }

  body.mobile-menu-open::before,
  body.filter-panel-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(7, 29, 61, 0.42);
    backdrop-filter: blur(2px);
  }

  .app-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-header {
    min-height: var(--mobile-header-height);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: calc(9px + env(safe-area-inset-top, 0px)) 10px 9px;
  }

  .header-title {
    min-width: 0;
    gap: 8px;
  }

  .header-title .brand-mark.small {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
  }

  .header-title h1 {
    font-size: 1.02rem;
    white-space: nowrap;
  }

  .header-title > div:last-child {
    min-width: 0;
  }

  .header-actions {
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .compact-logout {
    display: none;
  }

  .user-menu {
    width: auto;
    min-width: 0;
  }

  .user-menu-button {
    width: auto;
    max-width: 54vw;
    min-height: 44px;
    justify-content: space-between;
    padding: 9px 10px;
  }

  .user-menu-button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-menu-panel {
    left: auto;
    right: 0;
    width: min(300px, calc(100vw - 20px));
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .nav > button[data-page="users"],
  .nav > button[data-page="activity"],
  .nav > button[data-page="conventions"],
  .nav > button[data-page="lists"] {
    display: none !important;
  }

  .nav > button[data-page="dashboard"],
  .nav > button[data-page="accommodations"],
  .nav > button[data-page="delegates"],
  .nav > .mobile-only-nav {
    display: grid;
    min-width: 0;
    width: 100%;
    place-items: center;
  }

  .nav > button[data-page="dashboard"]::before { content: '\2302'; }
  .nav > button[data-page="accommodations"]::before { content: '\25A3'; }
  .nav > button[data-page="delegates"]::before { content: '\2637'; }
  .nav > .mobile-only-nav::before { content: '\2022\2022\2022'; letter-spacing: 2px; }

  .nav-label-desktop {
    display: none;
  }

  .nav-label-mobile {
    display: inline;
  }

  .mobile-more-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    max-height: min(68dvh, 560px);
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 14px 20px;
    border: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -16px 44px rgba(7, 29, 61, 0.22);
  }

  .mobile-more-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
  }

  .mobile-more-header strong {
    color: var(--primary);
    font-size: 1.12rem;
  }

  .mobile-more-menu button {
    min-width: 0;
    min-height: 54px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--primary);
    background: #f7fbfd;
    font-size: 0.9rem;
    text-align: left;
  }

  .mobile-more-menu .mobile-more-header button {
    width: auto;
    min-height: 42px;
    flex: 0 0 auto;
  }

  .page-heading {
    top: calc(var(--mobile-header-height) + env(safe-area-inset-top, 0px));
    gap: 8px;
  }

  .page-heading p,
  .page-version {
    display: none;
  }

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

  .heading-actions > :only-child {
    grid-column: 1 / -1;
  }

  .mobile-page-hint {
    display: block;
    margin: 0;
  }

  .filter-toolbar {
    max-height: min(74dvh, 640px);
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-filter-close {
    display: block;
    order: -2;
  }

  .dashboard-keycards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-metric {
    min-width: 0;
    min-height: 118px;
    align-content: start;
  }

  .dashboard-metric small {
    display: none;
  }

  .dashboard-graphics {
    display: none;
  }

  .shortcut-grid,
  .attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .shortcut-button {
    grid-template-columns: 1fr;
    justify-items: start;
    min-width: 0;
  }

  tbody tr.clickable-row::after {
    display: none;
  }

  .empty-row {
    padding: 0;
  }

  .empty-row td::before {
    display: none;
  }

  .empty-row .empty-state {
    min-height: 190px;
  }

  .table-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-actions > :only-child {
    grid-column: 1 / -1;
  }

  input,
  select,
  textarea,
  button {
    min-height: 48px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
  }

  .check-row,
  .choice-row {
    min-height: 50px;
    align-items: center;
  }

  .form-step-title {
    position: relative !important;
    top: auto !important;
    scroll-margin-top: 150px;
    box-shadow: none;
  }

  #app-view .record-form > .form-actions:last-child {
    position: sticky;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 28px rgba(11, 45, 95, 0.14);
  }

  #app-view .record-form > .form-actions:last-child button:only-child {
    grid-column: 1 / -1;
  }

  .detail-panel > .panel-heading .table-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-section {
    scroll-margin-top: 150px;
  }

  .detail-section.audit-section {
    font-size: 0.88rem;
    opacity: 0.7;
  }

  .public-form-shell {
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(12px, env(safe-area-inset-bottom, 0px));
  }

  .public-form-card {
    width: 100%;
    max-width: calc(100vw - 16px);
    min-width: 0;
    overflow: hidden;
  }

  .public-form-card .brand-block > div,
  .public-form-card .record-form,
  .public-form-card .record-form > *,
  .public-form-card input,
  .public-form-card select,
  .public-form-card textarea {
    min-width: 0;
    max-width: 100%;
  }

  .public-form-card h1,
  .public-form-card p,
  .public-form-card label {
    overflow-wrap: anywhere;
  }

  .public-form-card .form-actions {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .public-success-screen {
    min-height: 62dvh;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: 90dvh;
    border-radius: 24px 24px 16px 16px;
  }
}

@media (max-width: 390px) {
  .header-title h1 {
    display: none;
  }

  .user-menu-button {
    max-width: 68vw;
  }

  .dashboard-metric {
    min-height: 108px;
    padding: 12px;
  }

  .dashboard-metric strong {
    font-size: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
