/*
 * Field Guide Marina — Component Library
 * v8.0.0 — Every reusable component per design-spec.md §7
 *
 * Depends on: fgm-tokens.css, fgm-base.css
 */

/* ═══════════════════════════════════════════════════════════
   7.1  BUTTONS
   ═══════════════════════════════════════════════════════════ */

.fgm-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--fg);
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.fgm-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.fgm-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.fgm-btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.fgm-btn-primary:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: #fff;
}

.fgm-btn-secondary {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.fgm-btn-secondary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.fgm-btn-danger {
  background: var(--bad-dot);
  color: #fff;
  border-color: var(--bad-dot);
}
.fgm-btn-danger:hover {
  background: color-mix(in srgb, var(--bad-dot) 85%, black);
  border-color: color-mix(in srgb, var(--bad-dot) 85%, black);
  color: #fff;
}

.fgm-btn[disabled],
.fgm-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.fgm-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.fgm-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.fgm-btn-lg {
  padding: 12px 20px;
  font-size: 14px;
  min-height: 44px;
}

.fgm-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   7.2  INPUTS
   ═══════════════════════════════════════════════════════════ */

.fgm-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.fgm-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.fgm-label .required {
  color: var(--bad-dot);
}

.fgm-label .optional {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-3);
  margin-left: auto;
}

.fgm-input,
.fgm-select,
.fgm-textarea {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.fgm-textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

.fgm-select {
  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='%235F6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.fgm-input:focus,
.fgm-select:focus,
.fgm-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.fgm-input.is-error,
.fgm-select.is-error,
.fgm-textarea.is-error {
  border-color: var(--bad-dot);
}
.fgm-input.is-error:focus,
.fgm-select.is-error:focus,
.fgm-textarea.is-error:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad-dot) 15%, transparent);
}

.fgm-help {
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.4;
}

.fgm-error-text {
  font-size: 11px;
  color: var(--num-bad);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fgm-error-text svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   7.3  PILLS
   ═══════════════════════════════════════════════════════════ */

.fgm-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  white-space: nowrap;
  line-height: 1.3;
}

.fgm-pill-ok      { background: color-mix(in srgb, var(--ok-dot)     14%, white); color: color-mix(in srgb, var(--ok-dot)     78%, black); }
.fgm-pill-warn    { background: color-mix(in srgb, var(--warn-dot)   16%, white); color: color-mix(in srgb, var(--warn-dot)   80%, black); }
.fgm-pill-bad     { background: color-mix(in srgb, var(--bad-dot)    14%, white); color: color-mix(in srgb, var(--bad-dot)    78%, black); }
.fgm-pill-vacant  { background: color-mix(in srgb, var(--vacant-dot) 15%, white); color: color-mix(in srgb, var(--vacant-dot) 75%, black); }
.fgm-pill-neutral { background: color-mix(in srgb, var(--fg-3)       18%, white); color: var(--fg-2); }
.fgm-pill-brand   { background: var(--brand-soft); color: var(--brand); }

/* Status aliases → semantic pills */
.fgm-pill-active,
.fgm-pill-leased,
.fgm-pill-paid,
.fgm-pill-fulfilled   { background: color-mix(in srgb, var(--ok-dot) 14%, white);   color: color-mix(in srgb, var(--ok-dot) 78%, black); }

.fgm-pill-pending,
.fgm-pill-pending_renewal,
.fgm-pill-offered,
.fgm-pill-waiting      { background: color-mix(in srgb, var(--warn-dot) 16%, white); color: color-mix(in srgb, var(--warn-dot) 80%, black); }

.fgm-pill-overdue,
.fgm-pill-unpaid,
.fgm-pill-cancelled    { background: color-mix(in srgb, var(--bad-dot) 14%, white);  color: color-mix(in srgb, var(--bad-dot) 78%, black); }

.fgm-pill-expired,
.fgm-pill-info         { background: color-mix(in srgb, var(--fg-3) 18%, white);     color: var(--fg-2); }

.fgm-pill-overdue      { outline: 1px solid color-mix(in srgb, var(--bad-dot) 40%, white); }

/* Renewal status pill aliases */
.fgm-pill-renewal-green { background: color-mix(in srgb, var(--ok-dot) 14%, white);   color: color-mix(in srgb, var(--ok-dot) 78%, black); }
.fgm-pill-renewal-blue  { background: var(--brand-soft); color: var(--brand); }
.fgm-pill-renewal-yellow,
.fgm-pill-renewal-orange { background: color-mix(in srgb, var(--warn-dot) 16%, white); color: color-mix(in srgb, var(--warn-dot) 80%, black); }
.fgm-pill-renewal-red   { background: color-mix(in srgb, var(--bad-dot) 14%, white);  color: color-mix(in srgb, var(--bad-dot) 78%, black); }
.fgm-pill-renewal-gray,
.fgm-pill-renewal-grey  { background: color-mix(in srgb, var(--fg-3) 18%, white);     color: var(--fg-2); }

/* Payment status pill aliases (portal) */
.fgm-pill-pay-paid      { background: color-mix(in srgb, var(--ok-dot) 14%, white);   color: color-mix(in srgb, var(--ok-dot) 78%, black); }
.fgm-pill-pay-unpaid    { background: color-mix(in srgb, var(--bad-dot) 14%, white);  color: color-mix(in srgb, var(--bad-dot) 78%, black); }
.fgm-pill-pay-pending   { background: color-mix(in srgb, var(--warn-dot) 16%, white); color: color-mix(in srgb, var(--warn-dot) 80%, black); }

/* ═══════════════════════════════════════════════════════════
   7.4  STATUS DOTS
   ═══════════════════════════════════════════════════════════ */

.fgm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.fgm-dot-ok      { background: var(--ok-dot); }
.fgm-dot-warn    { background: var(--warn-dot); }
.fgm-dot-bad     { background: var(--bad-dot); }
.fgm-dot-vacant  { background: var(--vacant-dot); }
.fgm-dot-neutral { background: var(--fg-3); }

/* ═══════════════════════════════════════════════════════════
   7.5  CARDS
   ═══════════════════════════════════════════════════════════ */

.fgm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.fgm-card-lease {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.fgm-card-lease-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.fgm-card-lease-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--fg);
}

/* ═══════════════════════════════════════════════════════════
   7.6  TABLES
   ═══════════════════════════════════════════════════════════ */

.fgm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fgm-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  font-weight: 500;
  padding: 20px 16px 14px;
  border-bottom: 1px solid var(--line-strong);
}

.fgm-table tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.005em;
}

.fgm-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

.fgm-table tbody tr:nth-child(odd) {
  background: var(--row-stripe);
}

.fgm-table tbody tr:hover {
  background: var(--row-hover);
}

.fgm-td-num {
  color: var(--brand);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fgm-td-action {
  color: var(--fg-3);
  font-size: 13px;
  transition: color 0.15s;
  text-decoration: none;
}

.fgm-table tbody tr:hover .fgm-td-action {
  color: var(--brand);
}

/* ═══════════════════════════════════════════════════════════
   7.7  MODALS
   ═══════════════════════════════════════════════════════════ */

.fgm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 30, 33, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.fgm-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.fgm-modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.fgm-modal-wide {
  max-width: 520px;
}

.fgm-modal-header {
  padding: var(--space-6) var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.fgm-modal-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
}

.fgm-modal-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fgm-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--fg-3);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s, color 0.15s;
}

.fgm-modal-close:hover {
  background: var(--row-hover);
  color: var(--fg);
}

.fgm-modal-body {
  padding: var(--space-5) var(--space-6);
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
}

.fgm-modal-footer {
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  background: color-mix(in srgb, var(--brand) 2%, white);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.fgm-modal-icon-danger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bad-dot) 12%, white);
  color: var(--bad-dot);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fgm-modal-icon-danger svg {
  width: 18px;
  height: 18px;
}

/* Multi-step progress */
.fgm-modal-progress {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-6) 0;
}

.fgm-modal-step {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--line);
}

.fgm-modal-step.is-done {
  background: var(--ok-dot);
}

.fgm-modal-step.is-active {
  background: var(--brand);
}

/* ═══════════════════════════════════════════════════════════
   7.8  TOASTS
   ═══════════════════════════════════════════════════════════ */

.fgm-toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 100001;
  pointer-events: none;
}

.fgm-toast {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 360px;
  pointer-events: auto;
  animation: fgm-toast-in 0.25s ease-out;
}

.fgm-toast.is-dismissing {
  animation: fgm-toast-out 0.2s ease-in forwards;
}

@keyframes fgm-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fgm-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}

.fgm-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fgm-toast-icon svg {
  width: 14px;
  height: 14px;
}

.fgm-toast-icon-ok   { background: color-mix(in srgb, var(--ok-dot)   12%, white); color: var(--ok-dot); }
.fgm-toast-icon-warn { background: color-mix(in srgb, var(--warn-dot) 12%, white); color: var(--warn-dot); }
.fgm-toast-icon-bad  { background: color-mix(in srgb, var(--bad-dot)  12%, white); color: var(--bad-dot); }

.fgm-toast-body {
  flex: 1;
  min-width: 0;
}

.fgm-toast-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2px;
}

.fgm-toast-text {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.4;
}

.fgm-toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--fg-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.fgm-toast-close:hover {
  color: var(--fg);
}

/* ═══════════════════════════════════════════════════════════
   7.9  BANNERS
   ═══════════════════════════════════════════════════════════ */

.fgm-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.45;
}

.fgm-banner svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fgm-banner-info {
  background: var(--brand-soft);
  color: var(--brand);
}

.fgm-banner-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-stroke);
}

.fgm-banner-bad {
  background: color-mix(in srgb, var(--bad-dot) 8%, white);
  color: var(--num-bad);
  border: 1px solid color-mix(in srgb, var(--bad-dot) 18%, white);
}

/* ═══════════════════════════════════════════════════════════
   7.10  SKELETONS
   ═══════════════════════════════════════════════════════════ */

.fgm-skeleton {
  background: linear-gradient(90deg,
    var(--block-bg) 0%,
    color-mix(in srgb, var(--brand) 12%, white) 50%,
    var(--block-bg) 100%);
  background-size: 800px 100%;
  animation: fgm-shimmer 1.6s infinite linear;
  border-radius: var(--radius-md);
}

@keyframes fgm-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.fgm-skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
}

.fgm-skeleton-number {
  height: 48px;
  width: 120px;
}

.fgm-skeleton-pill {
  height: 22px;
  width: 72px;
  border-radius: var(--radius-md);
}

.fgm-skeleton-row {
  height: 56px;
  margin-bottom: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .fgm-skeleton {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   7.11  FAB
   ═══════════════════════════════════════════════════════════ */

.fgm-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  z-index: 99999;
  transition: transform 0.15s, box-shadow 0.15s;
}

.fgm-fab:hover {
  transform: scale(1.06);
}

.fgm-fab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.fgm-fab svg {
  width: 22px;
  height: 22px;
}

.fgm-fab-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--fg);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.fgm-fab:hover .fgm-fab-tooltip {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   7.12  EMPTY STATES
   ═══════════════════════════════════════════════════════════ */

.fgm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-11) var(--space-6);
}

.fgm-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.fgm-empty-icon svg {
  width: 24px;
  height: 24px;
}

.fgm-empty-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: var(--space-2);
}

.fgm-empty-text {
  font-size: 13px;
  color: var(--fg-2);
  max-width: 380px;
  line-height: 1.5;
  margin-bottom: var(--space-5);
}

.fgm-empty-actions {
  display: flex;
  gap: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════
   7.13  STAT BLOCKS (dashboard)
   ═══════════════════════════════════════════════════════════ */

.fgm-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.fgm-stat-block {
  background: var(--block-bg);
  padding: var(--space-9);
  position: relative;
}

.fgm-stat-block::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
}

.fgm-stat-grid > .fgm-stat-block:nth-child(odd)::after {
  width: 1px;
  height: 100%;
  top: 0;
  right: 0;
  background: var(--line);
}

.fgm-stat-grid > .fgm-stat-block:nth-child(-n+2)::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.fgm-stat-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

.fgm-stat-block-label {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  line-height: 1;
}

.fgm-stat-block-sub {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--fg-2);
  line-height: 1.4;
  margin-top: var(--space-1);
}

.fgm-stat-block-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.fgm-stat-block-link:hover {
  color: var(--brand-ink);
}

.fgm-stat-block-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.fgm-stat-item {
  padding: 0 var(--space-4);
  position: relative;
}

.fgm-stat-item:first-child {
  padding-left: 0;
}

.fgm-stat-item:last-child {
  padding-right: 0;
}

.fgm-stat-item + .fgm-stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.fgm-stat-number {
  font-size: 60px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-2);
}

.fgm-stat-number[data-tone="ok"]      { color: var(--num-ok); }
.fgm-stat-number[data-tone="warn"]    { color: var(--num-warn); }
.fgm-stat-number[data-tone="bad"]     { color: var(--num-bad); }
.fgm-stat-number[data-tone="brand"]   { color: var(--brand); }
.fgm-stat-number[data-tone="neutral"] { color: var(--fg); }

.fgm-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   7.14  KANBAN CARDS
   ═══════════════════════════════════════════════════════════ */

.fgm-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.fgm-kanban-col {
  background: var(--block-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.fgm-kanban-col-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fgm-kanban-col-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
  background: color-mix(in srgb, var(--fg-3) 12%, white);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.fgm-kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: var(--space-2);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--space-3);
  transition: border-color 0.15s;
}

.fgm-kanban-card:hover {
  border-color: var(--brand);
}

.fgm-kanban-card-slip {
  font-size: 22px;
  font-weight: 500;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  grid-row: 1 / span 3;
  align-self: start;
}

.fgm-kanban-card-tenant {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.fgm-kanban-card-meta {
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 2px;
}

.fgm-kanban-card-foot {
  font-size: 11px;
  color: var(--fg-3);
  margin-top: var(--space-2);
  grid-column: 1 / -1;
}

.fgm-kanban-card.is-settled {
  background: #FBF9F3;
}

.fgm-kanban-card.is-settled .fgm-kanban-card-slip {
  color: var(--fg-2);
}

/* ═══════════════════════════════════════════════════════════
   HERO (§8.1)
   ═══════════════════════════════════════════════════════════ */

.fgm-hero {
  background: linear-gradient(115deg,
    color-mix(in srgb, var(--brand) 10%, white) 0%,
    color-mix(in srgb, var(--brand)  4%, white) 45%,
    color-mix(in srgb, var(--brand) 22%, white) 100%);
  position: relative;
  padding: var(--space-9);
  overflow: hidden;
}

.fgm-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 82% 25%,
    color-mix(in srgb, var(--brand) 18%, white) 0%,
    transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.fgm-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

.fgm-hero-title {
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
}

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER (§8.2)
   ═══════════════════════════════════════════════════════════ */

.fgm-page-header {
  padding: var(--space-7) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-6);
}

.fgm-page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fgm-page-eyebrow a {
  color: var(--brand);
  text-decoration: none;
}

.fgm-page-title {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: var(--space-2);
}

.fgm-page-desc {
  font-size: 14px;
  color: var(--fg-2);
  margin: 0 0 var(--space-6);
  line-height: 1.5;
}

.fgm-page-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 14px;
  color: var(--fg-2);
}

.fgm-page-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fgm-page-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════
   ATTENTION LIST (§8.3)
   ═══════════════════════════════════════════════════════════ */

.fgm-attention-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fgm-attention-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.fgm-attention-when {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.fgm-attention-body {
  font-size: 15px;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.fgm-attention-body small {
  font-size: 13px;
  color: var(--fg-2);
}

.fgm-attention-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
}

.fgm-attention-action:hover {
  color: var(--brand-ink);
}

/* ═══════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════ */

.fgm-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}

.fgm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.fgm-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.fgm-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: transform 0.2s;
}

.fgm-toggle input:checked + .fgm-toggle-track {
  background: var(--brand);
}

.fgm-toggle input:checked + .fgm-toggle-track::after {
  transform: translateX(18px);
}

.fgm-toggle input:focus-visible + .fgm-toggle-track {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   TOOLBAR (filter bar above tables/lists)
   ═══════════════════════════════════════════════════════════ */

.fgm-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  flex-wrap: wrap;
}

.fgm-toolbar-search {
  position: relative;
}

.fgm-toolbar-search .fgm-input {
  padding-left: 36px;
  width: 240px;
}

.fgm-toolbar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-3);
  pointer-events: none;
}

.fgm-toolbar-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--fg-3);
}

/* ═══════════════════════════════════════════════════════════
   MAP SVG FILLS (§7.15)
   ═══════════════════════════════════════════════════════════ */

.fgm-slip-ok     { fill: color-mix(in srgb, var(--ok-dot)     45%, white); }
.fgm-slip-warn   { fill: color-mix(in srgb, var(--warn-dot)   45%, white); }
.fgm-slip-bad    { fill: color-mix(in srgb, var(--bad-dot)    45%, white); }
.fgm-slip-vacant { fill: color-mix(in srgb, var(--vacant-dot) 14%, white); }

.fgm-slip-selected { stroke: var(--brand); stroke-width: 2px; }
.fgm-slip-hover    { stroke: var(--brand); stroke-width: 1.5px; }

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .fgm-toast,
  .fgm-modal-overlay,
  .fgm-fab {
    animation: none;
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .fgm-page-title {
    font-size: 28px;
  }

  .fgm-empty {
    padding: 32px 16px;
  }

  .fgm-empty-icon {
    width: 48px;
    height: 48px;
  }

  .fgm-empty-title {
    font-size: 14px;
  }

  .fgm-modal-dialog {
    max-width: calc(100vw - 32px);
    margin: 16px auto;
  }
}

@media (max-width: 600px) {
  .fgm-page-title {
    font-size: 24px;
  }

  .fgm-page-eyebrow {
    font-size: 10px;
  }

  .fgm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fgm-btn-lg {
    width: 100%;
    justify-content: center;
  }
}
