/* Bebshio (Bebshio) SaaS v3 — Phase 2 Hishabee-style theme (LOOK ONLY).
   Design tokens from work/hishabee-saas-analysis.md §3.1 / §4, matched to
   the real Hishabee dashboard (image-5.png): white page, very light-grey
   content, white sidebar/topbar with dark text, BOLD golden-yellow banner
   + accent #F5C518, BLACK primary buttons, green = cash-in, red = cash-out,
   blue = links/info. Yellow is used boldly (banner, logo mark, auth panel,
   landing hero) — not as a tiny accent. No logic lives here — pure CSS. */

:root {
  --sidebar-w: 230px;
  --brand: #111827;          /* black primary */
  --accent: #f5c518;         /* Hishabee yellow */
  --accent-soft: #fef9c3;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;             /* white page background */
  --content-bg: #f7f8fa;     /* very light grey content area */
  --card-border: #e5e7eb;
  --green: #22c55e;          /* income / cash-in */
  --green-soft: #dcfce7;
  --red: #ef4444;            /* expense / cash-out */
  --red-soft: #fee2e2;
  --blue: #2563eb;           /* links / info */
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
.text-cash-in { color: var(--green) !important; }
.text-cash-out { color: var(--red) !important; }

.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar: white / light grey, dark text (NOT a dark sidebar) ---- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--card-border);
  padding: 1rem .75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: 1.02rem; color: var(--brand);
  padding: .25rem .5rem 1rem; text-decoration: none;
}
.sidebar .brand .logo-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: var(--accent); color: #111;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; overflow: hidden;
}
.sidebar .brand img.logo-img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; flex: 0 0 38px; }
.sidebar .nav-link {
  color: var(--ink); border-radius: .5rem; padding: .55rem .75rem;
  display: flex; align-items: center; gap: .6rem; margin-bottom: .15rem;
  font-size: .95rem; text-decoration: none; white-space: nowrap;
}
.sidebar .nav-link:hover { background: #f3f4f6; }
.sidebar .nav-link.active { background: #fef08a; color: var(--brand); font-weight: 700; }
.sidebar .nav-link.active i { color: #a16207; }
.sidebar .nav-link i { font-size: 1.1rem; color: #4b5563; }
.sidebar .nav-link.disabled { color: var(--muted); cursor: default; }
.sidebar .nav-link.disabled:hover { background: transparent; }
.sidebar .nav-section {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  padding: .9rem .75rem .35rem;
}
.sidebar .badge-soon {
  margin-left: auto; font-size: .65rem; background: var(--accent-soft);
  color: #854d0e; border: 1px solid #fde047; border-radius: 999px; padding: .05rem .45rem;
}

/* ---- Main / topbar ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--content-bg); }
.topbar {
  background: #fff; border-bottom: 1px solid var(--card-border);
  padding: .55rem 1.25rem; display: flex; align-items: center; gap: .75rem;
  position: sticky; top: 0; z-index: 10;
}
.topbar .biz-name { font-weight: 700; }
.topbar .biz-role { font-size: .8rem; color: var(--muted); }
.topbar .biz-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  color: #111; font-weight: 800; display: inline-flex; align-items: center;
  justify-content: center; border: none; overflow: hidden; flex: 0 0 36px;
}
.topbar .biz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar .icon-btn {
  border: 1px solid var(--card-border); background: #fff; color: var(--ink);
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; position: relative;
}
.topbar .icon-btn:hover { background: #f3f4f6; }
.content { padding: 1.5rem; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ---- Cards, KPIs, pills ---- */
.card { border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.kpi { text-align: left; position: relative; }
.kpi .kpi-label { color: var(--muted); font-size: .85rem; }
.kpi .kpi-value { font-size: 1.45rem; font-weight: 700; }
/* Hishabee KPI values are coloured, not just their icons: green = sales /
   cash-in / profit, blue = purchase / stock value, red = money owed to us. */
.kpi .kpi-value.green { color: #16a34a; }
.kpi .kpi-value.blue { color: #1d4ed8; }
.kpi .kpi-value.orange { color: #ea580c; }
.kpi .kpi-value.red { color: #dc2626; }
.kpi .kpi-icon {
  position: absolute; top: .85rem; right: .85rem;
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.kpi-icon.green { background: var(--green-soft); color: #15803d; }
.kpi-icon.red { background: var(--red-soft); color: #b91c1c; }
.kpi-icon.yellow { background: var(--accent-soft); color: #a16207; }
.kpi-icon.blue { background: #dbeafe; color: #1d4ed8; }
.kpi-icon.grey { background: #f3f4f6; color: #4b5563; }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  border-radius: 999px; padding: .35rem .9rem; font-size: .9rem;
  border: 1px solid var(--card-border); background: #fff; color: var(--ink);
  text-decoration: none; font-weight: 600;
}
.pill:hover { background: #f3f4f6; color: var(--ink); }
.pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
/* Hishabee balance pill: white with a GREEN outline + green text. */
.pill-balance { background: #fff; border: 1.5px solid #16a34a; color: #15803d; }
.pill-green { background: var(--green-soft); border-color: #bbf7d0; color: #15803d; }
.pill-red { background: var(--red-soft); border-color: #fecaca; color: #b91c1c; }
/* Hishabee time filters: pills sit in one light-grey container; the
   active one is WHITE (not black) with a soft shadow. */
.range-pills { display: inline-flex; gap: .25rem; flex-wrap: wrap; background: #f3f4f6; border-radius: 999px; padding: .25rem; }
.range-pills .pill { border: none; background: transparent; }
.range-pills .pill:hover { background: #e5e7eb; }
.range-pills .pill.active { background: #fff; color: var(--ink); border: none; box-shadow: 0 1px 3px rgba(16, 24, 40, .15); }

/* ---- Buttons: black primary, white secondary with grey border ---- */
.btn-dark, .btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-dark:hover, .btn-primary:hover { background: #000; border-color: #000; color: #fff; }
.btn-outline-dark { border-color: #d1d5db; color: var(--ink); background: #fff; }
.btn-outline-dark:hover { background: #f3f4f6; color: var(--ink); border-color: #9ca3af; }
.btn-outline-secondary { background: #fff; }
.btn-black-download, .btn-download {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-black-download:hover, .btn-download:hover { background: #000; color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); }

/* ---- Quick-action tiles (dashboard): Hishabee's are LIGHT GREY, not white cards ---- */
.quick-tiles { display: flex; gap: .75rem; flex-wrap: wrap; }
.quick-tile {
  flex: 1 1 140px; display: flex; align-items: center; gap: .75rem;
  background: #f3f4f6; border: 1px solid transparent; border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--ink);
}
.quick-tile:hover { background: #e9ebee; border-color: var(--accent); color: var(--ink); }
.quick-tile i { font-size: 1.5rem; color: #a16207; }
.quick-tile .qt-label { font-weight: 700; }
.quick-tile .qt-sub { font-size: .8rem; color: var(--muted); }

/* ---- Right slide-in drawer (create/edit forms) ---- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 1040;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(480px, 94vw);
  background: #fff; z-index: 1050; box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
  transform: translateX(105%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--card-border);
}
.drawer-head h5 { margin: 0; font-weight: 700; }
.drawer-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--card-border); display: flex; gap: .5rem; }

/* ---- Centred modal (choices / confirmations) ---- */
.hs-modal-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 1040;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.hs-modal-backdrop.open { display: flex; }
.hs-modal {
  background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  width: min(440px, 94vw); padding: 1.5rem;
}
.hs-modal h5 { font-weight: 700; margin-bottom: .75rem; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .empty-icon {
  width: 56px; height: 56px; border-radius: 50%; background: #f3f4f6;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: .75rem;
}
.empty-state .empty-title { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.empty-state p { margin: .25rem 0 0; font-size: .9rem; }

/* ---- Toggle switch (yes/no options) ---- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 44px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0; background: #d1d5db; border-radius: 999px;
  transition: background .2s; cursor: pointer;
}
.toggle .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.toggle input:checked + .slider { background: var(--green); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* ---- Dashboard yellow banner (Hishabee's signature element: a big bold
       golden-yellow block with dark text + a black CTA button) ---- */
.dash-banner { background: var(--accent); border-radius: var(--radius); }
.dash-banner h4 { font-weight: 800; color: #111827; }
.dash-banner p { color: #374151; }
.date-range input[type="date"], .date-range .form-control { background: #fff; }
.per-page-select { max-width: 130px; }

/* ---- Misc ---- */
.banner { border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; }
/* Trial banner: bold golden yellow like Hishabee's banner, black text. */
.banner-trial { background: var(--accent); border: 1px solid #eab308; color: #111827; font-weight: 600; }
.banner-grace { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.banner-expired { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.btn-dark { background: var(--brand); border-color: var(--brand); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--content-bg); }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .logo-mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #111; overflow: hidden;
}
.auth-card .logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.badge-plan { background: #eef2ff; color: #3730a3; }
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 19;
  display: none;
}
.bottom-nav { display: none; }

/* Compact "মোবাইল ভিউ" on the dashboard: tighter cards, smaller KPI text. */
.mobile-view .content { max-width: 480px; }
.mobile-view .kpi .kpi-value { font-size: 1.15rem; }
.mobile-view .content { padding: 1rem; }

/* Phones (<=576px): KPI cards are 2-across, so shrink the value + icon and
   keep the label clear of the icon — otherwise big ৳ amounts wrap
   mid-number ("৳61,58 / 0.00") and the icon covers the label (cashbook
   screenshot, 2026-11-16). Same 1.15rem value size as .mobile-view. */
@media (max-width: 575.98px) {
  .kpi .kpi-value { font-size: 1.15rem; }
  .kpi .kpi-icon { width: 28px; height: 28px; font-size: .95rem; top: .7rem; right: .7rem; }
  .kpi .kpi-label { padding-right: 2.4rem; }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .content { padding: 1rem; }
  .topbar .biz-role { display: none; }
  /* Landing header on phones: brand + 2 buttons must fit in one row. */
  .landing-nav .landing-brand { font-size: 1.1rem; }
  .landing-nav .landing-brand .logo-mark,
  .landing-nav .landing-brand img.logo-img { width: 34px; height: 34px; }
  /* Salesman mobile bottom nav (Hishabee-style mobile layout). */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: #fff; border-top: 1px solid var(--card-border);
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; text-align: center; color: var(--muted); text-decoration: none;
    font-size: .68rem; display: flex; flex-direction: column; align-items: center; gap: 2px;
  }
  .bottom-nav a i { font-size: 1.25rem; }
  .bottom-nav a.active { color: var(--brand); font-weight: 700; }
  body.has-bottom-nav .content { padding-bottom: 4.5rem; }
  body.has-bottom-nav .main { padding-bottom: 0; }
}
@media print {
  .sidebar, .topbar, .no-print, .drawer, .drawer-backdrop, .bottom-nav { display: none !important; }
  body { background: #fff; }
  .main { background: #fff; }
}

/* --- Phase 5: Business Report tiles + thermal receipt -------------------- */
.report-tile {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  background: #fff; border: 1px solid var(--card-border); border-radius: 12px;
  padding: 1rem; text-decoration: none; color: inherit;
}
.report-tile:hover { border-color: var(--brand); text-decoration: none; color: inherit; }
.report-tile-icon { font-size: 1.4rem; color: var(--brand); }
.report-tile-label { font-weight: 700; }
.report-tile-value { font-size: 1.15rem; font-weight: 800; }
.report-tile-sub { font-size: .8rem; color: var(--muted); }

.thermal-preview-wrap { display: flex; justify-content: center; background: #f1f3f5; border-radius: 12px; padding: 1rem; }
.thermal-receipt { background: #fff; margin: 0 auto; padding: 8px 6px; color: #111; line-height: 1.35; border: 1px dashed #ccc; }
.thermal-receipt .tr-center { text-align: center; }
.thermal-receipt .tr-shop { font-weight: 800; font-size: 1.15em; }
.thermal-receipt .tr-logo { max-height: 48px; max-width: 100%; }
.thermal-receipt .tr-line { text-align: center; overflow: hidden; white-space: nowrap; }
.thermal-receipt .tr-items { width: 100%; border-collapse: collapse; }
.thermal-receipt .tr-items th, .thermal-receipt .tr-items td { padding: 1px 2px; vertical-align: top; }
.thermal-receipt .tr-items thead tr { border-bottom: 1px dashed #999; }
.thermal-receipt .tr-row { display: flex; justify-content: space-between; }
.thermal-receipt .tr-bold { font-weight: 800; }
.thermal-receipt .tr-sign { display: flex; justify-content: space-between; margin-top: 14px; text-align: center; }

/* --- A4 cash memo preview (printer settings) ---------------------------- */
.a4-preview-wrap { background: #f1f3f5; border-radius: 12px; padding: 1rem; }
.a4-memo { background: #fff; max-width: 210mm; margin: 0 auto; padding: 20px 24px; color: #111; line-height: 1.45; border: 1px solid #dee2e6; }
.a4-head { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 12px; }
.a4-logo { max-height: 64px; max-width: 120px; }
.a4-shop { flex: 1; }
.a4-shop-name { font-weight: 800; font-size: 1.4em; }
.a4-memo-title { font-weight: 800; font-size: 1.2em; border: 2px solid #111; border-radius: 6px; padding: 4px 14px; white-space: nowrap; }
.a4-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.a4-items { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.a4-items th, .a4-items td { border: 1px solid #dee2e6; padding: 6px 8px; }
.a4-items thead th { background: #f8f9fa; }
.a4-totals { width: 55%; margin-left: auto; }
.a4-row { display: flex; justify-content: space-between; padding: 2px 0; }
.a4-row.a4-bold { font-weight: 800; border-top: 1px solid #999; }
.a4-footer { text-align: center; margin-top: 14px; }
.a4-sign { display: flex; justify-content: space-between; margin-top: 32px; text-align: center; }

/* --- Landing page (Bebshio homepage) ---------------------------------- */
.landing { background: #fff; }
.landing-nav {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--card-border);
}
/* Header buttons never wrap — on phones the long trial label used to split
   across two lines and stretch the login button tall. */
.landing-nav .btn { white-space: nowrap; }
.landing-brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.25rem; color: var(--brand); text-decoration: none;
}
.landing-brand:hover { color: var(--brand); }
.landing-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: #111;
}
.landing-brand img.logo-img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.landing-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.landing-links a:hover { color: var(--brand); }
/* Hishabee hero: a BOLD solid golden-yellow block with black text
   (the most visible colour on the page), black CTA buttons, white card. */
.landing-hero { background: var(--accent); }
.landing-hero-card { border-radius: var(--radius); }
/* Full Bebshio lockup (mark + wordmark) for the big brand slots. */
.hero-logo-full { width: 170px; height: auto; display: block; margin: 0 auto .75rem; }
.landing-section { padding: 3.5rem 0; }
.landing-alt { background: var(--content-bg); }
.feature-card { transition: border-color .15s; }
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #a16207;
}
.pricing-card { border-radius: var(--radius); }
.pricing-card.featured { border: 2px solid var(--accent); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: #111; margin: 0 auto;
}
.faq-item summary { cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.landing-footer { background: var(--brand); color: #fff; }
.landing-footer .logo-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: #111;
}
.landing-footer img.logo-img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.landing-footer a { color: #d1d5db; text-decoration: none; }
.landing-footer a:hover { color: #fff; }
.landing-footer .text-muted { color: #9ca3af !important; }

/* --- Auth split layout: desktop two-column (brand panel + form),
       mobile stacked (compact brand header + form) ----------------------- */
.auth-split { overflow: hidden; }
.auth-brand { display: none; }
/* Full lockup (mark + "Bebshio") replaces mark + h3 where it fits.
   Top-level on purpose: the mobile auth header and the admin login use it
   below 992px too, where the media query below does not apply. */
.auth-logo-full { width: 230px; max-width: 80%; height: auto; }
.auth-logo-full-sm { width: 170px; }
@media (min-width: 992px) {
  /* Row, not column: Bootstrap .card forces flex-direction: column, which
     stacked the brand panel on top of the form on desktop. */
  .auth-split { max-width: 920px; display: flex; flex-direction: row; text-align: left; }
  /* Hishabee yellow: the brand panel is BOLD golden yellow with black
     text (like Hishabee's banner), not a black panel. */
  .auth-brand {
    display: flex; flex: 0 0 360px; flex-direction: column; justify-content: center;
    gap: .85rem; background: var(--accent); color: #111827; padding: 2.5rem 2rem;
  }
  .auth-brand .logo-mark {
    width: 56px; height: 56px; border-radius: 14px; background: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.7rem; font-weight: 800; color: var(--accent);
  }
  .auth-brand h3 { color: #111827; font-weight: 800; margin: 0; }
  .auth-brand-tag { color: #374151; margin: 0; }
  .auth-brand-points {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: .5rem; color: #1f2937;
  }
  .auth-brand-points i { color: #111827; margin-right: .35rem; }
  .auth-brand-note { color: #111827; font-size: .9rem; margin: 0; font-weight: 700; }
  .auth-form { flex: 1; min-width: 0; padding: 2.5rem !important; }
}
