/* DJAWARA voucher interface
   Shared visual language for scan, admin, and QR utility pages. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

:root {
  --color-ink: #000000;
  --color-ink-soft: #0c0c0c;
  --color-paper: #edefee;
  --color-paper-deep: #a0a0a0;
  --color-text: #1b1c1e;
  --color-text-light: #edefee;
  --color-muted: #a8aaa9;
  --color-green: #294535;
  --color-green-bright: #426a53;
  --color-gold: #c09549;
  --color-gold-deep: #957023;
  --color-line: rgb(237 238 239 / 32%);
  --color-line-soft: rgb(237 238 239 / 14%);
  --color-surface: rgb(0 0 0 / 90%);
  --color-surface-soft: rgb(12 12 12 / 88%);
  --color-danger: #ca6c66;
  --color-danger-soft: rgb(121 43 43 / 30%);
  --color-success: #8fb99c;
  --color-success-soft: rgb(41 69 53 / 52%);
  --color-warning: #d6b772;

  /* Compatibility aliases retained for the existing PHP templates. */
  --bg: var(--color-ink);
  --card: var(--color-surface);
  --accent: var(--color-gold);
  --accent-danger: var(--color-danger);
  --accent-ok: var(--color-success);
  --text-main: var(--color-text-light);
  --text-muted: var(--color-muted);

  --font-display: "Cormorant Garamond", "Iowan Old Style", Baskerville,
    "Palatino Linotype", Georgia, serif;
  --font-ui: "Inter", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --font-xs: clamp(0.7rem, 0.67rem + 0.14vw, 0.78rem);
  --font-sm: clamp(0.82rem, 0.77rem + 0.2vw, 0.94rem);
  --font-body: clamp(0.95rem, 0.9rem + 0.2vw, 1.04rem);
  --font-heading: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  --font-app-title: clamp(2.15rem, 1.8rem + 1.7vw, 3.35rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --content-gutter: clamp(1rem, 4vw, 2.5rem);
  --page-gutter: clamp(0.75rem, 4vw, 1.5rem);
  --section-space: clamp(1.25rem, 3vw, 2.25rem);
  --radius-sm: 0.15rem;
  --radius-md: 0.5rem;
  --duration-fast: 180ms;
  --duration-medium: 420ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-portal: 0 1.5rem 5rem rgb(0 0 0 / 55%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  min-height: 100%;
  background: var(--color-ink);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-ink);
  color: var(--color-text-light);
  font-family: var(--font-ui);
  font-size: var(--font-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

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

body::before {
  background: url("../img/djawara-hero.webp") 50% 50% / cover no-repeat;
  filter: saturate(0.72) contrast(1.08);
  opacity: 0.34;
  transform: scale(1.03);
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 68%), rgb(0 0 0 / 84%) 42%, rgb(0 0 0 / 94%)),
    radial-gradient(circle at 16% 8%, rgb(192 149 73 / 17%), transparent 29%),
    radial-gradient(circle at 84% 90%, rgb(41 69 53 / 30%), transparent 36%);
}

@keyframes atmosphere-drift {
  from {
    transform: scale(1.03) translate3d(-0.2%, 0, 0);
  }

  to {
    transform: scale(1.06) translate3d(0.2%, -0.35%, 0);
  }
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

::selection {
  background: var(--color-green);
  color: var(--color-text-light);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  border: 1px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-weight: 700;
  transition: transform var(--duration-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 92rem);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: var(--page-gutter);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.page-scan .page {
  width: min(100%, 47.5rem);
}

.page-tools .page {
  width: min(100%, 66rem);
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgb(41 69 53 / 10%), transparent 38%),
    var(--color-surface);
  box-shadow: var(--shadow-portal);
}

.page-scan .card,
.page-tools .card,
.login-wrap .card {
  isolation: isolate;
}

.page-scan .card::before,
.page-tools .card::before,
.login-wrap .card::before {
  position: absolute;
  top: -15rem;
  left: 50%;
  z-index: -1;
  width: min(92%, 36rem);
  height: 31rem;
  border: 1px solid rgb(192 149 73 / 17%);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

.brand-mark {
  width: clamp(3.75rem, 9vw, 4.25rem);
  height: clamp(3.75rem, 9vw, 4.25rem);
  margin: 0 auto var(--space-3);
  padding: 0.18rem;
  overflow: hidden;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 48%);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.header {
  position: relative;
  padding:
    clamp(1.35rem, 3.5vw, 2rem)
    var(--content-gutter)
    clamp(1.25rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--color-line-soft);
  text-align: center;
}

.tagline,
.eyebrow,
.field-label,
.section-label,
.filter-label,
.tag-pill,
.code-label {
  color: var(--color-gold);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.tagline,
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
}

.field-label,
.section-label,
.filter-label,
.tag-pill,
.code-label {
  font-family: var(--font-ui);
}

.title {
  margin: var(--space-2) 0 0;
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: var(--font-app-title);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}

.subtitle {
  max-width: 34rem;
  margin: var(--space-3) auto 0;
  color: rgb(237 238 239 / 72%);
  font-size: var(--font-sm);
  line-height: 1.6;
  text-wrap: balance;
}

form {
  margin: 0;
}

.page-tools .card > form {
  margin-inline: var(--content-gutter);
}

.voucher-body {
  padding: var(--space-5) var(--content-gutter) 0;
}

.voucher-body > .section-label {
  margin: 0 0 var(--space-2);
}

.voucher-body .pill-center,
.voucher-body .detail-card,
.voucher-body .section-note,
.voucher-body .msg {
  margin-right: 0;
  margin-left: 0;
}

.voucher-body .pill-center {
  width: min(100%, 36rem);
  margin-inline: auto;
  display: grid;
  gap: var(--space-3);
}

.staff-panel {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-line-soft);
  background: rgb(41 69 53 / 13%);
}

.staff-panel .section-label {
  margin-top: 0;
}

.result-actions {
  margin-top: var(--space-5);
  display: flex;
  justify-content: center;
}

.field-label,
.section-label {
  display: block;
  margin: var(--space-4) 0 var(--space-2);
  color: rgb(237 238 239 / 66%);
}

input:not([type="hidden"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: rgb(0 0 0 / 48%);
  color: var(--color-paper);
  transition:
    border-color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

input::placeholder,
textarea::placeholder {
  color: rgb(237 238 239 / 38%);
}

.voucher-code-input {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

select {
  color-scheme: dark;
}

textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.5;
}

input:not([type="hidden"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-gold);
  background: rgb(12 12 12 / 82%);
  box-shadow: 0 0 0 3px rgb(192 149 73 / 13%);
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--color-green-bright);
}

button,
a.ghost,
.go-back-btn {
  min-height: 3rem;
  padding: 0.72rem 1.2rem;
  border: 1px solid var(--color-paper);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-green);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) ease;
}

button:hover,
a.ghost:hover,
.go-back-btn:hover {
  border-color: var(--color-gold);
  background: var(--color-green-bright);
  transform: translateY(-2px);
}

button:active,
a.ghost:active,
.go-back-btn:active {
  transform: translateY(0);
}

button.secondary,
a.ghost,
.go-back-btn {
  border-color: var(--color-line);
  background: transparent;
}

button.secondary:hover,
a.ghost:hover,
.go-back-btn:hover {
  border-color: var(--color-gold);
  background: rgb(41 69 53 / 30%);
}

button.danger {
  border-color: rgb(202 108 102 / 72%);
  background: var(--color-danger-soft);
}

button.danger:hover {
  border-color: var(--color-danger);
  background: rgb(121 43 43 / 54%);
}

button.small,
a.small {
  min-height: 2.6rem;
  padding: 0.58rem 0.9rem;
  font-size: 0.82rem;
}

.field-group {
  margin-bottom: 0.75rem;
}

.pill-row,
.pill-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.pill-row {
  margin-top: var(--space-4);
}

.pill-center {
  margin: 0;
}

.pill {
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--color-line-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgb(41 69 53 / 18%);
  color: rgb(237 238 239 / 74%);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.pill-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 0.25rem rgb(192 149 73 / 10%);
}

.code-chip {
  min-width: 0;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgb(41 69 53 / 28%);
  text-align: center;
}

.code-value {
  margin-top: 0.28rem;
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.17em;
}

.status-pill {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.58rem 0.9rem;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: var(--font-sm);
  letter-spacing: 0.01em;
}

.status-ok {
  background: var(--color-success-soft);
  color: #b9d6c0;
}

.status-error,
.status-expired {
  background: var(--color-danger-soft);
  color: #e4aaa5;
}

.status-used {
  background: rgb(192 149 73 / 15%);
  color: var(--color-warning);
}

.section-selamat {
  width: 100%;
  padding-top: 0.25rem;
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 500;
  line-height: 1.12;
  text-align: center;
}

.detail-card {
  margin: var(--space-5) 0 0;
  border: 1px solid var(--color-line);
  background:
    linear-gradient(120deg, rgb(41 69 53 / 24%), transparent 58%),
    var(--color-surface-soft);
}

.voucher-details {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.72fr) minmax(0, 1.4fr);
}

.detail-label,
.detail-label-atas,
.detail-value {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-line-soft);
}

.detail-label,
.detail-label-atas {
  color: var(--color-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-value {
  border-left: 1px solid var(--color-line-soft);
  color: var(--color-paper);
  font-family: var(--font-ui);
  font-size: var(--font-sm);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.voucher-details > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.section-note {
  margin: var(--space-5) 0 0;
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--color-gold);
  background: rgb(192 149 73 / 9%);
  color: rgb(237 238 239 / 78%);
  font-size: var(--font-sm);
  letter-spacing: 0.01em;
  line-height: 1.6;
  text-align: center;
}

.page-scan form button {
  width: 100%;
}

.page-scan .spacing {
  margin-bottom: 0;
}

.msg {
  margin-top: var(--space-4);
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--color-line);
  border-left-width: 2px;
  font-size: var(--font-sm);
  line-height: 1.5;
}

.msg.error {
  border-color: rgb(202 108 102 / 52%);
  border-left-color: var(--color-danger);
  background: var(--color-danger-soft);
  color: #efc0bc;
}

.msg.success {
  border-color: rgb(143 185 156 / 48%);
  border-left-color: var(--color-success);
  background: var(--color-success-soft);
  color: #c9dfcf;
}

.page-tools .msg {
  margin-inline: var(--content-gutter);
}

.footer {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--content-gutter);
  border-top: 1px solid var(--color-line-soft);
  color: rgb(237 238 239 / 52%);
  font-size: var(--font-xs);
  letter-spacing: 0.06em;
  text-align: center;
}

.footer strong {
  color: var(--color-gold);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Admin --------------------------------------------------------------- */
.page-admin .page {
  justify-content: flex-start;
  padding-top: clamp(1rem, 3vw, 2.25rem);
  padding-bottom: clamp(1rem, 3vw, 2.25rem);
}

.login-wrap {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
}

.login-wrap .card {
  width: min(100%, 35rem);
  padding: clamp(1.15rem, 4vw, 2rem);
}

.login-wrap .card-header {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-line-soft);
  align-items: flex-start;
}

.login-wrap .card-header::before {
  width: 3rem;
  height: 3rem;
  margin-right: 0.85rem;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  flex: 0 0 auto;
  content: "";
  background: url("../img/djawara-icon.webp") 50% / cover no-repeat;
}

.login-wrap form {
  padding-top: var(--space-1);
}

.login-wrap .card-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.login-wrap .btn-row {
  justify-content: flex-end;
}

.card-header,
.top-bar,
.btn-row,
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header {
  justify-content: space-between;
}

.card-title {
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: var(--font-heading);
  font-weight: 500;
  line-height: 1.08;
}

.card-subtitle {
  margin-top: 0.25rem;
  color: rgb(237 238 239 / 58%);
  font-size: var(--font-sm);
  line-height: 1.5;
}

.tag-pill {
  min-height: 2rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgb(192 149 73 / 48%);
  flex: 0 0 auto;
  background: rgb(192 149 73 / 10%);
}

.btn-row {
  margin-top: var(--space-4);
  justify-content: space-between;
  flex-wrap: wrap;
}

.top-bar {
  min-height: 4.5rem;
  padding: 0.75rem clamp(0.9rem, 3vw, 1.5rem);
  border: 1px solid var(--color-line);
  justify-content: space-between;
  background: var(--color-surface);
  box-shadow: 0 0.8rem 2.5rem rgb(0 0 0 / 34%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand::before {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  flex: 0 0 auto;
  content: "";
  background: url("../img/djawara-icon.webp") 50% / cover no-repeat;
}

.brand strong {
  color: var(--color-paper);
  font-weight: 400;
}

.layout {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: minmax(18rem, 0.7fr) minmax(0, 1.7fr);
  gap: var(--space-4);
  align-items: start;
}

.layout > .card {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.layout > .card > .card-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line-soft);
}

.layout > .card > .card-header + form > .field-label:first-of-type {
  margin-top: 0;
}

.layout > .card:first-child {
  position: sticky;
  top: 1rem;
}

.filter-row {
  margin-top: 0;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.filter-row select {
  width: auto;
  min-width: 8.5rem;
  flex: 1 1 9rem;
}

.filter-label {
  flex: 0 0 auto;
  color: rgb(237 238 239 / 62%);
}

.form-help,
.bulk-help {
  color: var(--color-muted);
  font-size: var(--font-xs);
  line-height: 1.5;
}

.form-help {
  margin-top: var(--space-1);
}

.export-form {
  margin-bottom: var(--space-3);
}

.table-empty {
  padding: var(--space-4) var(--space-2);
  color: var(--color-muted);
  text-align: center;
}

.bulk-actions {
  margin-top: var(--space-3);
}

.table-wrap {
  width: 100%;
  max-height: min(65vh, 44rem);
  margin-top: var(--space-3);
  overflow: auto;
  border: 1px solid var(--color-line-soft);
  overscroll-behavior: contain;
  scrollbar-color: var(--color-green-bright) var(--color-ink-soft);
}

table {
  width: 100%;
  min-width: 49rem;
  border-collapse: collapse;
  font-size: var(--font-sm);
}

th,
td {
  padding: 0.78rem 0.72rem;
  border-bottom: 1px solid var(--color-line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111714;
  color: var(--color-gold);
  font-size: var(--font-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

tbody tr {
  transition: background-color var(--duration-fast) ease;
}

tbody tr:hover {
  background: rgb(41 69 53 / 20%);
}

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

.code-mono {
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chip {
  min-height: 1.6rem;
  padding: 0.25rem 0.48rem;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-type {
  color: var(--color-gold);
}

.chip-ok {
  color: var(--color-success);
}

.chip-used,
.chip-expired {
  color: var(--color-warning);
}

.chip-disabled {
  color: var(--color-danger);
}

/* Link and QR utility ------------------------------------------------- */
.page-tools .card > form {
  padding-top: var(--space-5);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.page-tools .grid .section-label {
  margin: 0 0 var(--space-2);
}

.page-tools textarea {
  min-height: 14rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.page-tools textarea[readonly] {
  background: rgb(41 69 53 / 13%);
}

.page-tools .btn-row {
  justify-content: center;
  gap: var(--space-3);
}

.hint {
  margin-top: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-line-soft);
  color: rgb(237 238 239 / 58%);
  font-size: var(--font-xs);
  line-height: 1.55;
  text-align: center;
}

.hint b {
  color: var(--color-paper);
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--color-ink);
}

@media (min-width: 42rem) {
  .page {
    padding-block: clamp(1.5rem, 4vw, 3rem);
  }

  .card,
  .top-bar {
    border-radius: var(--radius-md);
  }

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

@media (max-width: 62rem) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout > .card:first-child {
    position: static;
  }
}

@media (max-width: 40rem) {
  .page {
    padding: var(--page-gutter);
  }

  .page-admin .page {
    padding-top: var(--page-gutter);
    padding-bottom: var(--page-gutter);
  }

  .header {
    padding-inline: var(--content-gutter);
  }

  .login-wrap {
    min-height: 0;
    place-items: start stretch;
  }

  .login-wrap .tag-pill {
    display: none;
  }

  .login-wrap .btn-row button {
    width: 100%;
  }

  .voucher-details {
    grid-template-columns: 1fr;
  }

  .detail-label,
  .detail-label-atas {
    padding-bottom: var(--space-1);
    border-bottom: 0;
  }

  .detail-value {
    padding-top: 0;
    padding-bottom: var(--space-4);
    border-left: 0;
    border-bottom: 1px solid var(--color-line-soft);
  }

  .voucher-details > :last-child {
    border-bottom: 0;
  }

  .top-bar {
    padding: 0.65rem;
    align-items: center;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .brand::before {
    width: 2.4rem;
    height: 2.4rem;
  }

  .top-bar form {
    flex: 0 0 auto;
  }

  .top-bar button {
    min-height: 2.5rem;
    padding: 0.55rem 0.72rem;
    font-size: 0.72rem;
  }

  .layout > .card,
  .login-wrap .card {
    padding: 1rem;
  }

  .card-header {
    align-items: flex-start;
  }

  .filter-label {
    flex-basis: 100%;
  }

  .page-tools textarea {
    min-height: 11rem;
  }

  .page-tools textarea:not(:placeholder-shown) {
    min-height: 13rem;
  }

  .page-tools .btn-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-tools .btn-row > :first-child,
  .page-tools .btn-row > :last-child {
    grid-column: 1 / -1;
  }

  .page-tools .btn-row > * {
    width: 100%;
  }
}

@media (max-width: 22rem) {
  .tag-pill {
    display: none;
  }

  .top-bar .brand strong {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  body::before {
    animation: none;
    transform: none;
  }
}

@media (forced-colors: active) {
  .card,
  .top-bar,
  .detail-card,
  .table-wrap,
  input,
  select,
  textarea,
  button,
  a.ghost {
    border-color: CanvasText;
  }
}
