/* Jan Admin — minimal teal slate redesign (Blade + CSS only) */

@font-face {
  font-family: "Dana";
  src: url("/fonts/DanaVF.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/fonts/Dana-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/fonts/Dana-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/fonts/DanaFaNum.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039, U+0660-0669, U+06F0-06F9;
}

:root {
  --bg: #eef3f2;
  --bg-accent: #d9ebe7;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --border: #dce6e3;
  --border-strong: #c5d4d0;
  --text: #14221f;
  --muted: #5f726c;
  --primary: #0f6b63;
  --primary-strong: #0b544e;
  --primary-soft: #dff3ef;
  --primary-glow: rgba(15, 107, 99, 0.16);
  --sidebar: #102523;
  --sidebar-2: #16332f;
  --sidebar-text: #d7e8e4;
  --sidebar-muted: #8aa8a1;
  --danger: #b42318;
  --success: #067647;
  --warning: #b54708;
  --info: #175cd3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 34, 31, 0.04), 0 8px 24px rgba(16, 34, 31, 0.04);
  --shadow-lg: 0 12px 40px rgba(16, 34, 31, 0.08);
  --sidebar-w: 260px;
  --font: "Dana", Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 100% -10%, var(--bg-accent) 0%, transparent 55%),
    radial-gradient(700px 420px at -5% 110%, #e4efe8 0%, transparent 50%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

body.admin-app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

a:hover {
  color: var(--primary-strong);
}

.admin-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  overflow: hidden;
}

/* —— Sidebar —— */
.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(165deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.15rem 0.9rem 1.5rem;
  position: relative;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  padding: 0.55rem 0.65rem 1.1rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
}

.admin-brand:hover {
  color: #fff;
  text-decoration: none;
}

.admin-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #1aa89b, #0f6b63);
  box-shadow: 0 8px 20px rgba(15, 107, 99, 0.35);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.admin-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.admin-brand-text strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.admin-brand-text small {
  color: var(--sidebar-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.admin-nav a {
  display: block;
  padding: 0.58rem 0.75rem;
  border-radius: 11px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}

.admin-nav a.is-active {
  background: rgba(26, 168, 155, 0.18);
  color: #fff;
  border-color: rgba(26, 168, 155, 0.28);
  box-shadow: inset 3px 0 0 #1aa89b;
  text-decoration: none;
}

.admin-nav .nav-section {
  margin: 1rem 0.7rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--sidebar-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* —— Main / Topbar —— */
.admin-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 230, 227, 0.9);
  padding: 0.95rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.admin-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.4rem 1.4rem 2rem;
}

.admin-content.is-spa-loading,
.spa-table.is-spa-loading {
  opacity: 0.55;
  pointer-events: none;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  font-size: 0.8rem;
  border: 1px solid #cfe7e2;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.58rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #128277 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.btn:hover {
  filter: brightness(1.04);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
  filter: none;
}

.btn-danger {
  background: linear-gradient(180deg, #d92d20, var(--danger));
  box-shadow: 0 6px 16px rgba(180, 35, 24, 0.18);
}

.btn-sm {
  padding: 0.38rem 0.7rem;
  font-size: 0.84rem;
  border-radius: 9px;
}

.btn.is-current {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: #b7ddd6;
  box-shadow: none;
}

.btn.is-current:hover {
  color: var(--primary-strong);
  filter: none;
}

/* —— Cards / Stats —— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}

.card + .card {
  margin-top: 1rem;
}

.card-title {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.stat::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #1aa89b, var(--primary));
  border-radius: 0 3px 3px 0;
}

.stat .label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stat .value {
  margin-top: 0.35rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat .value.value-sm {
  font-size: 1.05rem;
  line-height: 1.45;
}

.stat .cell-sub {
  margin-top: 0.25rem;
}

.stat-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.stat-link:hover {
  border-color: #b7ddd6;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transform: translateY(-2px);
}

/* —— Forms —— */
.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: #314540;
}

.form-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.55;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.form-control:hover {
  border-color: var(--border-strong);
}

.form-control:focus {
  outline: none;
  background: #fff;
  border-color: #78c0b6;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input.js-plain-int {
  -moz-appearance: textfield;
  appearance: textfield;
}

input.js-plain-int::-webkit-outer-spin-button,
input.js-plain-int::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-error {
  margin-top: 0.4rem;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.form-error:empty {
  display: none;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-static {
  padding: 0.65rem 0.8rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-weight: 700;
}

.form-control.is-invalid,
.ui-select.is-invalid .ui-select-toggle {
  border-color: #f3b4ae;
  background: #fff8f7;
}

.choice-pills.is-invalid {
  border: 1px solid #f3b4ae;
  background: #fff8f7;
  border-radius: 12px;
  padding: 0.4rem;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f726c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2.2rem;
  cursor: pointer;
}

.js-money {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  direction: ltr;
  text-align: left;
}

/* —— Alerts —— */
.alert {
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.alert-success {
  background: #ecfdf3;
  color: var(--success);
  border: 1px solid #abefc6;
}

.alert-danger {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.alert-info {
  background: #eff8ff;
  color: var(--info);
  border: 1px solid #b2ddff;
}

/* —— Tables —— */
.table-wrap {
  overflow-x: auto;
}

table.admin-table,
table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

table.admin-table th,
table.admin-table td,
table.data-table th,
table.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.78rem 0.75rem;
  text-align: right;
  vertical-align: middle;
}

table.admin-table th,
table.data-table th {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
  background: linear-gradient(180deg, #f8fbfa, #f3f8f6);
}

table.admin-table tbody tr:hover td,
table.data-table tbody tr:hover td {
  background: #f8fbfa;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.badge-success {
  background: #ecfdf3;
  color: var(--success);
}

.badge-warning {
  background: #fffaeb;
  color: var(--warning);
}

.badge-danger {
  background: #fef3f2;
  color: var(--danger);
}

.badge-info {
  background: #eff8ff;
  color: var(--info);
}

.badge-muted {
  background: #f2f4f3;
  color: var(--muted);
}

/* —— Filters / actions —— */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-bar__search {
  flex: 1 1 220px;
  min-width: 180px;
}

.filter-select {
  width: auto;
  min-width: 140px;
  flex: 0 1 160px;
}

.filter-bar__actions {
  display: flex;
  gap: 0.4rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.meta-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--surface-2);
}

.meta-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
  font-weight: 700;
}

.cell-title {
  font-weight: 800;
}

.cell-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

.actions {
  white-space: nowrap;
  text-align: left;
}

.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.break-all {
  word-break: break-all;
}

.muted {
  color: var(--muted);
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card .table-wrap {
  padding: 0;
}

.pager {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.page-link:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
  text-decoration: none;
}

.page-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.page-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child {
  border-bottom: 0;
}

.timeline-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.status-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.quick-links a {
  display: inline-flex;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.quick-links a:hover {
  background: var(--primary-soft);
  border-color: #b7ddd6;
  color: var(--primary-strong);
}

.plan-row,
.inline-edit-row,
.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.plan-row .form-control,
.inline-edit-row .form-control,
.option-row .form-control {
  width: auto;
  min-width: 90px;
  flex: 1 1 110px;
}

.inline-delete {
  margin: -0.35rem 0 0.85rem;
}

.delete-confirm-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.delete-confirm-row[hidden] {
  display: none !important;
}

.star-rating-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.35rem;
}

.star-rating-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.1rem 0.15rem;
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
  color: rgba(22, 64, 110, 0.22);
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating-btn:hover {
  transform: scale(1.08);
}

.star-rating-btn.is-filled {
  color: #ff5c34;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.empty-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* —— Catalog company extras —— */
.company-identity-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.logo-preview-panel {
  position: sticky;
  top: 0.5rem;
}

.logo-preview-frame {
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, #e7f6f2, transparent 55%),
    var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1rem;
}

.logo-preview-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview-empty {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.offer-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 0.75rem;
}

.site-card-preview {
  position: sticky;
  top: 0.75rem;
}

.mock-offer-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f5faf8);
  padding: 1rem;
  overflow: hidden;
  min-height: 280px;
}

.mock-offer-logo-wrap {
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 0.75rem;
  width: 72px;
  height: 72px;
  opacity: 0.35;
}

.mock-offer-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mock-offer-body {
  position: relative;
  z-index: 1;
  padding-inline-end: 4.5rem;
}

.mock-offer-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.mock-offer-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.mock-offer-features {
  margin: 0.65rem 0;
  padding-inline-start: 1rem;
  font-size: 0.85rem;
}

.mock-offer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0;
}

.mock-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

.mock-price-block {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.mock-price-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.mock-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.mock-price-row strong {
  font-size: 1.2rem;
}

.mock-price-row s {
  color: var(--muted);
  font-size: 0.9rem;
}

.mock-install-block {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.section-label {
  margin: 1.1rem 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.price-calc-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #eaf7f4, #f4fbf9);
  border: 1px solid #c6e5de;
}

.price-calc-box > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.price-calc-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.price-calc-box strong {
  font-size: 0.95rem;
}

.plan-create-box {
  padding: 0.9rem;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
}

.plan-edit-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr 0.9fr 0.9fr auto auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.plan-sample {
  font-size: 0.8rem;
  color: var(--muted);
}

.plans-table thead th {
  font-size: 0.78rem;
  white-space: nowrap;
}

/* —— Login —— */
.login-page {
  min-height: 100vh;
  padding: 1.25rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 480px at 100% 0%, #cfe8e2 0%, transparent 55%),
    radial-gradient(700px 420px at 0% 100%, #e4efe8 0%, transparent 50%),
    #eef3f2;
}

.login-shell {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  background:
    radial-gradient(500px 280px at 10% 0%, rgba(26, 168, 155, 0.35), transparent 60%),
    linear-gradient(160deg, #102523 0%, #16332f 55%, #0f6b63 130%);
  color: #fff;
  padding: 2.35rem 2rem;
  display: flex;
  align-items: center;
}

.login-brand-inner {
  width: 100%;
}

.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 900;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.login-brand h1 {
  margin: 1.15rem 0 0.55rem;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.35;
}

.login-brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  line-height: 1.75;
}

.login-points {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.login-points li {
  position: relative;
  padding-right: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 700;
}

.login-points li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #7dd3c7;
}

.login-panel {
  padding: 2rem 1.75rem;
  display: flex;
  align-items: center;
}

.login-panel-inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.login-header {
  margin-bottom: 1.35rem;
}

.login-kicker {
  margin: 0 0 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.login-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  font-weight: 900;
  color: var(--text);
}

.login-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form .form-control {
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.15rem 0 1.15rem;
}

.btn-login {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-left: 2.75rem;
}

.password-toggle {
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.password-toggle:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.password-toggle .eye-off {
  display: none;
}

.password-toggle.is-visible .eye-on {
  display: none;
}

.password-toggle.is-visible .eye-off {
  display: block;
}

@media (max-width: 1100px) {
  .offer-workspace,
  .company-identity-grid {
    grid-template-columns: 1fr;
  }

  .site-card-preview,
  .logo-preview-panel {
    position: static;
  }

  .price-calc-box {
    grid-template-columns: 1fr;
  }

  .plan-edit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 1.5rem 1.35rem 1.25rem;
  }

  .login-brand h1 {
    font-size: 1.25rem;
  }

  .login-points {
    display: none;
  }

  .login-panel {
    padding: 1.5rem 1.25rem 1.75rem;
  }
}

@media (max-width: 960px) {
  body.admin-app {
    height: auto;
    overflow: auto;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .admin-main {
    height: auto;
    overflow: visible;
  }

  .admin-content {
    overflow: visible;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .meta-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .meta-list.meta-list--horizontal {
    grid-template-columns: 1fr;
  }

  .meta-list.meta-list--horizontal > .meta-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 1rem;
  }
}

/* —— Inner pages: stack, forms, detail panels —— */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-stack > .page-actions,
.page-stack > .product-tabs,
.page-stack > .filter-bar,
.page-stack > .stats {
  margin-bottom: 0;
}

.page-stack > .card + .card,
.page-stack > .detail-grid + .card,
.page-stack > .card + .detail-grid,
.page-stack > .detail-grid + .detail-grid,
.page-stack > .offer-workspace {
  margin-top: 0;
}

.page-stack > [style*="margin-top"],
.page-stack > [style*="margin-bottom"] {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.page-actions {
  align-items: center;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.product-tabs,
.segment-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.45rem;
  background: #e7efed;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: none;
  width: fit-content;
  max-width: 100%;
}

.product-tabs .btn,
.segment-tabs .btn,
.page-actions.product-tabs .btn {
  border-radius: 999px;
  box-shadow: none;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.product-tabs .btn:hover,
.segment-tabs .btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  transform: none;
  filter: none;
}

.product-tabs .btn.is-current,
.segment-tabs .btn.is-current,
.page-actions .btn.is-current {
  background: #fff;
  color: var(--primary-strong);
  border-color: #cfe3de;
  box-shadow: 0 4px 12px rgba(16, 34, 31, 0.06);
}

.form-card {
  padding: 1.25rem 1.35rem 1.35rem;
}

.form-card > .card-title:first-child,
.card > .card-title:first-child {
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.form-card > .form-hint:nth-child(2),
.card > .form-hint:first-of-type {
  margin-top: -0.35rem;
  margin-bottom: 1rem;
}

.form-card .card-title,
#pricing-form .card-title,
.form-card .section-label {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary-soft), transparent 85%);
  border: 0;
  color: var(--primary-strong);
  font-size: 0.92rem;
}

.form-card > .card-title:first-child,
#pricing-form > .card-title:first-child {
  margin-top: 0;
  background: none;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-size: 1.02rem;
}

.section-label {
  margin: 1.35rem 0 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary-soft), transparent 85%);
  color: var(--primary-strong);
  font-size: 0.9rem;
}

.detail-grid {
  gap: 1rem;
}

.detail-grid > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.detail-grid > .card.card-fit {
  height: auto;
  align-self: start;
}

.detail-grid.detail-grid--top {
  align-items: start;
}

.detail-grid.detail-grid--top > .card {
  height: auto;
}

.meta-list.meta-list--horizontal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.meta-list.meta-list--horizontal > div {
  grid-template-columns: minmax(72px, 38%) 1fr;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
}

.meta-list.meta-list--horizontal > .meta-span-2 {
  grid-column: 1 / -1;
}

.meta-list.meta-list--horizontal dt {
  font-size: 0.72rem;
}

.meta-list.meta-list--horizontal dd {
  font-size: 0.86rem;
  word-break: break-word;
}

.detail-grid .meta-list {
  flex: 1;
}

.meta-list > div {
  align-items: center;
}

.meta-list dd {
  font-variant-numeric: tabular-nums;
}

.table-card > .card-title {
  padding: 1rem 1.15rem 0.85rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbfa, #fff);
}

.table-card .admin-table th:first-child,
.table-card .admin-table td:first-child {
  padding-right: 1.15rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.status-form {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.code-chip,
.card code {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: #102523;
  color: #b8ebe2;
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  direction: ltr;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-banner {
  margin: 0;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eaf7f4, #f7fbfa);
  border: 1px solid #c6e5de;
  color: #31564f;
  font-weight: 600;
  line-height: 1.7;
}

.preview-panel {
  background:
    radial-gradient(circle at 100% 0%, #e7f6f2, transparent 45%),
    var(--surface);
}

.preview-panel .card-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.formula-breakdown {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #102523;
  color: #c9ebe4;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-span,
.form-group.span-2 {
  grid-column: 1 / -1;
}

.plan-create-box,
.price-calc-box,
.mock-offer-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.timeline-item {
  position: relative;
  padding: 0.85rem 0.85rem 0.85rem 0.95rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.list-row {
  padding: 0.75rem 0.35rem;
  border-radius: 8px;
}

.list-row:hover {
  background: var(--surface-2);
}

.offer-workspace {
  gap: 1.1rem;
}

.offer-editor-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.offer-editor-col > .card {
  margin-top: 0 !important;
}

.company-identity-grid {
  gap: 1.4rem;
  padding-top: 0.25rem;
}

.logo-preview-frame {
  box-shadow: var(--shadow);
  border-style: solid;
}

.checkbox-grid {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.form-actions {
  padding-top: 0.35rem;
}

.empty-hint {
  padding: 0.85rem 0.2rem;
}

@media (max-width: 960px) {
  .product-tabs,
  .segment-tabs {
    border-radius: 16px;
    width: 100%;
  }
}

/* —— Guide / Help —— */
.guide-layout {
  display: grid;
  grid-template-columns: 288px 1fr;
  gap: 1.1rem;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  padding: 0.9rem;
  overflow: hidden;
}

.guide-search {
  margin-bottom: 0.75rem;
}

.guide-nav {
  overflow-y: auto;
  padding-left: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.guide-nav-group + .guide-nav-group {
  margin-top: 0.85rem;
}

.guide-nav-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem 0.45rem;
}

.guide-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.9;
}

.guide-nav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--muted);
}

.guide-nav-item.is-active .guide-nav-item-icon {
  color: var(--primary-strong);
}

.guide-svg-icon {
  display: block;
  flex-shrink: 0;
}

.guide-panel-icon {
  font-size: inherit;
  line-height: 1;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.guide-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.guide-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: right;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.guide-nav-item + .guide-nav-item {
  margin-top: 0.15rem;
}

.guide-nav-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.guide-nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: var(--border);
  font-weight: 700;
}

.guide-nav-item-text {
  flex: 1 1 auto;
}

.guide-content {
  min-width: 0;
}

.guide-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem 1.6rem;
  animation: guideFade 0.25s var(--ease);
}

@keyframes guideFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.guide-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.guide-panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.guide-panel-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.guide-panel-head .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.guide-block + .guide-block,
.guide-block + .guide-callout,
.guide-callout + .guide-block,
.guide-callout + .guide-callout {
  margin-top: 1.35rem;
}

.guide-block-title {
  margin: 0 0 0.6rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-right: 0.7rem;
}

.guide-block-title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.15rem;
  bottom: 0.15rem;
  width: 3px;
  border-radius: 3px;
  background: var(--primary);
}

.guide-text {
  margin: 0 0 0.6rem;
  color: var(--text);
  line-height: 1.85;
}

.guide-text:last-child {
  margin-bottom: 0;
}

.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  padding: 0.55rem 2.4rem 0.55rem 0;
  line-height: 1.75;
  border-bottom: 1px dashed var(--border);
}

.guide-steps li:last-child {
  border-bottom: 0;
}

.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  right: 0;
  top: 0.55rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.guide-fields {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.guide-field {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.guide-field dt {
  margin: 0;
  font-weight: 700;
  color: var(--primary-strong);
  font-size: 0.9rem;
}

.guide-field dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-callout {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
}

.guide-callout-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guide-callout-head .guide-svg-icon {
  flex-shrink: 0;
}

.guide-callout ul {
  margin: 0;
  padding-right: 1.2rem;
  line-height: 1.85;
}

.guide-callout-tip {
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 25%, var(--border));
}

.guide-callout-tip .guide-callout-head {
  color: var(--success);
}

.guide-callout-warn {
  background: color-mix(in srgb, var(--warning) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 28%, var(--border));
}

.guide-callout-warn .guide-callout-head {
  color: var(--warning);
}

.guide-faq {
  display: grid;
  gap: 0.5rem;
}

.guide-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.guide-faq-item summary {
  cursor: pointer;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-left: 2rem;
}

.guide-faq-item summary::-webkit-details-marker {
  display: none;
}

.guide-faq-item summary::after {
  content: "+";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

.guide-faq-item[open] summary::after {
  content: "−";
}

.guide-faq-item p {
  margin: 0;
  padding: 0 0.85rem 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

.guide-search-empty {
  text-align: center;
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
    max-height: none;
  }

  .guide-nav {
    max-height: 340px;
  }

  .guide-panel-head {
    flex-direction: column;
  }

  .guide-field {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* —— Admin account / managers —— */
.admin-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
}

.admin-user-link:hover {
  color: var(--primary-strong);
}

.nav-section-manage {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.perm-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.permissions-panel {
  margin-top: 0.5rem;
  transition: opacity 0.2s var(--ease);
}

.perm-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.perm-groups {
  display: grid;
  gap: 0.85rem;
}

.perm-group {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.perm-group legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0 0.25rem;
  float: none;
}

.perm-group-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.perm-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.45rem 0.85rem;
  margin-top: 0.65rem;
}

.perm-item {
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid transparent;
}

.perm-item:hover {
  border-color: var(--border);
}

.perm-item span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.45;
}

.perm-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.company-scope-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.company-scope-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.company-scope-items {
  max-height: 320px;
  overflow: auto;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.perm-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.perm-chip {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.color-field input[type="color"] {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: transparent;
  cursor: pointer;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.site-asset-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.form-group > .site-asset-row {
  padding-top: 0;
  border-bottom: 0;
}

.site-asset-row:last-of-type {
  border-bottom: 0;
}

.site-asset-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
}

.site-asset-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-asset-empty {
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.3;
  padding: 0.25rem;
}

.site-asset-fields {
  flex: 1;
  min-width: 0;
}

.site-asset-label {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

/* —— Issuance queue —— */
.issuance-stats {
  margin-bottom: 1rem;
}

.issuance-product {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.plate-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #c9d9d4;
  background: linear-gradient(180deg, #fff, #f3f8f6);
  color: #1d3a34;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.issuance-table tbody tr.is-aging td {
  background: #fffcf5;
}

.issuance-table tbody tr.is-stale td {
  background: #fff7f5;
}

.issuance-table tbody tr.is-aging:hover td,
.issuance-table tbody tr.is-stale:hover td {
  background: #f8fbfa;
}

.issuance-empty {
  padding: 2.2rem 1rem;
  text-align: center;
}

.promo-banner-guide {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(22, 64, 110, 0.12);
  background: linear-gradient(180deg, #f7fbff, #eef5fb);
  color: #163f5f;
  font-size: 0.86rem;
  line-height: 1.75;
}

.promo-banner-guide ul {
  margin: 0.55rem 0 0;
  padding-inline-start: 1.2rem;
}

.promo-banner-guide code {
  font-size: 0.8em;
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
}

.promo-banner-previews {
  display: grid;
  gap: 1rem;
}

.promo-banner-preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
  color: #3a556c;
  font-size: 0.8rem;
}

.promo-banner-preview-meta strong {
  color: #12324d;
  font-size: 0.88rem;
}

.promo-banner-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 10 / 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(22, 64, 110, 0.18);
  background: #16406e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.promo-banner-frame.is-desktop {
  max-width: 100%;
}

.hero-poster-frame {
  position: relative;
  width: 448px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(22, 64, 110, 0.18);
  background: #e8f1f8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 10px 24px -14px rgba(22, 64, 110, 0.35);
}

.hero-poster-frame.is-desktop {
  width: 640px;
}

.hero-poster-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-banner-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-banner-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  pointer-events: none;
}

.festival-preview-scroll {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.35rem;
}

.promo-banner-previews[hidden],
[data-preview-slot][hidden] {
  display: none !important;
}

[data-fit-frame] {
  position: relative;
  overflow: hidden;
}

.festival-hero-frame,
.festival-card-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(22, 64, 110, 0.18);
  background: #16406e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.festival-hero-frame {
  border-radius: 12px;
}

.festival-hero-frame.is-mobile {
  width: 360px;
  height: 36px;
}

.festival-hero-frame.is-desktop {
  width: 1152px;
  height: 115px;
}

.festival-poster-frame,
.festival-card-frame {
  border-radius: 22px;
  background: #e8f1f8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 10px 24px -14px rgba(22, 64, 110, 0.35);
}

.festival-poster-frame.is-mobile,
.festival-card-frame.is-mobile {
  width: 448px;
  height: 280px;
}

.festival-poster-frame.is-desktop,
.festival-card-frame.is-desktop {
  width: 640px;
  height: 400px;
}

.festival-hero-frame img,
.festival-poster-frame img,
.festival-card-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.festival-hero-frame .promo-banner-empty,
.festival-poster-frame .promo-banner-empty,
.festival-card-frame .promo-banner-empty {
  font-size: 0.7rem;
  padding: 0 0.5rem;
  text-align: center;
}

@media (max-width: 900px) {
  .issuance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.excess-editor {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}

.excess-scheme-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.excess-scheme-card {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  background: var(--surface-2);
}

.excess-scheme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.excess-chip-grid {
  margin-bottom: 0.15rem;
}

.excess-family-groups,
.excess-usage-groups {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.excess-family-group,
.excess-usage-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.excess-family-title,
.excess-usage-type {
  font-size: 0.78rem;
  font-weight: 800;
  color: #314540;
}

.excess-band-wrap {
  margin: 0.85rem 0 0.55rem;
}

.excess-band-table th,
.excess-band-table td {
  vertical-align: middle;
}

.issuance-price-card {
  display: grid;
  gap: 1rem;
}

.issuance-price-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.issuance-price-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}

.issuance-price-was {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #8a9a95;
  text-decoration: line-through;
}

.issuance-price-now {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
}

.issuance-price-badge {
  margin-top: 0.35rem;
  display: inline-flex;
  border-radius: 999px;
  background: #ffe4e6;
  color: #e11d48;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.2rem 0.6rem;
}

.issuance-price-title {
  margin: 0;
  font-size: 0.95rem;
}

.issuance-price-rows {
  margin: 0;
  display: grid;
}

.issuance-price-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.issuance-price-rows > div:last-child {
  border-bottom: 0;
}

.issuance-price-rows dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.issuance-price-rows dd {
  margin: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.issuance-price-rows > div.is-neg dt,
.issuance-price-rows > div.is-neg dd {
  color: var(--success);
}

.issuance-price-rows > div.is-em {
  border-top: 1px dashed var(--border-strong);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.issuance-price-rows > div.is-em dt,
.issuance-price-rows > div.is-em dd {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text);
}

.festival-builder {
  display: grid;
  gap: 0.85rem;
  margin: 0.5rem 0 1.25rem;
}

.festival-builder[hidden],
#audience-combinator-wrap[hidden] {
  display: none !important;
}

.festival-builder-empty {
  border: 1px dashed var(--border-strong, var(--border));
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: #fafafa;
  color: var(--muted, #667);
  text-align: center;
}

.festival-builder-empty p {
  margin: 0;
  line-height: 1.7;
}

.festival-group,
.festival-reward,
.festival-condition {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
}

.festival-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.festival-group-head .form-hint {
  margin: 0.2rem 0 0;
}

.festival-condition-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.festival-field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.festival-field > label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #667);
}

.festival-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.festival-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted, #667);
  font-size: 0.78rem;
  font-weight: 800;
}

.festival-connector::before,
.festival-connector::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 4.5rem;
  background: var(--border-strong, var(--border));
}

.festival-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

/* Custom selects, file picker, choice pills */
.ui-select {
  position: relative;
}

.ui-select-native {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  pointer-events: none !important;
}

.ui-select-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.ui-select-toggle:hover {
  border-color: var(--border-strong);
}

.ui-select.is-open .ui-select-toggle,
.ui-select-toggle:focus {
  outline: none;
  background: #fff;
  border-color: #78c0b6;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.ui-select-toggle.is-placeholder {
  color: var(--muted);
  font-weight: 600;
}

.ui-select-caret {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 0.7rem;
  border-inline-end: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s var(--ease);
}

.ui-select.is-open .ui-select-caret {
  transform: rotate(225deg) translateY(-1px);
}

.ui-select-menu {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.ui-select.is-open .ui-select-menu {
  display: block;
}

.ui-select-option {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
}

.ui-select-option:hover,
.ui-select-option.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.choice-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill:hover {
  border-color: var(--border-strong);
}

.choice-pill:has(input:checked) {
  background: var(--primary-soft);
  border-color: #78c0b6;
  color: var(--primary-strong);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.ui-file {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.ui-file input[type="file"] {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.ui-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ui-file-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.ui-file-name {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.leads-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.leads-wrap {
  overflow-x: hidden;
}

table.admin-table.leads-table th,
table.admin-table.leads-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.45rem 0.4rem;
  font-size: 0.78rem;
  vertical-align: middle;
  text-align: center;
}

table.admin-table.leads-table th[data-col="name"],
table.admin-table.leads-table td[data-col="name"],
table.admin-table.leads-table th[data-col="rank"],
table.admin-table.leads-table td[data-col="rank"] {
  text-align: right;
}

.leads-table .leads-row-col {
  width: 3.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.leads-table th {
  white-space: nowrap;
}

.leads-table [data-col].is-off {
  display: none;
}

.col-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.col-sort span {
  color: var(--muted);
  font-size: 0.72rem;
}

.col-sort:hover,
.col-sort.is-active {
  color: var(--primary-strong);
  text-decoration: none;
}

.leads-filters th {
  background: var(--surface-2);
  font-weight: 500;
}

.leads-filters .form-control {
  min-width: 0;
  width: 100%;
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
}

.leads-filters th:not([data-col="name"]):not([data-col="rank"]) .form-control {
  text-align: center;
}

.leads-filters th:not([data-col="name"]):not([data-col="rank"]) .form-control::placeholder {
  text-align: center;
}

.lead-row:hover td {
  background: #f3faf8;
}

table.admin-table.leads-table tbody tr.finance-row-deposit td,
table.admin-table.leads-table tbody tr.finance-row-deposit:hover td {
  background: #eaf6ee;
}

table.admin-table.leads-table tbody tr.finance-row-withdrawal td,
table.admin-table.leads-table tbody tr.finance-row-withdrawal:hover td {
  background: #f8ecea;
}

.td-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-height: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leads-table td:not([data-col="name"]):not([data-col="rank"]) .td-link {
  text-align: center;
}

.leads-table th:not([data-col="name"]):not([data-col="rank"]) .col-sort {
  justify-content: center;
  width: 100%;
}

.td-link:hover {
  color: inherit;
  text-decoration: none;
}

.leads-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.75rem;
}

.col-picker {
  position: relative;
}

.col-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 13rem;
  padding: 0.45rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.col-picker-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.col-picker-item:hover {
  background: var(--surface-2);
}

.leads-filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.team-picker {
  margin-bottom: 1rem;
}

.team-picker-label {
  margin: 0.75rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.team-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.team-crumb a {
  color: var(--primary-strong);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
}

.team-crumb a:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.team-crumb a.is-current {
  color: var(--text);
  background: var(--surface-2);
}

.team-crumb-sep {
  color: var(--muted);
}

.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem 0.5rem 0.45rem;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

a.team-chip:hover {
  border-color: #78c0b6;
  background: var(--primary-soft);
  color: var(--primary-strong);
  text-decoration: none;
}

.team-chip em {
  min-width: 1.5rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-style: normal;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

a.team-chip em {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
}

.team-chip.is-empty {
  opacity: 0.72;
  cursor: default;
}

.training-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: 22px;
  background:
    radial-gradient(1200px 180px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(135deg, #12332f 0%, #0f6b63 58%, #1aa89b 100%);
  color: #f3fffc;
  box-shadow: var(--shadow-lg);
}

.training-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #b7ece4;
}

.training-hero h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.training-hero p {
  margin: 0;
  max-width: 38rem;
  color: #d7efe9;
  line-height: 1.8;
}

.training-hero-meta {
  min-width: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
}

.training-hero-meta strong {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.training-hero-meta span {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #d7efe9;
}

.training-toolbar {
  margin: 1rem 0;
}

.training-search {
  display: block;
  max-width: 24rem;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.training-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.05rem 1.1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: var(--shadow);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}

.training-card:hover {
  transform: translateY(-3px);
  border-color: #8dcec6;
  box-shadow: 0 16px 36px rgba(16, 34, 31, 0.1);
}

.training-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.training-ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.training-size {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.training-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
}

.training-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.75;
  flex: 1;
}

.training-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

.training-date {
  color: var(--muted);
  font-size: 0.75rem;
}

.training-empty {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--surface);
}

@media (max-width: 1100px) {
  .training-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .training-hero {
    flex-direction: column;
  }

  .training-hero-meta {
    align-self: flex-start;
  }

  .training-grid {
    grid-template-columns: 1fr;
  }
}

.date-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.life-stepper {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
}

.life-stepper li {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.life-stepper li.is-done {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.life-stepper li.is-current {
  background: var(--primary);
  color: #fff;
}

.life-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.life-review-grid div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}

.life-review-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.life-review-grid dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.life-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(16, 37, 35, 0.55);
}

.life-modal.is-open {
  display: grid;
}

.life-modal-card {
  width: min(28rem, 100%);
  border-radius: 22px;
  padding: 1.35rem 1.4rem 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f3faf8 100%);
  box-shadow: 0 24px 60px rgba(16, 34, 31, 0.22);
}

.life-modal-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.life-modal-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  line-height: 1.8;
}

.life-modal-total {
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  text-align: center;
}

.life-defect-btn {
  background: #c2410c !important;
  border-color: #c2410c !important;
  color: #fff !important;
  font-weight: 800;
}

.life-defect-btn:hover {
  background: #9a3412 !important;
  color: #fff !important;
}

.life-note-col {
  white-space: normal !important;
  text-align: right !important;
  min-width: 16rem;
  line-height: 1.7;
}

.life-mark {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.life-mark.is-ok {
  background: #ecfdf3;
  color: #067647;
}

.life-mark.is-no {
  background: #fef3f2;
  color: #b42318;
}

@media (max-width: 900px) {
  .life-review-grid {
    grid-template-columns: 1fr;
  }
}

.finance-top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: -0.15rem 0 0.9rem;
  padding: 0.55rem 0 0.65rem;
  background: var(--bg);
}

.finance-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.9rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.policy-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.policy-section > .finance-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 16px -12px rgba(15, 23, 42, 0.35);
}

.policy-panel[hidden] {
  display: none !important;
}

#policy-list {
  margin-top: 1.25rem;
}

.finance-tabs a {
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
}

.finance-tabs a:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
  text-decoration: none;
}

.finance-tabs a.is-active {
  color: #fff;
  background: var(--primary);
}

.finance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.life-stepper-wide {
  flex-wrap: wrap;
}

.life-stepper-wide li {
  flex: 1 1 4.5rem;
  font-size: 0.72rem;
}

.nl-product-grid,
.nl-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.7rem;
  margin: 0.4rem 0 1rem;
}

.nl-product-card,
.nl-company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
}

.nl-product-card:has(input:checked),
.nl-company-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.nl-company-card img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

.nl-company-card strong,
.nl-product-card span {
  font-size: 0.86rem;
  font-weight: 800;
}

.nl-sub {
  font-size: 0.95rem;
  margin: 1rem 0 0.6rem;
}

.nl-plate-row {
  display: grid;
  grid-template-columns: 4.2rem 5.8rem 5.2rem 4.2rem;
  gap: 0.4rem;
}

.nl-addon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nl-quote-box {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--primary-soft);
  font-weight: 800;
}
