/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1F4E79;
  --primary-hover: #183e60;
  --primary-light: #2E75B6;
  --primary-bg: #EBF0F5;
  --primary-border: #C5D5E6;
  --accent: #3182CE;
  --success: #2F855A;
  --success-bg: #E6F4EA;
  --warning: #B7791F;
  --warning-bg: #FFF8E7;
  --danger: #C53030;
  --danger-bg: #FED7D7;
  --bg: #F1F4F8;
  --surface: #FFFFFF;
  --border: #DDE2E8;
  --border-light: #EDF0F4;
  --text: #2D3748;
  --text-muted: #718096;
  --text-dim: #A0AEC0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
  --sidebar-w: 232px;
  --radius: 8px;
  --radius-sm: 6px;
  --transition: 0.18s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: none; }

/* ── Layout ─────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #F8FAFC 0%, var(--surface) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 36px;
  max-width: calc(100vw - var(--sidebar-w));
  overflow-x: hidden;
}

/* ── Sidebar ────────────────────────────────────── */
.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-brand .brand-icon { color: var(--primary); width: 26px; height: 26px; }
.sidebar-brand .brand-text { font-size: 19px; font-weight: 700; color: var(--primary); letter-spacing: -0.3px; }
.sidebar-brand .brand-sub { font-size: 12px; color: var(--text-muted); margin-left: 2px; }

.sidebar-section-label {
  padding: 18px 20px 6px;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text); font-weight: 500;
  transition: all var(--transition);
}
.nav-item:hover { background: #F1F5F9; color: var(--primary); }
.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
.nav-item span:first-child { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.user-avatar { width: 20px; height: 20px; color: var(--text-muted); }
.logout-btn { color: var(--text-muted); padding: 5px; border-radius: var(--radius-sm); transition: all var(--transition); }
.logout-btn:hover { color: var(--danger); background: var(--danger-bg); }

/* ── Page Header ────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.page-desc { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; line-height: 1.4;
}
.btn span { width: 16px; height: 16px; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #F8FAFC; border-color: var(--primary-border); color: var(--primary); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { opacity: 0.92; box-shadow: var(--shadow-sm); }

.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-sm span { width: 14px; height: 14px; }
.btn-full { width: 100%; justify-content: center; padding: 10px 18px; }

.btn-outline {
  background: transparent; border: 1.5px dashed var(--border); color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }

/* ── Flash Messages ─────────────────────────────── */
.flash-container {
  position: fixed; top: 16px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 6px;
  max-width: 400px;
}
.flash {
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.flash-success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success); }
.flash-error { background: var(--danger-bg); color: var(--danger); border-left: 3px solid var(--danger); }

/* ── Tables ─────────────────────────────────────── */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

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

.data-table thead { background: linear-gradient(180deg, #F8FAFC 0%, #F1F4F8 100%); }

.data-table th {
  padding: 11px 14px; text-align: left;
  font-weight: 600; font-size: 11.5px;
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 2px solid var(--border);
  letter-spacing: 0.3px;
}

.data-table th.th-right { text-align: right; }
.data-table th.th-center { text-align: center; }

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table td.td-right { text-align: right; }
.data-table td.td-center { text-align: center; }

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #FAFBFC; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tfoot { background: #F8FAFC; border-top: 2px solid var(--border); }
.data-table tfoot td { padding: 11px 14px; font-weight: 600; }

.td-name { font-weight: 600; color: var(--text); }
.td-desc { color: var(--text-muted); font-size: 12px; max-width: 220px; }
.td-price { font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace; text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.td-total-label { text-align: right; color: var(--text); }
.td-total-value { font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace; text-align: right; color: var(--primary); font-weight: 700; font-size: 14px; white-space: nowrap; }
.td-empty { text-align: center; color: var(--text-dim); padding: 36px 14px; font-size: 13.5px; }

/* ── Add Row (wizard product/service selector) ──── */
.add-row {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px;
  background: #FAFBFC;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.add-row .form-field { margin-bottom: 0; flex: 1; min-width: 120px; }
.add-row .form-field label { font-size: 11.5px; margin-bottom: 3px; }
.add-row .btn { flex-shrink: 0; align-self: flex-end; height: 36px; }

/* ── Added Items List ───────────────────────────── */
.added-list { margin-bottom: 16px; }
.added-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all var(--transition);
}
.added-item:hover { border-color: var(--primary-border); background: #FAFBFC; }
.added-item-info { flex: 1; min-width: 0; }
.added-item-name { font-weight: 600; font-size: 13.5px; }
.added-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.added-item-price { font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace; font-size: 13px; color: var(--primary); font-weight: 600; text-align: right; white-space: nowrap; }
.added-item-remove { flex-shrink: 0; }

/* ── Inputs ─────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.10);
}
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
select:disabled { background: #F8FAFC; color: var(--text-dim); cursor: not-allowed; }

.input-num { width: 100%; text-align: right; font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace; }
.input-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* ── Forms ──────────────────────────────────────── */
.form-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-row { display: flex; gap: 14px; }
.form-row .form-field { flex: 1; }
.required { color: var(--danger); }

.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  padding-top: 22px; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── Wizard Progress ────────────────────────────── */
.wizard-progress {
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 30px; gap: 0;
}

.step-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.step-item:hover { color: var(--text); }

.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--border-light); color: var(--text-dim);
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-item.active .step-dot {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(31,78,121,0.30);
}
.step-item.active { color: var(--primary); font-weight: 600; }

.step-item.done .step-dot {
  background: var(--success); color: #fff;
}
.step-item.done { color: var(--success); }
.step-item.done .step-dot span { width: 16px; height: 16px; }

.step-line {
  width: 44px; height: 2px;
  background: var(--border-light); border-radius: 1px;
  margin: 0 6px;
  transition: background var(--transition);
}

/* ── Selection Cards ────────────────────────────── */
.selection-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.selection-card { display: block; cursor: pointer; }
.selection-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.selection-card-body {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px;
  text-align: center; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.selection-card-body:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.selection-card input:checked + .selection-card-body {
  border-color: var(--primary); background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(31,78,121,0.08);
}
.selection-icon { width: 40px; height: 40px; color: var(--primary); margin-bottom: 12px; }
.selection-card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.selection-card-body p { font-size: 12.5px; color: var(--text-muted); }

/* ── Wizard Actions ─────────────────────────────── */
.wizard-actions {
  display: flex; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--border-light);
  margin-top: 24px;
}

/* ── Dashboard ──────────────────────────────────── */
.dashboard {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.dashboard-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px;
  cursor: pointer; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.dashboard-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dash-icon { width: 34px; height: 34px; color: var(--primary-light); margin-bottom: 14px; }
.dashboard-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.dashboard-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ── Preview ────────────────────────────────────── */
.preview-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.preview-section-title {
  font-size: 14px; font-weight: 700; color: var(--primary);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-bg);
}
.preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px 28px;
}
.preview-field { display: flex; flex-direction: column; gap: 2px; }
.preview-label { font-size: 12px; color: var(--text-muted); }
.preview-value { font-size: 14px; font-weight: 600; }

.grand-total-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff; border-radius: var(--radius); padding: 18px 26px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; box-shadow: var(--shadow-md);
}
.grand-total-label { font-size: 15px; font-weight: 600; opacity: 0.9; }
.grand-total-value { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }

/* ── Warnings ───────────────────────────────────── */
.warnings-section {
  background: var(--warning-bg); border: 1px solid #FAE29F;
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
}
.warnings-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--warning); margin-bottom: 8px;
}
.warnings-header span { width: 20px; height: 20px; }
.warnings-list { list-style: disc; padding-left: 24px; }
.warnings-list li { font-size: 13px; color: #7B5E1A; margin-bottom: 4px; line-height: 1.5; }

/* ── Modal ──────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative; background: var(--surface);
  border-radius: var(--radius); padding: 26px 28px;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close span { width: 18px; height: 18px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ── Login ──────────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, #EBF0F5 0%, #F1F4F8 50%, #E8EDF3 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.login-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 38px;
  width: 100%; max-width: 390px;
  border: 1px solid var(--border-light);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-icon { width: 40px; height: 40px; color: var(--primary); margin-bottom: 10px; }
.login-header h1 { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 3px; letter-spacing: -0.3px; }
.login-header p { font-size: 13px; color: var(--text-muted); }
.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Empty State ────────────────────────────────── */
.empty-state {
  background: var(--surface); border: 1.5px dashed var(--border);
  border-radius: var(--radius); padding: 52px 24px;
  text-align: center; color: var(--text-muted);
}
.empty-state span { width: 44px; height: 44px; color: var(--text-dim); margin-bottom: 14px; }
.empty-state p { font-size: 14px; }
.empty-state a { font-weight: 600; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; max-width: 100vw; padding: 18px; }
  .wizard-progress { flex-wrap: wrap; justify-content: flex-start; }
  .step-line { display: none; }
  .step-item { font-size: 11px; gap: 4px; }
  .step-dot { width: 26px; height: 26px; font-size: 11px; }
  .selection-cards { grid-template-columns: 1fr; }
  .dashboard { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .add-row { flex-direction: column; align-items: stretch; }
  .add-row .btn { align-self: flex-end; }
}

/* ── Description cells ──────────────────────────── */
.td-desc-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.td-desc-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.td-seq { text-align: center; color: var(--text-muted); font-weight: 500; font-size: 12.5px; width: 40px; }

.sidebar-quotes { max-height: 280px; overflow-y: auto; padding: 2px 10px; }
.sq-item { font-size: 12px; padding: 5px 10px; }
.sq-item span:first-child { width: 14px; height: 14px; }

/* ── Polish: accessibility & stability ─────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:focus-visible, .nav-item:focus-visible, .dashboard-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove number input spinners for cleaner tables */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C8D2DD; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A9B7C7; }

/* Sticky table headers on long tables */
.table-container { position: relative; }
.table-container:has(tbody tr:nth-child(6)) .data-table thead th {
  position: sticky;
  top: 0;
  background: #F1F4F8;
  z-index: 1;
}

/* Sidebar saved quote items */
.nav-item.sq-item {
  font-size: 12px;
  padding: 5px 12px 5px 28px;
  color: var(--text-muted);
}
.nav-item.sq-item.active {
  color: var(--primary);
  font-weight: 600;
}
.sidebar-quotes-wrap { max-height: 260px; overflow-y: auto; padding: 0 4px; }

/* Page header responsive actions */
.page-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Stable buttons: prevent layout shift */
.btn, .btn-sm { min-height: 34px; }
.btn-sm { min-height: 30px; }

/* Table zebra striping on wide tables */
.data-table tbody tr:nth-child(even) { background: #FBFCFE; }
.data-table tbody tr:nth-child(even):hover { background: #F1F5F9; }

/* Add-row and form row consistency */
.add-row {
  box-shadow: var(--shadow-sm);
}

/* Better disabled state */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Reduce motion for stability */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tablet and narrow desktop layout */
@media (max-width: 1024px) {
  .main-content { padding: 24px 22px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header .header-actions { width: 100%; }
}

/* Primary dashboard card */
.dashboard-card-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: #fff;
}
.dashboard-card-primary h3 { color: #fff; }
.dashboard-card-primary p { color: rgba(255,255,255,0.82); }
.dashboard-card-primary .dash-icon { color: #fff; }
.dashboard-card-primary:hover {
  box-shadow: 0 8px 24px rgba(31,78,121,0.28);
  transform: translateY(-2px);
}

/* Login divider */
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0; color: var(--text-dim); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}

/* Discreet admin login toggle */
.admin-login-toggle {
  display: flex; justify-content: center; margin: 18px 0 0;
}
.admin-toggle-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px;
}
.admin-toggle-btn span { width: 14px; height: 14px; }
.admin-toggle-btn:hover { color: var(--text-muted); text-decoration: underline; }
#admin-login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }

/* Language switch */
.lang-switch { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.lang-link { color: var(--text-muted); padding: 2px 3px; }
.lang-link.active { color: var(--primary); font-weight: 700; }
.lang-link:hover { color: var(--primary); }
.lang-sep { color: var(--text-dim); }

/* Login language switch */
.login-lang-switch {
  display: flex; justify-content: center; align-items: center; gap: 4px;
  margin: -14px 0 18px; font-size: 13px;
}

/* Keep the user-management form inputs comfortably sized inside the modal. */
#user-form .form-field input[type="email"],
#user-form .form-field select {
  width: 100%;
  min-height: 40px;
}
