:root {
  --brand-accent: #F15A22;       /* logo orange */
  --brand-accent-dark: #C7431A;  /* hover/active shade */
  --brand-accent-light: #FFB38A; /* light tint, for links on dark backgrounds */
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #1f2430;
}
.layout { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 220px;
  flex: 0 0 220px;
  min-height: 100vh;
  background: #1f2430;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}
.sidebar-brand { display: block; margin-bottom: 28px; }
.sidebar-brand img { display: block; width: 100%; max-width: 170px; height: auto; }
.sidebar-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-links a {
  color: #cfd4e0; text-decoration: none; font-size: 14px; padding: 9px 10px; border-radius: 4px;
}
.sidebar-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.sidebar-user {
  font-size: 12px; color: #cfd4e0; padding-top: 16px; margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-user-info { margin-bottom: 6px; word-break: break-word; }
.link-button {
  background: none; border: none; color: var(--brand-accent-light); cursor: pointer; padding: 0; font-size: 13px;
}
.content { flex: 1; max-width: 1100px; margin: 24px auto; padding: 0 24px; }
h1 { font-size: 22px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
th { background: #eef0f4; font-weight: 600; }
tbody tr:hover { background: #f9fafb; }
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e5e7eb; }
.badge-active { background: #d3f9d8; color: #1a7a2e; }
.badge-suspended, .badge-revoked, .badge-expired, .badge-cancelled { background: #ffe0e0; color: #a41414; }
.badge-grace, .badge-past_due, .badge-pending { background: #fff4d6; color: #8a6100; }
.badge-lead, .badge-onboarding { background: #dbeafe; color: #1e40af; }
.badge-archived, .badge-inactive { background: #e5e7eb; color: #4b5563; }
.badge-issued, .badge-unused { background: #dbeafe; color: #1e40af; }
.badge-refreshed, .badge-redeemed { background: #d3f9d8; color: #1a7a2e; }
.badge-enforced { background: #d3f9d8; color: #1a7a2e; }
.badge-monitor { background: #fff4d6; color: #8a6100; }
.badge-disabled { background: #e5e7eb; color: #4b5563; }
.badge-err { background: #ffe0e0; color: #a41414; }
.badge-crit, .badge-alert, .badge-emerg { background: #ffd0d0; color: #7a0d0d; }
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; }
.pagination .current { color: #6b7280; }
form.inline { display: inline; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.page-header h1 { margin: 0; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.field label { margin: 0; }
.field .required { color: #d92d20; margin-left: 2px; font-weight: 400; }
.field .hint { font-size: 12px; color: #6b7280; font-weight: 400; margin-top: 2px; }
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-bar .field { min-width: 180px; margin-bottom: 0; }
.filter-bar .actions { display: flex; gap: 8px; }

.form-card { max-width: 700px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid + .form-grid { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.form-section-title { margin: 0 0 2px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; }

/* Read-only label/value pairs (instance/customer/license detail pages) — a
   responsive grid instead of one value per full-width row, so wide screens
   don't waste horizontal space on a single narrow column of text. */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; }
.detail-grid .detail-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-grid .detail-item.full { grid-column: 1 / -1; }
.detail-grid .detail-label { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-grid .detail-value { font-size: 14px; overflow-wrap: anywhere; }
.form-actions {
  display: flex; gap: 10px; align-items: center;
  margin-top: 8px; padding-top: 20px; border-top: 1px solid #e5e7eb;
}
textarea.mono {
  font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace; font-size: 13px;
}
.field-group {
  border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; background: #fafbfc;
  margin-bottom: 16px;
}
.field-group .field:last-child { margin-bottom: 0; }
.field-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #8992a3; margin: 0 0 12px;
}
.field-divider {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 14px;
  color: #9aa1b1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.field-divider::before, .field-divider::after { content: ""; flex: 1; border-top: 1px solid #e5e7eb; }
.preset-chips { display: flex; gap: 6px; margin-top: 6px; }
.preset-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid #cbd2de;
  background: #fff; color: #4b5563; cursor: pointer;
}
.preset-chip:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.preset-chip.active { border-color: var(--brand-accent); background: var(--brand-accent); color: #fff; }

.status-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 10px 0; }
.status-item { display: flex; align-items: center; font-size: 14px; }
.status-item strong { margin-right: 6px; }
.status-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; flex-shrink: 0;
}
.status-dot-ok { background: #1a7a2e; animation: status-pulse-ok 2s ease-in-out infinite; }
.status-dot-degraded { background: #8a6100; animation: status-pulse-warn 1.4s ease-in-out infinite; }
.status-dot-down { background: #a41414; animation: status-pulse-warn 1.1s ease-in-out infinite; }
.status-dot-unknown { background: #9aa1b1; }
@keyframes status-pulse-ok {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 122, 46, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(26, 122, 46, 0); }
}
@keyframes status-pulse-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(164, 20, 20, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(164, 20, 20, 0); }
}
.heartbeat-meta { color: #6b7280; font-size: 13px; margin: 2px 0 0; }
.heartbeat-stale {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff4d6; color: #8a6100; border: 1px solid #f5e3ad;
  border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 600; margin-top: 10px;
}
.disk-bar-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.disk-bar-wrap {
  background: #eef0f4; border-radius: 6px; height: 8px; width: 160px; overflow: hidden; flex-shrink: 0;
}
.disk-bar-fill { height: 100%; border-radius: 6px; background: #1a7a2e; transition: width 0.2s; }
.disk-bar-fill.warn { background: #8a6100; }
.disk-bar-fill.danger { background: #a41414; }

.feature-groups { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; }
.feature-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #8992a3; margin: 0 0 8px;
}
.toggle-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: #fff;
}
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #eef0f4;
  cursor: pointer; transition: background 0.1s;
}
.toggle-row:nth-child(2n) { border-left: 1px solid #eef0f4; }
.toggle-row:nth-last-child(-n+2) { border-bottom: none; }
.toggle-row:hover { background: #fafbfc; }
.toggle-row .toggle-label { font-size: 13px; font-weight: 500; color: #1f2430; }
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; background: #d7dbe3; border: 1px solid #c7ccd6;
  border-radius: 999px; transition: 0.15s; cursor: pointer;
}
.toggle-slider::before {
  content: ""; position: absolute; height: 15px; width: 15px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: 0.15s; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand-accent); border-color: var(--brand-accent-dark); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(17px); }
.toggle-switch input:focus-visible + .toggle-slider { box-shadow: 0 0 0 3px rgba(241, 90, 34, 0.25); }
@media (max-width: 640px) {
  .toggle-grid { grid-template-columns: 1fr; }
  .toggle-row:nth-child(2n) { border-left: none; }
  .toggle-row:nth-last-child(-n+2) { border-bottom: 1px solid #eef0f4; }
  .toggle-row:last-child { border-bottom: none; }
}
input[readonly] { background: #f5f6f8; color: #6b7280; cursor: not-allowed; }
input:disabled, select:disabled { background: #f5f6f8; color: #9aa1b1; cursor: not-allowed; opacity: 1; }
select:disabled:hover { border-color: #cbd2de; }
.table-count { font-size: 13px; color: #6b7280; margin: 0 0 8px; }
.card-title { margin: 0 0 4px; font-size: 16px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #8992a3; margin-bottom: 4px;
}
.detail-value { font-size: 14px; color: #1f2430; }
.detail-value .muted { color: #9aa1b1; font-style: italic; }
.mono-cell { font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace; font-size: 13px; color: #4b5563; }
.id-with-copy { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn-inline {
  background: #eef0f4; color: #4b5563; border: none; border-radius: 4px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.copy-btn-inline:hover { background: #e5e7eb; }
.code-reveal {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #f5f6f8; border: 1px dashed #cbd2de; border-radius: 8px;
  padding: 18px 20px; margin: 4px 0 20px;
}
.code-reveal .code-value {
  font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 0.03em; color: #1f2430;
  flex: 1; min-width: 200px; user-select: all;
}
.copy-btn {
  flex-shrink: 0; background: var(--brand-accent); color: #fff; border: none;
  padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.copy-btn:hover { background: var(--brand-accent-dark); }
.copy-btn.copied { background: #1a7a2e; }
.action-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 16px; margin-bottom: 10px; flex-wrap: wrap;
  background: #fafbfc; border: 1px solid #eef0f4; border-left: 3px solid #cbd2de; border-radius: 8px;
}
.action-row:last-child { margin-bottom: 0; }
.action-row.tone-neutral { border-left-color: #9aa1b1; }
.action-row.tone-warn { border-left-color: #8a6100; }
.action-row.tone-danger { border-left-color: #a41414; }
.action-info strong { display: block; font-size: 14px; }
.action-info .hint { margin: 2px 0 0; font-size: 12px; color: #6b7280; max-width: 320px; }
.action-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-form input[type="number"] { width: 90px; }
.action-form input[type="text"] { width: 200px; }

.revoked-notice {
  background: #fff5f5; border: 1px solid #ffd6d6; border-left: 3px solid #a41414; border-radius: 8px;
  padding: 14px 16px;
}
.revoked-notice strong { color: #a41414; font-size: 14px; }
.revoked-notice p { margin: 6px 0 0; font-size: 13px; color: #4b5563; }
.revoked-notice p.hint { margin-top: 8px; color: #6b7280; }
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; align-items: flex-start; }
}
.empty-state { text-align: center; padding: 40px 24px; color: #6b7280; }
.empty-state p { margin: 0 0 12px; }
input, select, textarea {
  padding: 10px 12px; border: 1px solid #cbd2de; border-radius: 6px; font-size: 14px; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(241, 90, 34, 0.12);
}
input:hover, select:hover, textarea:hover { border-color: #b8c0cc; }
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 10px 34px 10px 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}
select:hover { border-color: #b8c0cc; }
select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23F15A22' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.checkbox-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 400; margin: 14px 0 0; color: #1f2430;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; accent-color: var(--brand-accent); }
label { display: block; font-size: 13px; margin: 10px 0 4px; font-weight: 600; }
button, .button {
  background: var(--brand-accent); color: #fff; border: none; padding: 8px 14px; border-radius: 4px;
  cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--brand-accent-dark); }
button.secondary, .button.secondary { background: #6b7280; }
button.danger, .button.danger { background: #d92d20; }
.flashes { list-style: none; padding: 0; margin: 0 0 16px; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #d3f9d8; color: #1a7a2e; }
.flash-danger { background: #ffe0e0; color: #a41414; }
.flash-warning { background: #fff4d6; color: #8a6100; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-tile { flex: 1; min-width: 140px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 16px; }
.stat-tile .value { font-size: 26px; font-weight: 700; }
.stat-tile .label { font-size: 12px; color: #6b7280; }
.stat-tile.alert-red .value { color: #a41414; }
.stat-tile.alert-amber .value { color: #8a6100; }
.stat-tile.alert-ok .value { color: #1a7a2e; }

.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px;
  align-items: start;
}
.dashboard-grid .card h2 { font-size: 15px; margin: 0 0 12px; }
.dashboard-grid .card table { margin-bottom: 8px; }
.dashboard-grid .card .empty-state { padding: 24px; }
.table-scroll { overflow-x: auto; }
.table-scroll table th, .table-scroll table td { white-space: nowrap; }

.activity-feed { list-style: none; margin: 0 0 8px; padding: 0; }
.activity-feed li { padding: 8px 0; border-bottom: 1px solid #eef0f4; font-size: 13px; }
.activity-feed li:last-child { border-bottom: none; }
.activity-line { color: #1f2430; overflow-wrap: anywhere; }
.activity-target { color: #6b7280; }
.activity-time { color: #9aa1b1; font-size: 12px; margin-top: 2px; }

.card-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--brand-accent); font-size: 13px; font-weight: 600; text-decoration: none;
}
.card-link:hover { color: var(--brand-accent-dark); text-decoration: underline; }

/* Separates a trailing .card-link (or similar) from the data/content above it
   within the same .card, e.g. instance detail's "View error logs" link. */
.card-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Note: single hyphenated class names on purpose (not `.row-action.danger` etc.) —
   a compound class like `.danger` would also match the unrelated global
   `button.danger`/`.button.danger` solid-red rules elsewhere in this file, whose
   higher specificity (element+class) would silently override this reset. */
.row-action {
  display: inline-block; background: #f1f3f5; border: none; border-radius: 4px;
  padding: 4px 10px; margin: 0; cursor: pointer;
  font-size: 12px; font-weight: 600; text-decoration: none; color: #4b5563;
  transition: background-color 0.12s ease;
}
.row-action:hover { text-decoration: none; }
.row-action-accent { color: var(--brand-accent-dark); background: #ffe9dd; }
.row-action-accent:hover { background: #ffd9c2; }
.row-action-muted { color: #4b5563; background: #f1f3f5; }
.row-action-muted:hover { background: #e5e7eb; }
.row-action-danger { color: #a41414; background: #ffe0e0; }
.row-action-danger:hover { background: #ffcccc; }
.row-action-success { color: #1a7a2e; background: #d3f9d8; }
.row-action-success:hover { background: #baf0c2; }

.role-hint-box {
  border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; margin-top: 8px; background: #fafbfc;
}
.role-hint-row { font-size: 12px; color: #4b5563; line-height: 1.7; }
.role-hint-row strong { color: #1f2430; }

.form-subtitle { color: #6b7280; font-size: 13px; margin: -6px 0 18px; }
.muted { color: #9aa1b1; }
.version-pill {
  display: inline-block; font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
  font-size: 12px; font-weight: 600; color: #4b5563; background: #eef0f4;
  border-radius: 999px; padding: 2px 10px;
}
.notice-box { border-radius: 8px; padding: 12px 16px; margin: 4px 0 18px; font-size: 13px; line-height: 1.5; }
.notice-box.tone-warn { background: #fff4d6; color: #6b4e00; border: 1px solid #f5e3ad; }

.pdf-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  z-index: 1000; align-items: center; justify-content: center; padding: 32px;
}
.pdf-modal-overlay.is-open { display: flex; }
.pdf-modal {
  background: #fff; border-radius: 10px; width: 100%; max-width: 860px; height: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); overflow: hidden;
}
.pdf-modal-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb; background: #fafbfc;
}
.pdf-modal-title { font-size: 14px; font-weight: 600; color: #1f2430; flex: 1; overflow-wrap: anywhere; }
.pdf-modal-header a { font-size: 13px; color: var(--brand-accent); text-decoration: none; }
.pdf-modal-header a:hover { text-decoration: underline; }
.pdf-modal-close {
  background: none; border: none; color: #6b7280; cursor: pointer; font-size: 20px; line-height: 1; padding: 4px;
}
.pdf-modal-close:hover { color: #1f2430; }
.pdf-modal-body { flex: 1; min-height: 0; }
.pdf-modal-body iframe { width: 100%; height: 100%; border: none; display: block; }

.file-drop {
  position: relative; display: flex; align-items: center; gap: 12px;
  border: 1px dashed #cbd2de; border-radius: 8px; padding: 16px 18px;
  background: #fafbfc; transition: border-color 0.15s, background-color 0.15s;
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--brand-accent); background: #fff6f2; }
.file-drop.has-file { border-style: solid; border-color: #1a7a2e; background: #f3fbf4; }
.file-drop-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; margin: 0;
}
.file-drop-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px;
  background: #eef0f4; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #6b7280;
}
.file-drop.has-file .file-drop-icon { background: #d3f9d8; color: #1a7a2e; }
.file-drop-body { flex: 1; min-width: 0; pointer-events: none; }
.file-drop-title { font-size: 13px; font-weight: 600; color: #1f2430; }
.file-drop-title .file-drop-browse { color: var(--brand-accent); text-decoration: underline; }
.file-drop-meta { font-size: 12px; color: #6b7280; margin-top: 1px; overflow-wrap: anywhere; }
.file-drop-clear {
  flex-shrink: 0; background: none; border: none; color: #6b7280; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 4px; z-index: 1; position: relative;
}
.file-drop-clear:hover { color: #d92d20; }
input.input-valid { border-color: #1a7a2e; }
input.input-valid:focus { box-shadow: 0 0 0 3px rgba(26, 122, 46, 0.15); }
input.input-invalid { border-color: #d92d20; }
input.input-invalid:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.15); }
.hint-ok { color: #1a7a2e; }
.hint-bad { color: #d92d20; }
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin: 0;
  max-width: none;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #eef0f4 55%, #e4e7ec 100%);
}
.auth-page .flashes { width: 100%; max-width: 380px; }
.auth-wrap {
  max-width: 380px;
  width: 100%;
  margin: 0;
  border-radius: 12px;
  border-top: 4px solid var(--brand-accent);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 36px 32px;
}
.auth-wrap h1 { font-size: 20px; margin: 0 0 20px; text-align: center; }
.auth-wrap label { font-size: 13px; }
.auth-wrap input { padding: 10px 12px; font-size: 15px; }
.auth-wrap button[type="submit"] { width: 100%; padding: 11px 14px; font-size: 15px; margin-top: 4px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { max-width: 240px; height: auto; }
.qr-code {
  display: flex; justify-content: center; margin: 16px 0;
  background: #fff; padding: 12px; border: 1px solid #e5e7eb; border-radius: 6px;
}
.qr-code svg { width: 200px; height: 200px; }
details { margin: 12px 0; font-size: 13px; color: #6b7280; }
details summary { cursor: pointer; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
