/* ============================================
   PLAN GENERATOR - Diseno minimalista
   Inspirado en Linear/Notion/Stripe
   Fondo blanco, mucho espacio, tipografia cuidada
   ============================================ */

:root {
  /* Neutrals - off-white minimal */
  --bg: #ffffff;
  --bg-soft: #fafaf9;
  --bg-subtle: #f6f6f4;
  --bg-hover: #f0f0ee;

  /* Borders */
  --border: #ececea;
  --border-strong: #d8d8d4;
  --border-input: #d8d8d4;

  /* Text */
  --text: #0a0a0a;
  --text-secondary: #4a4a48;
  --text-muted: #737370;
  --text-soft: #a3a39e;

  /* Accent - sober */
  --accent: #0a0a0a;
  --accent-hover: #2a2a2a;
  --accent-soft: #f0f0ee;
  --accent-ring: rgba(10, 10, 10, 0.08);

  /* Semantic */
  --danger: #c53030;
  --danger-soft: #fef2f2;
  --success: #2f855a;
  --success-soft: #f0fdf4;
  --warning: #b7791f;

  /* Effects */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.10), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.18), 0 12px 24px rgba(0, 0, 0, 0.08);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Fonts */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ============ BOOT LOADER ============ */
.boot-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ APP CHROME ============ */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.appbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.appbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--text);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.appbar-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.appbar-breadcrumb .sep { color: var(--text-soft); }
.appbar-breadcrumb .crumb-link { cursor: pointer; }
.appbar-breadcrumb .crumb-link:hover { color: var(--text); }

.appbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}
.user-chip:hover { background: var(--bg-hover); }

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.dropdown {
  position: absolute;
  top: 50px;
  right: 24px;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 60;
}
.dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-item:hover { background: var(--bg-soft); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.main {
  flex: 1;
  width: 100%;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: white;
  border-color: var(--text);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-primary:active { transform: translateY(0.5px); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
  padding: 6px 10px;
  font-size: 12px;
}
.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============ FORM FIELDS ============ */
.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field-help {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 6px 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  transition: all 0.12s ease;
  outline: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
  border-color: var(--border-strong);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  background: var(--bg);
  cursor: pointer;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ============ AUTH PAGES ============ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.auth-logo .logo-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 10px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 32px 0;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.auth-switch a:hover { border-bottom-color: var(--text); }

.auth-error {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ============ DASHBOARD ============ */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-greeting {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 0 0 4px 0;
  line-height: 1.15;
}

.page-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.section {
  margin-bottom: 56px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.section-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.card-preview {
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.card-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-body {
  padding: 14px 16px;
}

.card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: var(--r-sm);
  padding: 2px;
}
.card:hover .card-actions { display: flex; }

.card-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 14px;
}
.card-empty p { margin: 0 0 12px 0; }

/* Special "new" card */
.card-new {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
}
.card-new:hover {
  background: var(--bg-hover);
  border-color: var(--text);
  color: var(--text);
}

.card-new-plus {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Plan list (more list-like, less card) */
.plan-list {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  overflow: hidden;
}

.plan-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
}
.plan-item:last-child { border-bottom: 0; }
.plan-item:hover { background: var(--bg-soft); }

.plan-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  margin: 0;
}
.plan-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.plan-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.plan-item:hover .plan-actions { opacity: 1; }

.plan-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.badge-shared {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}
.badge-builtin {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* ============ EDITOR LAYOUT (plan / template) ============ */
.editor-layout {
  display: grid;
  grid-template-columns: 260px 1fr 460px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.editor-aside {
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  padding: 20px 14px;
}

.editor-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
}
.editor-nav-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.editor-nav-item.active {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 500;
}
.editor-nav-num {
  width: 18px;
  height: 18px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.editor-nav-item.active .editor-nav-num {
  background: var(--text);
  color: white;
}

.editor-main {
  overflow-y: auto;
  padding: 36px 48px 80px;
  background: var(--bg);
}

.editor-section {
  display: none;
  max-width: 680px;
}
.editor-section.active { display: block; }

.editor-section-head {
  margin-bottom: 28px;
}
.editor-section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0 0 4px 0;
}
.editor-section-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.editor-subhead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin: 32px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.editor-preview {
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-bar {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-muted);
}

.zoom-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 2px;
}
.zoom-btn {
  width: 26px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--r-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zoom-btn:hover { background: var(--bg); color: var(--text); }
.zoom-label {
  padding: 0 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

.preview-stage {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.preview-stage iframe {
  background: white;
  box-shadow: var(--shadow-md);
  border: 0;
}

/* ============ TEMPLATE GALLERY ============ */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.template-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.template-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.template-card.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.template-card .card-preview {
  aspect-ratio: 16 / 10;
}

.template-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.template-info-name {
  font-weight: 500;
  font-size: 13px;
  margin: 0;
}
.template-info-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 1px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ DYNAMIC ITEMS ============ */
.dyn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.dyn-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.dyn-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dyn-item-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dyn-item .field { margin-bottom: 10px; }
.dyn-item .field:last-child { margin-bottom: 0; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-head {
  padding: 20px 24px 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0 0 4px 0;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.modal-body {
  padding: 0 24px 12px;
}
.modal-foot {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ============ COLOR PICKER ROW ============ */
.color-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  flex-shrink: 0;
}
.color-row label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}
.color-row input[type="color"] {
  display: none;
}
.color-row input[type="text"] {
  width: 90px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  padding: 5px 6px;
}

/* ============ STYLE PICKER ============ */
.style-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.style-option {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--bg);
}
.style-option:hover {
  border-color: var(--border-strong);
}
.style-option.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--accent-ring);
}
.style-option-icon {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.style-option-name {
  font-size: 12px;
  font-weight: 500;
}

/* ============ UPLOADER ============ */
.upload-box {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.upload-box:hover {
  border-color: var(--text);
  background: var(--bg-subtle);
}
.upload-box input[type="file"] {
  display: none;
}
.upload-preview {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}
.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ============ SHARE LIST ============ */
.share-list {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
}
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.share-row:last-child { border-bottom: 0; }

/* ============ TOAST ============ */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 11px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.danger { background: var(--danger); }

/* ============ MISC ============ */
.callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin: 12px 0;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 6px 0;
}
.empty-state p {
  font-size: 13px;
  margin: 0 0 16px 0;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.flex-1 { flex: 1; }
.muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ============ SCROLLBARS ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-soft);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 220px 1fr 380px; }
}
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 200px 1fr; }
  .editor-preview { display: none; }
  .page { padding: 32px 20px 60px; }
  .editor-main { padding: 24px 24px 60px; }
}
@media (max-width: 600px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-aside { display: none; }
}
