:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
#app {
  position: relative;
  min-height: 100%;
}
#app > *:not(.loading-progress):not(.loading-progress-text) {
  width: 100%;
}
html.auth-route body,
html.auth-route #app {
  background: linear-gradient(160deg, #e6f0fa 0%, #fff 45%);
}
.loading-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  margin: 0;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.loading-progress circle {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 7;
  transform-origin: 50% 50%;
}
.loading-progress circle:last-child {
  stroke: #0066cc;
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
  transition: stroke-dasharray 0.05s ease-in-out;
  transform: rotate(-90deg);
}
.loading-progress-text {
  display: none;
}
body {
  font-family: Montserrat, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
a { color: var(--primary); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 18px; }
button, input, select, textarea { font: inherit; }

.app-loading,
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 48px;
  background: linear-gradient(160deg, #e6f0fa 0%, #fff 45%);
  color-scheme: light;
}

.auth-card {
  width: min(440px, calc(100vw - 48px));
  padding: 32px 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 51, 102, 0.08);
  color-scheme: light;
}
.auth-logo-wrap { text-align: center; margin-bottom: 24px; }
.auth-logo { height: 36px; width: auto; display: inline-block; vertical-align: middle; }
.auth-card h1 {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  color: #334155;
}
.auth-card h1:focus,
.auth-card h1:focus-visible {
  outline: none;
}
.auth-subtitle {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
  margin: 0 0 24px;
}
.auth-card .auth-submit {
  width: 100%;
  margin-top: 0;
  padding: 12px;
  font-size: 14px;
  gap: 10px;
}
.auth-card .auth-submit svg { width: 18px; height: 18px; flex-shrink: 0; }

.form-field { display: grid; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.form-field label .req { color: var(--brand-red); }
.form-field small { color: var(--muted); font-size: 11px; }

/* Shared text-like controls (form fields, tender page, auth, modals) */
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-field select,
.form-field textarea,
.tender-create-page .category-picker__add input,
input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background-color: var(--input-bg);
  color: var(--input-text);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 13px;
}
.form-field textarea,
textarea {
  resize: vertical;
}
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"])::placeholder,
.tender-create-page .category-picker__add input::placeholder,
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder {
  color: var(--input-placeholder);
  opacity: 1;
}
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.form-field select:focus,
.form-field textarea:focus,
.tender-create-page .category-picker__add input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}

/* Force light-surface palette in auth card and modals */
.auth-card .form-field input:not([type="checkbox"]):not([type="radio"]),
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]),
.auth-card .form-field select,
.modal-card .form-field select,
.auth-card .form-field textarea,
.modal-card .form-field textarea {
  font-size: 14px;
  border: 1px solid #e2e8f0;
  background-color: #f0f5ff;
  color: #334155;
}
.auth-card .form-field input:not([type="checkbox"]):not([type="radio"])::placeholder,
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"])::placeholder {
  color: #94a3b8;
  opacity: 1;
}
.auth-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill,
.auth-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill:hover,
.auth-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill:focus,
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill,
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill:hover,
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #f0f5ff inset;
  -webkit-text-fill-color: #334155;
  caret-color: #334155;
  transition: background-color 99999s ease-out;
}
.is-error { border-color: var(--error-border); box-shadow: none; }
.form-error {
  display: none;
  font-size: 12px;
  line-height: 1.45;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.form-error.is-visible { display: block; }

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--surface-muted); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost-danger {
  background: transparent;
  color: var(--brand-red, #c8102e);
  border: 1px solid rgba(200, 16, 46, .42);
}
.btn-ghost-danger:hover:not(:disabled) {
  background: rgba(200, 16, 46, .06);
  border-color: var(--brand-red, #c8102e);
  color: var(--brand-red, #c8102e);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn.is-loading { pointer-events: none; opacity: .85; color: transparent; position: relative; }
.btn.is-loading svg { opacity: 0; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-action-indicator {
  position: sticky;
  top: 64px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: min(520px, calc(100vw - 48px));
  margin: 0 0 14px;
  padding: 9px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, white);
  color: var(--text-heading, var(--text));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  font-weight: 600;
}

.page-action-indicator__spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.role-list { display: grid; gap: 12px; }
.role-card {
  text-align: left;
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}
.role-card:hover { border-color: var(--primary); background: var(--surface-muted); }
.role-card span { color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100vh; background: var(--bg); }
.app-header {
  background: var(--surface);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header > .btn,
.app-header .header-actions .btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
}
.app-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  width: auto;
  height: 32px;
}
.app-header .logo img {
  height: 32px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}
.header-slot-spacer {
  flex: 1;
  max-width: 360px;
  min-width: 0;
}
.app-header .nav-links {
  display: flex;
  gap: 14px;
  margin-left: auto;
}
.app-header .nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-heading, var(--text));
  padding: 3px 0;
  border-bottom: 2px solid transparent;
}
.app-header .nav-links a:hover,
.app-header .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.app-header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .user-label {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
  white-space: nowrap;
}
.app-header .user-label strong {
  display: block;
  color: var(--text-heading, var(--text));
  font-size: 12px;
  font-weight: 600;
}
.app-header .user-label span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.app-header .icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.app-header .icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
  border-color: #cbd5e1;
}
.app-header .icon-btn svg { width: 18px; height: 18px; }
.app-header .icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--brand-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.app-header-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 180px;
  display: block;
}
.app-header-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.app-header-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: #fff;
  color: var(--text);
  min-height: 34px;
}
.app-header-search input:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}
.header-create-tender {
  flex-shrink: 0;
  white-space: nowrap;
}
.header-create-tender svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.app-main { padding: 20px 32px 48px; }
.page {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.welcome-card {
  max-width: 620px;
  margin: 80px auto 0;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
}
.welcome-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: var(--surface-muted);
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
}
.welcome-card p { color: var(--muted); line-height: 1.6; margin-bottom: 22px; }

.admin-users-page h1 { font-size: 22px; font-weight: 700; margin: 0; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  padding: 9px 12px;
  font-size: 13px;
}
.stats { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.users-table th,
.users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 1%;
  white-space: nowrap;
  padding-right: 6px;
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  padding-left: 10px;
}
.users-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: #fafbfc; }
[data-theme="dark"] .users-table tr:hover td { background: rgba(255,255,255,.03); }
.users-table tr.is-deactivated td { opacity: .55; background: #f8fafc; }
[data-theme="dark"] .users-table tr.is-deactivated td { background: rgba(255,255,255,.04); }
.users-table code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.chk-deactivated {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.chk-deactivated input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  accent-color: #c8102e;
  color-scheme: light;
  cursor: pointer;
  flex-shrink: 0;
  appearance: auto;
}
.chk-deactivated input[type="checkbox"]:checked {
  border-color: #c8102e;
  background-color: #c8102e;
}
.role-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.role-badge { border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 600; }
.role-badge--buyer { background: var(--buyer-bg); color: var(--buyer-fg); }
.role-badge--admin { background: var(--admin-bg); color: var(--admin-fg); }
.picker-combo { position: relative; }
.picker-combo--toolbar { min-width: 180px; flex-shrink: 0; }
.picker-combo.is-open { z-index: 50; }
.picker-combo__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.picker-combo__trigger svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.picker-combo__trigger:focus-visible,
.picker-combo.is-open .picker-combo__trigger {
  outline: none;
  border-color: #b8d4f0;
  box-shadow: 0 0 0 1px rgba(0, 102, 204, .14);
}
.picker-combo__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  overflow: hidden;
}
.picker-combo__list { list-style: none; padding: 4px 0; margin: 0; }
.picker-combo__list li { border-bottom: 1px solid var(--border); }
.picker-combo__list li:last-child { border-bottom: none; }
.picker-combo__item {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: var(--surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.picker-combo__item:hover { background: var(--surface-muted); }
.picker-combo__item.is-selected {
  color: var(--primary);
  font-weight: 600;
  background: var(--surface-muted);
}
.role-checks { display: flex; flex-direction: column; gap: 10px; }
.role-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.role-checks input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  accent-color: #c8102e;
  color-scheme: light;
  cursor: pointer;
  flex-shrink: 0;
  appearance: auto;
}
.role-checks input[type="checkbox"]:checked {
  border-color: #c8102e;
  background-color: #c8102e;
}
.template-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.template-table th,
.template-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.template-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--muted);
}
[data-theme="dark"] .template-table th { background: rgba(255,255,255,.04); }
.upload-zone {
  position: relative;
  display: block;
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-sm);
  padding: 28px 16px;
  text-align: center;
  background: var(--surface-muted);
  cursor: pointer;
  margin-bottom: 16px;
}
.upload-zone:hover { border-color: var(--primary); }
.upload-zone strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.upload-zone span { display: block; font-size: 12px; color: var(--muted); }
.upload-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eef5ff;
}
.upload-file__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0066cc;
  border: 1px solid #dbeafe;
}
.upload-file__icon svg { width: 22px; height: 22px; }
.upload-file__meta {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.upload-file__meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file__meta span {
  font-size: 12px;
  color: #64748b;
}
.upload-file__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.upload-file__remove:hover {
  background: #fff;
  color: #334155;
}
.upload-file__remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}
.upload-zone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.import-errors {
  display: none;
  font-size: 12px;
  background: var(--import-bg);
  border: 1px solid var(--import-border);
  color: var(--import-text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.import-errors.is-visible { display: block; }
.import-errors ul { margin: 6px 0 0 18px; }
.import-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 16px;
}
.import-confirm-text {
  font-size: 14px;
  color: #334155;
  margin: 12px 0 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal-backdrop--stacked {
  z-index: 300;
}
.modal-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  color: #334155;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  padding: 24px;
  color-scheme: light;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #334155; }
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #334155;
}
.modal-card .form-field {
  display: block;
  margin-bottom: 14px;
}
.modal-card .form-field > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.modal-card .form-field > label .req { color: #c8102e; }
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]) {
  display: block;
}
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"]).is-error,
.modal-card .form-field select.is-error,
.modal-card .form-field textarea.is-error {
  border-color: #fecaca;
  box-shadow: none;
}
.modal-card .form-field input:not([type="checkbox"]):not([type="radio"])::placeholder,
.modal-card .form-field textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}
.modal-card .form-field select:focus,
.modal-card .form-field textarea:focus {
  border-color: #b8d4f0;
  box-shadow: 0 0 0 1px rgba(0, 102, 204, 0.14);
}
.modal-card .form-error {
  margin-bottom: 12px;
}
.modal-card .role-checks label {
  color: #334155;
}
.modal-card .upload-zone strong { color: #334155; }
.modal-card .upload-file {
  border-color: #bfdbfe;
  background: #eef5ff;
}
.modal-card .upload-file__meta strong { color: #334155; }
.modal-card .upload-file__meta span { color: #64748b; }
.modal-card .btn-ghost {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.modal-card .btn-ghost:hover {
  background: #f0f5ff;
}
.modal-card .btn-ghost-danger {
  background: transparent;
  color: #c8102e;
  border: 1px solid rgba(200, 16, 46, .42);
}
.modal-card .btn-ghost-danger:hover:not(:disabled) {
  background: rgba(200, 16, 46, .06);
  border-color: #c8102e;
  color: #c8102e;
}
.modal-card .btn-primary {
  background: #0066cc;
  color: #fff;
}
.modal-card .btn-primary:hover {
  background: #005bbf;
}
.icon-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--text);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: .25s;
  pointer-events: none;
  z-index: 400;
  max-width: min(360px, calc(100vw - 48px));
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--error-bg);
  color: var(--error-text);
  border-top: 1px solid var(--error-border);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
