/* AdClawPro — application styles (extracted from design.html + extras) */
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.fade-in { animation: fadeIn .25s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard sidebar nav */
.nav-active { background: rgba(99,102,241,0.15); color: #fff; border-left: 2px solid #6366f1; }
.nav-item { border-left: 2px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.05); }

/* Range sliders */
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: #e2e8f0; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #4f46e5; cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #4f46e5; cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
input[type=range].fill { background: linear-gradient(to right, #4f46e5 0%, #4f46e5 var(--p, 50%), #e2e8f0 var(--p, 50%), #e2e8f0 100%); }

/* Toggle switch */
.tog { width: 44px; height: 24px; border-radius: 12px; position: relative; cursor: pointer; transition: background .2s; display: inline-block; flex: 0 0 auto; }
.tog.on { background: #4f46e5; }
.tog.off { background: #cbd5e1; }
.tog .knob { width: 18px; height: 18px; border-radius: 50%; background: #fff; position: absolute; top: 3px; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.tog.on .knob { left: 23px; }
.tog.off .knob { left: 3px; }

/* Diagnostic matrix cards */
.diag-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px 18px; transition: all .2s; }
.diag-card:hover { border-color: #a5b4fc; box-shadow: 0 4px 12px -4px rgba(99,102,241,0.15); }
.diag-bar { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; margin: 10px 0 8px; }
.diag-bar-fill { height: 100%; border-radius: 3px; }

/* Knowledge category tabs */
.kcat { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; display:inline-block; }
.kcat.active { background: #0b1020; color: #fff; font-weight: 600; }
.kcat:not(.active) { color: #64748b; }
.kcat:not(.active):hover { background: #f1f5f9; }

/* Modals */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.on { display: flex; }

/* Add-category preset rows */
.preset-cat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer; transition: all .15s; }
.preset-cat:hover { border-color: #a5b4fc; background: #f8fafc; }
.preset-cat.selected { border-color: #4f46e5; background: #eef2ff; }
.preset-cat.selected .check { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.preset-cat .check { width: 20px; height: 20px; border-radius: 5px; border: 2px solid #cbd5e1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; flex-shrink: 0; transition: all .15s; }

/* Toasts */
#toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 13.5px; box-shadow: 0 10px 30px -8px rgba(2,6,23,.45); display:flex; gap:10px; align-items:flex-start; }
.toast.error { background: #b91c1c; }
.toast.success { background: #15803d; }

/* Skeletons */
.skeleton { background: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 37%,#f1f5f9 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:0 0} }

/* Chat widget */
#acp-chat { position: fixed; z-index: 90; font-family: Inter, system-ui, sans-serif; }
#acp-chat .bubble { width: 56px; height: 56px; border-radius: 999px; color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow: 0 10px 24px -6px rgba(2,6,23,.4); font-size:24px; }
#acp-chat .panel { width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 100px); background:#fff; border-radius:18px; overflow:hidden; display:none; flex-direction:column; box-shadow: 0 24px 60px -12px rgba(2,6,23,.45); border:1px solid #e2e8f0; }
#acp-chat .panel.open { display:flex; }
#acp-chat .msgs { flex:1; overflow-y:auto; padding:16px; background:#f8fafc; display:flex; flex-direction:column; gap:10px; }
#acp-chat .m { max-width: 85%; padding:10px 13px; border-radius:14px; font-size:13.5px; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
#acp-chat .m.bot { background:#fff; border:1px solid #e2e8f0; align-self:flex-start; border-bottom-left-radius:4px; }
#acp-chat .m.user { color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
#acp-chat .m a { text-decoration: underline; }

/* Marketing: advanced-tech backdrop */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,0.075) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 130% 100% at 50% 0%, #000 45%, transparent 85%);
  mask-image: radial-gradient(ellipse 130% 100% at 50% 0%, #000 45%, transparent 85%);
}
/* Soft colour wash behind the hero so glass surfaces have something to blur. */
.bg-mesh {
  background:
    radial-gradient(720px 340px at 12% -6%, rgba(99,102,241,.28), transparent 68%),
    radial-gradient(620px 320px at 78% -2%, rgba(168,85,247,.22), transparent 68%),
    radial-gradient(900px 420px at 50% 108%, rgba(14,165,233,.16), transparent 72%);
}
/* Fade a coloured wash out toward the bottom so sections blend into white. */
.fade-mask {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
}
.spotlight-card { position: relative; background: #fff; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(620px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(99,102,241,0.16), transparent 46%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0;
}
.spotlight-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,.55), rgba(168,85,247,.35), rgba(14,165,233,.45));
  opacity: 0;
  transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  z-index: 0;
}
.spotlight-card:hover::before,
.spotlight-card:hover::after { opacity: 1; }
.spotlight-card:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: 0 18px 40px -16px rgba(99,102,241,0.30); }
.spotlight-card > * { position: relative; z-index: 1; }
.glass-card {
  background: linear-gradient(140deg, rgba(255,255,255,.84), rgba(255,255,255,.46));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 30px 70px -32px rgba(79,70,229,.45), inset 0 1px 0 rgba(255,255,255,.9);
}
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .glass-card { background: rgba(255,255,255,.96); border-color: #e2e8f0; }
}
.code-panel { background: #0b1020; }
.code-scroll { scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.bar-fill-anim { width: 0%; transition: width 1.5s cubic-bezier(.4,0,.2,1); }
@media (max-width: 640px) {
  .bg-grid { background-size: 28px 28px; }
  .diag-card { padding: 14px 14px; }
  /* Phones: heavy backdrop blur is expensive and makes text harder to read
     over the busy hero wash, so tighten the glass surface. */
  .glass-card {
    background: linear-gradient(140deg, rgba(255,255,255,.94), rgba(255,255,255,.80));
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
    border-color: rgba(255,255,255,.7);
    box-shadow: 0 14px 32px -22px rgba(79,70,229,.40), inset 0 1px 0 rgba(255,255,255,.9);
  }
  .code-panel { border-radius: 14px; }
  /* Dark solution panel: tighter padding, smaller heading and a single
     column so the numbered steps never squeeze off-screen. */
  [data-dark-section] {
    padding: 1.1rem;
    border-radius: 16px;
  }
  [data-dark-section] h3 { font-size: 1.15rem; line-height: 1.32; }
  [data-dark-section] ul { gap: .9rem 0; }
  [data-dark-section] li { gap: .6rem; }
  [data-dark-section] p,
  [data-dark-section] div { overflow-wrap: anywhere; }
  /* Glass cards on phones: drop the lift and heavy shadow so they stay flat
     and readable inside the busy hero wash. */
  .glass-card { box-shadow: 0 10px 24px -18px rgba(79,70,229,.35), inset 0 1px 0 rgba(255,255,255,.9); }
}
@media (max-width: 380px) {
  .glass-card {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,.96);
  }
  [data-dark-section] { padding: .95rem; }
  [data-dark-section] h3 { font-size: 1.05rem; }
}
/* Touch devices have no hover: keep cards flat so they never "stick". */
@media (hover: none) {
  .spotlight-card:hover { transform: none; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
  .spotlight-card:hover::before,
  .spotlight-card:hover::after { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-fill-anim { transition: none; }
  .spotlight-card:hover { transform: none; }
}

/* Print: reports */
@media print {
  .no-print, aside, header.app-topbar, .print-hidden { display: none !important; }
  body { background: #fff !important; }
  .print-area { margin: 0 !important; padding: 0 !important; max-width: 100% !important; }
}
