/*
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 32px; max-width:none; 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; }
}

/* Desktop: collapsible sidebar (☰ toggles) for a WhatsApp-style full-width inbox */
@media(min-width:861px){
  .app-top .menu-btn{ display:flex; align-items:center; justify-content:center; }
  .app.side-collapsed{ grid-template-columns:1fr; }
  .app.side-collapsed .app-side{ display:none; }
}

/* ======================================================================
   Auth (login / signup / verify) — modern colorful split-panel
   ====================================================================== */
.auth2{ min-height:78vh; display:flex; align-items:center; justify-content:center; padding:44px 18px;
  background:radial-gradient(1100px 560px at 8% -10%, #efeaff 0%, transparent 55%),
            radial-gradient(1000px 620px at 112% 115%, #d9faf0 0%, transparent 55%), var(--tint); }
.auth2-card{ width:100%; max-width:940px; display:grid; grid-template-columns:1.02fr .98fr;
  background:#fff; border-radius:24px; overflow:hidden; border:1px solid var(--line);
  box-shadow:0 32px 74px rgba(30,34,53,.15); }

/* Brand panel */
.auth2-brand{ position:relative; padding:46px 42px; color:#fff; overflow:hidden;
  background:linear-gradient(150deg, var(--v) 0%, #7c5be6 46%, var(--m) 135%); }
.auth2-brand::before,.auth2-brand::after{ content:""; position:absolute; border-radius:50%; }
.auth2-brand::before{ width:230px; height:230px; background:#fff; opacity:.12; top:-78px; right:-64px; }
.auth2-brand::after{ width:170px; height:170px; background:var(--m); opacity:.34; bottom:-54px; left:-34px; filter:blur(3px); }
.auth2-brand .logo{ position:relative; z-index:1; display:flex; align-items:center; gap:11px; font-weight:800; font-size:22px; }
.auth2-brand .logo .lmark{ width:42px; height:42px; border-radius:12px; background:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 16px rgba(0,0,0,.14); }
.auth2-brand .logo .lmark img{ width:26px; height:26px; }
.auth2-brand h2{ position:relative; z-index:1; font-family:var(--bn); font-weight:700; font-size:25px; line-height:1.4; margin:28px 0 10px; }
.auth2-brand .tag{ position:relative; z-index:1; font-family:var(--bn); opacity:.94; font-size:15px; margin:0 0 26px; }
.auth2-brand ul{ position:relative; z-index:1; list-style:none; padding:0; margin:0 0 26px; display:grid; gap:13px; }
.auth2-brand li{ display:flex; align-items:center; gap:11px; font-family:var(--bn); font-size:15px; }
.auth2-brand li .tick{ width:27px; height:27px; flex:0 0 auto; border-radius:50%; background:rgba(255,255,255,.20); display:flex; align-items:center; justify-content:center; font-size:14px; }
.auth2-brand .seal{ position:relative; z-index:1; display:inline-flex; align-items:center; gap:7px; font-family:var(--bn); font-size:13px; background:rgba(255,255,255,.17); padding:8px 14px; border-radius:100px; }

/* Form panel */
.auth2-form{ padding:46px 42px; }
.auth2-form h1{ font-size:25px; margin:0 0 6px; }
.auth2-form .sub{ color:var(--gray); font-family:var(--bn); font-size:15px; margin:0 0 22px; }
.auth2-form .field{ margin-bottom:15px; }
.auth2-form label{ display:block; font-weight:600; font-size:13.5px; margin-bottom:6px; color:var(--ink); }
.auth2-form input{ width:100%; padding:13px 15px; border:1.5px solid var(--line); border-radius:12px; font-family:inherit; font-size:15px; background:#fcfcff; transition:.15s; }
.auth2-form input:focus{ outline:none; border-color:var(--v); background:#fff; box-shadow:0 0 0 4px var(--v-l); }
.auth2-btn{ width:100%; margin-top:4px; border:0; border-radius:12px; padding:14px; font-family:inherit; font-weight:700; font-size:16px; color:#fff; cursor:pointer;
  background:linear-gradient(135deg, var(--v), var(--m)); box-shadow:0 10px 24px rgba(108,92,231,.28); transition:.15s; }
.auth2-btn:hover{ filter:brightness(1.06); transform:translateY(-1px); }
.auth2-msg{ font-family:var(--bn); font-size:14px; padding:11px 14px; border-radius:11px; margin-bottom:16px; }
.auth2-msg.err{ background:#fdecec; color:#c0392b; border:1px solid #f5c6c6; }
.auth2-msg.ok{ background:#e7f9f2; color:var(--m-d); border:1px solid #b6ecd9; }
.auth2-alt{ text-align:center; font-family:var(--bn); color:var(--gray); font-size:14.5px; margin:20px 0 0; }
.auth2-alt a{ font-weight:700; }
.auth2-otp{ text-align:center; font-size:30px; letter-spacing:14px; font-weight:700; padding:16px 15px !important; }
.auth2-resend{ text-align:center; font-family:var(--bn); font-size:14px; color:var(--gray); margin:16px 0 0; }
.auth2-resend button{ background:none; border:0; color:var(--v); font-weight:700; cursor:pointer; font-family:inherit; font-size:inherit; }
.auth2-logout{ text-align:center; margin:14px 0 0; font-family:var(--bn); font-size:13px; }
.auth2-logout a{ color:var(--gray); text-decoration:underline; }
.auth2-trust{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.auth2-trust .chip{ font-family:var(--bn); font-size:13px; font-weight:600; background:var(--v-l); color:var(--v); padding:6px 11px; border-radius:100px; }
.auth2-proof{ font-family:var(--bn); font-size:12.5px; color:var(--gray); margin:0 0 20px; line-height:1.55; }
.auth2-note{ text-align:center; font-family:var(--bn); font-size:12.5px; color:var(--gray); margin:13px 0 0; }
.auth2-hint{ font-family:var(--bn); font-size:13px; color:#8a6d00; background:#fff8e1; border:1px solid #ffe8a3; border-radius:11px; padding:10px 13px; margin:0 0 16px; line-height:1.55; }
.connect-steps{ display:grid; gap:10px; margin:16px auto 20px; text-align:left; max-width:430px; }
.connect-steps .cstep{ display:flex; align-items:flex-start; gap:10px; font-family:var(--bn); font-size:14px; color:var(--ink); line-height:1.5; }
.connect-steps .cnum{ flex:0 0 auto; width:25px; height:25px; border-radius:50%; background:var(--v); color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; }
@media(max-width:760px){
  .auth2-card{ grid-template-columns:1fr; max-width:440px; }
  .auth2-brand{ padding:30px 28px; }
  .auth2-brand h2{ font-size:21px; margin:16px 0 8px; }
  .auth2-brand .tag{ margin-bottom:4px; }
  .auth2-brand ul,.auth2-brand .seal{ display:none; }
  .auth2-form{ padding:32px 26px; }
}
