/* ══════════════════════════════════════════════════════════════
   FableLoc Admin Dashboard — Styles
   ══════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #202124;
  background: #f8f9fa;
  line-height: 1.5;
}

/* ── Login page ─────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff 0%, #f5fbff 100%);
}

.login-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.login-subtitle {
  text-align: center;
  color: #5f6368;
  font-size: 13px;
  margin: 4px 0 24px;
}

.login-error {
  background: #fce8e6;
  color: #a50e0e;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5f6368;
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.login-field input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

/* ── Navigation ─────────────────────────────────────────────── */

#nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  height: 52px;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: #1a73e8;
  margin-right: 20px;
  white-space: nowrap;
}

.nav-link {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #f1f3f4;
  color: #202124;
}

.nav-link.active {
  background: #e8f0fe;
  color: #1a73e8;
}

.nav-spacer { flex: 1; }

.nav-user {
  font-size: 13px;
  color: #5f6368;
  margin-right: 8px;
  white-space: nowrap;
}

.nav-logout {
  color: #a50e0e !important;
}

/* ── Main content ───────────────────────────────────────────── */

#content {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 20px;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { filter: brightness(0.93); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }

.btn.primary { background: #1a73e8; color: #fff; }
.btn.secondary { background: #edf2fa; color: #174ea6; }
.btn.success { background: #34a853; color: #fff; }
.btn.danger { background: #ea4335; color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }

/* ── Cards (dashboard) ──────────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dash-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dash-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #1a73e8;
}

.dash-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dash-card-stats {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.6;
}

.dash-summary {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 13px;
  color: #5f6368;
}

/* ── Controls bar ───────────────────────────────────────────── */

.controls-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-stack {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-input {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.search-options-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-options-row .select-filter {
  min-width: 170px;
}

.search-option-checkbox {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.filter-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #5f6368;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-tab:hover { background: #f1f3f4; }
.filter-tab.active { background: #e8f0fe; color: #1a73e8; border-color: #1a73e8; }

.select-filter {
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

/* ── Lead list ──────────────────────────────────────────────── */

.lead-list {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  overflow: hidden;
}

.lead-row {
  border-bottom: 1px solid #f1f3f4;
}

.lead-row:last-child { border-bottom: none; }

.lead-group {
  border-bottom: 1px solid #f1f3f4;
}

.lead-group:last-child { border-bottom: none; }

.dev-group-body {
  padding-left: 24px;
  background: #fcfdff;
}

.dev-group-body .lead-row {
  border-left: 2px solid #e8f0fe;
}

.lead-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.lead-header:hover { background: #f8f9ff; }

.lead-chevron {
  font-size: 11px;
  color: #5f6368;
  width: 16px;
  text-align: center;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.lead-chevron.open { transform: rotate(90deg); }

.lead-name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.lead-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}



/* ── Lead detail panel ──────────────────────────────────────── */

.lead-detail {
  display: none;
  padding: 16px 16px 16px 40px;
  background: #fafbfc;
  border-top: 1px solid #f1f3f4;
}

.lead-detail.open { display: block; }

/* ── Two-column detail layout ────────────────────────────── */

.detail-two-col {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.facts-card {
  flex: 0 0 280px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px 16px;
}

.facts-card h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6368;
  margin-bottom: 8px;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.fact label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #80868b;
}

.fact span {
  font-size: 12px;
  color: #202124;
  word-break: break-word;
}

.actions-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-links {
  display: flex;
  gap: 12px;
}

.detail-links a {
  font-size: 13px;
  color: #1a73e8;
  text-decoration: none;
}

.detail-links a:hover { text-decoration: underline; }

.detail-email-section {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px 16px;
}

.detail-email-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 8px;
}

.email-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-input {
  flex: 1;
  border: 1px solid #dadce0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}

.email-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.email-input:disabled {
  background: #f1f3f4;
  color: #80868b;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #5f6368;
  cursor: pointer;
  white-space: nowrap;
}

.detail-suggestions {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.detail-suggestions h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 6px;
}

.suggestion-item {
  font-size: 13px;
  color: #3c4043;
  margin-bottom: 4px;
}

.suggestion-item strong {
  color: #5f6368;
  font-size: 11px;
  text-transform: uppercase;
}

/* ── Badges ─────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: 'Segoe UI', sans-serif;
  vertical-align: middle;
}

.badge-price { background: #45475a; color: #a6adc8; }
.badge-reviews { background: #313244; color: #89b4fa; border: 1px solid #45475a; }
.badge-pool-steam-principal { background: #89b4fa; color: #1e1e2e; }
.badge-pool-steam-f2p       { background: #a6e3a1; color: #1e1e2e; }
.badge-pool-steam-recentes  { background: #f9e2af; color: #1e1e2e; }
.badge-pool-steam-upcoming  { background: #cba6f7; color: #1e1e2e; }
.badge-pool-kickstarter     { background: #f38ba8; color: #1e1e2e; }

/* ── Email status icon ───────────────────────────────────── */

.email-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  width: 26px;
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: -1px;
  line-height: 1;
}

.email-icon-unknown {
  background: #fff;
  color: #9aa0a6;
  border: 1px solid #dadce0;
}

.email-icon-found {
  background: #1e3a2a;
  color: #a6e3a1;
  border: 1px solid #a6e3a1;
}

.email-icon-no {
  background: #2a1e1e;
  color: #f38ba8;
  border: 1px solid #f38ba8;
}

/* ── Notes section ───────────────────────────────────────── */

.detail-notes-section {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px 16px;
}

.detail-notes-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 8px;
}

.notes-input {
  width: 100%;
  min-height: 80px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 8px;
}

.notes-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

/* ── Compose view ───────────────────────────────────────────── */

.compose-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 24px;
}

.compose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.compose-full { grid-column: 1 / -1; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 6px;
}

.compose-input {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.compose-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.compose-readonly {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fafbfc;
  padding: 10px 12px;
  font-size: 14px;
  color: #3c4043;
  min-height: 40px;
  word-break: break-word;
}

.compose-readonly.muted { color: #80868b; }

.body-editor {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  min-height: 260px;
  max-height: 450px;
  overflow-y: auto;
}

.body-editor:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.body-editor a { color: #1a73e8; text-decoration: underline; }

.placeholder {
  background: #fff4c2;
  border: 1px dashed #d6a700;
  color: #6f5200;
  border-radius: 4px;
  padding: 1px 4px;
  font-style: italic;
  cursor: pointer;
}

.placeholder-bar {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  background: #fff7e0;
  color: #8a5b00;
}

.placeholder-bar.clear {
  background: #e6f4ea;
  color: #137333;
}

.ai-hint {
  background: #f0f4ff;
  border: 1px solid #d2e3fc;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 13px;
  color: #3c4043;
}

.ai-hint em { color: #5f6368; }

.compose-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.compose-msg {
  margin-top: 8px;
  font-size: 12px;
  color: #5f6368;
  min-height: 18px;
}

.compose-msg.warn { color: #8a5b00; }
.compose-msg.error { color: #a50e0e; }
.compose-msg.success { color: #137333; }

.field-note {
  margin-top: 8px;
  font-size: 12px;
  color: #5f6368;
}

/* ── Autocomplete dropdown ──────────────────────────────────── */

.autocomplete-wrap { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  display: none;
}

.autocomplete-dropdown.visible { display: block; }

.ac-item {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: #edf4ff; }

.ac-name { font-weight: 600; color: #202124; }
.ac-dev { color: #5f6368; font-size: 12px; }

/* ── Templates view ─────────────────────────────────────────── */

.templates-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  overflow: hidden;
}

.templates-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #f1f3f4;
}

.templates-header h2 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}

.template-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f4;
}

.template-row:last-child { border-bottom: none; }

.template-name { font-weight: 600; font-size: 14px; flex: 1; }
.template-meta { font-size: 12px; color: #5f6368; }
.template-actions { display: flex; gap: 6px; }

.template-editor {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.template-editor h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.template-field {
  margin-bottom: 14px;
}

.template-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5f6368;
  margin-bottom: 6px;
}

.template-field input,
.template-field select,
.template-field textarea {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}

.template-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.template-field input:focus,
.template-field select:focus,
.template-field textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.placeholder-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.placeholder-btn {
  background: #fff4c2;
  border: 1px dashed #d6a700;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #6f5200;
  cursor: pointer;
}

.placeholder-btn:hover { background: #ffe88a; }

.template-preview {
  background: #fafbfc;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
  min-height: 80px;
  white-space: pre-wrap;
  word-break: break-word;
}

.template-preview .placeholder {
  background: #fff4c2;
  border: 1px dashed #d6a700;
  color: #6f5200;
  border-radius: 4px;
  padding: 1px 4px;
  font-style: italic;
}

/* ── Pagination ─────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.pagination button {
  border: 1px solid #dadce0;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.pagination button:hover { background: #f1f3f4; }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination span { font-size: 13px; color: #5f6368; }

/* ── Import modal ───────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.modal h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  margin-bottom: 6px;
}

.modal-field select,
.modal-field input[type="file"] {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-msg {
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
}

.modal-msg.success { background: #e6f4ea; color: #137333; }
.modal-msg.error { background: #fce8e6; color: #a50e0e; }

/* ── Drafts overlay ─────────────────────────────────────────── */

#drafts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  overflow-y: auto;
  padding: 24px;
}

.dov-wrap {
  max-width: 860px;
  margin: 0 auto;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
}

.dov-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dov-topbar h2 {
  font-size: 18px;
  font-weight: 700;
}

.dov-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.dov-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dov-title {
  font-size: 15px;
  font-weight: 700;
}

.dov-meta {
  font-size: 12px;
  color: #5f6368;
  margin-bottom: 12px;
}

.dov-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #5f6368;
  letter-spacing: 0.04em;
  min-width: 60px;
  margin-right: 4px;
}

.dov-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dov-subject-val {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  min-width: 200px;
  padding: 3px 5px;
  border-radius: 4px;
  outline: none;
  border: 1px solid transparent;
}

.dov-subject-val[contenteditable="true"] {
  border-color: #1a73e8;
  background: #f8fcff;
}

.dov-body-wrap {
  border-top: 1px solid #f1f3f4;
  padding-top: 12px;
}

.dov-body-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dov-body-val {
  font-size: 13px;
  line-height: 1.7;
  padding: 4px 5px;
  border-radius: 4px;
  outline: none;
  min-height: 48px;
  border: 1px solid transparent;
}

.dov-body-val[contenteditable="true"] {
  border-color: #1a73e8;
  background: #f8fcff;
  padding: 8px 10px;
}

.dov-save-msg {
  margin-top: 6px;
  font-size: 12px;
  min-height: 16px;
}

.dov-error { color: #a50e0e; }

/* ── Placeholder management ─────────────────────────────────── */

.ph-section {
  margin-top: 24px;
}

.ph-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ph-list {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
}

.ph-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f3f4;
  font-size: 13px;
}

.ph-item:last-child { border-bottom: none; }
.ph-tag { font-weight: 700; font-family: monospace; }
.ph-desc { flex: 1; color: #5f6368; }
.ph-builtin { color: #80868b; font-style: italic; font-size: 11px; }

.ph-add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ph-add-row input {
  border: 1px solid #dadce0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}

.ph-add-row input:focus {
  outline: none;
  border-color: #1a73e8;
}

/* ── Empty state ────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #5f6368;
}

.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state-msg { font-size: 14px; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  #nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 6px;
  }

  .nav-spacer { display: none; }

  .detail-two-col { flex-direction: column; }
  .facts-card { flex: none; }
  .compose-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── File upload (hidden input) ─────────────────────────────── */

.hidden { display: none !important; }
