:root {
  --ink: #111827;
  --muted: #667085;
  --navy: #1b2a4a;
  --blue: #2e6be6;
  --green: #1e9e63;
  --red: #d64545;
  --line: #dce3ee;
  --soft: #f5f7fa;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  letter-spacing: 0;
  overflow-x: hidden;
}
a { text-decoration: none; }
img, svg { max-width: 100%; }
:focus-visible {
  outline: 3px solid rgba(46,107,230,.32);
  outline-offset: 3px;
}
.app-navbar {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(27,42,74,.08);
  backdrop-filter: blur(14px);
}
.navbar-brand { color: var(--navy); font-weight: 800; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.nav-link { color: #344054; font-weight: 600; }
.nav-link.active, .nav-link:hover { color: var(--blue); }
.btn {
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-ghost { color: var(--navy); background: #eef3ff; }
.btn:hover { transform: translateY(-1px); }
.form-control, .form-select {
  border-color: var(--line);
}
.form-control:focus, .form-select:focus {
  border-color: rgba(46,107,230,.55);
  box-shadow: 0 0 0 .25rem rgba(46,107,230,.13);
}
.hero {
  padding: 150px 0 56px;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(17,24,39,.92), rgba(27,42,74,.80)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #b9cdfd;
  font-weight: 800;
  text-transform: uppercase;
  font-size: .78rem;
}
.hero h1, .page-header h1 {
  max-width: 980px;
  margin: 18px auto;
  font-size: clamp(2.4rem, 5vw, 5.25rem);
  line-height: 1.02;
  font-weight: 800;
}
.hero .lead { max-width: 760px; margin: 0 auto 30px; color: #d8e2f4; }
.search-shell {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.16);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.search-shell .input-group {
  display: grid;
  grid-template-columns: 52px minmax(260px, 1.45fr) minmax(190px, .85fr) minmax(210px, .9fr) auto;
  gap: 8px;
}
.search-shell .form-control, .search-shell .form-select, .search-shell .input-group-text {
  border: 0;
  border-radius: 8px !important;
  width: 100%;
}
.search-shell .btn {
  white-space: nowrap;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 38px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,.22);
}
.stats-strip div { padding: 22px; background: rgba(255,255,255,.12); }
.stats-strip strong { display: block; font-size: 1.7rem; }
.stats-strip span { color: #dbe7ff; }
.section { padding: 76px 0; }
.section-muted { background: var(--soft); }
.section-heading { max-width: 700px; margin-bottom: 32px; }
.section-heading span { color: var(--blue); font-weight: 800; text-transform: uppercase; font-size: .78rem; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 800; color: var(--navy); }
.notice-card, .step-card, .price-card, .detail-box, .auth-card, .filter-panel, .sticky-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 45px rgba(16,24,40,.07);
}
.notice-card, .step-card, .price-card, .category-tile, .process-step, .source-card, .related-list a {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.notice-card:hover, .step-card:hover, .category-tile:hover, .process-step:hover, .source-card:hover, .related-list a:hover {
  transform: translateY(-3px);
  border-color: rgba(46,107,230,.28);
  box-shadow: 0 20px 55px rgba(16,24,40,.10);
}
.notice-card { min-width: 0; padding: 22px; display: flex; flex-direction: column; }
.notice-card h3 { font-size: 1.1rem; line-height: 1.35; font-weight: 800; }
.notice-card h3 a { color: var(--navy); }
.notice-card p { color: var(--muted); flex: 1; }
.notice-card h3, .notice-card h3 a, .notice-card p, .notice-meta, .notice-footer {
  min-width: 0;
  overflow-wrap: anywhere;
}
.notice-card.notice-promo-bold h3 { font-weight: 900; }
.notice-card.notice-promo-highlight {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 72%);
  border-color: #f7c948;
}
.notice-card.notice-promo-featured {
  border-color: var(--blue);
  box-shadow: 0 18px 44px rgba(37, 99, 235, .16);
}
.notice-card.notice-promo-homepage {
  position: relative;
  border-top: 4px solid #10b981;
}
.badge-type { background: #e9f1ff; color: var(--blue); border: 1px solid #cddcff; }
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--blue);
}
.icon-btn.active { background: #fff4d8; color: #b7791f; }
.notice-meta { display: grid; gap: 8px; margin: 14px 0; color: #475467; font-size: .9rem; }
.notice-meta span { display: flex; gap: 8px; align-items: center; }
.notice-meta i { color: var(--blue); width: 16px; }
.notice-footer { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; }
.deadline { color: var(--green); }
.deadline.danger { color: var(--red); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-tile {
  min-height: 150px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}
.category-tile i { color: var(--blue); font-size: 1.5rem; }
.category-tile strong { color: var(--navy); font-size: 1.1rem; }
.category-tile span { color: var(--muted); }
.classified-dropzone {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 2px dashed #b8c7dd;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
  cursor: pointer;
  text-align: center;
}
.classified-dropzone i { color: var(--blue); font-size: 2rem; }
.classified-dropzone.is-dragover { border-color: var(--blue); background: #eef4ff; }
.classified-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.classified-preview-item {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  cursor: grab;
}
.classified-preview-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.classified-preview-item span {
  display: block;
  padding: 7px 8px;
  font-size: .78rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.classified-remove-image {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 8px;
  font-size: .78rem;
  color: #b42318;
}
.classified-map {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}
.classified-map iframe { width: 100%; height: 280px; border: 0; display: block; }
.promotion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.promotion-option {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.promotion-option strong {
  grid-column: 2;
  color: var(--navy);
}
.promotion-option span {
  display: grid;
  gap: 4px;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.25;
}
.promotion-option small {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
}
.promotion-total {
  grid-template-columns: 1fr;
  background: #f8fbff;
}
.promotion-total strong { grid-column: 1; font-size: 1.1rem; }
.message-list {
  display: grid;
  gap: 12px;
}
.message-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.message-item.is-new {
  border-color: rgba(34, 197, 94, .45);
  background: #f7fff9;
}
.ksef-status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.ksef-env-preview {
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre;
}
.ksef-env-preview code {
  color: inherit;
  white-space: pre;
}
.step-card { height: 100%; padding: 30px; }
.step-card i { color: var(--green); font-size: 2rem; margin-bottom: 20px; }
.step-card h3, .detail-box h2 { color: var(--navy); font-weight: 800; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.process-step {
  min-height: 270px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 45px rgba(16,24,40,.07);
}
.process-step span {
  color: var(--blue);
  font-weight: 800;
  font-size: .78rem;
}
.process-step i {
  display: block;
  margin: 18px 0;
  color: var(--green);
  font-size: 2rem;
}
.process-step h2 {
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 800;
}
.process-step p { color: var(--muted); }
.source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.source-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.source-card h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}
.source-card p { margin: 12px 0; color: var(--muted); }
.source-card strong { color: var(--navy); font-size: 1.35rem; }
.status-pill {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}
.status-pill.ok { color: #047857; background: #d1fae5; }
.status-pill.warn { color: #9a3412; background: #ffedd5; }
.feature-list {
  display: grid;
  gap: 12px;
}
.feature-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}
.feature-list i { color: var(--green); margin-right: 10px; }
.landing-search {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin-top: 24px;
}
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.keyword-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: #e9f1ff;
  font-weight: 800;
}
.related-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.related-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-weight: 800;
}
.related-list i { color: var(--blue); }
.empty-state {
  margin-top: 22px;
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  background: var(--white);
}
.empty-state i {
  color: var(--blue);
  font-size: 2rem;
  margin-bottom: 14px;
}
.empty-state h2 {
  color: var(--navy);
  font-weight: 800;
}
.empty-state p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
}
.watched-card h2 {
  margin: 16px 0 8px;
  font-size: 1.2rem;
}
.watched-card h2 a { color: var(--navy); }
.note-box {
  padding: 12px;
  border-radius: 8px;
  background: #f0f7ff;
  color: var(--navy);
}
.notification-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.notification-grid label {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-weight: 800;
}
.notification-grid input { margin-right: 8px; }
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.stat-row span {
  color: var(--muted);
  font-weight: 700;
}
.stat-row strong {
  color: var(--navy);
}
.log-preview {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  color: #d1fae5;
  background: #0f172a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.checkout-summary {
  display: grid;
  gap: 12px;
}
.submit-notice-form .form-label {
  color: var(--navy);
  font-weight: 800;
}
.location-fields-stack {
  display: grid;
  gap: 14px;
}
.location-suggest-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}
.location-suggest-panel[hidden] { display: none; }
.location-suggest-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--navy);
  text-align: left;
}
.location-suggest-item:hover,
.location-suggest-item.is-active {
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
}
.location-suggest-item strong {
  font-size: 0.95rem;
}
.location-suggest-item span,
.location-suggest-empty {
  color: var(--muted);
  font-size: 0.86rem;
}
.location-suggest-empty {
  padding: 8px 10px;
}
.location-suggest-source {
  padding: 4px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}
.checkout-summary div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.checkout-summary span {
  color: var(--muted);
  font-weight: 700;
}
.checkout-summary strong {
  color: var(--navy);
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cta-band { padding: 58px 0; background: var(--navy); color: var(--white); }
.cta-band span { color: #a7f3d0; font-weight: 800; }
.cta-band h2 { max-width: 760px; font-weight: 800; }
.footer { background: #0f172a; color: var(--white); }
.footer a { display: block; color: #cbd5e1; margin: 8px 0; }
.footer .text-secondary { color: #cbd5e1 !important; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #ffffff;
}
.footer-social a:hover { background: rgba(255,255,255,0.1); color: #ffffff; }
.social-login-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.social-login-grid .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  margin: 12px 0;
}
.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}
.category-tree-editor { display: grid; gap: 14px; }
.category-tree-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) 120px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}
.category-tree-nested {
  display: block;
}
.category-editor-node {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid rgba(46, 107, 230, .18);
}
.category-tree-nested > .category-editor-node {
  padding-left: 0;
  border-left: 0;
}
.category-node-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.category-node-children {
  margin-left: 18px;
}
.category-cascade {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.category-cascade-level {
  min-width: 0;
}
.category-stat-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.category-stat-grid span {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}
.category-stat-grid strong {
  display: block;
  color: var(--navy);
  font-size: 1.3rem;
}
.category-manager-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}
.category-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.category-bulk-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.category-manager-status {
  min-height: 24px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}
.category-manager-list {
  display: grid;
  gap: 6px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}
.category-manager-row {
  display: grid;
  grid-template-columns: 38px minmax(260px, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  padding-left: calc(10px + var(--level, 0) * 18px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.category-row-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
}
.category-row-meta {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
}
.category-row-actions {
  display: flex;
  gap: 6px;
}
.category-row-actions .btn {
  width: 34px;
  height: 34px;
  padding: 0;
}
.pricing-plan-editor {
  display: grid;
  gap: 14px;
}
.pricing-plan-row {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.pricing-plan-row .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  font-weight: 700;
}
.settings-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  font-weight: 800;
}
.contact-topic-editor {
  display: grid;
  gap: 12px;
}
.contact-topic-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 46px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.contact-topic-row .contact-topic-remove {
  width: 42px;
  height: 42px;
  padding: 0;
}
.page-header {
  padding: 132px 0 52px;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(27,42,74,.96), rgba(46,107,230,.70)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.page-header-compact {
  padding-bottom: 64px;
}
.flash-message {
  padding: 92px 0 0;
  background: var(--soft);
}
.flash-message .container {
  padding-top: 12px;
  padding-bottom: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  background: #dcfce7;
  font-weight: 800;
}
.page-header h1 { margin-left: 0; }
.page-header p { max-width: 780px; color: #dbe7ff; font-size: 1.1rem; }
.clean-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.clean-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #475467;
}
.clean-list i {
  margin-top: 4px;
  color: var(--green);
}
.filter-panel { padding: 20px; position: sticky; top: 92px; }
.filter-panel .form-label { margin-top: 14px; color: var(--navy); font-weight: 800; }
.category-filter-list {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.category-filter-list h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}
.category-filter-list a {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.category-filter-list a:hover,
.category-filter-list a.active {
  background: #eff6ff;
  color: var(--primary);
}
.category-filter-children {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.results-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.results-toolbar span { display: block; color: var(--muted); }
.results-toolbar .d-flex { flex-wrap: wrap; }
.results-toolbar .form-select { min-width: 180px; }
.results-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.results-pagination span {
  color: var(--navy);
  font-weight: 800;
}
.results-pagination .disabled {
  pointer-events: none;
  opacity: .45;
}
.detail-box { padding: 28px; }
.ksef-corrections {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  padding-top: 10px;
}
.ksef-correction-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.attachment-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.attachment-list i { color: var(--blue); margin-right: 8px; }
.sticky-actions { position: sticky; top: 92px; padding: 22px; display: grid; gap: 12px; }
.meta-grid { display: grid; gap: 12px; margin-bottom: 10px; }
.meta-grid div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.meta-grid span { display: block; color: var(--muted); font-size: .85rem; }
.meta-grid strong { color: var(--navy); }
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 28px; font-weight: 800; }
.price-note {
  margin-top: -8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.price-card { position: relative; padding: 28px; height: 100%; }
.price-card.featured { border: 2px solid var(--blue); transform: translateY(-8px); }
.popular { position: absolute; top: 18px; right: 18px; color: var(--blue); font-weight: 800; }
.price-card h2 { color: var(--navy); font-weight: 800; }
.price { margin: 22px 0; color: var(--muted); }
.price span { color: var(--navy); font-size: 3rem; font-weight: 800; }
.price-card ul { list-style: none; padding: 0; display: grid; gap: 12px; margin-bottom: 24px; }
.price-card li { display: flex; gap: 10px; }
.price-card li i { color: var(--green); margin-top: 4px; }
.auth-page { min-height: 100vh; padding: 130px 0 70px; background: var(--soft); }
.auth-card { padding: 32px; }
.auth-card h1, .auth-side h2 { color: var(--navy); font-weight: 800; }
.auth-card .form-label { margin-top: 14px; font-weight: 800; }
.auth-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.auth-side { padding: 42px; color: var(--white); border-radius: 8px; background: linear-gradient(135deg, var(--navy), var(--blue)); }
.auth-side h2 { color: var(--white); font-size: 2.5rem; }
.auth-side p { color: #dbe7ff; font-size: 1.1rem; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; padding-top: 74px; background: var(--soft); }
.app-sidebar { padding: 26px; background: #101828; color: var(--white); }
.app-sidebar strong { display: block; margin-bottom: 22px; font-size: 1.2rem; }
.app-sidebar a { display: flex; gap: 10px; padding: 12px; margin-bottom: 6px; border-radius: 8px; color: #cbd5e1; font-weight: 700; }
.app-sidebar a.active, .app-sidebar a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.app-content { padding: 32px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dashboard-header span { color: var(--blue); font-weight: 800; text-transform: uppercase; font-size: .78rem; }
.dashboard-header h1 { color: var(--navy); font-weight: 800; margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric-grid div { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.metric-grid span { display: block; color: var(--muted); }
.metric-grid strong { font-size: 2rem; color: var(--navy); }
.profile-builder {
  display: grid;
  gap: 20px;
}
.chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: calc(100vh - 170px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.chat-sidebar {
  border-right: 1px solid var(--line);
  background: #f8fafc;
  min-width: 0;
}
.chat-sidebar-header,
.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-sidebar-header strong,
.chat-header h2 {
  color: var(--navy);
  font-weight: 800;
}
.chat-sidebar-header span {
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}
.chat-conversation-list {
  max-height: calc(100vh - 230px);
  overflow: auto;
}
.chat-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.chat-conversation:hover,
.chat-conversation.active {
  background: #eef5ff;
}
.chat-conversation-main {
  min-width: 0;
}
.chat-conversation-main strong,
.chat-conversation-main span,
.chat-conversation-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-conversation-main strong {
  color: var(--navy);
  font-weight: 800;
}
.chat-conversation-main span,
.chat-conversation-main small,
.chat-conversation-meta small,
.chat-header p,
.chat-header span {
  color: var(--muted);
}
.chat-conversation-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.chat-conversation-meta b {
  min-width: 24px;
  height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: .78rem;
  text-align: center;
}
.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: #f8fafc;
}
.chat-header h2,
.chat-header p {
  margin: 0;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 22px;
}
.chat-message {
  display: flex;
}
.chat-message.mine {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: min(680px, 78%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16,24,40,.06);
}
.chat-message.mine .chat-bubble {
  border-color: #bcd5ff;
  background: #eaf2ff;
}
.chat-bubble p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}
.chat-bubble time {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
}
.chat-attachments,
.chat-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-attachments img {
  width: 118px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.chat-compose {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-compose-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.chat-compose textarea {
  min-height: 44px;
  max-height: 140px;
  resize: vertical;
}
.chat-compose small {
  display: block;
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
}
.chat-attachment-preview {
  margin-bottom: 10px;
}
.chat-attachment-preview span {
  display: inline-grid;
  grid-template-columns: 54px minmax(0, 120px);
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.chat-attachment-preview img {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}
.chat-attachment-preview em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-empty {
  margin: 20px;
}
code, pre, .table td, .table th { overflow-wrap: anywhere; }
.table { vertical-align: middle; }
.contact-antibot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

@media (max-width: 991px) {
  .hero { padding-top: 118px; }
  .search-shell .input-group { grid-template-columns: 52px minmax(0, 1fr); }
  .search-shell .input-group > * { width: 100% !important; }
  .search-shell .form-select, .search-shell .btn { grid-column: 1 / -1; }
  .stats-strip, .category-grid, .metric-grid, .process-grid, .source-grid, .notification-grid, .analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-search { flex-direction: column; }
  .results-toolbar, .dashboard-header { align-items: stretch; flex-direction: column; }
  .app-shell { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-conversation-list { max-height: 340px; }
  .chat-bubble { max-width: 92%; }
  .contact-topic-row { grid-template-columns: 1fr; }
  .contact-topic-row .contact-topic-remove { width: 100%; }
  .app-sidebar {
    position: static;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
  }
  .app-sidebar strong { flex: 0 0 auto; margin: 0 10px 0 0; }
  .app-sidebar a {
    flex: 0 0 auto;
    margin-bottom: 0;
    white-space: nowrap;
  }
  .price-card.featured { transform: none; }
}

@media (max-width: 575px) {
  .hero h1, .page-header h1 { font-size: 2.3rem; }
  .stats-strip, .category-grid, .metric-grid, .process-grid, .source-grid, .notification-grid, .analytics-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .app-content { padding: 20px; }
  .hero { padding-top: 106px; }
  .search-shell .input-group { grid-template-columns: 1fr; }
  .search-shell .input-group-text { display: none; }
  .landing-search .btn,
  .results-toolbar .btn,
  .results-toolbar .form-select,
  .dashboard-header .btn,
  .cta-band .btn {
    width: 100%;
  }
  .results-toolbar .d-flex { width: 100%; }
  .checkout-summary div {
    display: grid;
    gap: 4px;
  }
  .checkout-summary strong { text-align: left; }
  .notice-footer {
    display: grid;
    gap: 6px;
  }
  .category-tree-row {
    grid-template-columns: 1fr;
  }
  .social-login-grid {
    grid-template-columns: 1fr;
  }
}
