/* ── Woonmodule Brand Font ────────────────────────── */
@font-face {
  font-family: 'Circular';
  src: url('/static/fonts/CircularXXWeb-Light.woff2') format('woff2'),
       url('/static/fonts/CircularXXWeb-Light.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular';
  src: url('/static/fonts/CircularXXWeb-Black.woff2') format('woff2'),
       url('/static/fonts/CircularXXWeb-Black.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ── Design Tokens ───────────────────────────────── */
:root {
  --pdash-bg: #f5f8ff;
  --pdash-card: #ffffff;
  --pdash-border: #d0dfef;
  --pdash-text: #000055;
  --pdash-muted: #6b7280;
  --pdash-accent: #000055;
  --pdash-accent-light: #DDEEFF;
  --pdash-accent-hover: #000044;
  --pdash-success: #16a34a;
  --pdash-warm: #b45309;
  --pdash-pink: #FF3266;
  --pdash-pale-pink: #FFEEEE;
  --pdash-blue: #99CCFF;
  --pdash-shadow: 0px 0px 10px rgba(0, 0, 85, 0.12);
  --pdash-shadow-hover: 0px 0px 15px rgba(0, 0, 85, 0.2);
  --pdash-font: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  font-family: var(--pdash-font);
  color: var(--pdash-text);
}

html {
  height: -webkit-fill-available;
}

/* let the document be taller than the viewport */
main {
  height: auto;
  max-height: none;
  flex: 1;
  min-width: 0;
  overflow: auto;
}

a,
a:hover {
  color: #000055;
  text-decoration: none;
}

.b-example-divider {
  flex-shrink: 0;
  width: 1.5rem;
  height: 100vh;
  background-color: rgba(0, 0, 85, .1);
  border: solid rgba(0, 0, 85, .15);
  border-width: 1px 0;
  box-shadow: inset 0 .5em 1.5em rgba(0, 0, 85, .1), inset 0 .125em .5em rgba(0, 0, 85, .15);
}

.bi {
  vertical-align: -.125em;
  pointer-events: none;
  fill: currentColor;
}

.dropdown-toggle { outline: 0; }

.scrollarea {
  overflow-y: auto;
}

.fw-semibold { font-weight: 600; }
.lh-tight { line-height: 1.25; }


html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

#cms-iframe {
  border: 0;
  width: 100%;
  display: block;
  min-height: 95vh;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--pdash-border);
  overflow-y: auto;
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: var(--pdash-bg);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--pdash-border);
}
.sidebar-brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.sidebar-brand-logo {
  height: 16px;
  width: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px 12px;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pdash-muted);
  cursor: pointer;
  transition: background .1s ease, color .1s ease;
}
.sidebar-section-toggle:hover {
  background: #e2ecff;
  color: var(--pdash-text);
}
.sidebar-section-toggle svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.sidebar-section-toggle::after {
  content: "";
  margin-left: auto;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(0,0,85,.4)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5 6l3 3 3-3'/%3e%3c/svg%3e") center no-repeat;
  transition: transform .2s ease;
}
.sidebar-section-toggle.collapsed::after {
  transform: rotate(-90deg);
}

.sidebar-links {
  list-style: none;
  margin: 2px 0 6px;
  padding: 0;
}
.sidebar-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 12px;
  margin: 1px 0;
  border-radius: 6px;
  font-size: 13px;
  color: #4b5570;
  text-decoration: none;
  transition: background .1s ease, color .1s ease;
}
.sidebar-links li a:hover {
  background: #e2ecff;
  color: var(--pdash-text);
}
.sidebar-links li a.active {
  background: var(--pdash-accent-light);
  color: var(--pdash-accent);
  font-weight: 600;
}

.sidebar-link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pdash-blue);
  flex-shrink: 0;
}
.sidebar-link-dot--active {
  background: var(--pdash-accent);
}

/* Sidebar user footer */
.sidebar-user {
  border-top: 1px solid var(--pdash-border);
  margin-top: auto;
}
.sidebar-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pdash-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Compact Tabulator overrides */
.tabulator {
  font-size: 0.8125rem;
  border: 1px solid var(--pdash-border);
}

.tabulator .tabulator-header .tabulator-col {
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pdash-muted);
  background-color: var(--pdash-bg);
  border-bottom: 2px solid var(--pdash-border);
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell {
  padding: 5px 8px;
  line-height: 1.4;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.cell-wrap {
  white-space: normal;
}

.tabulator-cell.cell-wrap .badge {
  margin-bottom: 2px;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row {
  min-height: 0;
  border-bottom: 1px solid #eef2fb;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover {
  background-color: var(--pdash-bg);
  cursor: pointer;
}

.tabulator .tabulator-footer {
  padding: 4px 8px;
  font-size: 0.8125rem;
  background-color: var(--pdash-bg);
}

.tabulator .tabulator-footer .tabulator-page {
  padding: 2px 8px;
  font-size: 0.75rem;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-sorter {
  right: 2px;
}

/* ── Project Dashboard Tiles ─────────────────────── */

.pdash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.pdash-tile {
  background: var(--pdash-card);
  border: 1px solid var(--pdash-border);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.pdash-tile:hover {
  border-color: var(--pdash-blue);
  box-shadow: var(--pdash-shadow-hover);
  color: inherit;
  text-decoration: none;
}

.pdash-tile--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  filter: grayscale(40%);
}
.pdash-tile--disabled .pdash-tile-action {
  display: none;
}

.pdash-tile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdash-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.pdash-tile-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pdash-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pdash-tile-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--pdash-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.pdash-tile-desc {
  font-size: 13px;
  color: var(--pdash-muted);
  line-height: 1.45;
}

.pdash-tile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    font-size: 13px;
    color: var(--pdash-muted);
    line-height: 1.45;
}
.pdash-tile-stats span + span::before {
    content: " \00b7  ";
}

.pdash-tile-desc--prominent {
  font-size: 15px;
  font-weight: 500;
  color: var(--pdash-text);
}

.pdash-tile-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pdash-accent);
  margin-top: auto;
}
.pdash-tile:hover .pdash-tile-action {
  color: var(--pdash-pink);
}
.pdash-tile-action svg {
  width: 14px;
  height: 14px;
  transition: transform .15s ease;
}
.pdash-tile:hover .pdash-tile-action svg {
  transform: translateX(2px);
}
.pdash-tile-action + .pdash-tile-action {
  margin-top: 0;
}

/* Icon background variants */
.pdash-icon-blue   { background: var(--pdash-accent-light); color: var(--pdash-accent); }
.pdash-icon-teal   { background: #e6f7f4; color: #0f766e; }
.pdash-icon-amber  { background: #fef3e2; color: #b45309; }
.pdash-icon-green  { background: #ecfdf5; color: #16a34a; }
.pdash-icon-purple { background: #f3f0ff; color: #6d28d9; }
.pdash-icon-rose   { background: var(--pdash-pale-pink); color: var(--pdash-pink); }
.pdash-icon-slate  { background: #f1f5f9; color: #475569; }
.pdash-icon-indigo { background: #eef2ff; color: #4338ca; }

/* Section separator */
.pdash-section {
  margin-top: 28px;
}
.pdash-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pdash-muted);
  margin-bottom: 12px;
  padding-left: 2px;
}

/* Funnel stage pills */
.pdash-funnel-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow: hidden;
}
.pdash-funnel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--pdash-bg);
  color: var(--pdash-text);
}
.pdash-funnel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Prospect chart */
.pdash-chart-container {
  position: relative;
  height: 340px;
}

/* Wide tile spanning two columns */
.pdash-tile-wide {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .pdash-tile-wide { grid-column: span 1; }
}

/* Home intro */
.pdash-home-intro {
  font-size: 15px;
  color: var(--pdash-muted);
  margin-bottom: 20px;
}

/* External link icon */
.pdash-external {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  margin-left: 2px;
}

/* ── Analytics ───────────────────────────────────── */
.analytics-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pdash-text);
}
.analytics-stat-label {
  font-size: 0.8rem;
  color: var(--pdash-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.analytics-path-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  font-size: 0.8rem;
}
.analytics-device-bar {
  height: 8px;
  background: var(--pdash-bg);
  border-radius: 4px;
  margin-bottom: 4px;
  overflow: hidden;
}
.analytics-device-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.analytics-device-desktop { background: var(--pdash-accent); }
.analytics-device-mobile { background: var(--pdash-success); }
.analytics-device-tablet { background: #b45309; }
.analytics-device-label {
  font-size: 0.8rem;
  color: var(--pdash-muted);
}

/* ── Auth Pages ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  padding: 24px;
}

.auth-page-inner {
  max-width: 420px;
  width: 100%;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--pdash-border);
  border-radius: 12px;
  box-shadow: var(--pdash-shadow);
  max-width: 420px;
  width: 100%;
  padding: 36px 32px;
}

.auth-subtitle {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pdash-dark);
  margin-top: -8px;
  margin-bottom: 24px;
}

.auth-logo {
  display: block;
  height: 20px;
  width: auto;
  margin: 0 auto 28px;
}

.auth-input {
  border: 1px solid #c0d0e4;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input:focus {
  outline: none;
  border-color: var(--pdash-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 85, .12);
}

.auth-btn {
  display: block;
  width: 100%;
  background: var(--pdash-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}
.auth-btn:hover {
  background: var(--pdash-accent-hover);
  box-shadow: var(--pdash-shadow-hover);
  color: #fff;
  text-decoration: none;
}

.auth-link {
  color: var(--pdash-accent);
  text-decoration: none;
  font-size: 14px;
}
.auth-link:hover {
  color: var(--pdash-pink);
  text-decoration: underline;
}

.auth-alert-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-alert-danger {
  background: var(--pdash-pale-pink);
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-footer {
  opacity: 0.6;
  font-size: 12px;
}

.auth-footer a {
  text-decoration: underline;
}

/* ── Bootstrap Overrides ─────────────────────────── */

/* Buttons */
.btn {
  border-radius: 8px;
  font-size: 0.875rem;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background-color: var(--pdash-accent);
  border-color: var(--pdash-accent);
}
.btn-primary:hover,
.btn-primary:active {
  background-color: var(--pdash-accent-hover);
  border-color: var(--pdash-accent-hover);
  box-shadow: var(--pdash-shadow);
}
.btn-primary:focus-visible {
  background-color: var(--pdash-accent);
  border-color: var(--pdash-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 85, .25);
}
.btn-outline-primary {
  color: var(--pdash-accent);
  border-color: var(--pdash-accent);
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: var(--pdash-accent);
  border-color: var(--pdash-accent);
  color: #fff;
}
.btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 0, 85, .25);
}
.btn-secondary {
  background-color: #6b7280;
  border-color: #6b7280;
}
.btn-secondary:hover,
.btn-secondary:active {
  background-color: #4b5563;
  border-color: #4b5563;
}
.btn-outline-secondary {
  color: #6b7280;
  border-color: var(--pdash-border);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:active {
  background-color: var(--pdash-bg);
  border-color: var(--pdash-border);
  color: var(--pdash-text);
}
.btn-success {
  background-color: var(--pdash-success);
  border-color: var(--pdash-success);
}
.btn-success:hover,
.btn-success:active {
  background-color: #15803d;
  border-color: #15803d;
}
.btn-danger {
  background-color: var(--pdash-pink);
  border-color: var(--pdash-pink);
}
.btn-danger:hover,
.btn-danger:active {
  background-color: #e0255a;
  border-color: #e0255a;
}

/* Cards */
.card {
  border: 1px solid var(--pdash-border);
  border-radius: 10px;
  box-shadow: none;
  transition: box-shadow 0.15s ease;
}
.card:hover {
  box-shadow: var(--pdash-shadow);
}
.card-header {
  background-color: var(--pdash-bg);
  font-weight: 600;
  border-bottom: 1px solid var(--pdash-border);
}
.card-body {
  padding: 20px;
}
.card-narrow {
  max-width: 500px;
}

/* Badges – soft / pastel style */
.badge {
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 0.75rem;
}
.badge.bg-success {
  background-color: #ecfdf5 !important;
  color: #166534 !important;
}
.badge.bg-danger {
  background-color: var(--pdash-pale-pink) !important;
  color: var(--pdash-pink) !important;
}
.badge.bg-warning {
  background-color: #fef3e2 !important;
  color: #b45309 !important;
}
.badge.bg-info {
  background-color: var(--pdash-accent-light) !important;
  color: var(--pdash-accent) !important;
}
.badge.bg-secondary {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}
.badge.bg-primary {
  background-color: var(--pdash-accent-light) !important;
  color: var(--pdash-accent) !important;
}

/* Alerts */
.alert {
  border-radius: 8px;
  font-size: 0.875rem;
}
.alert-success {
  background-color: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}
.alert-danger {
  background-color: var(--pdash-pale-pink);
  border-color: #fecaca;
  color: #991b1b;
}
.alert-warning {
  background-color: #fef3e2;
  border-color: #fde68a;
  color: #92400e;
}
.alert-info {
  background-color: var(--pdash-accent-light);
  border-color: var(--pdash-blue);
  color: var(--pdash-accent);
}

/* Form controls */
.form-control,
.form-select {
  border-radius: 8px;
  border-color: #c0d0e4;
  font-size: 0.875rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--pdash-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 85, .12);
}
.form-label {
  font-weight: 500;
  color: var(--pdash-text);
}

/* Tables */
.table > thead th {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--pdash-muted);
  background-color: var(--pdash-bg);
  border-bottom-width: 2px;
  border-bottom-color: var(--pdash-border);
}
.table > tbody > tr > td {
  padding: 10px 12px;
  vertical-align: middle;
  border-color: #eef2fb;
}
.table-hover > tbody > tr:hover {
  background-color: var(--pdash-bg);
}

/* Progress bars */
.progress {
  border-radius: 8px;
  background-color: var(--pdash-accent-light);
}
.progress-bar {
  background-color: var(--pdash-accent);
}

/* Nav tabs */
.nav-tabs .nav-link {
  border-radius: 6px 6px 0 0;
  font-size: 0.875rem;
  color: var(--pdash-muted);
}
.nav-tabs .nav-link.active {
  color: var(--pdash-accent);
  font-weight: 600;
  border-color: var(--pdash-border) var(--pdash-border) #fff;
}
.nav-tabs .nav-link:hover:not(.active) {
  color: var(--pdash-text);
  border-color: transparent;
}

/* List groups */
.list-group-item {
  border-color: var(--pdash-border);
}

/* Page header */
.page-header {
  padding: 0.75rem 0 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--pdash-border);
}
.page-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.page-header-section:empty { display: none; }
.page-header-section::before {
  content: " › ";
  color: var(--pdash-muted);
  font-weight: 400;
}
.page-header-section {
  font-weight: 500;
  color: var(--pdash-muted);
}
.page-description:empty { display: none; }
.page-description {
  font-size: 0.875rem;
  color: var(--pdash-muted);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* Text color utilities */
.text-primary {
  color: var(--pdash-accent) !important;
}
.text-success {
  color: var(--pdash-success) !important;
}

/* ── CMS Page Tree Indentation ──────────────────── */
.cms-indent-0 { padding-left: 0; }
.cms-indent-1 { padding-left: 1.5rem; }
.cms-indent-2 { padding-left: 3rem; }
.cms-indent-3 { padding-left: 4.5rem; }
.cms-indent-4 { padding-left: 6rem; }
.cms-indent-5 { padding-left: 7.5rem; }
.cms-translation-row { background-color: var(--pdash-accent-light); }
.cms-translation-indent { font-size: 0.875rem; }

/* ── Contract fields preview ─────────────────────── */
.contract-fields-preview-table { max-height: 400px; overflow-y: auto; }

/* ── Home Map ────────────────────────────────────── */
.pdash-map {
  height: 400px;
  border-radius: 10px;
  border: 1px solid var(--pdash-border);
  margin-bottom: 24px;
  overflow: hidden;
  z-index: 0;
  animation: pdash-map-fadein 0.6s ease-out;
}

@media (min-width: 768px) {
  .pdash-map {
    height: 500px;
  }
}

@keyframes pdash-map-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Map pin marker */
.pdash-map-marker {
  background: transparent;
  border: none;
  overflow: visible;
}

.pdash-map-pin-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.pdash-map-pin-wrap.pdash-animated {
  animation: pdash-marker-drop 0.4s ease-out both;
}

.pdash-map-pin-wrap:hover .pdash-map-pin {
  transform: scale(1.15);
}

.pdash-map-pin {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 85, 0.35));
  transition: transform 0.15s ease;
}

/* Label base */
.pdash-map-label {
  position: absolute;
  background: var(--pdash-accent-light);
  color: var(--pdash-accent);
  border: 1px solid var(--pdash-blue);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--pdash-font);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--pdash-shadow);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pdash-map-label:hover {
  background: var(--pdash-blue);
  box-shadow: var(--pdash-shadow-hover);
  color: var(--pdash-accent);
  text-decoration: none;
}

.pdash-animated .pdash-map-label {
  animation: pdash-label-fade 0.3s ease-out both;
}

/* Arrow shared base */
.pdash-map-label::after {
  content: '';
  position: absolute;
  border: 6px solid transparent;
}

/* Direction: top (label above pin) */
.pdash-map-label[data-dir="top"] {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
}

.pdash-map-label[data-dir="top"]::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--pdash-blue);
}

/* Direction: right (label right of pin) */
.pdash-map-label[data-dir="right"] {
  left: 100%;
  top: 15px;
  transform: translateY(-50%);
  margin-left: 8px;
}

.pdash-map-label[data-dir="right"]::after {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--pdash-blue);
}

/* Direction: bottom (label below pin) */
.pdash-map-label[data-dir="bottom"] {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
}

.pdash-map-label[data-dir="bottom"]::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--pdash-blue);
}

/* Direction: left (label left of pin) */
.pdash-map-label[data-dir="left"] {
  right: 100%;
  top: 15px;
  transform: translateY(-50%);
  margin-right: 8px;
}

.pdash-map-label[data-dir="left"]::after {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--pdash-blue);
}

/* Filter toggle buttons (campaign edit) */
.filter-toggles .btn {
  border-radius: 2px;
}

@keyframes pdash-marker-drop {
  0% { opacity: 0; transform: translateY(-30px) scale(0.6); }
  60% { opacity: 1; transform: translateY(4px) scale(1.05); }
  80% { transform: translateY(-2px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pdash-label-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Plot numbers: Tabulator editor dropdowns ────── */
.tabulator-edit-list .tabulator-edit-list-item {
  font-size: 0.8125rem;
}

/* ── Plot numbers: open-detail link icon ─────────── */
.plot-number-open-link {
  color: var(--bs-primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}
.plot-number-open-link:hover {
  text-decoration: underline;
}

/* ── Plot numbers: save status bar ────────────────── */
.save-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  min-height: 2rem;
  border-top: 1px solid var(--bs-border-color);
}

.save-status-dirty {
  color: var(--bs-warning-text-emphasis);
  background-color: var(--bs-warning-bg-subtle);
}

.save-status-saving {
  color: var(--bs-secondary);
  background-color: var(--bs-light);
}

.save-status-ok {
  color: var(--bs-success);
  background-color: var(--bs-success-bg-subtle);
}

.save-status-error {
  color: var(--bs-danger);
  background-color: var(--bs-danger-bg-subtle);
}

/* ── AI Importer Beta ───────────────────────────── */
.ai-import-sparkle {
  vertical-align: -3px;
  margin-right: 4px;
  color: var(--pdash-accent);
}

.ai-import-summary-card {
  border: 1px solid var(--pdash-border);
}

.ai-import-summary-count {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.2;
}

.ai-import-summary-label {
  font-size: 0.8rem;
  color: var(--pdash-text);
  opacity: 0.7;
}

.ai-import-color-new { color: var(--pdash-success); }
.ai-import-color-changed { color: var(--pdash-accent); }
.ai-import-color-unchanged { color: #94a3b8; }
.ai-import-color-ref { color: var(--pdash-warm); }
.ai-import-color-warning { color: #dc2626; }

.ai-import-badge-new {
  background-color: #dcfce7;
  color: #166534;
}

.ai-import-badge-changed {
  background-color: var(--pdash-accent-light);
  color: var(--pdash-accent);
}

.ai-import-badge-unchanged {
  background-color: #f1f5f9;
  color: #64748b;
}

.ai-import-changed-cell {
  background-color: #fef3c7 !important;
}

.ai-import-old-value {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  text-decoration: line-through;
  line-height: 1.2;
  margin-top: 1px;
}

.ai-import-column-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.ai-import-column-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ai-import-col-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--pdash-border);
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
  background: var(--pdash-card);
  transition: background-color 0.15s, opacity 0.15s;
}

.ai-import-col-toggle:has(input:not(:checked)) {
  opacity: 0.5;
  background: #f1f5f9;
}

.ai-import-col-toggle input {
  margin: 0;
  width: 14px;
  height: 14px;
}

.ai-import-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0 1rem;
}

.ai-import-table {
  font-size: 0.82rem;
  white-space: nowrap;
}

.ai-import-table th {
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pdash-text);
  opacity: 0.7;
  position: sticky;
  top: 0;
  background: var(--pdash-card);
  z-index: 1;
}

.ai-import-th-check {
  width: 36px;
}

.ai-import-table td {
  vertical-align: top;
}

.ai-import-cell-input {
  font-size: 0.8rem;
  padding: 2px 6px;
  min-width: 70px;
  max-width: 150px;
}

.ai-import-row-new { }
.ai-import-row-changed { }
.ai-import-row-unchanged {
  opacity: 0.5;
}

.ai-import-row-warning {
  border-left: 3px solid #dc2626;
}

.ai-import-badge-warning {
  background-color: #fef2f2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: help;
  margin-top: 2px;
}

.ai-import-ref-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-import-ref-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-import-ref-input {
  max-width: 220px;
}

.ai-import-ref-label {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.ai-import-form-page .form-control.font-monospace {
  font-size: 0.85rem;
  line-height: 1.5;
}

.ai-import-image-preview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ai-import-image-preview img {
  max-width: 300px;
  max-height: 200px;
  border: 1px solid var(--pdash-border);
  border-radius: 4px;
  object-fit: contain;
}

/* ── Allocation ─────────────────────────────────── */

.alloc-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  border: 1px solid #6c757d;
  color: #6c757d;
  font-size: 0.75em;
  cursor: help;
  vertical-align: middle;
  margin-left: 0.25em;
}

.alloc-weight-value {
  font-variant-numeric: tabular-nums;
  min-width: 2em;
  text-align: right;
}

.prospect-delete-warning {
  border-left: 4px solid #dc3545;
  padding-left: 1rem;
}

/* ── Column picker (prospect list) ──────────────── */

.column-picker-menu {
  max-height: 20rem;
  overflow-y: auto;
}

.column-picker-item {
  cursor: pointer;
}
