/* Custom Styling built on top of Bootstrap 5 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* ABC Group Colors */
  --group-a-bg: #dcfce7;
  --group-a-text: #15803d;
  --group-a-border: #86efac;
  
  --group-b-bg: #fef9c3;
  --group-b-text: #a16207;
  --group-b-border: #fde047;
  
  --group-c-bg: #fee2e2;
  --group-c-text: #b91c1c;
  --group-c-border: #fca5a5;
  
  --merged-bg: #f0f9ff;
  --merged-border: #0284c7;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  padding-bottom: 6rem !important;
}

/* Navbar */
.navbar-custom {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.navbar-brand i {
  color: #38bdf8;
}

/* Tab Buttons */
.nav-link.btn-link {
  text-decoration: none;
  font-size: 0.925rem;
  letter-spacing: -0.01em;
  transition: color 0.15s, border-color 0.15s;
}

.nav-link.btn-link:hover {
  color: #38bdf8 !important;
}

/* Metric Cards */
.metric-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.metric-card.card-revenue::before { background: #10b981; }
.metric-card.card-margin::before { background: #8b5cf6; }
.metric-card.card-profit::before { background: #3b82f6; }
.metric-card.card-cost::before { background: #f59e0b; }
.metric-card.card-count::before { background: #6366f1; }

.metric-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.metric-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Section Cards & Panels */
.panel-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  padding: 1.5rem;
  margin-bottom: 4rem !important;
}

/* Action & Search Bar */
.action-bar {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

/* ABC Badges */
.badge-abc {
  font-weight: 700;
  padding: 0.35em 0.65em;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}

.badge-abc-A {
  background-color: var(--group-a-bg);
  color: var(--group-a-text);
  border-color: var(--group-a-border);
}

.badge-abc-B {
  background-color: var(--group-b-bg);
  color: var(--group-b-text);
  border-color: var(--group-b-border);
}

.badge-abc-C {
  background-color: var(--group-c-bg);
  color: var(--group-c-text);
  border-color: var(--group-c-border);
}

/* Table Design */
.table-responsive {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  max-height: calc(100vh - 310px);
  min-height: 350px;
  overflow-y: auto;
}

.table-custom {
  margin-bottom: 0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.table-custom th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--border-color);
  vertical-align: middle;
  padding: 0.75rem 0.6rem;
}

.table-custom th .sort-icon {
  cursor: pointer;
  margin-left: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.table-custom th:hover .sort-icon {
  opacity: 1;
}

.table-custom th .sort-icon.active {
  opacity: 1;
  color: var(--primary);
}

.table-custom td {
  vertical-align: middle;
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid #f1f5f9;
}

.table-custom tr:hover td {
  background-color: #f8fafc;
}

/* Merged Row Highlight */
.tr-merged {
  background-color: var(--merged-bg) !important;
}

.tr-merged td {
  border-top: 1px solid var(--merged-border);
  border-bottom: 1px solid var(--merged-border);
}

.badge-merged {
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.25em 0.5em;
  border-radius: 4px;
}

/* Filter Controls in Table Header */
.col-filter-input {
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  width: 100%;
}

.col-filter-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Universal Clear Button inside inputs */
.input-clear-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-clear-wrapper input {
  padding-right: 1.8rem !important;
}

.btn-clear-input {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #334155;
  color: #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}

.btn-clear-input:hover {
  background: #0f172a;
  transform: translateY(-50%) scale(1.1);
}

.input-clear-wrapper.has-value .btn-clear-input {
  display: flex;
}

/* Custom Scrollbar for Table */
.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Drag Drop Overlay */
.drag-overlay {
  border: 2px dashed #3b82f6;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.drag-overlay:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Merged Group Editor & Modal Styles */
#mergedModal .modal-dialog {
  max-width: 95vw !important;
  width: 95vw !important;
  margin: 1.75rem auto;
}

.merged-group-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.merged-group-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.merged-group-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.merged-group-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.merged-group-header {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.merged-group-title-input {
  font-weight: 600;
  color: #1e40af;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  width: 100%;
}

.merged-group-title-input:hover, .merged-group-title-input:focus {
  border-color: #93c5fd;
  background: #ffffff;
  outline: none;
}

.merged-group-body {
  padding: 1rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.add-item-dropdown-results {
  max-height: 220px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.add-item-result-entry {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

.add-item-result-entry:hover {
  background: #f0f9ff;
  color: var(--primary);
  font-weight: 600;
}

/* Executive Decision Banner */
.executive-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.executive-banner h5 {
  font-weight: 700;
  color: #818cf8;
}

/* Smart Period Calendar */
.period-picker {
  position: relative;
  --pp-accent: #039be5;
  --pp-accent-hover: #0288d1;
  --pp-accent-soft: #e1f3fc;
  --pp-hover: #f2f4f7;
  --pp-text: #3c4452;
  --pp-muted: #b0b7c3;
  --pp-weekend: #e53935;
  --pp-border: #dfe3ea;
}

.period-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 260px;
  padding: 0.2rem 0.5rem 0.2rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  color: var(--pp-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.period-picker-btn:hover,
.period-picker-btn.open {
  border-color: #b9c2cf;
}

.period-picker-btn.is-filtered {
  border-color: var(--pp-accent);
  color: var(--pp-accent);
}

.period-picker-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border-top: 5px solid #9aa4b6;
  background: #e4e8ef;
  color: #6b7486;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.period-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1060;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.period-menu {
  width: 280px;
  flex-shrink: 0;
  padding: 4px 0;
  background: #ffffff;
  border: 1px solid var(--pp-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.pp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--pp-text);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.pp-item:hover,
.pp-item-custom.open {
  background: var(--pp-hover);
  color: var(--pp-accent);
}

.pp-item.active {
  background: var(--pp-accent);
  color: #ffffff;
  font-weight: 700;
}

.pp-check,
.pp-chevron {
  font-size: 1.05rem;
  line-height: 1;
}

.pp-sep {
  height: 1px;
  margin: 2px 0;
  background: var(--pp-border);
}

.pp-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.pp-year {
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--pp-text);
  font-size: 0.95rem;
}

.pp-year:hover {
  background: var(--pp-hover);
  color: var(--pp-accent);
}

.pp-year.active {
  background: var(--pp-accent);
  color: #ffffff;
  font-weight: 700;
}

.pp-item.pp-reset {
  justify-content: flex-start;
  gap: 8px;
  color: #e5395b;
}

.pp-item.pp-reset:hover {
  background: #fff1f3;
  color: #c81e45;
}

.period-calendar {
  padding: 20px 24px 18px;
  background: #ffffff;
  border: 1px solid var(--pp-border);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.pp-months {
  display: flex;
  gap: 40px;
}

.pp-month-head {
  position: relative;
  height: 44px;
  margin-bottom: 6px;
  line-height: 44px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--pp-text);
}

.pp-nav {
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--pp-text);
  font-size: 1.3rem;
  line-height: 1;
}

.pp-nav:hover {
  border-color: var(--pp-accent);
  color: var(--pp-accent);
}

.pp-nav-prev { left: 0; }
.pp-nav-next { right: 0; }

.pp-grid {
  display: grid;
  grid-template-columns: repeat(7, 46px);
  row-gap: 4px;
}

.pp-weekday {
  padding: 6px 0 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b93a3;
}

.pp-weekday.pp-weekend {
  color: #f08a8a;
}

.pp-day {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pp-text);
  font-size: 0.92rem;
}

button.pp-day {
  cursor: pointer;
}

.pp-day-out {
  color: var(--pp-muted);
}

.pp-day.pp-weekend {
  color: var(--pp-weekend);
}

.pp-day:disabled {
  color: var(--pp-muted);
  cursor: default;
}

button.pp-day:not(:disabled):hover {
  background: var(--pp-hover);
}

.pp-day.pp-today {
  background: #ebedf1;
  font-weight: 700;
}

.pp-day.pp-in-range {
  border-radius: 0;
  background: var(--pp-accent-soft);
}

.pp-day.pp-range-start,
.pp-day.pp-range-end,
button.pp-day.pp-range-start:hover,
button.pp-day.pp-range-end:hover {
  background: var(--pp-accent);
  color: #ffffff;
  font-weight: 700;
}

.pp-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--pp-border);
}

.pp-date-input {
  width: 170px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--pp-border);
  border-radius: 10px;
  color: var(--pp-text);
  font-size: 1rem;
  text-align: center;
}

.pp-date-input:focus {
  outline: none;
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.15);
}

.pp-date-input.is-invalid {
  border-color: #e5395b;
}

.pp-dash {
  color: #8b93a3;
  font-weight: 600;
}

.pp-days {
  color: #8b93a3;
  font-size: 1rem;
}

.pp-apply {
  margin-left: auto;
  padding: 0.65rem 1.8rem;
  border: 0;
  border-radius: 10px;
  background: var(--pp-accent);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(3, 155, 229, 0.35);
}

.pp-apply:hover {
  background: var(--pp-accent-hover);
}

.pp-apply:disabled {
  opacity: 0.5;
  box-shadow: none;
}

/* Narrow screens: full-width popup under the button, one month */
.period-popup.pp-stacked {
  position: fixed;
  left: 16px;
  right: 16px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  overflow-y: auto;
}

.pp-stacked .period-menu {
  width: 100%;
}

.pp-stacked .period-calendar {
  padding: 16px;
}

.pp-stacked .pp-month {
  flex: 1;
  min-width: 0;
}

.pp-stacked .pp-grid {
  grid-template-columns: repeat(7, 1fr);
}

.pp-stacked .pp-date-input {
  flex: 1;
  width: 0;
  min-width: 110px;
}

.pp-stacked .pp-apply {
  width: 100%;
  margin-left: 0;
}

.period-note {
  padding: 0.4rem 0.75rem;
  border: 1px solid #fde7a8;
  border-radius: 8px;
  background: #fff8e6;
  color: #8a5a00;
  font-size: 0.8rem;
}

/* Floating Merge Bar */
.merge-bar-sticky {
  position: sticky;
  top: 60px;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #93c5fd;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

/* ==================== v2 additions ==================== */

.version-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.7rem;
  font-weight: 600;
}

.file-label {
  max-width: 220px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-switch .btn {
  font-weight: 600;
}

/* Name cell: link + meta line */
.entity-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.entity-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.entity-meta {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: normal;
}

.entity-meta a {
  color: inherit;
}

.address-cell {
  max-width: 320px;
  white-space: normal;
  font-size: 0.8rem;
}

.address-count {
  color: var(--text-muted);
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

/* In-page confirm/message dialog, above Bootstrap modals */
.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.app-dialog-box {
  width: 100%;
  max-width: 440px;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.app-dialog-text {
  margin-bottom: 1rem;
  white-space: pre-line;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.15em 0.45em;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-rule { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.tag-site { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tag-ai { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.tag-human { background: #fdf4ff; color: #a21caf; border-color: #f5d0fe; }
.tag-review { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tag-unresolved { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.2rem 0.35rem 0.2rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.category-chip button {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

/* Review tab */
.ai-panel {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

.ai-panel .text-muted-light {
  color: #94a3b8;
}

.ai-panel .btn-link {
  text-decoration: none;
}

.ai-panel .btn-link:hover {
  color: #e2e8f0 !important;
}

.review-stat {
  height: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
}

.review-stat .value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.review-stat .label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-stat .hint {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.review-table-wrap {
  max-height: calc(100vh - 260px);
}

.review-table {
  font-size: 0.85rem;
}

.review-table td {
  vertical-align: top;
  white-space: normal;
}

.confidence-badge {
  padding: 0.25em 0.5em;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.conf-high { background: var(--group-a-bg); color: var(--group-a-text); }
.conf-mid { background: var(--group-b-bg); color: var(--group-b-text); }
.conf-low { background: var(--group-c-bg); color: var(--group-c-text); }

.review-editor {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.review-editor input,
.review-editor select {
  min-width: 200px;
}

.variant-table td {
  white-space: normal;
}

/* API settings modal */
.settings-modal {
  border: 0;
  border-radius: 18px;
}

.settings-modal .modal-header,
.settings-modal .modal-footer {
  padding: 1.1rem 1.5rem;
}

.settings-modal .modal-body {
  padding: 1.25rem 1.5rem;
}

.settings-result {
  padding: 0.6rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.85rem;
}

.settings-result.is-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.settings-result.is-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.settings-result.is-pending { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

/* Sign-in page */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-title:empty,
.login-note:empty {
  display: none;
}

/* Roles: administrator-only controls stay hidden until the server confirms the administrator */
body:not(.role-admin) .admin-only {
  display: none !important;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  white-space: nowrap;
}

.user-chip .role {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
}

/* Users (administrator) */
.users-table td {
  vertical-align: middle;
}

.users-table .form-control,
.users-table .form-select {
  min-width: 120px;
}
