/* ════════════════════════════════════════════════════════════
   PresentTool™ — Dashboard tokens (production, v3.7.0)
   Mirrors the plugin tokens + mockups/ui-redesign-2026-web.
   Single source of truth for colours, type, elevation, radii.
   ──────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --pt-primary:   #8B4513;
  --pt-secondary: #C8956C;

  /* Text */
  --pt-text:        #1A1A1A;
  --pt-text-muted:  #6B6B6B;
  --pt-text-subtle: #9A9A95;

  /* Surfaces — light theme */
  --pt-bg-page:    #F8F6F1;
  --pt-surface-0:  #FFFFFF;
  --pt-surface-1:  #FAFAF8;
  --pt-surface-2:  #F4F3F0;
  --pt-surface-3:  #EEEDEA;

  /* Brand-tinted */
  --pt-accent-soft: rgba(139, 69, 19, 0.08);
  --pt-accent-mid:  rgba(139, 69, 19, 0.18);
  --pt-accent-deep: rgba(139, 69, 19, 0.40);

  /* Semantic */
  --pt-success:     #2D7A4F;
  --pt-warning:     #A0722A;
  --pt-destructive: #B03A2E;

  /* Borders */
  --pt-border:        #E5E5E0;
  --pt-border-strong: #D9D8D2;

  /* Type-stacks */
  --pt-serif: 'Source Serif 4', Georgia, serif;
  --pt-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pt-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Elevation */
  --pt-shadow-card:   0 1px 2px rgba(20, 18, 14, 0.04),
                      0 8px 24px rgba(20, 18, 14, 0.06);
  --pt-shadow-modal:  0 8px 24px rgba(20, 18, 14, 0.10),
                      0 32px 80px rgba(20, 18, 14, 0.18);
  --pt-shadow-hero:   0 16px 64px rgba(0, 0, 0, 0.40);

  /* Radii */
  --pt-radius-sm: 6px;
  --pt-radius-md: 10px;
  --pt-radius-lg: 14px;
  --pt-radius-xl: 20px;

  /* Layout */
  --pt-page-max: 1200px;
  --pt-nav-h:    56px;
}

:root[data-theme="dark"] {
  --pt-text:        #F2F0EB;
  --pt-text-muted:  #A09D96;
  --pt-text-subtle: #6B6B6B;

  --pt-bg-page:   #14120E;
  --pt-surface-0: #1C1C1A;
  --pt-surface-1: #1F1E1B;
  --pt-surface-2: #1A1A18;
  --pt-surface-3: #232220;

  --pt-border:        #2A2A28;
  --pt-border-strong: #3A3A38;

  --pt-accent-soft: rgba(200, 149, 108, 0.12);
  --pt-accent-mid:  rgba(200, 149, 108, 0.22);

  --pt-primary: #C8956C;
}

/* Reset + base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pt-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pt-text);
  background: var(--pt-bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--pt-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Headings ----------------------------------------------------- */
.pt-h1 {
  font-family: var(--pt-serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--pt-text);
}
.pt-h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--pt-primary);
}
.pt-h2 {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--pt-text);
}
.pt-eyebrow {
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pt-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pt-primary);
}
.pt-mono { font-family: var(--pt-mono); }

/* Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pt-sans);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--pt-radius-sm);
  padding: 7px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 13px; height: 13px; }

.btn-primary {
  background: var(--pt-primary);
  color: white;
  border-color: var(--pt-primary);
}
.btn-primary:hover { background: #6E3610; text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--pt-text);
  border-color: var(--pt-border-strong);
}
.btn-outline:hover { background: var(--pt-surface-2); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--pt-text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--pt-surface-2); color: var(--pt-text); text-decoration: none; }

.btn-danger {
  background: var(--pt-destructive);
  color: white;
  border-color: var(--pt-destructive);
}
.btn-danger:hover { background: #8E2E25; text-decoration: none; }

.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-lg { padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* Status pills -------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-family: var(--pt-sans);
}
.status-pill .ind {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.status-pill.running { background: var(--pt-accent-soft); color: var(--pt-primary); }
.status-pill.running .ind {
  background: var(--pt-primary);
  animation: pt-status-pulse 2s ease-out infinite;
}
.status-pill.success { background: rgba(45,122,79,0.10); color: var(--pt-success); }
.status-pill.success .ind { background: var(--pt-success); }
.status-pill.warning { background: rgba(160,114,42,0.10); color: var(--pt-warning); }
.status-pill.warning .ind { background: var(--pt-warning); }
.status-pill.failed  { background: rgba(176,58,46,0.08); color: var(--pt-destructive); }
.status-pill.failed .ind { background: var(--pt-destructive); }
.status-pill.muted   { background: var(--pt-surface-3); color: var(--pt-text-muted); }
.status-pill.muted .ind { background: var(--pt-text-subtle); }

@keyframes pt-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(139,69,19,0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(139,69,19,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,69,19,0); }
}

/* Form inputs --------------------------------------------------- */
.pt-input {
  font-family: var(--pt-sans);
  font-size: 13.5px;
  padding: 9px 11px;
  border: 1px solid var(--pt-border);
  background: var(--pt-surface-0);
  color: var(--pt-text);
  border-radius: var(--pt-radius-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  width: 100%;
}
.pt-input:focus {
  outline: none;
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 3px var(--pt-accent-soft);
}
.pt-input[aria-invalid="true"],
.pt-input.is-invalid {
  border-color: var(--pt-destructive);
}
.pt-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--pt-text);
  margin-bottom: 6px;
}
.pt-field { margin-bottom: 14px; }
.pt-field-hint {
  font-size: 11.5px;
  color: var(--pt-text-muted);
  margin: 4px 0 0;
}
.pt-field-error {
  font-size: 11.5px;
  color: var(--pt-destructive);
  margin: 4px 0 0;
}

/* Card primitive ------------------------------------------------ */
.pt-card {
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-md);
  box-shadow: var(--pt-shadow-card);
}

/* Skip-link for a11y ------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pt-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 0; outline: 2px solid #fff; }

/* Page-wide spinner -------------------------------------------- */
.pt-spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--pt-border);
  border-top-color: var(--pt-primary);
  border-radius: 50%;
  animation: pt-spin 0.7s linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* Toast area ---------------------------------------------------- */
.pt-toast-area {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: 360px;
}
.pt-toast {
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-left: 3px solid var(--pt-primary);
  border-radius: var(--pt-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--pt-text);
  box-shadow: var(--pt-shadow-card);
  pointer-events: auto;
  animation: pt-toast-in 0.18s ease-out;
}
.pt-toast.is-success { border-left-color: var(--pt-success); }
.pt-toast.is-warning { border-left-color: var(--pt-warning); }
.pt-toast.is-error   { border-left-color: var(--pt-destructive); }
@keyframes pt-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
