:root {
  --ink: #12263f;
  --accent: #2f8a8b;
  --accent-deep: #1f5f67;
  --accent-soft: #8ec9c7;
  --gold: #c69457;
  --gold-soft: #f1d4ae;
  --panel: rgba(255, 255, 255, 0.96);
  --line: rgba(18, 38, 63, 0.11);
  --success: #1d7b5e;
  --warning: #b66a35;
  --shadow-xl: 0 30px 70px rgba(18, 38, 63, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Candara, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(47, 138, 139, 0.16), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(198, 148, 87, 0.16), transparent 20%),
    radial-gradient(circle at bottom right, rgba(18, 38, 63, 0.12), transparent 30%),
    linear-gradient(140deg, #f4f1ea 0%, #edf4f6 45%, #fbfcfd 100%);
}

body.busy-state {
  overflow: hidden;
}

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

code {
  background: rgba(20, 33, 61, 0.06);
  border-radius: 8px;
  padding: 2px 6px;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-shell {
  padding-top: 28px;
  padding-bottom: 60px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(12, 28, 47, 0.92), rgba(12, 28, 47, 0.82));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #dff7f5, var(--accent) 45%, #0f243c 100%);
  box-shadow: 0 0 0 8px rgba(47, 138, 139, 0.16);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-family: Cambria, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f8fbfc;
}

.brand-copy small {
  color: rgba(244, 248, 250, 0.66);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links > a,
.nav-links .link-button,
.nav-group summary {
  color: rgba(243, 247, 250, 0.9);
  font-weight: 600;
}

.nav-group {
  position: relative;
}

.nav-group summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(243, 247, 250, 0.78);
  border-bottom: 2px solid rgba(243, 247, 250, 0.78);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
}

.nav-group[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.nav-group-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 28, 47, 0.96);
  box-shadow: 0 18px 34px rgba(6, 12, 24, 0.24);
}

.nav-group-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(243, 247, 250, 0.92);
  font-weight: 600;
}

.nav-group-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel,
.panel,
.pricing-card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

.hero-panel,
.panel,
.pricing-card,
.auth-card {
  padding: 24px;
}

.hero-panel-premium {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(198, 148, 87, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(11, 33, 56, 0.98), rgba(23, 62, 86, 0.94));
  overflow: hidden;
}

.hero-copy,
.hero-preview {
  display: grid;
  gap: 18px;
}

.hero-preview {
  align-content: start;
  justify-items: stretch;
}

.hero-panel-premium .eyebrow,
.hero-panel-premium h1,
.hero-panel-premium .lead {
  color: #f7fbfc;
}

.hero-panel-premium .lead {
  max-width: 680px;
  color: rgba(244, 248, 250, 0.82);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.hero-metric,
.preview-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  padding: 18px;
  backdrop-filter: blur(12px);
}

.preview-card {
  width: 100%;
}

.hero-metric span,
.preview-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(243, 247, 250, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-metric strong,
.preview-card strong {
  display: block;
  font-family: Cambria, Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.2;
  color: #fff;
}

.preview-card span:last-child {
  display: block;
  margin-top: 8px;
  color: rgba(243, 247, 250, 0.76);
  line-height: 1.55;
}

.preview-card-top {
  transform: none;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  margin-bottom: 24px;
}

.trust-strip > div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
  color: rgba(18, 38, 63, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-panel h1,
.page-head h1,
.auth-card h1,
.success-panel h1 {
  margin: 8px 0 12px;
  font-family: Cambria, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent-deep);
  font-weight: 700;
}

.lead {
  font-size: 1.04rem;
  line-height: 1.7;
  color: rgba(20, 33, 61, 0.82);
  max-width: 760px;
}

.compact {
  max-width: none;
}

.page-head,
.actions,
.grid-2,
.grid-3,
.job-list,
.summary-grid,
.stack-form,
.auth-card {
  display: grid;
  gap: 16px;
}

.page-head {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 22px;
}

.workspace-head {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
  border-radius: 28px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  background:
    radial-gradient(circle at top right, rgba(198, 148, 87, 0.18), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 247, 0.92));
  box-shadow: var(--shadow-xl);
}

.workspace-head::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 138, 139, 0.16), transparent 68%);
  pointer-events: none;
}

.admin-head,
.detail-head {
  margin-bottom: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
}

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

.grid-3 {
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ── Billing Toggle ─────────────────────────────────────── */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.billing-toggle-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(18, 38, 63, 0.4);
  transition: color 0.2s;
}

.billing-label-active {
  color: #14213d;
}

.billing-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(20, 33, 61, 0.15);
  border: none;
  border-radius: 13px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.billing-toggle-on {
  background: #14213d;
}

.billing-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.billing-toggle-on .billing-toggle-thumb {
  transform: translateX(22px);
}

.billing-save-badge {
  display: inline-flex;
  align-items: center;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.price-period {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(18, 38, 63, 0.5);
  margin-left: 0.15rem;
}

.price-unavailable {
  font-size: 1.1rem;
  color: rgba(18, 38, 63, 0.4);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.workspace-top-panel {
  margin-bottom: 22px;
}

.workspace-top-simple {
  display: grid;
  gap: 18px;
}

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

.workspace-sidebar {
  display: grid;
  gap: 20px;
}

.workspace-panel {
  padding: 22px;
}

.workspace-panel-minimal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 250, 0.94));
}

.workspace-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.workspace-panel-head h2 {
  margin: 4px 0 0;
}

.detail-grid {
  align-items: start;
}

.detail-head-compact {
  padding: 18px 22px;
  margin-bottom: 14px;
}

.detail-head-compact h1 {
  margin: 2px 0 4px;
  font-size: 2rem;
}

.detail-head-compact .lead {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.detail-summary-layout {
  margin-bottom: 16px;
}

.detail-panel {
  padding: 24px;
}

.detail-summary-panel-compact {
  padding: 18px 20px;
}

.detail-summary-panel {
  background:
    radial-gradient(circle at top right, rgba(47, 138, 139, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 252, 0.95));
}

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

.detail-panel-head h2 {
  margin: 4px 0 0;
}

.detail-summary-grid {
  margin-bottom: 12px;
}

.detail-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-metric-pill {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(20, 33, 61, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.detail-metric-pill span {
  margin: 0;
  color: rgba(18, 38, 63, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-metric-pill strong {
  font-family: Cambria, Georgia, serif;
  font-size: 1rem;
  line-height: 1.15;
  color: var(--ink);
}

.detail-metric-billing {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.94));
}

.detail-metric-purchases {
  background: linear-gradient(180deg, rgba(245, 251, 249, 0.98), rgba(236, 247, 244, 0.95));
}

.detail-metric-diff {
  background: linear-gradient(180deg, rgba(249, 248, 255, 0.98), rgba(241, 239, 251, 0.95));
}

.detail-metric-amount {
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.98), rgba(252, 240, 232, 0.95));
}

.detail-summary-panel-compact .detail-panel-head {
  margin-bottom: 12px;
}

.detail-summary-panel-compact .workspace-stat-card,
.detail-summary-panel-compact .summary-card {
  padding: 12px 14px;
  border-radius: 16px;
}

.detail-summary-panel-compact .summary-card span {
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.detail-summary-panel-compact .summary-card strong {
  font-size: 1rem;
  line-height: 1.15;
}

.detail-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: rgba(18, 38, 63, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.detail-summary-meta strong {
  color: var(--ink);
}

.detail-files-grid {
  align-items: stretch;
}

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

.workspace-stat-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 248, 0.94));
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.workspace-stat-card span {
  color: rgba(18, 38, 63, 0.58);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-stat-card strong {
  font-family: Cambria, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.workspace-note-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11, 33, 56, 0.96), rgba(24, 59, 81, 0.94));
  color: rgba(245, 248, 250, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace-note-card p {
  margin: 0;
  line-height: 1.68;
}

.supplier-info-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 12px 0 2px;
  align-items: start;
}

.supplier-info-head {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-note-card-light {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 250, 0.94));
  color: rgba(18, 38, 63, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.workspace-note-card-light .workspace-note-kicker {
  color: rgba(18, 38, 63, 0.58);
}

.workspace-note-kicker {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-guidance-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(47, 138, 139, 0.18);
  background: linear-gradient(180deg, rgba(238, 248, 248, 0.98), rgba(252, 254, 255, 0.96));
}

.top-guidance-card-minimal {
  padding: 16px 18px;
  border-radius: 18px;
  gap: 6px;
}

.top-guidance-card-minimal strong {
  font-size: 1rem;
  line-height: 1.45;
}

.top-guidance-card p {
  margin: 0;
  color: rgba(18, 38, 63, 0.74);
  line-height: 1.65;
}

.top-guidance-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.panel h2,
.pricing-card h2 {
  margin: 0 0 8px;
  font-family: Cambria, Georgia, serif;
  font-size: 1.5rem;
}

.list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.button,
button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), #46a7a4);
  box-shadow: 0 14px 32px rgba(47, 138, 139, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(47, 138, 139, 0.24);
}

.button-small {
  padding: 10px 16px;
}

.button-danger {
  background: #dc2626;
  color: #fff;
}

.button-danger:hover {
  background: #b91c1c;
}

.button-secondary,
.job-row {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 38, 63, 0.1);
  box-shadow: none;
}

.link-button {
  background: transparent;
  color: inherit;
  box-shadow: none;
  padding: 0;
}

.inline-form {
  margin: 0;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
}

/* ══════════════════════════════════════════════════════════
   REGISTRATION PAGE
══════════════════════════════════════════════════════════ */
.reg-page {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: calc(100vh - 64px);
}

/* ── Brand panel ──────────────────────────────────────────── */
.reg-brand {
  background: linear-gradient(160deg, #0d2237 0%, #14324f 50%, #1a4a5e 100%);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  align-items: center;
}

.reg-brand-inner {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.reg-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reg-brand-logo img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.reg-brand-logo span {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.reg-brand-copy h2 {
  font-family: Cambria, Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 0.65rem;
}

.reg-brand-copy p {
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

.reg-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.reg-brand-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.reg-brand-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(47,138,139,0.3);
  border: 1px solid rgba(47,138,139,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6de0d8;
  margin-top: 1px;
}

.reg-brand-features li > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.reg-brand-features li strong {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.reg-brand-features li span {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reg-brand-login {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.reg-brand-login a {
  color: #6de0d8;
  font-weight: 600;
  text-decoration: none;
}

.reg-brand-login a:hover {
  text-decoration: underline;
}

/* ── Form panel ───────────────────────────────────────────── */
.reg-form-panel {
  background: #f4f7fb;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}

.reg-form {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reg-form-header {
  margin-bottom: 2rem;
}

.reg-form-header h1 {
  font-family: Cambria, Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0d2237;
  margin: 0.3rem 0 0.5rem;
  line-height: 1.2;
}

.reg-form-header p {
  color: #45556d;
  font-size: 0.95rem;
  margin: 0;
}

.reg-alert {
  margin-bottom: 1.25rem;
}

/* ── Sections ─────────────────────────────────────────────── */
.reg-section {
  background: #fff;
  border: 1px solid rgba(18,38,63,0.1);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reg-section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  margin-bottom: 0.25rem;
}

.reg-section-num {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent-deep);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Fields ───────────────────────────────────────────────── */
.reg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.reg-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 0.85rem;
}

.reg-grid-pharmacy {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0.85rem;
  align-items: end;
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reg-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #14213d;
  letter-spacing: 0.01em;
}

.reg-field input[type="text"],
.reg-field input[type="email"],
.reg-field input[type="tel"],
.reg-field input[type="password"] {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(18,38,63,0.16);
  border-radius: 8px;
  font-size: 0.92rem;
  color: #0d2237;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.reg-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47,138,139,0.12);
}

.reg-field input::placeholder {
  color: rgba(18,38,63,0.3);
}

/* ── Password toggle ──────────────────────────────────────── */
.reg-password-wrap {
  position: relative;
}

.reg-password-wrap input {
  padding-right: 2.8rem;
}

.reg-pw-toggle {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #45556d;
  padding: 0.2rem;
  display: flex;
  align-items: center;
}

.reg-pw-toggle:hover {
  color: var(--accent-deep);
}

.reg-pw-rules {
  font-size: 0.78rem;
  color: #45556d;
  line-height: 1.5;
}

/* ── Locked email field (profile page) ────────────────────── */
.reg-email-locked-wrap {
  position: relative;
}

.reg-input-locked {
  background: #f0f3f7 !important;
  color: #7a8a9e !important;
  cursor: not-allowed;
  padding-right: 4.5rem !important;
}

.reg-locked-badge {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: #8a99ad;
  border-radius: 4px;
  padding: 2px 7px;
  pointer-events: none;
  text-transform: uppercase;
}

/* ── Custom checkbox ──────────────────────────────────────── */
.reg-field-checkbox-wrap {
  justify-content: flex-end;
  padding-bottom: 2px;
}

.reg-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #14213d;
  font-weight: 500;
  user-select: none;
}

.reg-checkbox-label input[type="checkbox"] {
  display: none;
}

.reg-checkbox-box {
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid rgba(18,38,63,0.25);
  border-radius: 4px;
  background: #fafbfc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.reg-checkbox-label input:checked + .reg-checkbox-box {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.reg-checkbox-label input:checked + .reg-checkbox-box::after {
  content: '';
  display: block;
  width: 0.35rem;
  height: 0.6rem;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ── Submit ───────────────────────────────────────────────── */
.reg-submit {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 10px;
}

.reg-footer-note {
  font-size: 0.78rem;
  color: #45556d;
  text-align: center;
  line-height: 1.6;
  margin-top: 1rem;
}

.reg-footer-note a {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .reg-page {
    grid-template-columns: 1fr;
  }
  .reg-brand {
    position: static;
    height: auto;
  }
  .reg-brand-inner {
    padding: 2rem 1.5rem;
  }
  .reg-grid-2,
  .reg-grid-3,
  .reg-grid-pharmacy {
    grid-template-columns: 1fr;
  }
  .reg-form-panel {
    padding: 2rem 1rem;
  }
}

.auth-card {
  width: min(100%, 480px);
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(198, 148, 87, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 251, 0.94));
}

.auth-card-wide {
  width: min(100%, 640px);
}

.auth-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.auth-forgot {
  font-size: 0.82rem;
  color: var(--ink-muted, #6b7280);
  text-decoration: none;
}

.auth-forgot:hover {
  color: #14213d;
  text-decoration: underline;
}

.auth-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 138, 139, 0.1);
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-deep);
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: white;
  font: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(203, 109, 67, 0.55);
  box-shadow: 0 0 0 4px rgba(203, 109, 67, 0.12);
}

.helper {
  color: rgba(20, 33, 61, 0.7);
  line-height: 1.65;
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff4ee;
  border: 1px solid rgba(203, 109, 67, 0.25);
  color: #7a3a1f;
}

.mapping-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.info-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(21, 93, 69, 0.08);
  border: 1px solid rgba(21, 93, 69, 0.18);
  color: #155d45;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.info-link:hover {
  background: rgba(21, 93, 69, 0.14);
  border-color: rgba(21, 93, 69, 0.3);
}

.alert-success {
  background: #edf8f2;
  border-color: rgba(27, 127, 92, 0.24);
  color: #155d45;
}

.progress-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 33, 61, 0.26);
  backdrop-filter: blur(8px);
}

.progress-shell[hidden] {
  display: none !important;
}

.upload-panel {
  padding: 32px;
  overflow: hidden;
}

.upload-studio {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(47, 138, 139, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(198, 148, 87, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 250, 0.95));
}

.upload-studio::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), #59b6ad, var(--gold));
}

.upload-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.upload-panel-head h2 {
  margin-bottom: 0;
}

.file-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.35rem;
  background: #14213d;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.upload-plan-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: #45556d;
}

.upload-plan-inline span {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #255f85;
}

.upload-plan-inline strong {
  font-weight: 500;
  color: #14213d;
}

.upload-panel-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(47, 138, 139, 0.12);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.studio-chip {
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.studio-chip span {
  color: rgba(18, 38, 63, 0.58);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-chip strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.upload-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 4px;
}

.upload-lane {
  min-width: 0;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.94));
  box-shadow: 0 14px 28px rgba(18, 38, 63, 0.05);
}

.upload-lane-purchases {
  background: linear-gradient(180deg, rgba(250, 255, 252, 0.98), rgba(239, 248, 243, 0.95));
}

.upload-lane-billing {
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(240, 246, 252, 0.95));
}

.upload-lane-results {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 243, 234, 0.96));
}

.upload-lane h3 {
  margin: 8px 0 10px;
  font-family: Cambria, Georgia, serif;
  font-size: 1.3rem;
}

.upload-lane p {
  margin: 0 0 10px;
  color: rgba(20, 33, 61, 0.72);
  line-height: 1.6;
}

.upload-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(18, 38, 63, 0.08);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compact-list {
  padding-left: 18px;
  margin-top: 6px;
  font-size: 0.94rem;
  line-height: 1.75;
}

.upload-config-card,
.option-callout {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 250, 0.9));
}

.upload-config-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: end;
}

.upload-config-main {
  display: grid;
  gap: 8px;
}

.upload-config-note {
  display: grid;
  gap: 6px;
  min-height: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.upload-config-note span {
  color: rgba(18, 38, 63, 0.56);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.upload-config-note strong {
  font-size: 0.98rem;
  line-height: 1.45;
}

.upload-form-minimal {
  gap: 14px;
}

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

.file-drop-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 190px;
  padding: 22px;
  border-radius: 24px;
  border: 1px dashed rgba(20, 33, 61, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.95));
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.file-drop-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 138, 139, 0.42);
  box-shadow: 0 22px 36px rgba(20, 33, 61, 0.1);
}

.file-drop-card-purchases {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 249, 243, 0.96));
}

.file-drop-card-billing {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 252, 0.96));
}

.file-drop-kicker {
  color: rgba(20, 33, 61, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.inline-upload-error {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(183, 72, 30, 0.08);
  border: 1px solid rgba(183, 72, 30, 0.18);
  color: #8a431f;
  font-size: 0.9rem;
  line-height: 1.5;
}

.file-drop-card strong {
  font-family: Cambria, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.file-drop-card input[type="file"] {
  margin-top: auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: white;
}

.file-picker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.file-picker-button {
  min-width: 190px;
}

.text-action {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  padding: 0;
  box-shadow: none;
}

.text-action:hover {
  transform: none;
  box-shadow: none;
  color: var(--ink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.file-queue {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  background: rgba(255, 255, 255, 0.72);
  min-height: 74px;
}

.single-file-queue {
  min-height: 74px;
}

.file-empty-state {
  color: rgba(18, 38, 63, 0.56);
  font-size: 0.94rem;
  line-height: 1.55;
}

.file-chip-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 250, 0.96));
}

.file-chip-info {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  flex: 0 0 auto;
  max-width: 200px;
}

.file-supplier-name-input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid rgba(18,38,63,0.18);
  border-radius: 6px;
  background: #fff;
  color: #14213d;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.file-supplier-name-input::placeholder {
  color: rgba(18,38,63,0.38);
}

.file-supplier-name-input:focus {
  border-color: #255f85;
  box-shadow: 0 0 0 2px rgba(37,95,133,0.12);
}

.file-chip-row > div {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.file-chip-row strong {
  display: inline;
  font-size: 0.98rem;
  line-height: 1.3;
}

.file-chip-row span {
  display: inline;
  margin-top: 0;
  color: rgba(18, 38, 63, 0.56);
  font-size: 0.82rem;
}

.chip-remove-button {
  appearance: none;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(18, 38, 63, 0.72);
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: none;
  line-height: 1;
  min-width: 12px;
}

.chip-remove-button:hover {
  transform: none;
  box-shadow: none;
  color: var(--accent-deep);
}

.option-callout-inline {
  align-items: center;
}

.option-callout-simple {
  padding: 14px 16px;
}

.generate-button {
  width: 100%;
  min-height: 58px;
  font-size: 1.02rem;
}

.file-drop-meta {
  display: block;
  min-height: 0;
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.admin-grid,
.admin-section {
  margin-bottom: 22px;
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
  overflow: hidden;
}

.pricing-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pricing-card-topline .eyebrow {
  min-width: 0;
}

.pricing-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 138, 139, 0.12);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.pricing-card-featured {
  transform: translateY(-6px);
  background:
    radial-gradient(circle at top right, rgba(198, 148, 87, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 247, 248, 0.96));
  border-color: rgba(47, 138, 139, 0.24);
  box-shadow: 0 26px 54px rgba(18, 38, 63, 0.14);
}

.admin-hero-panel {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(47, 138, 139, 0.1), transparent 25%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 251, 0.96));
}

.admin-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-panel-head h2 {
  margin: 6px 0 0;
}

.admin-section-emphasis {
  background:
    radial-gradient(circle at top right, rgba(198, 148, 87, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 248, 250, 0.96));
}

.admin-storage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-storage-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  border: 1px solid rgba(20, 33, 61, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.admin-storage-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(20, 33, 61, 0.68);
}

.admin-storage-card strong {
  display: block;
  font-family: Cambria, Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.15;
}

.path-value {
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 1.1rem !important;
}

.status-inline {
  font-size: 1.05rem !important;
}

.status-good {
  color: #1b7f5c;
}

.status-warn {
  color: #9b4c28;
}

.admin-create-plan-form {
  display: grid;
  gap: 16px;
}

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

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

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

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

.admin-table {
  display: grid;
  gap: 14px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 0.8fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-row-head {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
  background: transparent;
  border-style: dashed;
}

.admin-cell {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-actions {
  align-content: space-between;
}

.checkbox-row,
.checkbox-stack {
  display: grid;
  gap: 10px;
}

.checkbox-row-inline {
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
  align-items: center;
  gap: 18px;
}

.checkbox-row label,
.checkbox-stack label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.checkbox-row input,
.checkbox-stack input {
  width: auto;
}

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

.mapping-view-row {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1.55fr) !important;
  align-items: start;
}

.mapping-view-meta strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mapping-view-meta .helper {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mapping-view-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px 18px;
  align-content: start;
}

.mapping-view-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mapping-view-value {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 38, 63, 0.08);
  color: var(--ink);
  word-break: break-word;
}

.admin-plan-table-head,
.admin-plan-table-row,
.admin-user-table-head,
.admin-user-table-row {
  display: grid;
  gap: 14px;
}

.admin-plan-table-head,
.admin-user-table-head {
  padding: 0 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.admin-plan-table-head,
.admin-plan-table-row {
  grid-template-columns: 1.8fr 0.9fr 1fr 1fr 1fr 0.7fr 0.7fr;
}

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

.admin-user-table-head,
.admin-user-table-row {
  grid-template-columns: 1.8fr 1.1fr 1fr 0.9fr 0.7fr;
}

.admin-plan-table-row,
.admin-user-table-row {
  align-items: start;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.95));
  box-shadow: 0 12px 28px rgba(20, 33, 61, 0.06);
}

.admin-plan-cell,
.admin-user-cell {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: hidden;
}

.mapping-filename {
  display: block;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
}

.plan-badge-row {
  display: flex;
  align-items: center;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.06);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-plan-save {
  align-content: center;
}

.admin-plan-row-form {
  display: contents;
}

.admin-plan-delete-form {
  display: contents;
}

.user-pill-row {
  display: flex;
  align-items: center;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(203, 109, 67, 0.11);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-email {
  display: block;
  font-size: 1.02rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.admin-user-flags {
  align-content: center;
}

@media (max-width: 960px) {
  .admin-row,
  .page-head,
  .grid-2,
  .grid-3,
  .pricing-grid,
  .summary-grid,
  .hero-panel-premium,
  .trust-strip,
  .hero-metrics,
  .upload-flow,
  .file-field-grid {
    grid-template-columns: 1fr;
  }

  .admin-storage-grid,
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .checkbox-row-inline,
  .admin-plan-table-head,
  .admin-plan-table-row,
  .admin-user-table-head,
  .admin-user-table-row {
    grid-template-columns: 1fr;
  }

  .admin-panel-head {
    display: grid;
  }
}

.progress-card {
  width: min(100%, 520px);
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(20, 33, 61, 0.12);
  box-shadow: 0 24px 60px rgba(20, 33, 61, 0.18);
}

.progress-card h3 {
  margin: 10px 0 12px;
  font-family: Cambria, Georgia, serif;
  font-size: 1.55rem;
}

.processing-inline {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.processing-inline h3 {
  margin: 0;
  font-family: Cambria, Georgia, serif;
  font-size: 1.6rem;
}

.processing-note {
  margin: 4px 0 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 18px;
  margin-bottom: 6px;
}
.progress-stage-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(20, 33, 61, 0.75);
}
.progress-pct {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cb6d43;
  letter-spacing: 0.02em;
}

.capsule-progress {
  position: relative;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 33, 61, 0.1), rgba(203, 109, 67, 0.12));
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.capsule-progress-bar {
  display: block;
  height: 100%;
  width: 10%;
  border-radius: 999px;
  background: linear-gradient(90deg, #cb6d43, #f0a56f, #d96c4b);
  background-size: 200% 100%;
  box-shadow: 0 4px 12px rgba(203, 109, 67, 0.35);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  animation: capsule-shimmer 2s linear infinite;
}

.capsule-progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: rgba(20, 33, 61, 0.4);
  font-size: 0.8rem;
  font-weight: 600;
}
.capsule-progress-steps span {
  transition: color 0.3s;
}
.capsule-progress-steps span.active {
  color: #cb6d43;
}

@keyframes capsule-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes capsule-slide {
  0% {
    transform: translateX(-90%);
  }
  50% {
    transform: translateX(130%);
  }
  100% {
    transform: translateX(-90%);
  }
}

.prewrap {
  white-space: pre-wrap;
}

.price {
  font-family: Cambria, Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--ink);
}

.job-row,
.summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding: 16px;
}

.job-row {
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.94));
  width: 100%;
}

.job-row-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: 100%;
}

.job-row-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.job-row-title {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-row-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.activity-file-section {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.activity-file-label {
  color: rgba(18, 38, 63, 0.58);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity-file-list,
.activity-download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-file-chip,
.activity-download-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.3;
}

.activity-file-chip {
  background: rgba(18, 38, 63, 0.06);
  color: var(--ink);
}

.activity-file-chip:hover {
  background: rgba(18, 38, 63, 0.1);
}

.activity-download-chip {
  background: rgba(47, 138, 139, 0.1);
  color: var(--accent-deep);
  font-weight: 700;
}

.activity-download-chip:hover {
  background: rgba(47, 138, 139, 0.16);
}

.activity-summary-inline {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(20, 33, 61, 0.07);
  background:
    radial-gradient(circle at top right, rgba(47, 138, 139, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 252, 0.95));
  font-size: 0.95rem;
  line-height: 1.5;
}

.activity-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.activity-summary-line-primary {
  color: var(--ink);
}

.activity-summary-line-secondary {
  color: var(--accent-deep);
}

.activity-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.05);
}

.activity-summary-pill strong,
.activity-summary-note strong {
  display: inline-block;
  margin-right: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activity-summary-note {
  color: rgba(18, 38, 63, 0.75);
}

.activity-summary-inline strong {
  color: inherit;
}

.activity-table-divider {
  height: 1px;
  margin: 0 0 14px;
  background: linear-gradient(90deg, rgba(47, 138, 139, 0.28), rgba(20, 33, 61, 0.08), transparent);
}

.activity-table-panel {
  padding: 20px 20px 16px;
}

.activity-table-wrap {
  overflow-x: auto;
  padding: 4px;
  border-radius: 20px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.92), rgba(255, 255, 255, 0.98));
}

.activity-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.activity-table th,
.activity-table td {
  padding: 16px 18px;
  vertical-align: top;
  text-align: left;
}

.activity-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8fb;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  border-bottom: 1px solid rgba(20, 33, 61, 0.1);
  color: rgba(18, 38, 63, 0.62);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity-table th:first-child {
  border-left: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 14px 0 0 14px;
}

.activity-table th:last-child {
  border-right: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 0 14px 14px 0;
}

.activity-table th + th {
  border-left: 1px solid rgba(20, 33, 61, 0.06);
}

.activity-table td {
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 0.94rem;
}

.activity-table td + td {
  border-left: 1px solid rgba(20, 33, 61, 0.05);
}

.activity-primary-row td {
  box-shadow: 0 14px 28px rgba(18, 38, 63, 0.03);
}

.activity-table td:first-child {
  border-left: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 16px 0 0 16px;
}

.activity-table td:last-child {
  border-right: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 0 16px 16px 0;
}

.activity-table tbody tr:hover td {
  background: rgba(247, 250, 252, 0.98);
}

.activity-detail-row td {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.activity-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: -2px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.96), rgba(255, 255, 255, 0.98));
}

.activity-detail-section {
  display: grid;
  gap: 10px;
}

.activity-detail-kicker {
  color: rgba(18, 38, 63, 0.62);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity-run-link {
  font-weight: 700;
  color: var(--ink);
}

.activity-file-metric {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 72px;
}

.activity-file-metric strong {
  font-size: 1rem;
  color: var(--ink);
}

.activity-file-metric span {
  color: rgba(18, 38, 63, 0.58);
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-file-metric-secondary {
  margin-top: 10px;
}

/* ── Supplier name tag (job detail + activity) ──────────── */
.upload-supplier-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #1a56a0;
  background: #e8f0fb;
  border: 1px solid #c2d6f5;
  border-radius: 4px;
  padding: 1px 7px;
  white-space: nowrap;
}

.activity-supplier-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

/* ── PBM Plan tags in activity table ────────────────────── */
.activity-pbm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.activity-pbm-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5b4a00;
  background: #fef9e7;
  border: 1px solid #f0d070;
  border-radius: 4px;
  padding: 1px 7px;
  white-space: nowrap;
}

.activity-table-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
}

.activity-table .activity-file-chip,
.activity-table .activity-download-chip {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.job-row:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 138, 139, 0.26);
  box-shadow: 0 16px 30px rgba(18, 38, 63, 0.08);
}

.summary-card {
  display: block;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.summary-card span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(20, 33, 61, 0.65);
}

.summary-card strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.success-panel-premium {
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(47, 138, 139, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 250, 0.95));
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(20, 33, 61, 0.08);
}

.status-active,
.status-trialing,
.status-completed {
  background: rgba(27, 127, 92, 0.12);
  color: var(--success);
}

.status-processing,
.status-incomplete {
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
}

.status-failed,
.status-past_due,
.status-canceled,
.status-inactive {
  background: rgba(155, 76, 40, 0.12);
  color: var(--warning);
}

@media (max-width: 900px) {
  .page-head,
  .grid-2,
  .grid-3,
  .pricing-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .upload-panel-head,
  .capsule-progress-steps {
    display: grid;
  }

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

  .workspace-lower-grid,
  .upload-config-bar {
    grid-template-columns: 1fr;
  }

  .workspace-head {
    padding: 24px;
  }

  .detail-summary-meta {
    display: grid;
    gap: 6px;
  }

  .detail-metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .auth-kicker,
  .studio-ribbon {
    display: grid;
  }

  .file-picker-actions,
  .file-chip-row {
    align-items: start;
  }

  .file-chip-row {
    display: grid;
  }

  .job-row-detail {
    grid-template-columns: 1fr;
  }

  .job-row-side {
    justify-items: start;
  }

  .mapping-alert {
    align-items: flex-start;
  }

  .mapping-view-grid {
    grid-template-columns: 1fr;
  }

  .mapping-view-row {
    grid-template-columns: 1fr !important;
  }

  .nav-group {
    width: 100%;
  }

  .nav-group-menu {
    position: static;
    margin-top: 10px;
    min-width: 0;
  }

  .activity-summary-inline {
    display: grid;
    gap: 8px;
  }

  .activity-summary-line {
    display: grid;
    gap: 4px;
  }

  .activity-table {
    min-width: 0;
    border-spacing: 0;
  }

  .activity-table thead {
    display: none;
  }

  .activity-table,
  .activity-table tbody,
  .activity-table tr,
  .activity-table td {
    display: block;
    width: 100%;
  }

  .activity-table tr {
    padding: 14px 0;
    border-bottom: 1px solid rgba(20, 33, 61, 0.08);
  }

  .activity-table td {
    background: transparent;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 6px 0;
  }

  .activity-primary-row td {
    box-shadow: none;
  }

  .activity-detail-row td {
    padding: 0 0 12px;
  }

  .activity-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: rgba(18, 38, 63, 0.58);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .activity-table-chip-list {
    max-width: none;
  }

  .activity-detail-card {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 6px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid rgba(20, 33, 61, 0.08);
    border-radius: 0;
    background: transparent;
  }
}

/* ── Admin Tabs ─────────────────────────────────────────── */
.admin-tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(20,33,61,0.10);
  padding-bottom: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-muted, #6b7280);
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, border-color 0.15s;
}

.admin-tab-btn:hover {
  color: var(--ink);
  background: rgba(20,33,61,0.04);
}

.admin-tab-btn-active {
  color: #14213d;
  border-bottom-color: #14213d;
  background: none;
}

/* ── PBM BIN Reference Table ────────────────────────────── */
.pbm-bin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pbm-bin-table-head,
.pbm-bin-table-row {
  display: grid;
  grid-template-columns: 2fr 4fr 1.5fr 1fr;
  align-items: center;
  gap: 0;
}

.pbm-bin-table-head {
  background: #14213d;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-radius: 6px 6px 0 0;
}

.pbm-bin-table-head span,
.pbm-bin-table-row span {
  padding: 0.65rem 1rem;
}

.pbm-bin-table-row {
  border-bottom: 1px solid rgba(20,33,61,0.08);
  transition: background 0.1s;
}

.pbm-bin-table-row:last-child {
  border-bottom: none;
  border-radius: 0 0 6px 6px;
}

.pbm-bin-table-row:nth-child(odd) {
  background: rgba(20,33,61,0.02);
}

.pbm-bin-table-row:hover {
  background: rgba(20,33,61,0.05);
}

.pbm-bin-plan-name {
  font-weight: 600;
  color: #14213d;
}

.pbm-bin-bins {
  color: #45556d;
  line-height: 1.6;
  word-break: break-all;
}

.pbm-bin-label {
  padding: 0.4rem 1rem !important;
}

.pbm-bin-label-input {
  width: 100%;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(20,33,61,0.18);
  border-radius: 4px;
  font-size: 0.85rem;
  color: #14213d;
  background: #fff;
  box-sizing: border-box;
}

.pbm-bin-label-input:focus {
  outline: none;
  border-color: #255f85;
  box-shadow: 0 0 0 2px rgba(37,95,133,0.15);
}

.pbm-bin-check {
  text-align: center !important;
}

.pbm-bin-check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: #14213d;
}

/* ── PBM BIN Group Checkboxes (dashboard upload form) ─────── */
.upload-config-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.upload-config-section-head label {
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(18, 38, 63, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── PBM Multi-Select Dropdown ──────────────────────────── */
.pbm-multiselect {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.pbm-multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(20,33,61,0.2);
  border-radius: 6px;
  font-size: 0.91rem;
  font-weight: 500;
  color: #14213d;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pbm-multiselect-trigger:hover {
  border-color: #255f85;
}

.pbm-multiselect-arrow {
  width: 16px;
  height: 16px;
  color: #45556d;
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.pbm-multiselect-dropdown.open ~ .pbm-multiselect-trigger .pbm-multiselect-arrow,
.pbm-multiselect-trigger:has(+ .pbm-multiselect-dropdown.open) .pbm-multiselect-arrow {
  transform: rotate(180deg);
}

.pbm-multiselect-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(20,33,61,0.18);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20,33,61,0.13);
  z-index: 200;
  overflow: hidden;
}

.pbm-multiselect-dropdown.open {
  display: block;
}

.pbm-multiselect-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(20,33,61,0.08);
  background: #f7f9fc;
}

.pbm-multiselect-actions button {
  font-size: 0.8rem;
  font-weight: 600;
  color: #255f85;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.1s;
}

.pbm-multiselect-actions button:hover {
  background: rgba(37,95,133,0.1);
}

.pbm-multiselect-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.pbm-multiselect-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: #14213d;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}

.pbm-multiselect-item:hover {
  background: rgba(20,33,61,0.05);
}

.pbm-multiselect-item input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: #14213d;
  cursor: pointer;
  flex-shrink: 0;
}

.pbm-multiselect-item input[type="checkbox"]:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pbm-multiselect-item:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.pbm-multiselect-limit-msg {
  font-size: 0.78rem;
  font-weight: 600;
  color: #b94a00;
  background: #fff4ee;
  border: 1px solid #f5c7a9;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 0 0 6px;
}

/* ── Find Run (admin) ───────────────────────────────────────── */
.find-run-form {
  margin-bottom: 1.5rem;
}

.find-run-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.find-run-input {
  flex: 0 0 220px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(20,33,61,0.2);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.find-run-input:focus {
  outline: none;
  border-color: #255f85;
  box-shadow: 0 0 0 2px rgba(37,95,133,0.15);
}

.find-run-result {
  border: 1px solid rgba(20,33,61,0.1);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  background: rgba(20,33,61,0.02);
}

.find-run-result-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.find-run-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem 1.5rem;
}

.find-run-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.find-run-field span {
  font-size: 0.74rem;
  color: rgba(18,38,63,0.52);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.find-run-field strong {
  font-size: 0.94rem;
  color: #14213d;
  word-break: break-all;
}

/* ── License Management ─────────────────────────────────────── */
.license-form {
  background: rgba(20,33,61,0.02);
  border: 1px solid rgba(20,33,61,0.09);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.license-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .license-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .license-form-grid { grid-template-columns: 1fr; }
}

.license-reminder-col,
.license-file-col {
  grid-column: span 1;
}

.license-reminder-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.3rem;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.license-days-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.license-days-input {
  width: 90px;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(20,33,61,0.2);
  border-radius: 4px;
  font-size: 0.88rem;
}

.license-file-input {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  width: 100%;
}

.required {
  color: #c0392b;
  font-size: 0.85rem;
}

/* ── License Table ──────────────────────────────────────────── */
.license-table {
  width: 100%;
  font-size: 0.88rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(20,33,61,0.1);
}

.license-table-head {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 0.8fr 1.2fr;
  background: #14213d;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.license-table-head span,
.license-table-row > span {
  padding: 0.65rem 1rem;
}

.license-table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 0.8fr 1.2fr;
  align-items: center;
  border-bottom: 1px solid rgba(20,33,61,0.07);
  transition: background 0.1s;
}

.license-table-row:last-child { border-bottom: none; }
.license-table-row:nth-child(odd) { background: rgba(20,33,61,0.02); }
.license-table-row:hover { background: rgba(20,33,61,0.05); }

.license-cell-mono {
  font-family: monospace;
  font-size: 0.84rem;
  color: #45556d;
}

.license-cell-date {
  font-variant-numeric: tabular-nums;
  color: #14213d;
}

.license-cell-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Expiry status row tints */
.license-expired {
  background: rgba(192,57,43,0.06) !important;
  border-left: 3px solid #c0392b;
}

.license-warning {
  background: rgba(230,126,34,0.06) !important;
  border-left: 3px solid #e67e22;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-warn {
  background: rgba(230,126,34,0.15);
  color: #a04000;
}

/* Danger button */
.button-danger {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.button-danger:hover {
  background: #a93226;
  border-color: #a93226;
}
