:root {
  --primary: #4A6FA3;
  --primary-dark: #3A5A8C;
  --primary-light: rgba(74,111,163,0.09);
  --bg: #F6F2EA;
  --bg-secondary: #EDE8DF;
  --card-bg: #FAF8F3;
  --text: #27241D;
  --text-muted: #7A7269;
  --text-light: #A8A09A;
  --success: #2E7A50;
  --warning: #B87714;
  --danger: #B84040;
  --border: #DDD9CF;
  --border-light: #E8E4DB;
  --shadow-sm: 0 1px 2px rgba(40,35,28,0.06);
  --shadow: 0 1px 4px rgba(40,35,28,0.08), 0 2px 8px rgba(40,35,28,0.04);
  --shadow-md: 0 4px 16px rgba(40,35,28,0.09);
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── PREVIEW BAR ── */
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #c2410c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  font-size: 0.88rem;
  gap: 1rem;
}

.preview-bar-actions { display: flex; gap: 0.6rem; align-items: center; flex-shrink: 0; }

.preview-bar-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  font-size: 0.83rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s;
}
.preview-bar-btn:hover { background: rgba(255,255,255,0.28); }
.preview-bar-publish { font-weight: 600; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── NAVBAR ── */
nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.01em;
}

.nav-brand span { color: var(--primary); font-family: 'Noto Serif TC', serif; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  font-size: 0.9rem;
}

.nav-links a:hover { color: var(--text); background: var(--bg-secondary); }

.nav-links .btn { padding: 0.4rem 1rem; font-size: 0.88rem; }
.nav-links .btn-primary,
.nav-links .btn-primary:hover { color: #fff; }

/* ── ANNOUNCE BAR ── */
.announce-bar {
  display: flex;
  justify-content: center;
  padding: 2.5rem 2rem 0;
}

.announce-inner,
.announce-clickable {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(74,111,163,0.08);
  border: 1px solid rgba(74,111,163,0.18);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  color: var(--primary);
}

.announce-clickable {
  cursor: pointer;
  font-family: inherit;
  background: rgba(74,111,163,0.08);
  transition: background 0.15s;
}

.announce-clickable:hover { background: rgba(74,111,163,0.14); }

.announce-dot {
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.announce-text { color: var(--text); font-size: 0.8rem; }
.announce-arrow { color: var(--primary); font-size: 0.75rem; opacity: 0.7; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.hero-content {
  text-align: center;
  max-width: 580px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  font-family: 'Noto Serif TC', serif;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero h1 .highlight { color: var(--primary); }

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-family: 'Noto Serif TC', serif;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

/* ── SEARCH BOX ── */
.search-box {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(40,35,28,0.05);
}

.search-row { display: flex; gap: 0.6rem; }

.search-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-size: 0.97rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.search-input::placeholder { color: var(--text-light); }

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,163,0.12);
  background: var(--card-bg);
}

/* ── BUTTONS ── */
.btn {
  padding: 0.85rem 1.6rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-secondary); }

.btn-unlock {
  background: var(--primary);
  color: #fff;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
  justify-content: center;
}

.btn-unlock:hover { background: var(--primary-dark); }

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.83rem;
  border-radius: 7px;
}

.btn-danger {
  background: rgba(220,38,38,0.07);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,0.2);
}

.btn-danger:hover { background: rgba(220,38,38,0.13); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.3rem;
  transition: color 0.15s;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--text); }

/* ── PAGE CONTAINER ── */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ── CONSULT PAGE ── */
.company-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.company-avatar {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.company-meta h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.company-meta p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.2rem; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.summary-text {
  color: var(--text);
  line-height: 1.85;
  font-size: 0.97rem;
}
.summary-text p {
  margin: 0 0 0.85rem;
}
.summary-text p:last-child {
  margin-bottom: 0;
}

.full-summary-content {
  color: var(--text);
  line-height: 1.85;
  font-size: 0.95rem;
  font-family: 'Noto Serif TC', serif;
}

/* ── FULL SUMMARY REPORT ELEMENTS ── */
.full-summary-content .declaration {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.75;
  font-family: 'Noto Serif TC', serif;
}

.full-summary-content h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.7rem;
  margin: 1.8rem 0 1.3rem;
  text-align: center;
  font-family: 'Noto Serif TC', serif;
  letter-spacing: -0.01em;
}

.full-summary-content h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  margin: 2rem 0 0.85rem;
  font-family: 'Noto Serif TC', serif;
}

.full-summary-content p {
  margin-bottom: 0.9rem;
  text-align: justify;
  font-size: 0.92rem;
  line-height: 1.85;
}

.full-summary-content .share-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 0.9rem 0;
}

.full-summary-content .share-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 0.84rem;
}

.full-summary-content .quote {
  font-style: italic;
  color: var(--text-muted);
  padding-left: 0.75rem;
  border-left: 3px solid var(--border);
  margin: 0.3rem 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

.full-summary-content .target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.full-summary-content .target-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.87rem;
  line-height: 1.75;
}

.full-summary-content .target-card.fit {
  background: rgba(46,122,80,0.05);
  border-color: rgba(46,122,80,0.2);
}

.full-summary-content .target-card.not-fit {
  background: rgba(184,64,64,0.05);
  border-color: rgba(184,64,64,0.18);
}

.full-summary-content .footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-light);
  font-size: 0.78rem;
  line-height: 2;
}

.full-summary-content .footer-source-link {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lock-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.lock-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.lock-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; font-weight: 700; }
.lock-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.65; }

.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  background: var(--primary-light);
  border: 1px solid rgba(74,111,163,0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.price-tag .price { font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.price-tag .currency { font-size: 1rem; color: var(--primary); }
.price-tag .period { font-size: 0.85rem; color: var(--text-muted); }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.25s ease;
}

.full-summary-modal {
  max-width: 820px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem 2.5rem;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.modal-close:hover { color: var(--text-muted); }

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pay-method {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pay-method .pm-icon { font-size: 1.3rem; display: block; margin-bottom: 0.3rem; }

.pay-method:hover, .pay-method.selected {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,163,0.1);
  background: var(--card-bg);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.modal-note {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.75rem;
}

/* ── NOT FOUND ── */
.not-found-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.not-found-icon { font-size: 2.5rem; margin-bottom: 0.9rem; line-height: 1; }
.not-found-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.75rem; }
.not-found-card p { color: var(--text-muted); line-height: 1.75; margin-bottom: 1.5rem; }

.request-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.25);
  color: var(--success);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ── ALERTS ── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.91rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.25);
  color: var(--success);
}

.alert-error {
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.2);
  color: var(--danger);
}

/* ── UNLOCK SUCCESS ── */
.unlock-success {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.unlock-success .card-title { color: var(--text-muted); }

/* ── SOURCE PAGE ── */
.source-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.source-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.source-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Noto Serif TC', serif;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.source-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.source-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}

.source-section:last-of-type {
  border-bottom: none;
}

.source-section h2 {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Noto Serif TC', serif;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  margin-bottom: 1.1rem;
}

.source-section p {
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 0.8rem;
  font-family: 'Noto Serif TC', serif;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.source-list li {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
  font-family: 'Noto Serif TC', serif;
}

.source-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.source-note {
  background: var(--bg-secondary);
  border-left: 3px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.8rem;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.process-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.process-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.process-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.process-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.appeal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.85rem;
}

.appeal-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.appeal-card strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-family: 'Noto Serif TC', serif;
}

.appeal-card p {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.appeal-meta {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.appeal-meta strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.appeal-meta > div > p {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0;
}

.contact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  white-space: nowrap;
}

.contact-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-box strong {
  font-size: 0.9rem;
  color: var(--text);
}

.source-closing p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.source-updated {
  margin-top: 1rem;
  font-size: 0.8rem !important;
  color: var(--text-light) !important;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card-bg);
  border: 1px solid rgba(22,163,74,0.3);
  color: var(--success);
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  font-size: 0.93rem;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 2000;
  animation: slideUp 0.25s ease;
}

.toast.show { display: flex; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(74,111,163,0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── COUNT BADGE ── */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(217,119,6,0.1);
  color: var(--warning);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.83rem;
  font-weight: 600;
}

/* ── AUTH PAGES ── */
.auth-page {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.auth-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.auth-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.8rem; }
.auth-card .form-group { text-align: left; }
.auth-card .form-label { font-size: 0.83rem; }

.auth-footer {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── SEARCH AUTOCOMPLETE ── */
.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0; right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  display: none;
  overflow: hidden;
}

.sug-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.1s;
  color: var(--text);
}

.sug-item:hover { background: var(--bg); }

.sug-cat {
  font-size: 0.75rem;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

/* ── DASHBOARD ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.dash-stat-val { font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.dash-stat-lbl { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.25rem; }
.dash-stat-alert { border-color: rgba(217,119,6,0.3) !important; }

.dash-tabs {
  display: flex;
  gap: 0.3rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.dash-tab {
  padding: 0.45rem 1rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.dash-tab.active { background: var(--primary); color: #fff; font-weight: 600; }
.dash-tab:hover:not(.active) { color: var(--text); background: var(--bg); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.company-cards { display: flex; flex-direction: column; gap: 0.6rem; }

.company-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}

.company-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }

.cc-avatar {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.95rem; flex-shrink: 0;
}

.cc-body { flex: 1; }
.cc-name { font-weight: 600; font-size: 0.93rem; }
.cc-cat { font-size: 0.75rem; color: var(--primary); margin-top: 0.1rem; }
.cc-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.cc-summary { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; line-height: 1.5; }

.history-list { display: flex; flex-direction: column; gap: 0.45rem; }

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
  box-shadow: var(--shadow-sm);
}

.history-item:hover { border-color: var(--primary); }
.history-icon { color: var(--text-light); }
.history-name { flex: 1; font-size: 0.9rem; }
.history-status { margin-right: auto; }
.history-date { font-size: 0.78rem; color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }

.nav-active { color: var(--primary) !important; }

/* ── STATUS BADGES ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.73rem;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.available {
  background: rgba(22,163,74,0.08);
  color: var(--success);
  border: 1px solid rgba(22,163,74,0.2);
}

.status-badge.pending {
  background: rgba(107,114,128,0.08);
  color: var(--text-muted);
  border: 1px solid rgba(107,114,128,0.18);
}

/* ── NOTIFICATION BELL ── */
.notif-bell {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
}

.notif-bell:hover { color: var(--text); background: var(--bg-secondary); }
.notif-bell.has-notif { color: var(--warning); }

.notif-dot {
  position: absolute;
  top: -1px; right: -1px;
  background: var(--warning);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.05rem 0.3rem;
  min-width: 15px;
  text-align: center;
  line-height: 1.6;
}

.tab-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--warning);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.05rem 0.35rem;
  min-width: 15px;
  margin-left: 0.3rem;
  line-height: 1.5;
  vertical-align: middle;
}

.notif-tab-btn { position: relative; }

/* ── NOTIFICATIONS LIST ── */
.notif-list { display: flex; flex-direction: column; gap: 0.5rem; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
  box-shadow: var(--shadow-sm);
}

.notif-item:hover { border-color: var(--primary); }
.notif-item.unread { border-color: rgba(217,119,6,0.3); background: rgba(217,119,6,0.03); }

.notif-icon-wrap { position: relative; flex-shrink: 0; }

.notif-icon-circle {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.2);
}

.notif-unread-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 9px; height: 9px;
  background: var(--warning);
  border-radius: 50%;
  border: 2px solid #fff;
}

.notif-body { flex: 1; }
.notif-title { font-weight: 600; font-size: 0.91rem; margin-bottom: 0.25rem; }
.notif-msg { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.3rem; }
.notif-time { font-size: 0.73rem; color: var(--text-light); }
.notif-arrow { color: var(--text-light); font-size: 0.85rem; align-self: center; flex-shrink: 0; }

/* ── REGISTER MODAL ── */
.register-modal {
  max-width: 540px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
}

.register-modal .modal-header { align-items: flex-start; margin-bottom: 1rem; }
.register-modal .modal-header h3 { font-size: 1.05rem; }

.rp-intro {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.rp-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.rp-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
}

.rpb-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }

.rp-benefit strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.rp-benefit span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.rp-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── LOGGED-IN NOTICE ── */
.logged-in-notice {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(22,163,74,0.05);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin-top: 1.2rem;
  font-size: 0.88rem;
}

.logged-in-notice span:first-child { font-size: 1.2rem; flex-shrink: 0; }
.logged-in-notice strong { display: block; color: var(--success); margin-bottom: 0.15rem; }
.logged-in-notice span:last-of-type { color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .search-row { flex-direction: column; }
  .rp-benefits { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .full-summary-content .target-grid { grid-template-columns: 1fr; }
}
