/* ===========================================================
   ActRPA  |  Shared stylesheet
   =========================================================== */

:root {
  --bg:        #0b1020;
  --bg-soft:   #111831;
  --surface:   #151d3b;
  --surface-2: #1b2550;
  --border:    #27315c;
  --text:      #e7ecff;
  --muted:     #9aa6d6;
  --brand:     #5b8cff;
  --brand-2:   #7c5cff;
  --accent:    #27e0b0;
  --danger:    #ff5c7c;
  --warn:      #ffcc66;
  --radius:    14px;
  --shadow:    0 18px 50px rgba(0, 0, 0, .45);
  --maxw:      1160px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, .18), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(91, 140, 255, .14), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 32, .72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-weight: 800; color: white; font-size: 1rem;
  box-shadow: 0 6px 18px rgba(91,140,255,.45);
}
.brand img.logo { background: none; box-shadow: none; border-radius: 0; object-fit: contain; }
.brand small { display:block; color: var(--muted); font-weight: 500; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--muted); padding: 9px 14px; border-radius: 9px; font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; width: 42px; height: 40px; font-size: 1.3rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 20px; border-radius: 11px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; transition: transform .08s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 26px rgba(91,140,255,.4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 16px; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 640px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .lead { margin: 0 auto; }

/* ---------- Hero ---------- */
.hero { padding-top: 90px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .num { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.hero-stats .lbl { color: var(--muted); font-size: .9rem; }

.hero-visual {
  background: linear-gradient(160deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
}
.bot-window { background: #0a0f22; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bot-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bot-bar span { width: 11px; height: 11px; border-radius: 50%; background: #39406b; }
.bot-bar span:nth-child(1){ background:#ff5c7c;} .bot-bar span:nth-child(2){ background:#ffcc66;} .bot-bar span:nth-child(3){ background:#27e0b0;}
.bot-body { padding: 18px; font-family: "Consolas", monospace; font-size: .86rem; }
.bot-line { display: flex; gap: 10px; padding: 5px 0; color: var(--muted); }
.bot-line .tick { color: var(--accent); }
.bot-line.run { color: var(--text); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, transform .12s;
}
.card:hover { border-color: #39457d; transform: translateY(-3px); }
.card .ico { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; font-size: 1.4rem;
  background: var(--surface-2); margin-bottom: 16px; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Pricing / license cards ---------- */
.price-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: .72rem;
  font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .08em; text-transform: uppercase; }
.plan .price { font-size: 2.6rem; font-weight: 800; margin: 10px 0 2px; }
.plan .price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0; flex: 1; }
.plan ul li { padding: 9px 0; border-bottom: 1px dashed var(--border); color: var(--muted); display:flex; gap:10px; }
.plan ul li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.plan ul li.no { opacity: .5; } .plan ul li.no::before { content:"✕"; color: var(--danger); }

/* ---------- Downloads ---------- */
.dl-grid { grid-template-columns: repeat(3, 1fr); }
.dl-card { text-align: center; }
.dl-card .os { font-size: 2.6rem; margin-bottom: 8px; }
.dl-meta { color: var(--muted); font-size: .85rem; margin: 6px 0 18px; }
.dl-list { list-style: none; padding: 0; margin: 0; }
.dl-list li { display:flex; align-items:center; justify-content: space-between; gap: 16px;
  padding: 16px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 12px; background: var(--surface); }
.dl-list .info { display:flex; align-items:center; gap: 14px; }
.badge { font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border:1px solid var(--border); }
.badge.new { background: rgba(39,224,176,.15); color: var(--accent); border-color: rgba(39,224,176,.4); }

/* ---------- Forms ---------- */
.form-wrap { max-width: 560px; margin: 0 auto; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.field .req { color: var(--danger); }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--text); font-size: .98rem; font-family: var(--font);
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.err { color: var(--danger); font-size: .82rem; margin-top: 6px; display: none; }
.field.invalid .input, .field.invalid select { border-color: var(--danger); }
.field.invalid .err { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { width: auto; margin-top: 4px; }

.alert { padding: 14px 16px; border-radius: 11px; margin-bottom: 20px; font-size: .92rem; display: none; }
.alert.ok { display:block; background: rgba(39,224,176,.12); border: 1px solid rgba(39,224,176,.4); color: var(--accent); }
.alert.bad { display:block; background: rgba(255,92,124,.12); border: 1px solid rgba(255,92,124,.4); color: var(--danger); }

/* ---------- License key box ---------- */
.keybox { background: var(--bg-soft); border: 1px dashed var(--brand); border-radius: 11px; padding: 16px;
  font-family: "Consolas", monospace; font-size: 1.1rem; letter-spacing: .06em; display:flex;
  align-items:center; justify-content: space-between; gap: 14px; word-break: break-all; }
.keybox .k { color: var(--accent); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.table tr:hover td { background: var(--surface); }

/* ---------- Misc ---------- */
.band { background: linear-gradient(135deg, rgba(91,140,255,.14), rgba(124,92,255,.14)); border: 1px solid var(--border);
  border-radius: 20px; padding: 48px; text-align: center; }
.logos { display:flex; gap: 40px; flex-wrap: wrap; justify-content: center; align-items: center; opacity: .7; }
.pill { display:inline-flex; gap:8px; align-items:center; padding: 7px 14px; border:1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 40px; color: var(--muted); }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { color: var(--text); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display:flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .price-grid, .dl-grid, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .row-2 { grid-template-columns: 1fr; }
}

/* ===========================================================
   Chatbot widget
   =========================================================== */
.cb-launcher {
  position: fixed; bottom: 24px; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 1.6rem; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(91,140,255,.5); transition: transform .12s ease;
}
.cb-launcher:hover { transform: translateY(-2px) scale(1.04); }
.cb-launcher.right { right: 24px; } .cb-launcher.left { left: 24px; }
.cb-launcher .dot { position:absolute; top:6px; right:6px; width:12px; height:12px;
  border-radius:50%; background: var(--accent); border:2px solid var(--bg); }

.cb-panel {
  position: fixed; bottom: 96px; z-index: 901; width: 370px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 130px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden;
}
.cb-panel.right { right: 24px; } .cb-panel.left { left: 24px; }
.cb-panel.open { display: flex; animation: cbIn .16s ease; }
@keyframes cbIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.cb-head { display:flex; align-items:center; gap: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.cb-head .av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2);
  display:grid; place-items:center; font-size: 1.2rem; flex: none; }
.cb-head .t { font-weight: 700; line-height: 1.2; }
.cb-head .s { font-size: .76rem; opacity: .85; }
.cb-head .x { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.3rem;
  cursor: pointer; opacity: .85; } .cb-head .x:hover { opacity: 1; }

.cb-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-soft); }
.cb-msg { max-width: 82%; padding: 10px 13px; border-radius: 13px; font-size: .92rem; line-height: 1.5; }
.cb-msg.bot { background: var(--surface-2); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.cb-msg.me  { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.cb-msg a { color: inherit; text-decoration: underline; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cb-chip { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: .82rem; cursor: pointer; }
.cb-chip:hover { color: var(--text); border-color: var(--brand); }
.cb-typing { display:flex; gap:4px; align-self:flex-start; padding: 12px 14px; background: var(--surface-2); border-radius: 13px; }
.cb-typing span { width:7px; height:7px; border-radius:50%; background: var(--muted); animation: cbBlink 1.2s infinite; }
.cb-typing span:nth-child(2){ animation-delay:.2s; } .cb-typing span:nth-child(3){ animation-delay:.4s; }
@keyframes cbBlink { 0%,60%,100%{ opacity:.3; } 30%{ opacity:1; } }

.cb-foot { display:flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.cb-foot input { flex: 1; padding: 11px 13px; border-radius: 10px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--text); font-size: .92rem; font-family: var(--font); }
.cb-foot input:focus { outline: none; border-color: var(--brand); }
.cb-foot button { border: none; border-radius: 10px; padding: 0 16px; cursor: pointer; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* Settings page helpers */
.faq-row { display:grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; margin-bottom: 10px; align-items: start; }
.faq-row textarea { min-height: 44px; resize: vertical; }
.faq-row .del { background: transparent; border: 1px solid var(--border); color: var(--danger);
  border-radius: 9px; padding: 10px 12px; cursor: pointer; }
.faq-row .del:hover { border-color: var(--danger); }
@media (max-width: 640px){ .faq-row { grid-template-columns: 1fr; } }
.swatch { display:inline-flex; gap:8px; align-items:center; }
.swatch input[type=color]{ width: 44px; height: 38px; padding: 2px; border-radius: 8px; border:1px solid var(--border); background: var(--bg-soft); }

/* ===========================================================
   Bot Store
   =========================================================== */
.store-toolbar { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:28px; }
.store-toolbar .store-count { color: var(--muted); font-size:.95rem; }
.store-toolbar .store-count strong { color: var(--text); font-size:1.15rem; }
.store-toolbar .store-search { flex:1; min-width:220px; }
.store-toolbar .store-search .input { margin:0; }

.store-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.bot-card { display:flex; flex-direction:column; }
.bot-top { display:flex; align-items:center; gap:12px; }
.bot-avatar { width:44px; height:44px; border-radius:11px; flex:none; display:grid; place-items:center;
  font-weight:800; color:#fff; font-size:1.2rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.app-tags { display:flex; flex-wrap:wrap; gap:7px; margin:16px 0 0; }
.app-tag { font-size:.78rem; padding:4px 10px; border-radius:999px; background: var(--surface-2);
  color: var(--text); border:1px solid var(--border); }
.app-tag .apv { color: var(--accent); font-weight:600; }
.bot-foot { display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:auto; padding-top:18px; }
.bot-foot .btn { padding:9px 15px; font-size:.88rem; }
.bot-del { color: var(--danger); padding:9px 12px !important; }

.app-row { display:grid; grid-template-columns: 1.4fr 1fr auto; gap:10px; margin-bottom:10px; }
.app-row .del { background: transparent; border:1px solid var(--border); color: var(--danger);
  border-radius:10px; padding:0 14px; cursor:pointer; }
.app-row .del:hover { border-color: var(--danger); }
.empty-state { text-align:center; color: var(--muted); padding: 40px 0; }
@media (max-width: 920px){ .store-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px){ .app-row { grid-template-columns: 1fr 1fr auto; } }
