:root {
  --bg: #edf3fb;
  --bg-soft: #e4edf8;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(19, 63, 120, 0.1);
  --panel-line: rgba(19, 63, 120, 0.08);
  --text: #17304d;
  --muted: #6a82a3;
  --primary: #206eff;
  --primary-strong: #0f56d8;
  --primary-soft: rgba(32, 110, 255, 0.1);
  --primary-glow: rgba(32, 110, 255, 0.22);
  --success: #1f9b6e;
  --success-soft: rgba(31, 155, 110, 0.12);
  --warning: #b67c1a;
  --warning-soft: rgba(182, 124, 26, 0.14);
  --danger: #df4a63;
  --danger-soft: rgba(223, 74, 99, 0.14);
  --sidebar: linear-gradient(180deg, #132d4c 0%, #10253f 52%, #0c1e33 100%);
  --shadow: 0 26px 60px rgba(19, 55, 104, 0.12);
  --shadow-soft: 0 14px 30px rgba(23, 52, 94, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-stack: "SF Pro Display", "SF Pro SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(32, 110, 255, 0.16), transparent 24%),
    radial-gradient(circle at 16% 14%, rgba(63, 183, 255, 0.14), transparent 20%),
    radial-gradient(circle at bottom left, rgba(16, 108, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #f3f7fc 0%, var(--bg) 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: auto;
  z-index: -1;
}

body::before {
  top: 0;
  right: 0;
  width: min(32vw, 420px);
  height: min(32vw, 420px);
  background: radial-gradient(circle, rgba(32, 110, 255, 0.16), transparent 68%);
}

body::after {
  left: -120px;
  bottom: -140px;
  width: min(34vw, 460px);
  height: min(34vw, 460px);
  background: radial-gradient(circle, rgba(42, 174, 255, 0.12), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  min-height: 100vh;
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #ecf3ff;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  z-index: 20;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 14px 16px auto;
  height: 180px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(111, 188, 255, 0.22), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.brand,
.sidebar-note,
.nav,
.sidebar-foot {
  position: relative;
  z-index: 1;
}

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

.brand-badge,
.login-badge {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight:600;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #59c0ff 0%, #206eff 100%);
  box-shadow: 0 16px 34px rgba(32, 110, 255, 0.3);
}

.brand-title {
  font-size: 20px;
  font-weight:600;
}

.brand-subtitle,
.page-subtitle,
.mini-meta,
.form-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.brand-subtitle {
  color: rgba(236, 243, 255, 0.68);
}

.sidebar-note {
  display: grid;
  gap: 6px;
  padding: 16px 16px 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-note strong {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-note span {
  color: rgba(236, 243, 255, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

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

.nav-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  color: rgba(236, 243, 255, 0.74);
  font-weight:600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-item:hover,
.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar-foot {
  margin-top: auto;
}

.logout {
  margin: 0;
}

.main {
  min-height: 100vh;
  margin-left: 292px;
  padding: 30px 30px 42px;
}

.main-shell {
  width: 100%;
  max-width: 1360px;
}

.content-stack {
  display: grid;
  gap: 24px;
}

.page-header {
  margin-bottom: 24px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 110, 255, 0.12);
  color: var(--primary);
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin-top: 14px;
  font-size: 28px;
  font-weight:600;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin-top: 10px;
  max-width: 760px;
  font-size: 15px;
}

.hero-panel,
.card,
.stat-card,
.login-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: fade-up 0.45s ease both;
}

.hero-panel,
.card,
.stat-card {
  position: relative;
  overflow: hidden;
}

.hero-panel::after,
.card::after,
.stat-card::after,
.login-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -56px;
  bottom: -74px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 110, 255, 0.12), transparent 68%);
  pointer-events: none;
}

.hero-panel {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.9)),
    var(--panel);
}

.hero-copy h2 {
  margin: 10px 0 12px;
  font-size: 28px;
  line-height: 1.24;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-inline-item {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(19, 63, 120, 0.08);
  color: #335779;
  font-size: 14px;
  font-weight:600;
  box-shadow: var(--shadow-soft);
}

.hero-status-card {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.hero-status-head {
  display: grid;
  gap: 10px;
}

.hero-status-head strong {
  font-size: 15px;
}

.hero-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-status-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(241, 246, 251, 0.82);
  border: 1px solid rgba(19, 63, 120, 0.06);
}

.hero-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
}

.hero-status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.88)),
    var(--panel);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(89, 192, 255, 0.5), rgba(32, 110, 255, 0.9));
}

.stat-label {
  color: var(--muted);
  font-size: 15px;
  font-weight:600;
}

.stat-value {
  margin-top: 14px;
  font-size: 28px;
  font-weight:600;
  letter-spacing: -0.03em;
}

.stat-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.feature-grid,
.grid-2 {
  display: grid;
  gap: 20px;
}

.feature-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

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

.card {
  padding: 24px;
}

.card-accent {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(235, 246, 255, 0.94)),
    var(--panel);
}

.card-tone {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94)),
    var(--panel);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.card h3,
.card h4 {
  margin: 0;
}

.card h3 {
  font-size: 20px;
}

.card h4 {
  font-size: 15px;
}

.card-eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-body-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.surface-note {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(32, 110, 255, 0.08), rgba(19, 63, 120, 0.04));
  border: 1px solid rgba(32, 110, 255, 0.1);
}

.summary-list,
.stack-form,
.stacked-preview {
  display: grid;
  gap: 16px;
}

.summary-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-line);
}

.summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-item-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight:600;
  align-self: start;
  flex: 0 0 auto;
}

.summary-item-body {
  margin: 0;
  color: #3b5878;
  line-height: 1.8;
}

.preview-group {
  display: grid;
  gap: 8px;
}

.preview-label {
  color: var(--primary);
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: #355372;
  font-size: 15px;
  font-weight:600;
}

.field-hint {
  margin-top: -4px;
  color: rgba(90, 109, 131, 0.92);
  font-size: 13px;
  line-height: 1.7;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(19, 63, 120, 0.12);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(32, 110, 255, 0.26);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(32, 110, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(32, 110, 255, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  background: rgba(240, 245, 250, 0.95);
  cursor: not-allowed;
}

.form-grid {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight:600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2d89ff 0%, #206eff 100%);
  box-shadow: 0 14px 30px rgba(32, 110, 255, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 18px 34px rgba(32, 110, 255, 0.28);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f26e84 0%, #df4a63 100%);
  box-shadow: 0 12px 26px rgba(223, 74, 99, 0.2);
}

.btn-ghost {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(32, 110, 255, 0.12);
}

.btn-ghost:hover {
  box-shadow: 0 12px 24px rgba(32, 110, 255, 0.12);
}

.btn-small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

.preview-box,
.table-shell,
.schedule-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(19, 63, 120, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.preview-box {
  padding: 18px;
  color: #365574;
  line-height: 1.8;
  white-space: pre-line;
}

.divider {
  height: 1px;
  background: var(--panel-line);
  margin: 18px 0;
}

.table-shell {
  overflow: auto;
  padding: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-line);
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  font-size: 14px;
  font-weight:600;
}

tbody td {
  background: rgba(255, 255, 255, 0.48);
}

tbody tr:hover td {
  background: rgba(32, 110, 255, 0.05);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions-inline form {
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight:600;
}

.tag-a {
  color: var(--primary);
  background: rgba(32, 110, 255, 0.12);
}

.tag-b {
  color: var(--success);
  background: rgba(31, 155, 110, 0.12);
}

.tag-c {
  color: var(--warning);
  background: rgba(182, 124, 26, 0.12);
}

.metric-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(19, 63, 120, 0.08);
  color: #38597b;
  font-size: 13px;
  font-weight:600;
  box-shadow: var(--shadow-soft);
}

.table-link {
  color: var(--primary);
  font-weight:600;
}

.table-link:hover {
  text-decoration: underline;
}

.merchant-form-shell {
  display: block;
}

.merchant-form-main {
  gap: 18px;
}

.merchant-form-block {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: var(--shadow-soft);
}

.merchant-form-block-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.merchant-form-block-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.merchant-form-actions {
  padding-top: 4px;
}

.merchant-sort-shell {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(245, 249, 255, 0.82);
  border: 1px solid rgba(19, 63, 120, 0.08);
}

.merchant-fold-stack {
  display: grid;
  gap: 12px;
}

.merchant-fold {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.merchant-fold[open] {
  background: rgba(255, 255, 255, 0.78);
}

.merchant-fold-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.merchant-fold-summary::-webkit-details-marker {
  display: none;
}

.merchant-fold-copy {
  display: grid;
  gap: 4px;
}

.merchant-fold-copy strong {
  font-size: 15px;
  font-weight:600;
  line-height: 1.4;
}

.merchant-fold-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
  line-height: 1.6;
}

.merchant-fold-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(32, 110, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight:600;
}

.merchant-sort-fold .merchant-sort-list,
.merchant-sort-fold .merchant-empty-note,
.merchant-fold .merchant-grid,
.merchant-fold .merchant-empty-note {
  margin: 0 16px 16px;
}

.merchant-empty-note {
  box-shadow: none;
}

.merchant-sort-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.merchant-sort-head h4 {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.3;
}

.merchant-sort-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.merchant-sort-feedback {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(32, 110, 255, 0.08);
  border: 1px solid rgba(32, 110, 255, 0.12);
  color: var(--text);
  font-size: 15px;
  font-weight:600;
}

.merchant-sort-feedback.is-error {
  background: rgba(192, 54, 54, 0.08);
  border-color: rgba(192, 54, 54, 0.16);
  color: #9d1d1d;
}

.merchant-sort-list {
  display: grid;
  gap: 12px;
}

.merchant-sort-item {
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: var(--shadow-soft);
  cursor: move;
  user-select: none;
}

.merchant-sort-item.is-dragging {
  opacity: 0.42;
  transform: scale(0.99);
}

.merchant-sort-handle {
  color: var(--muted);
  font-size: 15px;
  font-weight:600;
  letter-spacing: -0.1em;
  text-align: center;
}

.merchant-sort-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(32, 110, 255, 0.08);
  color: var(--text);
  font-size: 15px;
  font-weight:600;
}

.merchant-sort-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.merchant-sort-copy strong {
  font-size: 15px;
  font-weight:600;
  line-height: 1.5;
  word-break: break-word;
}

.merchant-sort-copy span {
  color: var(--muted);
  font-size: 14px;
  font-weight:600;
  line-height: 1.6;
}

.merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(286px, 1fr));
  gap: 14px;
}

.merchant-grid[data-sort-list] {
  grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
  justify-content: start;
  align-items: start;
}

.merchant-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.82)),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: var(--shadow-soft);
  min-height: 100%;
}

.merchant-card.is-dragging {
  opacity: 0.42;
  transform: scale(0.99);
}

.merchant-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.merchant-card-head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.merchant-card-head-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.merchant-card-grip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(32, 110, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.02em;
  cursor: grab;
  user-select: none;
}

.merchant-card-time {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  line-height: 1.5;
}

.merchant-card-title {
  font-size: 15px;
  font-weight:600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.merchant-card-subtitle {
  margin-top: -4px;
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
  line-height: 1.5;
}

.merchant-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.merchant-card-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(240, 246, 252, 0.86);
  border: 1px solid rgba(19, 63, 120, 0.06);
}

.merchant-card-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
}

.merchant-card-row strong {
  font-size: 14px;
  font-weight:600;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.merchant-card-note strong {
  font-weight:600;
}

.merchant-card-actions {
  padding-top: 2px;
}

.merchant-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight:600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.merchant-status-badge.is-open {
  background: rgba(36, 149, 83, 0.12);
  border-color: rgba(36, 149, 83, 0.2);
  color: #1c7b43;
}

.merchant-status-badge.is-rest {
  background: rgba(208, 126, 32, 0.12);
  border-color: rgba(208, 126, 32, 0.2);
  color: #9a5a10;
}

.merchant-status-badge.is-unset {
  background: rgba(19, 63, 120, 0.08);
  border-color: rgba(19, 63, 120, 0.12);
  color: var(--muted);
}

.tag-editor-list,
.history-stack {
  display: grid;
  gap: 14px;
}

.tag-editor-row,
.lookup-user-card,
.history-item {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(19, 63, 120, 0.08);
  box-shadow: var(--shadow-soft);
}

.tag-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 180px 140px;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.tag-editor-stat {
  display: grid;
  gap: 8px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(240, 246, 252, 0.9);
  border: 1px solid rgba(19, 63, 120, 0.06);
}

.tag-editor-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight:600;
}

.tag-editor-stat strong {
  font-size: 20px;
  font-weight:600;
}

.tag-editor-row .btn {
  grid-column: 1 / -1;
  justify-self: end;
}

.lookup-user-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
}

.lookup-user-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.lookup-user-head h4 {
  margin: 0;
  font-size: 28px;
  line-height: 1.24;
}

.lookup-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marker-tag-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.history-item strong {
  font-size: 15px;
  line-height: 1.7;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.switch-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(244, 248, 252, 0.88);
  border: 1px solid rgba(19, 63, 120, 0.06);
}

.switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(106, 130, 163, 0.26);
  transition: 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition: 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: linear-gradient(135deg, #2d89ff 0%, #206eff 100%);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(26px);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.schedule-card {
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.schedule-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.schedule-head h4 {
  margin: 10px 0 0;
}

.slot-list {
  display: grid;
  gap: 14px;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-radius: 16px;
  background: rgba(243, 247, 251, 0.94);
  border: 1px solid rgba(19, 63, 120, 0.06);
}

.slot-row .field {
  min-width: 0;
}

.slot-row .btn {
  grid-column: 1 / -1;
  justify-self: end;
  align-self: start;
  min-width: 96px;
}

.field.compact {
  gap: 8px;
}

.flash {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight:600;
  box-shadow: var(--shadow-soft);
  animation: fade-up 0.35s ease both;
}

.flash-success {
  color: var(--success);
  background: var(--success-soft);
}

.flash-error {
  color: var(--danger);
  background: var(--danger-soft);
}

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

.login-card {
  width: min(500px, 100%);
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.92)),
    var(--panel);
}

.login-card h1 {
  margin: 18px 0 10px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.login-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.subtle-list {
  margin: 0 0 20px 18px;
  padding: 0;
  color: #486786;
  line-height: 1.8;
}

.subtle-list li + li {
  margin-top: 4px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1240px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 1180px) {
  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    width: auto;
    min-height: auto;
    padding: 16px 18px;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 30, 51, 0.94);
    backdrop-filter: blur(18px);
    overflow: visible;
  }

  .sidebar::before {
    inset: 8px 10px auto;
    height: 96px;
    border-radius: 18px;
  }

  .sidebar-note {
    display: none;
  }

  .nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    white-space: nowrap;
  }

  .sidebar-foot {
    margin-top: 0;
  }

  .main {
    margin-left: 0;
    padding: 22px 18px 34px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .card-header {
    flex-direction: column;
  }

  .metric-badges {
    justify-content: flex-start;
  }

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

  .tag-editor-row {
    grid-template-columns: 1fr;
  }

  .slot-row .btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 860px) {
  .page-title {
    font-size: 28px;
  }

  .page-subtitle {
    font-size: 15px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-status-grid,
  .stats-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .lookup-user-grid {
    grid-template-columns: 1fr;
  }

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

  .switch-field {
    align-items: flex-start;
    flex-direction: column;
  }

  .merchant-grid {
    grid-template-columns: 1fr;
  }

  .merchant-grid[data-sort-list] {
    grid-template-columns: 1fr;
  }

  .merchant-card-body {
    grid-template-columns: 1fr;
  }

  .merchant-sort-head {
    flex-direction: column;
    align-items: stretch;
  }

  .merchant-fold-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 14px;
  }

  .brand-badge,
  .login-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: 16px;
  }

  .main {
    padding: 16px 14px 26px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .page-title {
    font-size: 26px;
  }

  .hero-panel,
  .card,
  .stat-card,
  .login-card {
    border-radius: 20px;
  }

  .hero-panel,
  .card,
  .stat-card {
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }

  .hero-inline-item {
    width: 100%;
    justify-content: center;
  }

  .metric-badge {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }

  .merchant-sort-fold .merchant-sort-list,
  .merchant-sort-fold .merchant-empty-note,
  .merchant-fold .merchant-grid,
  .merchant-fold .merchant-empty-note {
    margin: 0 14px 14px;
  }

  .merchant-card-head {
    flex-direction: column;
  }

  .merchant-card-head-side {
    width: 100%;
    justify-items: start;
  }

  .merchant-card-row,
  .slot-row {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }
}

/* v1.0.26 phone sizes (generated) */
@media(max-width:760px){
.page-subtitle{font-size:16px}
.hero-copy h2{font-size:26px}
.hero-status-head strong{font-size:16px}
.hero-status-grid strong{font-size:16px}
.stat-label{font-size:16px}
.stat-value{font-size:26px}
.card h3{font-size:19px}
.card h4{font-size:16px}
.field span{font-size:16px}
.merchant-fold-copy strong{font-size:16px}
.merchant-sort-head h4{font-size:16px}
.merchant-sort-feedback{font-size:16px}
.merchant-sort-handle{font-size:16px}
.merchant-sort-index{font-size:16px}
.merchant-sort-copy strong{font-size:16px}
.merchant-card-title{font-size:16px}
.tag-editor-stat strong{font-size:19px}
.lookup-user-head h4{font-size:26px}
.history-item strong{font-size:16px}
.login-card h1{font-size:26px}
}
