:root {
  --background: #f8fafc;
  --foreground: #09090b;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #eef2ff;
  --accent-foreground: #3730a3;
  --destructive: #dc2626;
  --destructive-soft: #fef2f2;
  --success: #059669;
  --success-soft: #ecfdf5;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --border: rgba(24, 24, 27, 0.1);
  --input: rgba(24, 24, 27, 0.12);
  --ring: rgba(24, 24, 27, 0.24);
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 28px 90px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--foreground);
  background:
    radial-gradient(circle at 12% 0%, rgba(99, 102, 241, 0.18), transparent 30rem),
    radial-gradient(circle at 92% 8%, rgba(14, 165, 233, 0.16), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 54%, #eef2ff 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 78%);
}

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

svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  letter-spacing: -0.055em;
}

h2,
h3 {
  letter-spacing: -0.032em;
}

p {
  color: var(--muted-foreground);
  line-height: 1.75;
}

button,
input,
textarea {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  color: var(--primary-foreground);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 760;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.secondary {
  color: var(--secondary-foreground);
  background: var(--secondary);
  border-color: var(--border);
}

.compact {
  min-height: 40px;
  padding: 9px 14px;
}

.ghost-button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--foreground);
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.36;
  pointer-events: none;
}

.ambient-one {
  top: -10rem;
  left: -7rem;
  background: #a5b4fc;
}

.ambient-two {
  right: -9rem;
  bottom: -12rem;
  background: #7dd3fc;
}

.site-shell {
  display: grid;
  place-items: center;
  padding: 46px 20px;
}

.redeem-layout {
  width: min(1320px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 90px rgba(30, 64, 175, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.hero-section,
.redeem-card,
.login-card,
.admin-sidebar,
.metric-card,
.admin-card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 26px;
  padding: clamp(34px, 4.5vw, 48px);
  box-shadow: none;
}

.hero-section::after {
  position: absolute;
  right: -92px;
  bottom: -92px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 48px;
  content: "";
  transform: rotate(18deg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.06));
}

.brand-mark,
.admin-logo-icon,
.stock-icon,
.feature-icon,
.success-orb,
.metric-icon,
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  width: 66px;
  height: 66px;
  margin: 6px 0 44px;
  border: 0;
  border-radius: 18px;
  color: #0866ff;
  background: #eaf2ff;
  box-shadow: none;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.compact-mark {
  margin-bottom: 18px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #0866ff;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-section h1 {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(46px, 5.4vw, 70px);
  line-height: 1.12;
}

.hero-copy {
  max-width: 460px;
  margin-top: 28px;
  color: #53627c;
  font-size: 17px;
  font-weight: 520;
  line-height: 1.8;
}

.stock-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 58px;
  padding: 24px 28px;
  border: 1px solid #dfe7f2;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86));
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
}

.stock-card span,
.metric-card span,
.sidebar-note span,
.result-meta span,
.form-help,
.feature-item span {
  color: var(--muted-foreground);
  font-size: 13px;
}

.stock-card strong {
  display: block;
  margin-top: 0;
  color: #0866ff;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stock-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #5b6a84;
  font-size: 16px;
  font-weight: 760;
}

.stock-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #0866ff;
}

.stock-file-icon svg {
  width: 24px;
  height: 24px;
}

.stock-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #059669;
  background: var(--success-soft);
}

.stock-icon svg {
  width: 27px;
  height: 27px;
}

.feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #3730a3;
  background: var(--accent);
}

.feature-item strong {
  display: block;
  margin-bottom: 2px;
}

.redeem-card {
  min-height: 620px;
  border-radius: 26px;
  padding: 34px;
  box-shadow: none;
}

.redeem-card > h2 {
  margin-bottom: 22px;
  font-size: 26px;
  line-height: 1.1;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid #d6e0ed;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.tab-button {
  min-height: 50px;
  border-radius: 0;
  color: #0f172a;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-size: 16px;
}

.tab-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1682ff, #075cff);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

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

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

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

.card-heading h2 {
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 34px);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-foreground);
  background: var(--accent);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

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

label {
  color: var(--foreground);
  font-size: 16px;
  font-weight: 760;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea {
  width: 100%;
  border: 1px solid #d6e0ed;
  border-radius: 10px;
  padding: 15px 18px;
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="file"] {
  cursor: pointer;
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
textarea:focus {
  border-color: var(--ring);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(24, 24, 27, 0.08);
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: #64748b;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 44px;
}

.redeem-card .input-with-icon svg {
  right: 14px;
  left: auto;
}

.redeem-card .input-with-icon input {
  padding-right: 46px;
  padding-left: 18px;
}

.primary-action {
  min-height: 56px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #1682ff, #075cff);
  font-size: 17px;
  box-shadow: 0 14px 30px rgba(8, 102, 255, 0.22);
}

.support-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: #64748b;
  font-size: 15px;
  font-weight: 620;
}

.support-note svg {
  width: 22px;
  height: 22px;
  color: #0866ff;
}

.message {
  margin: 16px 0 0;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 14px;
  font-weight: 650;
}

.message.error {
  color: var(--destructive);
  background: var(--destructive-soft);
  border-color: rgba(220, 38, 38, 0.13);
}

.message.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(5, 150, 105, 0.16);
}

.message.info {
  color: var(--info);
  background: var(--info-soft);
  border-color: rgba(37, 99, 235, 0.14);
}

.result-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.result-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.result-header h3 {
  font-size: 19px;
}

.result-header p {
  font-size: 13px;
}

.success-orb {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #059669;
  background: var(--success-soft);
}

.success-orb svg {
  width: 24px;
  height: 24px;
}

.result-meta {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  gap: 10px;
}

.result-meta div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card-solid);
  overflow-wrap: anywhere;
}

.result-meta div:last-child {
  grid-column: 1 / -1;
}

.result-meta strong {
  font-size: 14px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

pre {
  max-height: 310px;
  overflow: auto;
  margin: 10px 0 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: #dbeafe;
  background: #09090b;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-help {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-page {
  min-height: 100vh;
  padding: 0;
  background: #f8fbff;
}

.admin-page::before {
  display: none;
}

.admin-global-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 30px;
  border-bottom: 1px solid #e5edf7;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #111827;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.admin-brand-icon,
.admin-avatar,
.admin-upload-icon,
.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #1682ff, #075cff);
}

.admin-brand-icon svg {
  width: 20px;
  height: 20px;
}

.admin-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0f172a;
}

.admin-user-menu > div {
  display: grid;
  gap: 2px;
}

.admin-user-menu strong {
  font-size: 14px;
}

.admin-user-menu span {
  color: #64748b;
  font-size: 12px;
}

.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #475569;
  background: #eaf2ff;
}

.admin-avatar svg {
  width: 25px;
  height: 25px;
}

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

.admin-sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  border-right: 1px solid #e5edf7;
  background: rgba(255, 255, 255, 0.72);
}

.admin-nav {
  display: grid;
  gap: 12px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  color: #475569;
  font-size: 15px;
  font-weight: 760;
}

.admin-nav a svg {
  width: 22px;
  height: 22px;
}

.admin-nav a.active,
.admin-nav a:hover {
  color: #0866ff;
  background: #eaf2ff;
}

.collapse-button {
  justify-content: flex-start;
  margin-top: auto;
  min-height: 40px;
  padding: 0 18px;
  color: #475569;
  background: transparent;
  box-shadow: none;
}

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

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

.admin-title-row h1 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.admin-title-row p {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}

.admin-title-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  color: #0866ff;
  background: #fff;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

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

.metric-card {
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.04);
}

.metric-card > div:last-child {
  display: grid;
  gap: 5px;
}

.metric-card span {
  color: #334155;
  font-size: 14px;
  font-weight: 680;
}

.metric-card strong {
  color: #111827;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.metric-card small {
  color: #16a34a;
  font-size: 13px;
}

.metric-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.metric-icon svg {
  width: 30px;
  height: 30px;
}

.metric-icon.blue {
  color: #0866ff;
  background: #eaf2ff;
}

.metric-icon.emerald {
  color: #16a34a;
  background: #dcfce7;
}

.metric-icon.violet {
  color: #7c3aed;
  background: #f0e7ff;
}

.metric-icon.amber {
  color: #f59e0b;
  background: #fef3c7;
}

.admin-work-grid,
.admin-lower-grid,
.admin-quick-grid,
.admin-single-column {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.admin-work-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.admin-lower-grid {
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: stretch;
}

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

.admin-single-column {
  grid-template-columns: minmax(0, 1fr);
}

.admin-card {
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.04);
}

.quick-entry-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  padding: 22px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-entry-card:hover {
  border-color: #b8d5ff;
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(8, 102, 255, 0.10);
}

.quick-entry-card div {
  display: grid;
  gap: 6px;
}

.quick-entry-card strong {
  color: #111827;
  font-size: 17px;
}

.quick-entry-card span:last-child {
  color: #64748b;
  font-size: 13px;
}

.admin-card h2 {
  margin-bottom: 18px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.admin-card p {
  margin: -8px 0 20px;
  color: #64748b;
  font-size: 14px;
}

.admin-number-field {
  position: relative;
}

.admin-number-field input {
  height: 48px;
  padding-right: 42px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
}

.admin-number-field span {
  position: absolute;
  right: 16px;
  top: 50%;
  color: #64748b;
  transform: translateY(-50%);
}

.admin-primary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #1682ff, #075cff);
  box-shadow: 0 12px 24px rgba(8, 102, 255, 0.18);
}

.admin-secondary-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  color: #0866ff;
  font-size: 14px;
  font-weight: 760;
}

.admin-upload-zone {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 128px;
  padding: 20px;
  border: 1px dashed #b8c7da;
  border-radius: 10px;
  color: #0f172a;
  background: #fbfdff;
  text-align: center;
  cursor: pointer;
}

.admin-upload-zone input {
  width: min(100%, 240px);
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.admin-upload-zone span:last-child {
  color: #64748b;
  font-size: 13px;
}

.admin-upload-icon {
  width: 38px;
  height: 38px;
  color: #0866ff;
}

.admin-upload-icon svg {
  width: 34px;
  height: 34px;
}

.admin-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-card-toolbar h2 {
  margin: 0;
}

.log-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.log-filters span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  color: #64748b;
  background: #fff;
  font-size: 13px;
}

.log-summary {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.admin-icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  box-shadow: none;
}

.log-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5edf7;
  border-radius: 10px;
}

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.admin-log-table th,
.admin-log-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5edf7;
  color: #334155;
  text-align: left;
  white-space: nowrap;
}

.admin-log-table th {
  color: #475569;
  background: #f8fafc;
  font-weight: 780;
}

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

.admin-log-table a {
  color: #0866ff;
  font-weight: 760;
}

.mono-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.truncate-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-cell {
  color: #64748b;
  text-align: center !important;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  font-weight: 760;
}

.status-pill.success {
  color: #16a34a;
  background: #dcfce7;
}

.status-pill.processing {
  color: #2563eb;
  background: #dbeafe;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #64748b;
  font-size: 13px;
}

.admin-pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 7px;
  color: #334155;
  background: #fff;
  border-color: transparent;
  box-shadow: none;
}

.page-button.active {
  color: #0866ff;
  border-color: #0866ff;
}

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

.activity-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.activity-list strong {
  display: block;
  color: #334155;
  font-size: 14px;
}

.activity-list small,
.activity-list time {
  color: #64748b;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
}

.dot.green {
  background: #16a34a;
}

.dot.blue {
  background: #0866ff;
}

.dot.purple {
  background: #7c3aed;
}

.dot.orange {
  background: #f97316;
}

.activity-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e5edf7;
  color: #0866ff;
  font-size: 14px;
  font-weight: 760;
}

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

.inventory-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e5edf7;
}

.inventory-list > div:last-child {
  border-bottom: 0;
}

.inventory-list span {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.inventory-list strong {
  color: #111827;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.inventory-list a {
  color: #0866ff;
  font-size: 14px;
  font-weight: 760;
}

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

.admin-login-page {
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-card {
  width: min(460px, 100%);
  border-radius: 32px;
  padding: 30px;
}

.login-card h1 {
  margin-top: 8px;
  font-size: 38px;
  line-height: 1;
}

.login-card p {
  margin: 12px 0 22px;
}

.back-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 700;
}

body.admin-page .admin-quick-grid,
body.admin-page .admin-lower-grid,
body.admin-page .admin-single-column,
body.admin-page .inventory-list {
  display: grid;
}

body.admin-page .admin-quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-page .admin-lower-grid {
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: stretch;
}

body.admin-page .admin-single-column {
  grid-template-columns: minmax(0, 1fr);
}

body.admin-page .quick-entry-card {
  display: flex;
  align-items: center;
}

body.admin-page .inventory-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

@media (max-width: 1060px) {
  .redeem-layout {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e5edf7;
  }

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

  .collapse-button {
    display: none;
  }

  .admin-work-grid,
  .admin-lower-grid,
  .admin-quick-grid {
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-lower-grid,
  body.admin-page .admin-quick-grid {
    grid-template-columns: 1fr;
  }

  .hero-section,
  .redeem-card {
    min-height: auto;
  }

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

@media (max-width: 680px) {
  .site-shell,
  .admin-page {
    padding: 12px;
  }

  .hero-section,
  .redeem-card,
  .login-card {
    border-radius: 26px;
  }

  .hero-section {
    padding: 28px;
  }

  .redeem-card {
    padding: 12px;
  }

  .tabs,
  .metrics-grid,
  .admin-nav {
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-quick-grid,
  body.admin-page .admin-lower-grid {
    grid-template-columns: 1fr;
  }

  .admin-global-header,
  .admin-card-toolbar,
  .admin-title-row,
  .stock-card,
  .card-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-global-header {
    height: auto;
    padding: 16px;
  }

  .admin-main {
    padding: 18px 14px 28px;
  }

  .admin-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-meta {
    grid-template-columns: 1fr;
  }

  .result-meta div:last-child {
    grid-column: auto;
  }

  .form-help {
    display: grid;
  }
}
