:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --canvas: #f3f6fb;
  --brand: #5855d6;
  --brand-dark: #3f3ba8;
  --brand-soft: #efefff;
  --green: #0f9f77;
  --green-dark: #087857;
  --green-soft: #e7f8f1;
  --amber: #b7791f;
  --amber-soft: #fff7df;
  --red: #c2415a;
  --red-soft: #fff0f3;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-md: 0 12px 30px rgb(15 23 42 / 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  font-family:
    'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  cursor: pointer;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(88 85 214 / 0.35);
  outline-offset: 2px;
}

.boot-screen,
.noscript-message {
  display: grid;
  min-height: 100vh;
  place-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.boot-screen p,
.noscript-message p {
  margin: 0;
  color: var(--muted);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #7775f1, #4b46c1);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: 0 6px 14px rgb(79 70 229 / 0.22);
}

.brand-mark-large {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 18px;
  font-size: 21px;
}

.landing-page {
  min-height: 100vh;
  padding: 24px;
}

.landing-frame {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.landing-topbar,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-topbar {
  min-height: 54px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-lockup strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-lockup small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.demo-badge,
.status-badge,
.scope-badge,
.type-badge,
.role-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
  white-space: nowrap;
}

.demo-badge {
  border: 1px solid #d9d7ff;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.demo-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: '';
}

.landing-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.landing-note::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: '';
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 26px;
  align-items: center;
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid #dfe2ff;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgb(130 126 244 / 0.24), transparent 38%),
    linear-gradient(135deg, #fdfdff 0%, #f2f2ff 58%, #f7fffc 100%);
  box-shadow: var(--shadow-md);
}

.landing-hero::after {
  position: absolute;
  right: 8%;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border: 28px solid rgb(15 159 119 / 0.08);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.eyebrow,
.page-eyebrow {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #20225a;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.landing-hero h1 span {
  color: var(--green-dark);
}

.landing-hero p {
  max-width: 610px;
  margin: 19px 0 0;
  color: #5d6680;
  font-size: 15px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 6px 10px;
  border: 1px solid #dce0fa;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.74);
  color: #505878;
  font-size: 12px;
}

.hero-preview {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(100%, 330px);
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 0.85);
  border-radius: 18px;
  background: rgb(255 255 255 / 0.86);
  box-shadow: 0 14px 32px rgb(70 64 162 / 0.11);
}

.preview-window-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 16px;
}

.preview-window-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d7d9ef;
}

.preview-window-bar i:first-child {
  background: #aaa7ef;
}

.preview-label {
  color: var(--muted);
  font-size: 11px;
}

.preview-coupon {
  margin-top: 10px;
  padding: 15px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f0efff, #effcf7);
}

.preview-coupon strong {
  display: block;
  margin-top: 8px;
  color: #24235f;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.preview-coupon small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.preview-code {
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed #d5d5ed;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-align: center;
}

.role-section {
  margin-top: 38px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: #26324a;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.role-card {
  display: flex;
  min-height: 185px;
  flex-direction: column;
  align-items: flex-start;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.role-card:hover {
  transform: translateY(-3px);
  border-color: #b8b6f1;
  box-shadow: 0 12px 24px rgb(15 23 42 / 0.09);
}

.role-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 16px;
}

.role-card:nth-child(2) .role-icon,
.role-card:nth-child(4) .role-icon {
  background: var(--green-soft);
  color: var(--green-dark);
}

.role-card:nth-child(3) .role-icon {
  background: #fff4e8;
  color: #a95b0c;
}

.role-card:nth-child(5) .role-icon {
  background: #eaf2ff;
  color: #3e67a6;
}

.role-card h3 {
  margin: 14px 0 2px;
  font-size: 15px;
}

.role-card small {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}

.role-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.role-card .arrow-label {
  margin-top: auto;
  padding-top: 12px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 750;
}

.role-card .arrow-label::after {
  margin-left: 5px;
  content: '→';
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  padding: 12px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.94);
  box-shadow: 0 2px 14px rgb(15 23 42 / 0.035);
  backdrop-filter: blur(12px);
}

.topbar .brand-lockup strong {
  font-size: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.current-user {
  display: grid;
  max-width: 210px;
  text-align: right;
}

.current-user strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-user small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-switch,
.reset-button,
.secondary-button,
.primary-button,
.quiet-button,
.danger-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.role-switch {
  max-width: 170px;
  padding: 0 31px 0 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.role-switch:hover,
.secondary-button:hover,
.quiet-button:hover {
  border-color: #aaa8e7;
  background: #fafaff;
}

.reset-button,
.quiet-button {
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #465269;
}

.reset-button:hover {
  border-color: #e0a0ac;
  background: var(--red-soft);
  color: var(--red);
}

.primary-button {
  padding: 0 17px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 12px rgb(88 85 214 / 0.18);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

.secondary-button {
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.danger-button {
  padding: 0 14px;
  border: 1px solid #efc0ca;
  background: var(--red-soft);
  color: var(--red);
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.demo-banner {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 16px;
  border-bottom: 1px solid #d4e8e1;
  background: #effaf6;
  color: #276c59;
  font-size: 11px;
  text-align: center;
}

.demo-banner strong {
  font-weight: 850;
}

.demo-banner span:last-child {
  color: #558477;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 16px 24px;
  border-right: 1px solid var(--line);
  background: #fbfcff;
}

.sidebar-role {
  padding: 14px;
  border: 1px solid #e1e3ff;
  border-radius: 13px;
  background: var(--brand-soft);
}

.sidebar-role .role-badge {
  border: 1px solid #d5d3ff;
  background: #fff;
  color: var(--brand-dark);
}

.sidebar-role strong {
  display: block;
  margin-top: 9px;
  color: #2d2d75;
  font-size: 14px;
}

.sidebar-role small {
  display: block;
  margin-top: 1px;
  color: #6f7291;
  font-size: 11px;
}

.sidebar-section-label {
  margin: 0 10px 7px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.sidebar-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #5d6a80;
  font-size: 12px;
  font-weight: 650;
}

.sidebar-link:hover {
  background: #f2f3ff;
  color: var(--brand-dark);
}

.sidebar-link.active {
  border-color: #dedcff;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.sidebar-link-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: #eef1f7;
  color: #65738d;
  font-size: 12px;
}

.sidebar-link.active .sidebar-link-icon {
  background: #fff;
  color: var(--brand);
}

.sidebar-divider {
  height: 1px;
  margin: auto 10px 0;
  background: var(--line);
}

.sidebar-bottom {
  display: grid;
  gap: 9px;
  padding: 0 10px;
}

.sidebar-bottom a {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-bottom a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.main-content {
  min-width: 0;
  padding: 32px clamp(18px, 4vw, 54px) 58px;
}

.content-frame {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
  color: var(--subtle);
  font-size: 11px;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #c1c8d4;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
}

.page-heading-copy {
  min-width: 0;
}

.page-heading h1 {
  margin: 0;
  color: #1d293b;
  font-size: clamp(24px, 3vw, 31px);
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.page-heading-description {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-heading-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #dddfff;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 94% -20%, rgb(111 109 229 / 0.2), transparent 35%),
    linear-gradient(135deg, #fff 0%, #f7f7ff 60%, #f1fbf8 100%);
  box-shadow: var(--shadow-sm);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card::after {
  position: absolute;
  right: 8%;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 25px solid rgb(15 159 119 / 0.07);
  border-radius: 50%;
  content: '';
}

.hero-card h2 {
  max-width: 740px;
  margin: 0;
  color: #282866;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.3;
}

.hero-card p {
  max-width: 650px;
  margin: 9px 0 0;
  color: #657087;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.hero-meta span {
  padding: 5px 9px;
  border: 1px solid #e0e2f5;
  border-radius: 7px;
  background: rgb(255 255 255 / 0.72);
  color: #5c6680;
  font-size: 11px;
}

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

.stat-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.stat-card-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
}

.stat-card:nth-child(2) .stat-card-icon {
  background: var(--green-soft);
  color: var(--green-dark);
}

.stat-card:nth-child(3) .stat-card-icon {
  background: #fff4e8;
  color: #a95b0c;
}

.stat-card:nth-child(4) .stat-card-icon {
  background: #eaf2ff;
  color: #3e67a6;
}

.stat-card-value {
  margin-top: 10px;
  color: #26324a;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.stat-card-value small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.stat-card-note {
  margin-top: 7px;
  color: var(--subtle);
  font-size: 10px;
}

.two-column,
.three-column {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.two-column {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

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

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  color: #2b374d;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-link {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 750;
}

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

.quick-grid {
  display: grid;
  gap: 9px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: var(--surface-soft);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.quick-link:hover {
  border-color: #d6d4ff;
  background: #fafaff;
}

.quick-link-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.quick-link strong {
  display: block;
  color: #344057;
  font-size: 12px;
}

.quick-link small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.quick-link::after {
  margin-left: auto;
  color: var(--subtle);
  content: '›';
  font-size: 18px;
}

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

.coupon-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.coupon-card:hover {
  transform: translateY(-1px);
  border-color: #c9c7f8;
  box-shadow: 0 7px 18px rgb(15 23 42 / 0.07);
}

.coupon-card-top,
.coupon-card-footer,
.list-row,
.store-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.coupon-card-main {
  min-width: 0;
}

.coupon-merchant {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.coupon-card h3 {
  margin: 3px 0 0;
  color: #26324a;
  font-size: 17px;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.coupon-card-description {
  margin: 5px 0 0;
  color: #5e6b80;
  font-size: 12px;
}

.coupon-benefit {
  min-width: 122px;
  padding: 9px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f0efff, #f2fffa);
  color: var(--brand-dark);
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.25;
  text-align: center;
}

.coupon-card-footer {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #eef1f5;
}

.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  color: var(--muted);
  font-size: 10px;
}

.coupon-meta span::before {
  margin-right: 4px;
  color: var(--subtle);
  content: '•';
}

.coupon-link-label {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.coupon-link-label::after {
  margin-left: 5px;
  content: '→';
}

.status-badge.available,
.status-chip.active {
  border: 1px solid #bfe9d9;
  background: var(--green-soft);
  color: var(--green-dark);
}

.status-badge.used,
.status-chip.used {
  border: 1px solid #d5d8df;
  background: #f1f3f6;
  color: #667085;
}

.status-badge.pending,
.status-chip.pending {
  border: 1px solid #f3d69d;
  background: var(--amber-soft);
  color: #9b6418;
}

.scope-badge.common {
  border: 1px solid #d7d6ff;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.scope-badge.limited {
  border: 1px solid #f0d5b5;
  background: #fff4e8;
  color: #a95b0c;
}

.type-badge {
  border: 1px solid #dce2ea;
  background: #f8fafc;
  color: #66758b;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.filter-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: #c8c5f6;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  gap: 18px;
}

.coupon-detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.coupon-detail-hero {
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 96% 2%, rgb(111 109 229 / 0.2), transparent 35%),
    linear-gradient(135deg, #f8f7ff, #f1fff9);
}

.coupon-detail-hero h2 {
  margin: 13px 0 0;
  color: #272763;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -0.06em;
  line-height: 1.2;
}

.coupon-detail-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #667087;
  font-size: 13px;
}

.detail-benefit {
  display: inline-block;
  margin-top: 19px;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.detail-body {
  padding: 22px;
}

.detail-section + .detail-section {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 12px;
  color: #334056;
  font-size: 13px;
}

.detail-grid,
.definition-list {
  display: grid;
  gap: 9px 18px;
}

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

.definition-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
}

.definition-row:last-child {
  border-bottom: 0;
}

.definition-row dt {
  color: var(--muted);
  font-size: 11px;
}

.definition-row dd {
  margin: 0;
  color: #354157;
  font-size: 12px;
  font-weight: 650;
}

.action-panel {
  padding: 21px;
  border: 1px solid #dce0ff;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fafaff, #f2fff9);
  box-shadow: var(--shadow-sm);
}

.action-panel h2 {
  margin: 0;
  color: #303272;
  font-size: 16px;
}

.action-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.action-panel .primary-button,
.action-panel .secondary-button,
.action-panel .quiet-button {
  width: 100%;
  margin-top: 15px;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 8px;
  color: #536077;
  font-size: 11px;
}

.check-list li::before {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  content: '✓';
  font-size: 10px;
  font-weight: 900;
}

.flow-steps {
  display: grid;
  gap: 11px;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.flow-number {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 850;
}

.flow-step strong {
  display: block;
  color: #354157;
  font-size: 12px;
}

.flow-step p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.success-panel,
.info-panel,
.warning-panel,
.empty-state {
  padding: 22px;
  border-radius: var(--radius-md);
}

.success-panel {
  border: 1px solid #bee8d8;
  background: var(--green-soft);
}

.info-panel {
  border: 1px solid #d7d6ff;
  background: var(--brand-soft);
}

.warning-panel {
  border: 1px solid #f0d39d;
  background: var(--amber-soft);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  background: var(--surface-soft);
  text-align: center;
}

.success-panel h2,
.info-panel h2,
.warning-panel h2,
.empty-state h2 {
  margin: 0;
  color: #334056;
  font-size: 17px;
}

.success-panel p,
.info-panel p,
.warning-panel p,
.empty-state p {
  margin: 7px 0 0;
  color: #5f6c80;
  font-size: 12px;
}

.success-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: #c8f0df;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 900;
}

.receipt-code {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed #b8daca;
  border-radius: 11px;
  background: #fff;
  color: #1c6c53;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.receipt-code small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
}

.receipt-code-button {
  width: 100%;
  margin-top: 8px;
}

.fake-qr {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 2px;
  width: 126px;
  height: 126px;
  margin: 19px auto 0;
  padding: 7px;
  border: 1px solid #d9e7df;
  border-radius: 8px;
  background: #fff;
}

.fake-qr span {
  border-radius: 1px;
  background: #e6f2ed;
}

.fake-qr span.on {
  background: #214c3e;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #eef1f4;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #fafbfc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  color: #526077;
  font-size: 12px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td strong {
  display: block;
  color: #344057;
  font-size: 12px;
}

.data-table td small {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 10px;
}

.data-table a {
  color: var(--brand-dark);
  font-weight: 750;
}

.data-table a:hover {
  text-decoration: underline;
}

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

.store-card,
.entity-card {
  display: block;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.store-card:hover,
.entity-card:hover {
  transform: translateY(-1px);
  border-color: #cac8f8;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.07);
}

.store-card h3,
.entity-card h3 {
  margin: 10px 0 0;
  color: #344057;
  font-size: 15px;
}

.store-card p,
.entity-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.store-card-footer,
.entity-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid #eef1f4;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 750;
}

.store-card-footer span:last-child,
.entity-card-footer span:last-child {
  color: var(--subtle);
  font-weight: 600;
}

.form-grid {
  display: grid;
  gap: 13px;
}

.form-label {
  display: grid;
  gap: 6px;
  color: #48566c;
  font-size: 11px;
  font-weight: 750;
}

.form-label input,
.form-label select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.form-label input::placeholder {
  color: #a3adbc;
}

.form-help {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.invite-list,
.activity-list {
  display: grid;
  gap: 0;
}

.activity-item,
.invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f4;
}

.activity-item:first-child,
.invite-item:first-child {
  padding-top: 0;
}

.activity-item:last-child,
.invite-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
}

.activity-copy,
.invite-copy {
  min-width: 0;
  flex: 1;
}

.activity-copy strong,
.invite-copy strong {
  display: block;
  overflow: hidden;
  color: #354157;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy small,
.invite-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time,
.invite-time {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 10px;
  text-align: right;
}

.bar-chart {
  display: flex;
  height: 146px;
  align-items: end;
  gap: 12px;
  padding: 10px 4px 0;
  border-bottom: 1px solid var(--line);
}

.bar-column {
  display: grid;
  flex: 1;
  height: 100%;
  align-content: end;
  gap: 6px;
  text-align: center;
}

.bar-column i {
  display: block;
  width: min(34px, 70%);
  min-height: 8px;
  margin: 0 auto;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #7a77ed, #aeacf9);
}

.bar-column:nth-child(2n) i {
  background: linear-gradient(180deg, #4fc69e, #a9e9cf);
}

.bar-column strong {
  color: #69768c;
  font-size: 10px;
}

.bar-column small {
  color: var(--subtle);
  font-size: 9px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.legend-swatch.common {
  background: var(--brand);
}

.legend-swatch.limited {
  background: #e5a35b;
}

.redeem-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.redeem-form-panel {
  padding: 24px;
  border: 1px solid #dce0ff;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fafaff, #f4fffb);
  box-shadow: var(--shadow-sm);
}

.redeem-form-panel h2 {
  margin: 0;
  color: #2d3273;
  font-size: 19px;
}

.redeem-form-panel > p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.demo-code-hint {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed #cfd3f2;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.68);
  color: #66718a;
  font-size: 10px;
}

.demo-code-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #444c70;
  font-size: 11px;
}

.role-detail-card {
  display: grid;
  gap: 16px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.role-detail-card h2 {
  margin: 0;
  color: #334056;
  font-size: 17px;
}

.role-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 18px minmax(0, 1fr);
  gap: 11px;
  min-height: 52px;
}

.timeline-item:not(:last-child)::after {
  position: absolute;
  top: 21px;
  left: 100px;
  bottom: -2px;
  width: 1px;
  background: #dce3eb;
  content: '';
}

.timeline-time {
  color: var(--subtle);
  font-size: 10px;
  text-align: right;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 3px solid #e1e0ff;
  border-radius: 50%;
  background: var(--brand);
}

.timeline-copy strong {
  display: block;
  color: #39455b;
  font-size: 12px;
}

.timeline-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid #cfd1f8;
  border-radius: 10px;
  background: #29276a;
  color: #fff;
  box-shadow: 0 12px 26px rgb(15 23 42 / 0.18);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

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

.muted-copy {
  color: var(--muted);
  font-size: 12px;
}

.text-link {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 750;
}

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

.stack {
  display: grid;
  gap: 16px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.no-margin {
  margin: 0;
}

@media (max-width: 1080px) {
  .role-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-card {
    min-height: 165px;
  }

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

  .sidebar {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 850px) {
  .landing-hero,
  .detail-layout,
  .two-column,
  .redeem-layout {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    justify-self: start;
  }

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

  .three-column {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    display: block;
    padding: 13px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-role {
    display: inline-block;
    width: 100%;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 2px;
  }

  .sidebar-section-label,
  .sidebar-divider,
  .sidebar-bottom {
    display: none;
  }

  .sidebar-link {
    min-width: max-content;
    min-height: 35px;
    padding: 5px 9px;
  }

  .sidebar-link-icon {
    width: 20px;
    height: 20px;
  }

  .main-content {
    padding-top: 23px;
  }
}

@media (max-width: 640px) {
  .landing-page {
    padding: 15px;
  }

  .landing-topbar,
  .topbar,
  .page-heading,
  .coupon-card-top,
  .coupon-card-footer {
    align-items: flex-start;
  }

  .landing-topbar {
    align-items: center;
  }

  .landing-note {
    display: none;
  }

  .landing-hero {
    gap: 20px;
    margin-top: 18px;
    padding: 23px;
    border-radius: 21px;
  }

  .landing-hero h1 {
    font-size: 31px;
  }

  .landing-hero p {
    font-size: 13px;
  }

  .role-section {
    margin-top: 27px;
  }

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

  .role-card {
    min-height: 182px;
    padding: 14px;
  }

  .role-card h3 {
    font-size: 13px;
  }

  .role-card p {
    font-size: 11px;
  }

  .topbar {
    min-height: 58px;
    padding: 9px 13px;
  }

  .topbar .brand-lockup small,
  .current-user,
  .topbar .reset-button {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .role-switch {
    max-width: 145px;
    min-height: 34px;
    font-size: 11px;
  }

  .demo-banner {
    flex-wrap: wrap;
    gap: 2px 7px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .main-content {
    padding: 20px 13px 40px;
  }

  .breadcrumb {
    margin-bottom: 13px;
  }

  .page-heading {
    display: block;
    margin-bottom: 18px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-heading-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .stats-grid {
    gap: 8px;
    margin-top: 13px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card-value {
    font-size: 23px;
  }

  .two-column,
  .three-column {
    gap: 12px;
    margin-top: 13px;
  }

  .panel,
  .role-detail-card,
  .redeem-form-panel {
    padding: 16px;
  }

  .coupon-card {
    padding: 14px;
  }

  .coupon-card-top {
    display: block;
  }

  .coupon-benefit {
    display: inline-block;
    min-width: 0;
    margin-top: 12px;
    padding: 7px 10px;
    font-size: 17px;
  }

  .coupon-card-footer {
    display: block;
  }

  .coupon-link-label {
    display: inline-block;
    margin-top: 10px;
  }

  .detail-grid,
  .store-grid,
  .entity-grid {
    grid-template-columns: 1fr;
  }

  .coupon-detail-hero {
    padding: 22px 18px;
  }

  .coupon-detail-hero h2 {
    font-size: 29px;
  }

  .detail-body {
    padding: 17px;
  }

  .definition-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .timeline-item {
    grid-template-columns: 70px 17px minmax(0, 1fr);
  }

  .timeline-item:not(:last-child)::after {
    left: 76px;
  }
}

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

  .role-card {
    min-height: 0;
  }

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

  .hero-meta span {
    font-size: 10px;
  }
}
