:root {
  --op-brand: #DB1B24;
  --op-brand-hover: #B8141B;
  --op-logo-red: #D9342B;

  --op-ink: #1A2733;
  --op-page-bg: #F4F2EC;
  --op-surface: #ffffff;

  --op-border: #E7E2D9;
  --op-border-soft: #F0ECE4;
  --op-border-input: #DBD4C8;
  --op-border-button: #D0C8BB;
  --op-border-pill: #E3DDD3;

  --op-surface-table-header: #F6F3EE;
  --op-surface-row-hover: #FAF7F1;
  --op-surface-dashed-panel: #FBFAF6;
  --op-surface-pill: #F2EFE9;

  --op-text-secondary: #7C9092;
  --op-text-tertiary: #3B5457;
  --op-text-muted: #9AAEB0;
  --op-text-slate: #5E7377;
  --op-text-faint: #BEB6A9;

  --op-success-fg: #2E7D46;
  --op-success-bg: #E4F1E6;
  --op-warning-fg: #B57E1F;
  --op-warning-bg: #FBF1DD;
  --op-warning-border: #EAD3A6;
  --op-danger-fg: #C0524F;
  --op-danger-bg: #FCF0F0;
  --op-danger-border: #F0CFCE;
  --op-neutral-bg: #E9ECF0;
  --op-neutral-bg-alt: #EEF1F2;
  --op-deleted-fg: #7C6F5E;
  --op-deleted-bg: #F1EBE4;

  --op-sidebar-gradient: linear-gradient(180deg, #1A2733, #121A22);
  --op-sidebar-item-inactive: #9AA6B0;
  --op-sidebar-item-active-text: #EAF6F5;
  --op-sidebar-item-active-bg: #DB1B24;
  --op-sidebar-section-fg: #7B8794;
  --op-sidebar-muted: #8994A0;
  --op-sidebar-avatar-bg: #333E49;
  --op-sidebar-avatar-fg: #E6EBF0;

  --op-shadow-card: 0 1px 2px rgba(18, 41, 44, .05);
  --op-focus-ring: 0 0 0 3px rgba(219, 27, 36, .15);

  --op-radius-sm: 6px;
  --op-radius-md: 7px;
  --op-radius-lg: 8px;
  --op-radius-control: 9px;
  --op-radius-panel: 11px;
  --op-radius-card: 13px;
  --op-radius-pill: 20px;

  --op-control-height: 39px;

  --op-font-body: 'Mulish', -apple-system, system-ui, sans-serif;
  --op-font-display: 'Figtree', -apple-system, system-ui, sans-serif;
}

html {
  height: 100vh;
  height: 100dvh;
}

body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  font-family: var(--op-font-body);
  background-color: var(--op-page-bg);
  color: var(--op-ink);
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100%;
  overflow: hidden;
}

::placeholder {
  color: var(--op-text-muted);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--op-border-button);
  border-radius: 8px;
}

:root {
  --bs-primary: var(--op-brand);
  --bs-primary-rgb: 219, 27, 36;
  --bs-body-bg: var(--op-page-bg);
  --bs-body-color: var(--op-ink);
  --bs-body-font-family: var(--op-font-body);
  --bs-border-radius: var(--op-radius-control);
  --bs-border-color: var(--op-border);
  --bs-link-color: var(--op-brand);
  --bs-link-hover-color: var(--op-brand-hover);
}

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

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

.btn-primary {
  --bs-btn-bg: var(--op-brand);
  --bs-btn-border-color: var(--op-brand);
  --bs-btn-hover-bg: var(--op-brand-hover);
  --bs-btn-hover-border-color: var(--op-brand-hover);
  --bs-btn-active-bg: var(--op-brand-hover);
  --bs-btn-active-border-color: var(--op-brand-hover);
}

/* ── Layout shell ─────────────────────────────────────────────── */

.op-app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
}

.op-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--op-sidebar-gradient);
  height: 100%;
  overflow-y: auto;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--op-sidebar-item-active-text);
  position: sticky;
  left: 0;
  z-index: 5;
}

.op-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 22px;
}

.op-sidebar-logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--op-radius-control);
  object-fit: contain;
}

.op-sidebar-brand-title {
  font-family: var(--op-font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 1.4px;
}

.op-sidebar-brand-subtitle {
  font-size: 10.5px;
  color: var(--op-sidebar-muted);
  letter-spacing: .4px;
  margin-top: 3px;
}

.op-sidebar-section {
  color: var(--op-sidebar-section-fg);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 14px 10px 8px;
}

.op-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--op-sidebar-item-inactive);
  padding: 11px 12px;
  border-radius: var(--op-radius-control);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .12s ease, color .12s ease;
}

.op-sidebar-item i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.op-sidebar-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, .06);
  text-decoration: none;
}

.op-sidebar-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

.op-sidebar-item-active,
.op-sidebar-item-active:hover {
  color: var(--op-sidebar-item-active-text);
  background-color: var(--op-sidebar-item-active-bg);
}

.op-sidebar-user {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 11px;
}

.op-sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.op-sidebar-user-name {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-sidebar-user-role {
  font-size: 11px;
  color: var(--op-sidebar-muted);
}

.op-sidebar-signout {
  background: none;
  border: none;
  color: var(--op-sidebar-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 17px;
  line-height: 1;
}

.op-sidebar-signout:hover {
  color: var(--op-sidebar-item-active-text);
}

.op-sidebar-signout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

.op-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 800px;
  min-height: 0;
}

.op-topbar {
  height: 66px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: var(--op-surface);
  border-bottom: 1px solid var(--op-border);
  padding: 0 30px;
}

.op-topbar-titles {
  min-width: 0;
}

.op-topbar-subtitle {
  font-size: 12.5px;
  color: var(--op-text-secondary);
  margin-top: 1px;
}

.op-topbar-actions {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.op-main-content {
  flex: 1;
  overflow: auto;
  padding: 28px 30px 44px;
  min-height: 0;
}

/* ── Titles ───────────────────────────────────────────────────── */

.op-eyebrow {
  font-family: var(--op-font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--op-text-secondary);
}

.op-page-title {
  font-family: var(--op-font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--op-ink);
  margin: 0;
}

.op-section-title {
  font-family: var(--op-font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--op-ink);
  margin: 0;
}

/* ── Cards ────────────────────────────────────────────────────── */

.op-card {
  background-color: var(--op-surface);
  border: 1px solid var(--op-border);
  border-radius: var(--op-radius-card);
  box-shadow: var(--op-shadow-card);
}

.op-card-clip {
  overflow: hidden;
}

.op-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--op-border-soft);
}

.op-card-body {
  padding: 20px 22px;
}

.op-card-body-flush {
  padding: 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.op-btn-primary,
.op-btn-secondary,
.op-btn-ghost,
.op-btn-soft-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--op-control-height);
  font-family: var(--op-font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--op-radius-control);
  padding: 8px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.op-btn-primary {
  background-color: var(--op-brand);
  border-color: var(--op-brand);
  color: #ffffff;
}

.op-btn-primary:hover {
  background-color: var(--op-brand-hover);
  border-color: var(--op-brand-hover);
}

.op-btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-btn-secondary {
  background-color: var(--op-surface);
  border-color: var(--op-border-button);
  color: var(--op-ink);
}

.op-btn-secondary:hover {
  background-color: var(--op-surface-row-hover);
  border-color: var(--op-border-button);
}

.op-btn-secondary:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--op-text-tertiary);
}

.op-btn-ghost:hover {
  background-color: var(--op-surface-pill);
  color: var(--op-ink);
}

.op-btn-ghost:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-btn-soft-danger {
  background-color: var(--op-danger-bg);
  border-color: var(--op-danger-border);
  color: var(--op-danger-fg);
}

.op-btn-soft-danger:hover {
  background-color: var(--op-danger-border);
}

.op-btn-soft-danger:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-btn-icon {
  width: var(--op-control-height);
  height: var(--op-control-height);
  padding: 0;
  font-size: 15px;
}

.op-btn-icon:hover {
  filter: brightness(.97);
}

.op-btn-icon:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

/* ── Badges ───────────────────────────────────────────────────── */

.op-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--op-font-body);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: var(--op-radius-pill);
  border: 1px solid transparent;
  line-height: 1.5;
}

.op-badge-success {
  color: var(--op-success-fg);
  background-color: var(--op-success-bg);
}

.op-badge-warning {
  color: var(--op-warning-fg);
  background-color: var(--op-warning-bg);
  border-color: var(--op-warning-border);
}

.op-badge-danger {
  color: var(--op-danger-fg);
  background-color: var(--op-danger-bg);
  border-color: var(--op-danger-border);
}

.op-badge-neutral {
  color: var(--op-text-tertiary);
  background-color: var(--op-neutral-bg);
}

.op-badge-slate {
  color: var(--op-text-slate);
  background-color: var(--op-neutral-bg-alt);
}

.op-badge-deleted {
  color: var(--op-deleted-fg);
  background-color: var(--op-deleted-bg);
}

.op-badge-lg {
  font-size: 12px;
  padding: 4px 12px;
}

/* ── Forms ────────────────────────────────────────────────────── */

.op-label {
  display: block;
  font-family: var(--op-font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--op-text-secondary);
  margin-bottom: 6px;
}

.op-label-required {
  color: var(--op-brand);
  margin-left: 2px;
}

.op-text-field {
  width: 100%;
}

.op-input {
  width: 100%;
  height: var(--op-control-height);
  font-family: var(--op-font-body);
  font-size: 14px;
  color: var(--op-ink);
  background-color: var(--op-surface);
  border: 1px solid var(--op-border-input);
  border-radius: var(--op-radius-control);
  padding: 8px 12px;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.op-input:hover {
  border-color: var(--op-border-button);
}

.op-input:focus-visible,
.op-input:focus {
  outline: none;
  border-color: var(--op-brand);
  box-shadow: var(--op-focus-ring);
}

.op-input:disabled {
  background-color: var(--op-surface-table-header);
  color: var(--op-text-muted);
  cursor: not-allowed;
}

.op-field-hint {
  font-size: 12px;
  color: var(--op-text-muted);
  margin-top: 4px;
}

.op-field-error {
  font-size: 12px;
  color: var(--op-danger-fg);
  margin-top: 4px;
}

.op-date-field {
  width: 100%;
}

.op-select-field {
  width: 100%;
}

.op-select {
  width: 100%;
  height: var(--op-control-height);
  font-family: var(--op-font-body);
  font-size: 14px;
  color: var(--op-ink);
  background-color: var(--op-surface);
  border: 1px solid var(--op-border-input);
  border-radius: var(--op-radius-control);
  padding: 0 12px;
  line-height: calc(var(--op-control-height) - 2px);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.op-select:hover {
  border-color: var(--op-border-button);
}

.op-select:focus-visible,
.op-select:focus {
  outline: none;
  border-color: var(--op-brand);
  box-shadow: var(--op-focus-ring);
}

.op-select:disabled {
  background-color: var(--op-surface-table-header);
  color: var(--op-text-muted);
  cursor: not-allowed;
}

/* ── Tables ───────────────────────────────────────────────────── */

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

.op-table-header {
  background-color: var(--op-surface-table-header);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--op-text-secondary);
}

.op-table-header th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--op-border);
}

.op-table-row td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--op-border-soft);
}

.op-table-row:hover {
  background-color: var(--op-surface-row-hover);
}

.op-table-row-clickable {
  cursor: pointer;
}

.op-table-row-clickable:hover {
  background-color: var(--op-surface-row-hover);
}

.op-table-row-clickable:focus-visible {
  outline: none;
  box-shadow: inset var(--op-focus-ring);
}

/* ── Data table (CSS grid) ────────────────────────────────────── */

.op-data-table {
  background-color: var(--op-surface);
  border: 1px solid var(--op-border);
  border-radius: var(--op-radius-card);
  overflow: hidden;
  box-shadow: var(--op-shadow-card);
}

.op-data-table-header {
  display: grid;
  gap: 12px;
  padding: 12px 22px;
  background-color: var(--op-surface-table-header);
  border-bottom: 1px solid var(--op-border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--op-text-secondary);
  text-transform: uppercase;
}

.op-data-table-row {
  display: grid;
  gap: 12px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--op-border-soft);
  align-items: center;
}

.op-data-table-row:last-child {
  border-bottom: none;
}

.op-data-table-row-clickable {
  cursor: pointer;
}

.op-data-table-row-clickable:hover {
  background-color: var(--op-surface-row-hover);
}

.op-data-table-row-clickable:focus-visible {
  outline: none;
  box-shadow: inset var(--op-focus-ring);
}

.op-data-table-header {
  position: sticky;
  top: 0;
  z-index: 1;
}

.op-operators-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.op-customers-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.op-codes-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Pager ────────────────────────────────────────────────────── */

.op-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-shrink: 0;
}

.op-pager-status {
  font-size: 13px;
  color: var(--op-text-secondary);
}

/* ── Quantity stepper ─────────────────────────────────────────── */

.op-quantity-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.op-quantity-stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--op-radius-lg);
  border: 1px solid var(--op-border-button);
  background-color: var(--op-surface);
  font-size: 17px;
  font-weight: 700;
  color: var(--op-ink);
  cursor: pointer;
}

.op-quantity-stepper-btn:hover:not(:disabled) {
  background-color: var(--op-surface-row-hover);
}

.op-quantity-stepper-btn:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-quantity-stepper-btn:disabled {
  color: var(--op-text-muted);
  cursor: not-allowed;
}

.op-quantity-stepper-value {
  font-family: var(--op-font-display);
  font-weight: 800;
  font-size: 22px;
  width: 36px;
  text-align: center;
}

.op-quantity-stepper-lg .op-quantity-stepper-btn {
  width: 42px;
  height: 42px;
  font-size: 20px;
  border-radius: var(--op-radius-control);
}

.op-quantity-stepper-lg .op-quantity-stepper-value {
  font-size: 30px;
  width: 60px;
}

/* ── Picker row ───────────────────────────────────────────────── */

.op-picker-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--op-border);
  border-radius: var(--op-radius-panel);
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}

.op-picker-row:last-child {
  margin-bottom: 0;
}

.op-picker-row:hover {
  border-color: var(--op-brand);
  background-color: var(--op-surface-row-hover);
}

.op-picker-row:focus-visible {
  outline: none;
  box-shadow: var(--op-focus-ring);
}

.op-picker-row-text {
  flex: 1;
  min-width: 0;
}

.op-picker-row-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--op-ink);
}

.op-picker-row-subtitle {
  font-size: 12.5px;
  color: var(--op-text-secondary);
}

.op-picker-row-arrow {
  color: var(--op-text-faint);
}

.op-picker-row-selected {
  border-color: var(--op-brand);
  background-color: var(--op-surface-row-hover);
}

.op-picker-row-selected .op-picker-row-arrow {
  color: var(--op-brand);
}

/* ── Callouts ─────────────────────────────────────────────────── */

.op-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--op-radius-panel);
  border: 1px solid transparent;
  font-size: 12.5px;
  line-height: 1.55;
}

.op-callout i {
  flex-shrink: 0;
  line-height: 1.4;
}

.op-callout-info {
  background-color: var(--op-surface-pill);
  border-color: var(--op-border-pill);
  color: var(--op-text-tertiary);
}

.op-callout-warning {
  background-color: var(--op-warning-bg);
  border-color: var(--op-warning-border);
  color: var(--op-warning-fg);
}

/* ── Avatars ──────────────────────────────────────────────────── */

.op-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--op-neutral-bg);
  color: var(--op-text-tertiary);
  font-family: var(--op-font-display);
  font-weight: 700;
  font-size: 14px;
}

.op-avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.op-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.op-avatar-dark {
  background-color: var(--op-sidebar-avatar-bg);
  color: var(--op-sidebar-avatar-fg);
}

/* ── Empty / dashed states ────────────────────────────────────── */

.op-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--op-text-muted);
  text-align: center;
  font-style: italic;
  font-size: 13.5px;
}

.op-dashed-panel {
  border: 1px dashed var(--op-border-button);
  border-radius: var(--op-radius-panel);
  background-color: var(--op-surface-dashed-panel);
  padding: 20px;
}

.op-dashed-panel-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--op-ink);
  margin-bottom: 12px;
  font-style: normal;
}

.op-dashed-panel-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ── Misc ─────────────────────────────────────────────────────── */

.op-code {
  font-family: var(--op-font-display);
  font-weight: 600;
  letter-spacing: .02em;
}

.op-code-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.op-stat-value {
  font-family: var(--op-font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--op-ink);
}

/* ── Toasts ───────────────────────────────────────────────────── */

.op-toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.op-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: var(--op-surface);
  border: 1px solid var(--op-border);
  border-radius: var(--op-radius-panel);
  box-shadow: 0 6px 20px rgba(18, 41, 44, .14);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--op-ink);
}

.op-toast-message {
  flex: 1;
}

.op-toast-close {
  border: none;
  background: transparent;
  color: var(--op-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

.op-toast-close:hover {
  color: var(--op-ink);
}

.op-toast-success {
  border-left: 3px solid var(--op-success-fg);
}

.op-toast-error {
  border-left: 3px solid var(--op-danger-fg);
}

.op-toast-warning {
  border-left: 3px solid var(--op-warning-fg);
}

.op-toast-info {
  border-left: 3px solid var(--op-text-slate);
}

/* ── Confirm dialog backdrop ──────────────────────────────────── */

.op-confirm-backdrop {
  background-color: rgba(26, 39, 51, .45);
}

/* ── Generic modal backdrop (OpModal) ─────────────────────────── */

.op-modal-backdrop {
  background-color: rgba(26, 39, 51, .45);
  overscroll-behavior: contain;
}

/* ── Auth shell (login pages) ────────────────────────────────── */

.op-auth-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.op-auth-brand {
  flex: 0 0 42%;
  background: var(--op-sidebar-gradient);
  color: var(--op-sidebar-item-active-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow-y: auto;
}

.op-auth-brand-inner {
  max-width: 360px;
}

.op-auth-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--op-radius-control);
  object-fit: contain;
  margin-bottom: 18px;
}

.op-auth-brand-title {
  font-family: var(--op-font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 1.6px;
}

.op-auth-brand-subtitle {
  font-size: 12px;
  color: var(--op-sidebar-muted);
  letter-spacing: .5px;
  margin-top: 4px;
  margin-bottom: 22px;
}

.op-auth-brand-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--op-sidebar-item-inactive);
  margin: 0;
}

.op-auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background-color: var(--op-page-bg);
  min-width: 340px;
  min-height: 0;
  overflow-y: auto;
}

.op-auth-panel {
  width: 100%;
  max-width: 380px;
}

.op-auth-header {
  margin-bottom: 22px;
}

.op-auth-title {
  font-family: var(--op-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--op-ink);
}

.op-auth-subtitle {
  font-size: 13px;
  color: var(--op-text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.op-auth-field {
  margin-top: 18px;
}

.op-auth-submit {
  width: 100%;
  height: auto;
  justify-content: center;
  margin-top: 22px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.op-auth-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
}

.op-otp-field .op-input {
  height: auto;
  font-family: var(--op-font-display);
  font-size: 24px;
  letter-spacing: .6em;
  text-align: center;
  padding-right: 0;
}

@media (max-width: 860px) {
  .op-auth-shell {
    flex-direction: column;
  }

  .op-auth-brand {
    flex: 0 0 auto;
    padding: 28px 24px;
  }

  .op-auth-brand-inner {
    max-width: none;
  }

  .op-auth-brand-tagline {
    display: none;
  }

  .op-auth-content {
    padding: 28px 20px 40px;
    min-width: 0;
  }
}

/* ── Access denied ────────────────────────────────────────────── */

.op-access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  text-align: center;
  color: var(--op-text-secondary);
  padding: 24px;
}

/* ── Initial loader (index.html) ─────────────────────────────── */

.op-initial-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  background-color: var(--op-page-bg);
}

.op-spinner {
  border-radius: 50%;
  border: 4px solid var(--op-border-soft);
  border-top-color: var(--op-brand);
  animation: op-spin .8s linear infinite;
}

.op-btn-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

@keyframes op-spin {
  to {
    transform: rotate(360deg);
  }
}

.op-initial-loader-spinner {
  width: 40px;
  height: 40px;
}

#blazor-error-ui {
  background: var(--op-danger-bg);
  border-top: 1px solid var(--op-danger-border);
  color: var(--op-danger-fg);
  bottom: 0;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, .1);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1090;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}
