/*
Theme Name: Alapi
Theme URI: https://alapi.chat
Author: Prime Focus Agency Ltd
Author URI: https://alapi.chat
Description: Alapi — customer-facing site for the Bangla AI chatbot SaaS. App-feel landing, signup/login, and merchant dashboard. Logic lives in the Alapi plugin (engine); this theme is the presentation layer.
Version: 0.1.0
Requires PHP: 8.0
Requires at least: 6.0
Text Domain: alapi
*/

:root{
  --v:#6C5CE7; --v-d:#5a4bd6; --v-l:#eeebff; --m:#00C39A; --m-d:#00875f;
  --ink:#1E2235; --gray:#5c5c6e; --line:#e9e7f3; --bg:#ffffff; --tint:#f6f5fb;
  --r:14px; --r-lg:20px;
  --sans:'Baloo Da 2','Hind Siliguri','Segoe UI',system-ui,sans-serif;
  --bn:'Hind Siliguri','Baloo Da 2',system-ui,sans-serif;
}
*,*::before,*::after{ box-sizing:border-box; }
body{ margin:0; font-family:var(--sans); color:var(--ink); background:var(--bg); line-height:1.65; font-size:16px; -webkit-font-smoothing:antialiased; }
img{ max-width:100%; display:block; }
a{ color:var(--v); text-decoration:none; }
.container{ max-width:1100px; margin:0 auto; padding:0 20px; }

/* Buttons */
.btn{ display:inline-flex; align-items:center; gap:8px; font-family:inherit; font-weight:600; font-size:16px; border:0; border-radius:12px; padding:13px 24px; cursor:pointer; background:var(--tint); color:var(--v); transition:.15s; }
.btn-primary{ background:var(--v); color:#fff; }
.btn-primary:hover{ background:var(--v-d); }
.btn-ghost{ background:transparent; color:var(--ink); border:1px solid var(--line); }
.btn-lg{ padding:16px 30px; font-size:17px; }

/* Header */
.site-head{ position:sticky; top:0; z-index:30; background:rgba(255,255,255,.92); backdrop-filter:saturate(1.4) blur(8px); border-bottom:1px solid var(--line); }
.site-head .container{ display:flex; align-items:center; gap:16px; height:68px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:24px; color:var(--ink); }
.brand img{ width:34px; height:34px; }
.site-nav{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.site-nav a.lnk{ padding:8px 14px; font-weight:500; color:var(--ink); border-radius:10px; }
.site-nav a.lnk:hover{ background:var(--tint); }
@media(max-width:720px){ .site-nav .hide-sm{ display:none; } }

/* Hero */
.hero{ text-align:center; padding:72px 0 52px; background:var(--tint); }
.hero .mark{ width:74px; height:74px; margin:0 auto 6px; }
.hero h1{ font-size:46px; font-weight:700; margin:14px 0; line-height:1.18; }
.hero p.sub{ font-family:var(--bn); font-size:19px; color:var(--gray); max-width:680px; margin:0 auto 28px; }
.hero .cta-row{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
@media(max-width:640px){ .hero h1{ font-size:31px; } .hero p.sub{ font-size:17px; } }

/* Sections */
.section{ padding:58px 0; }
.section h2{ text-align:center; font-size:30px; font-weight:700; margin:0 0 8px; }
.section .lead{ text-align:center; color:var(--gray); font-family:var(--bn); margin:0 auto 38px; max-width:560px; }
.feature-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:18px; }
.feature{ background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:24px; }
.feature .ic{ width:50px; height:50px; border-radius:13px; background:var(--v-l); color:var(--v); display:flex; align-items:center; justify-content:center; font-size:25px; margin-bottom:13px; }
.feature h3{ margin:0 0 6px; font-size:18px; }
.feature p{ margin:0; color:var(--gray); font-family:var(--bn); font-size:15px; }

/* Steps */
.steps{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:18px; }
.step{ text-align:center; padding:18px; }
.step .n{ width:46px; height:46px; border-radius:50%; background:var(--v); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; margin:0 auto 12px; font-size:21px; }
.step h3{ margin:0 0 6px; font-size:17px; }
.step p{ margin:0; color:var(--gray); font-family:var(--bn); font-size:15px; }

/* Pricing */
.price-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(258px,1fr)); gap:18px; align-items:stretch; }
.price{ background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:28px; display:flex; flex-direction:column; }
.price.feat{ border:2px solid var(--v); box-shadow:0 14px 34px rgba(108,92,231,.13); }
.price .pname{ font-weight:600; font-size:18px; color:var(--v); }
.price .amt{ font-size:40px; font-weight:700; margin:8px 0 4px; }
.price .amt small{ font-size:15px; color:var(--gray); font-weight:500; }
.price ul{ list-style:none; padding:0; margin:14px 0 22px; font-family:var(--bn); }
.price li{ padding:8px 0; border-bottom:1px dashed var(--line); }
.price li::before{ content:"✓ "; color:var(--m); font-weight:700; }
.price .btn{ margin-top:auto; justify-content:center; }

/* CTA band */
.cta-band{ background:var(--v); color:#fff; text-align:center; padding:58px 20px; }
.cta-band h2{ color:#fff; font-size:32px; margin:0 0 10px; }
.cta-band p{ opacity:.9; font-family:var(--bn); margin:0 0 18px; }
.cta-band .btn{ background:#fff; color:var(--v); }

/* Footer */
.site-foot{ background:var(--ink); color:#cfcce0; padding:36px 0; font-family:var(--bn); font-size:15px; }
.site-foot a{ color:#fff; }
.site-foot .container{ display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }

/* ===== Auth pages ===== */
.btn-block{ width:100%; justify-content:center; }
.auth-wrap{ min-height:72vh; display:flex; align-items:center; justify-content:center; padding:44px 20px; background:var(--tint); }
.auth-card{ width:100%; max-width:420px; background:#fff; border:1px solid var(--line); border-radius:20px; padding:32px; box-shadow:0 14px 34px rgba(30,34,53,.07); }
.auth-card h1{ font-size:24px; margin:0 0 6px; }
.auth-card .sub{ color:var(--gray); font-family:var(--bn); margin:0 0 22px; }
.auth-card .field{ margin-bottom:14px; }
.auth-card label{ font-weight:600; font-size:14px; display:block; margin-bottom:6px; }
.auth-card input{ width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px; font-family:inherit; font-size:15px; }
.auth-card input:focus{ outline:none; border-color:var(--v); box-shadow:0 0 0 3px var(--v-l); }
.auth-msg{ padding:11px 14px; border-radius:10px; font-family:var(--bn); font-size:14px; margin-bottom:16px; }
.auth-msg.err{ background:#fdeaec; color:#b3261e; }
.auth-msg.ok{ background:#e6fbf4; color:var(--m-d); }
.auth-alt{ text-align:center; margin-top:18px; font-family:var(--bn); color:var(--gray); }
.otp-input{ letter-spacing:10px; text-align:center; font-size:26px; font-weight:700; }

/* ===== App shell (merchant dashboard) ===== */
.app{ display:grid; grid-template-columns:248px 1fr; min-height:100vh; }
.scrim{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:40; }
.app-side{ background:var(--v); color:#fff; padding:18px 14px; display:flex; flex-direction:column; gap:5px; position:sticky; top:0; height:100vh; }
.app-brand{ display:flex; align-items:center; gap:10px; padding:6px 8px 16px; color:#fff; }
.app-brand img{ width:34px; height:34px; } .app-brand b{ font-size:22px; }
.app-nav a{ display:flex; align-items:center; gap:11px; padding:11px 13px; border-radius:10px; color:#e7e3ff; font-weight:500; }
.app-nav a:hover{ background:rgba(255,255,255,.12); color:#fff; }
.app-nav a.active{ background:#fff; color:var(--v); }
.app-side .spacer{ flex:1; } .app-side .side-foot{ font-size:12px; color:#cfc8ff; padding:8px; }
.app-main{ display:flex; flex-direction:column; min-width:0; background:var(--tint); }
.app-top{ position:sticky; top:0; z-index:20; background:rgba(255,255,255,.92); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:13px 22px; }
.app-top .menu-btn{ display:none; background:var(--tint); border:0; width:40px; height:40px; border-radius:10px; font-size:20px; color:var(--v); cursor:pointer; }
.app-top h1{ font-size:19px; margin:0; } .app-top .top-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.avatar{ width:38px; height:38px; border-radius:50%; background:var(--v-l); color:var(--v); display:flex; align-items:center; justify-content:center; font-weight:700; }
.app-body{ padding:24px; max-width:1100px; width:100%; }
.kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; }
.kpi{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px; }
.kpi .klabel{ color:var(--gray); font-size:13px; font-weight:500; } .kpi .num{ font-size:30px; font-weight:700; margin-top:6px; }
.dash-cta{ background:var(--v-l); border:1px dashed var(--v); border-radius:14px; padding:26px; text-align:center; margin-top:22px; }
.dash-cta h3{ margin:0 0 6px; } .dash-cta p{ color:var(--gray); font-family:var(--bn); margin:0 0 16px; }
.badge.ok{ background:#e6fbf4; color:var(--m-d); padding:5px 11px; border-radius:999px; font-size:12px; font-weight:600; }
@media(max-width:860px){
  .app{ grid-template-columns:1fr; }
  .app-side{ position:fixed; left:0; top:0; width:80%; max-width:300px; transform:translateX(-105%); transition:.25s; z-index:50; box-shadow:0 0 40px rgba(0,0,0,.3); }
  .app.side-open .app-side{ transform:translateX(0); }
  .app.side-open .scrim{ display:block; }
  .app-top .menu-btn{ display:flex; align-items:center; justify-content:center; }
}
