/* Rose Admin design system (frontend/client-backoffice/src/index.css, IX-3508), copied as plain
   CSS: this static site has no build step. Keep the values in step with the backoffice. */
@font-face {
  font-family: "DM Sans Variable";
  src: url("/fonts/DMSans-Variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --background: #fafafa;
  --foreground: #0a0a0a;
  --foreground-secondary: #404040;
  --card: #ffffff;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #ececec;
  --border-subtle: #f4f4f4;
  --input: #ececec;
  --ring: #2563eb;
  --primary: #0a0a0a;
  --primary-foreground: #ffffff;
  --primary-hover: #262626;
  --secondary: #f5f5f5;
  --secondary-foreground: #171717;
  --accent: #e6f0ff;
  --accent-foreground: #2563eb;
  --link: #2563eb;
  --destructive: #dc2626;
  --success: #16a34a;
  --surface-sunken: #f5f5f5;
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
  font-family: "DM Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  line-height: 1.5;
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--card);
}

a {
  color: var(--link);
}

/* Split screen, as the backoffice login: form on the left, brand panel on the right. */
.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

.pane {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.logo img {
  height: 24px;
  width: auto;
}

main {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 24px 0;
}

.brand-panel {
  display: none;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--accent-foreground);
}

.field,
.sheen {
  position: absolute;
  inset: 0;
}

/* Soft top-corner sheen: a white overlay, not a brand tint. */
.sheen {
  pointer-events: none;
  background-image: radial-gradient(120% 120% at 85% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%);
}

.brand-card {
  position: relative;
  z-index: 1;
  max-width: 460px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.brand-card p {
  margin: 0;
  font-size: 12px;
}

.brand-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--foreground-secondary);
}

@media (min-width: 1024px) {
  .shell {
    grid-template-columns: 1fr 1fr;
  }

  .pane {
    padding: 28px 40px;
    border-right: 1px solid var(--border-subtle);
  }

  .brand-panel {
    display: flex;
  }
}

/* Signed in on /account: one wide column on the grey background, as backoffice pages. */
body.wide {
  background: var(--background);
}

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

body.wide .pane {
  border-right: 0;
}

body.wide .brand-panel {
  display: none;
}

body.wide main {
  max-width: 880px;
  margin: 24px auto 0;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--accent-foreground);
}

h1 {
  margin: 12px 0 0;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
}

body.wide h1 {
  margin: 0;
  font-size: 24px;
}

h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtitle,
.muted {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.625;
}

.subtitle {
  margin: 12px 0 0;
}

ul.can {
  margin: 20px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--foreground-secondary);
}

ul.can li + li {
  margin-top: 6px;
}

.error {
  color: var(--destructive);
  font-size: 14px;
}

/* Button: default (primary, black), outline; sizes default 36px, lg 40px. */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

button:hover {
  background: var(--surface-sunken);
}

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

button.primary:hover {
  background: var(--primary-hover);
}

button.lg {
  height: 40px;
  padding: 0 24px;
  border-radius: 6px;
}

button.block {
  width: 100%;
  margin-top: 24px;
}

button:focus-visible,
input:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

label {
  display: block;
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 600;
}

input {
  height: 36px;
  width: 100%;
  padding: 4px 12px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

input::placeholder {
  color: var(--muted-foreground);
}

input[readonly] {
  background: var(--surface-sunken);
}

input:disabled {
  opacity: 0.5;
}

input[type="radio"] {
  width: auto;
  height: auto;
  margin: 0 4px 0 0;
  box-shadow: none;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row > input {
  flex: 1;
}

.spread {
  justify-content: space-between;
}

/* Card */
section {
  margin: 16px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

section > h2 {
  margin-bottom: 16px;
}

section .muted {
  margin: 8px 0 0;
}

/* Not built yet: shown, greyed and inert. */
.not-yet {
  color: var(--muted-foreground);
}

section.not-yet > :not(h2) {
  opacity: 0.55;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.choice label,
td label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-weight: 400;
  opacity: 0.55;
}

/* Status pill (neutral): Badge + rounded-full + leading dot. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 6px;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--muted-foreground);
}

.pill.success {
  background: #dcfce7;
  color: var(--success);
}

.pill.success::before {
  background: var(--success);
}

.credits {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

/* Table */
.table {
  overflow-x: auto;
  margin: 16px -24px -24px;
  border-top: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  height: 36px;
  padding: 0 24px;
  background: var(--surface-sunken);
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 24px;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}

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

tbody tr:hover {
  background: var(--surface-sunken);
}

td .muted {
  font-size: 12px;
  line-height: 1.4;
}

.brand-card h1 {
  margin-top: 8px;
  font-size: 22px;
}

.actions {
  margin-top: 24px;
}

label.first {
  margin-top: 0;
}

.row > input.expiry {
  flex: 0 0 96px;
}

td label + label {
  margin-left: 12px;
}
