/* ─── RESET & BASE ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --plum: #2d1b33;
  --plum-mid: #5c3d6e;
  --plum-light: #8b6a9e;
  --coral: #e8735a;
  --coral-hover: #d4603f;
  --amber: #f4a261;
  --gold: #d4a853;
  --bg: #faf8f6;
  --card: #ffffff;
  --card-shadow: rgba(45, 27, 51, 0.06);
  --card-shadow-hover: rgba(45, 27, 51, 0.12);
  --text: #1a1a1a;
  --text2: #7a6b80;
  --text3: #a99bb0;
  --border: #eae4ed;
  --success: #4caf50;
  --danger: #ef5350;
  --dismissed-bg: #f5f2f6;
  --dismissed-text: #b0a0b5;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Poppins', -apple-system, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.page { display: none; }
.page.active { display: block; }
input, textarea, select, button { font-family: var(--font); }
img { max-width: 100%; }

/* ─── NAV ───────────────────────────────────────── */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 246, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 32px; height: 32px; background: var(--plum); border-radius: 10px;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.dot { width: 8px; height: 8px; border-radius: 50%; position: absolute; top: 8px; }
.dot-l { background: var(--coral); left: 6px; }
.dot-r { background: var(--amber); right: 6px; }
.logo-text { font-weight: 700; font-size: 1.2rem; color: var(--plum); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle { display: flex; gap: 2px; margin-right: 12px; }
.lang-btn {
  padding: 4px 8px; border: 1px solid var(--border); background: none;
  font-size: 0.75rem; font-weight: 600; cursor: pointer; color: var(--text3);
  transition: all 0.15s;
}
.lang-btn:first-child { border-radius: 4px 0 0 4px; }
.lang-btn:last-child { border-radius: 0 4px 4px 0; }
.lang-btn.active { background: var(--plum); color: white; border-color: var(--plum); }
.nav-user { font-size: 0.85rem; color: var(--text2); }

/* ─── BUTTONS ───────────────────────────────────── */
.btn-accent {
  background: var(--coral); color: white; border: none; padding: 10px 24px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-accent:hover { background: var(--coral-hover); transform: translateY(-1px); }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text2);
  padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--plum-mid); color: var(--plum); }
.btn-danger-ghost:hover { border-color: var(--danger); color: var(--danger); }
.btn-ai {
  background: linear-gradient(135deg, var(--plum), var(--plum-mid));
  color: white; border: none; padding: 8px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,27,51,0.3); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ─── HERO ──────────────────────────────────────── */
.hero {
  text-align: center; padding: 100px 24px 60px; max-width: 700px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; background: rgba(45,27,51,0.08); color: var(--plum-mid);
  padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 800; line-height: 1.15; color: var(--plum); margin-bottom: 20px; }
.accent { color: var(--coral); }
.hero-sub { font-size: 1.1rem; color: var(--text2); max-width: 540px; margin: 0 auto 36px; line-height: 1.7; }
.hero-url-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 6px 6px 6px 16px; max-width: 540px; margin: 0 auto;
  transition: border-color 0.2s;
}
.hero-url-bar:focus-within { border-color: var(--coral); }
.hero-url-bar .material-icons-round { color: var(--text3); font-size: 20px; }
.hero-url-bar input {
  flex: 1; border: none; outline: none; font-size: 0.95rem; background: transparent; color: var(--text);
}
.hero-url-bar input::placeholder { color: var(--text3); }
.hero-hint { margin-top: 16px; font-size: 0.85rem; color: var(--text3); }

/* ─── HOW IT WORKS ──────────────────────────────── */
.how-section { padding: 80px 24px; max-width: 900px; margin: 0 auto; }
.how-section h2, .use-cases h2, .cta-bottom h2 {
  text-align: center; font-size: 1.8rem; font-weight: 700; color: var(--plum); margin-bottom: 48px;
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.step { text-align: center; }
.step-icon {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--plum), var(--plum-mid));
}
.step-icon .material-icons-round { color: white; font-size: 28px; }
.step h3 { font-size: 1rem; font-weight: 600; color: var(--plum); margin-bottom: 8px; }
.step p { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }

/* ─── USE CASES ─────────────────────────────────── */
.use-cases { padding: 60px 24px; max-width: 700px; margin: 0 auto; }
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.case-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 16px; background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); transition: all 0.2s; cursor: default;
}
.case-card:hover { border-color: var(--coral); transform: translateY(-2px); box-shadow: 0 4px 12px var(--card-shadow); }
.case-card .material-icons-round { font-size: 32px; color: var(--plum-mid); }
.case-card span:last-child { font-size: 0.85rem; font-weight: 500; color: var(--text); }

/* ─── VALUE SECTION ──────────────────────────────── */
.value-section { text-align: center; padding: 60px 24px 40px; max-width: 600px; margin: 0 auto; }
.value-section h2 { font-size: 1.6rem; font-weight: 700; color: var(--plum); margin-bottom: 20px; }
.value-sub { font-size: 1rem; color: var(--text2); line-height: 1.7; margin-bottom: 12px; }
.value-sub strong { color: var(--plum); font-size: 1.1rem; }

/* ─── CTA BOTTOM ────────────────────────────────── */
.cta-bottom {
  text-align: center; padding: 80px 24px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-mid) 100%);
  margin-top: 40px;
}
.cta-bottom h2 { color: white; margin-bottom: 32px; }
.cta-bottom .btn-accent { background: var(--coral); }

/* ─── AUTH ──────────────────────────────────────── */
#page-auth { padding-top: 80px; }
#page-auth.active { display: flex !important; justify-content: center; }
.auth-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 400px; box-shadow: 0 8px 32px var(--card-shadow);
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 2px solid var(--border); }
.auth-tab {
  flex: 1; padding: 12px; text-align: center; border: none; background: none;
  font-weight: 600; font-size: 0.95rem; color: var(--text3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.auth-tab.active { color: var(--coral); border-bottom-color: var(--coral); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form input {
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: var(--bg);
}
.auth-form input:focus { border-color: var(--coral); }
.auth-error { color: var(--danger); font-size: 0.85rem; min-height: 20px; }

/* ─── DASHBOARD ─────────────────────────────────── */
#page-dashboard { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-header h1 { font-size: 1.8rem; color: var(--plum); }
.dash-url-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 8px 8px 8px 16px; margin-bottom: 32px; transition: border-color 0.2s;
}
.dash-url-bar:focus-within { border-color: var(--coral); }
.dash-url-bar .material-icons-round { color: var(--text3); }
.dash-url-bar input { flex: 1; border: none; outline: none; font-size: 0.95rem; background: transparent; }
.piks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pik-card {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s;
}
.pik-card:hover { border-color: var(--plum-mid); box-shadow: 0 4px 16px var(--card-shadow-hover); transform: translateY(-2px); }
.pik-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pik-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--plum), var(--plum-mid));
  display: flex; align-items: center; justify-content: center;
}
.pik-card-icon .material-icons-round { color: white; font-size: 22px; }
.pik-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--plum); }
.pik-card-meta { font-size: 0.8rem; color: var(--text3); }
.pik-card-stats { display: flex; gap: 16px; margin-top: 12px; }
.pik-stat { font-size: 0.8rem; color: var(--text2); display: flex; align-items: center; gap: 4px; }
.pik-stat .material-icons-round { font-size: 16px; }
.pik-card-empty {
  border: 2px dashed var(--border); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; min-height: 140px; color: var(--text3);
}
.pik-card-empty .material-icons-round { font-size: 36px; }

/* ─── MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(45,27,51,0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 480px; box-shadow: 0 16px 48px rgba(45,27,51,0.2);
  max-height: 90vh; overflow-y: auto;
}
.modal-wide { max-width: 640px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.2rem; color: var(--plum); }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text3); padding: 4px;
  border-radius: 8px; transition: all 0.2s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-card form { display: flex; flex-direction: column; gap: 16px; }
.modal-card input, .modal-card textarea, .modal-card select {
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: var(--bg);
  resize: vertical;
}
.modal-card input:focus, .modal-card textarea:focus { border-color: var(--coral); }

/* ─── CATEGORY PICKER ───────────────────────────── */
.category-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-btn {
  padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 20px;
  background: var(--bg); font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center; gap: 6px; color: var(--text2);
}
.cat-btn:hover { border-color: var(--plum-mid); }
.cat-btn.active { background: var(--plum); color: white; border-color: var(--plum); }
.cat-btn .material-icons-round { font-size: 16px; }

/* ─── BOARD VIEW ────────────────────────────────── */
#page-board { max-width: 1200px; margin: 0 auto; padding: 24px; }
.board-top { margin-bottom: 20px; }
.board-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back-link { color: var(--text2); display: flex; align-items: center; }
.back-link:hover { color: var(--plum); text-decoration: none; }
.board-info { flex: 1; }
.board-info h1 { font-size: 1.4rem; color: var(--plum); }
.board-prefs { font-size: 0.85rem; color: var(--text2); font-style: italic; margin-top: 2px; }
.board-actions { display: flex; gap: 8px; }

/* ─── INPUT BAR ─────────────────────────────────── */
.board-input-bar {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden;
}
.input-tabs {
  display: flex; border-bottom: 1px solid var(--border); background: var(--bg);
}
.input-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 500; color: var(--text3);
  display: flex; align-items: center; gap: 6px; transition: all 0.2s;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.input-tab:hover { color: var(--text); }
.input-tab.active { color: var(--coral); border-bottom-color: var(--coral); }
.input-tab .material-icons-round { font-size: 18px; }
.input-area { display: flex; gap: 8px; padding: 12px; align-items: flex-start; }
.input-area input, .input-area textarea {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; outline: none; background: var(--bg); resize: vertical;
}
.input-area input:focus, .input-area textarea:focus { border-color: var(--coral); }
.manual-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%;
}
.manual-grid input, .manual-grid textarea { width: 100%; }
.manual-grid .full-width { grid-column: 1 / -1; }

/* ─── BOARD CONTROLS ────────────────────────────── */
.board-controls {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.view-tabs, .filter-tabs { display: flex; gap: 0; background: var(--card); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; }
.view-tab, .filter-tab {
  padding: 8px 14px; border: none; background: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 500; color: var(--text3);
  display: flex; align-items: center; gap: 4px; transition: all 0.15s;
}
.view-tab:hover, .filter-tab:hover { background: var(--bg); color: var(--text); }
.view-tab.active { background: var(--plum); color: white; }
.filter-tab.active { background: var(--coral); color: white; }
.view-tab .material-icons-round { font-size: 16px; }
.board-controls .btn-ai { margin-left: auto; }

/* ─── ITEMS GRID (CARDS) ───────────────────────── */
.items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.item-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; transition: all 0.2s; position: relative;
}
.item-card:hover { box-shadow: 0 4px 16px var(--card-shadow-hover); transform: translateY(-2px); }
.item-card.favorite { border-color: var(--gold); }
.item-card.dismissed { opacity: 0.5; border-color: var(--border); }
.item-card.dismissed:hover { opacity: 0.7; }
.item-img {
  width: 100%; height: 160px; object-fit: cover; background: linear-gradient(135deg, var(--plum), var(--plum-mid));
}
.item-img-placeholder {
  width: 100%; height: 120px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8e4eb, #d9d1de); color: var(--plum-light);
}
.item-img-placeholder .material-icons-round { font-size: 40px; }
.item-body { padding: 16px; }
.item-title { font-size: 0.95rem; font-weight: 600; color: var(--plum); margin-bottom: 6px; line-height: 1.3; }
.item-price { font-size: 1.15rem; font-weight: 700; color: var(--coral); margin-bottom: 8px; }
.item-location { font-size: 0.8rem; color: var(--text2); display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.item-location .material-icons-round { font-size: 14px; }
.item-desc { font-size: 0.8rem; color: var(--text3); line-height: 1.4; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.item-tag {
  padding: 3px 8px; background: var(--bg); border-radius: 4px;
  font-size: 0.7rem; color: var(--text2);
}
.item-actions { display: flex; gap: 6px; border-top: 1px solid var(--border); padding-top: 12px; }
.item-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px; border: none; background: none; cursor: pointer; border-radius: 6px;
  font-size: 0.75rem; color: var(--text3); transition: all 0.15s;
}
.item-action:hover { background: var(--bg); color: var(--text); }
.item-action.fav-active { color: var(--gold); }
.item-action .material-icons-round { font-size: 18px; }
.item-source { position: absolute; top: 8px; right: 8px; padding: 2px 8px; background: rgba(0,0,0,0.5); color: white; border-radius: 4px; font-size: 0.65rem; }
.item-status-badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.badge-favorite { background: var(--gold); color: white; }
.badge-dismissed { background: var(--dismissed-text); color: white; }
.badge-unavailable { background: var(--danger); color: white; }

/* ─── TABLE VIEW ────────────────────────────────── */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
#items-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
#items-table th {
  padding: 12px 14px; text-align: left; font-weight: 600; color: var(--plum);
  border-bottom: 2px solid var(--border); background: var(--bg);
  white-space: nowrap; cursor: pointer; user-select: none;
}
#items-table th:hover { background: var(--border); }
#items-table th .sort-arrow { font-size: 12px; margin-left: 4px; }
#items-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
#items-table tr:hover { background: rgba(45,27,51,0.02); }
#items-table tr.dismissed { opacity: 0.4; }
#items-table tr.favorite { background: rgba(212,168,83,0.06); }
.table-actions { display: flex; gap: 4px; }
.table-action {
  width: 36px; height: 36px; border: none; background: none; cursor: pointer;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 0;
}
.table-action .material-icons-round { font-size: 20px !important; }
.table-action:hover { background: var(--bg); color: var(--text); }
.table-action.fav-active { color: var(--gold); }
.table-cell-price { font-weight: 600; color: var(--coral); white-space: nowrap; }
.table-cell-best { background: rgba(76,175,80,0.08); }
.table-cell-worst { background: rgba(239,83,80,0.08); }

/* ─── MAP VIEW ──────────────────────────────────── */
#map-container { height: 500px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-popup { font-family: var(--font); max-width: 220px; }
.map-popup h4 { font-size: 0.85rem; color: var(--plum); margin-bottom: 4px; }
.map-popup .price { font-weight: 600; color: var(--coral); }
.map-popup p { font-size: 0.75rem; color: var(--text2); }

/* ─── AI PANEL ──────────────────────────────────── */
.ai-panel {
  position: fixed; right: 0; top: 60px; bottom: 0; width: 400px; max-width: 90vw;
  background: var(--card); border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px var(--card-shadow); z-index: 150;
  display: flex; flex-direction: column; animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.ai-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.ai-header h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--plum); }
.ai-content { flex: 1; overflow-y: auto; padding: 24px; font-size: 0.88rem; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.ai-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 60px 24px; color: var(--text2); }

/* ─── READY PROMPT ──────────────────────────────── */
.ready-prompt {
  background: linear-gradient(135deg, rgba(212,168,83,0.1), rgba(232,115,90,0.1));
  border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
}
.ready-inner { display: flex; align-items: center; gap: 16px; }
.ready-inner .material-icons-round { font-size: 32px; color: var(--gold); }
.ready-inner strong { color: var(--plum); }
.ready-inner p { font-size: 0.85rem; color: var(--text2); margin-top: 2px; }
.ready-inner .btn-ghost { margin-left: auto; }

/* ─── SCRAPE LOADING ────────────────────────────── */
.scrape-loading {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(45,27,51,0.3); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.loading-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 40px 48px;
  text-align: center; box-shadow: 0 16px 48px rgba(45,27,51,0.2);
}
.loading-card p { margin-top: 16px; color: var(--text2); font-weight: 500; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--coral); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ITEM MODAL ────────────────────────────────── */
.item-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-field label { display: block; font-size: 0.7rem; color: var(--text3); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 4px; }
.detail-field .value { font-size: 0.9rem; color: var(--text); }
.detail-notes textarea {
  width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; min-height: 80px; resize: vertical; outline: none; background: var(--bg);
}
.detail-notes textarea:focus { border-color: var(--coral); }

/* ─── DETECT MODAL ──────────────────────────────── */
.detect-preview { margin-bottom: 20px; }
.detect-preview h3 { font-size: 1rem; color: var(--plum); margin-bottom: 4px; }
.detect-preview .price { font-size: 1.1rem; font-weight: 600; color: var(--coral); }
.detect-preview .cat { display: inline-block; padding: 4px 12px; background: var(--bg); border-radius: 12px; font-size: 0.8rem; color: var(--text2); margin-top: 8px; }
.detect-pik-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.detect-pik-option {
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 12px;
}
.detect-pik-option:hover { border-color: var(--coral); background: rgba(232,115,90,0.04); }
.detect-pik-option .material-icons-round { color: var(--plum-mid); }
.detect-or { text-align: center; color: var(--text3); font-size: 0.85rem; margin: 12px 0; }

/* ─── PROCESSING CARDS ──────────────────────────── */
.item-card.processing, .item-card.error {
  min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.processing-overlay {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px; text-align: center; color: var(--text2);
}
.processing-overlay p { font-size: 0.85rem; }

/* ─── EVAL DOTS ─────────────────────────────────── */
.eval-dots { display: flex; gap: 4px; margin-bottom: 8px; }
.eval-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; cursor: help; }

/* ─── REQUIREMENTS LEGEND ───────────────────────── */
.req-legend {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.req-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 16px; font-size: 0.75rem; font-weight: 500;
}
.req-imp { font-weight: 700; }
.req-verdict { margin-top: 10px; font-size: 0.85rem; color: var(--text2); line-height: 1.5; }

/* ─── EVAL BANNER ──────────────────────────────── */
.eval-banner {
  background: linear-gradient(135deg, rgba(156,39,176,0.06), rgba(33,150,243,0.06));
  border: 1px solid var(--plum-light); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px;
}
.eval-banner-inner { display: flex; align-items: center; gap: 16px; }
.eval-banner-inner .material-icons-round { font-size: 32px; color: var(--plum-mid); }
.eval-banner-inner strong { color: var(--plum); }
.eval-banner-inner p { font-size: 0.85rem; color: var(--text2); margin-top: 2px; }

/* ─── COLUMN PICKER ────────────────────────────── */
.column-picker {
  position: absolute; top: 100%; left: 0; z-index: 50; margin-top: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--card-shadow-hover); min-width: 240px; max-height: 320px; overflow-y: auto;
}
.cp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.cp-header strong { font-size: 0.85rem; color: var(--plum); }
.cp-list { padding: 8px 0; }
.cp-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 16px; cursor: pointer;
  font-size: 0.82rem; color: var(--text); transition: background 0.1s;
}
.cp-item:hover { background: var(--bg); }
.cp-item input { accent-color: var(--coral); }
.cp-item span:first-of-type { flex: 1; }
.cp-count { font-size: 0.7rem; color: var(--text3); background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* ─── REQUIREMENT DOTS ─────────────────────────── */
.req-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.req-dot { display: inline-flex; align-items: center; }
.req-dot .material-icons-round { font-size: 16px; }
.req-match .material-icons-round { opacity: 1; }
.req-partial .material-icons-round { opacity: 0.7; }
.req-miss .material-icons-round { opacity: 0.35; }
.req-cell { text-align: center; padding: 4px !important; }

/* ─── PROCESSING INLINE (TABLE) ────────────────── */
.processing-inline {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  color: var(--text3); font-size: 0.82rem;
}
.spinner-sm {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--coral); border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}

/* ─── PHOTOS GRID ──────────────────────────────── */
.photos-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.photo-thumb {
  width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
}
.photo-thumb:hover { opacity: 0.8; }

/* ─── EMPTY STATES ──────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--text3);
}
.empty-state .material-icons-round { font-size: 48px; margin-bottom: 12px; color: var(--border); }
.empty-state p { font-size: 0.9rem; }

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 60px 20px 40px; }
  .hero h1 { font-size: 2rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .board-controls { gap: 10px; }
  .board-controls .btn-ai { margin-left: 0; width: 100%; justify-content: center; }
  .items-grid { grid-template-columns: 1fr; }
  .ai-panel { width: 100%; }
  .manual-grid { grid-template-columns: 1fr; }
  .item-detail-grid { grid-template-columns: 1fr; }
  .ready-inner { flex-wrap: wrap; }
  .board-nav { flex-wrap: wrap; }
  .dash-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  #items-table { font-size: 0.75rem; }
  #items-table th, #items-table td { padding: 8px 10px; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: repeat(3, 1fr); }
  .piks-grid { grid-template-columns: 1fr; }
  .view-tabs, .filter-tabs { flex-wrap: wrap; }
}
