/* ============================================================
   TakaBest — global stylesheet (ported from the Angular UI)
   Palette: #103D29 / #1b5e20 / #2e7d32 / #064e3b / #22c55e

   Copyright (c) 2026 TakaBest. All rights reserved.
   Proprietary — unauthorized copying or distribution is prohibited.
   https://takabest.co.ke
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #212121;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; }

/* ---------- Navbar ---------- */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,.1); position: sticky; top: 0; z-index: 50;
}
.navbar .logo { display: flex; align-items: center; font-size: 20px; font-weight: bold; color: #103D29; gap: 8px; }
.navbar .logo-img { height: 28px; width: auto; object-fit: contain; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: #555; font-weight: 500; position: relative; padding-bottom: 4px; transition: all .3s; }
.nav-links a:hover, .nav-links a.active-link { color: #2e7d32; }
.nav-links a.active-link { color: #1b5e20; font-weight: 600; }
.nav-links a.active-link::after { content:''; position:absolute; bottom:0; left:0; height:2px; width:100%; background:#1b5e20; border-radius:1px; }
.auth-buttons { display: flex; align-items: center; gap: 1rem; }
.btn-outline {
  padding:.5rem 1.2rem; border:2px solid #2e7d32; border-radius:8px; background:#fff;
  color:#2e7d32; font-weight:600; cursor:pointer; transition:.3s ease; display:inline-block;
}
.btn-outline:hover { background:#2e7d32; color:#fff; }
.btn-filled {
  padding:.5rem 1.2rem; background:#2e7d32; color:#fff; border:none; border-radius:8px;
  font-weight:600; cursor:pointer; transition:.3s ease; display:inline-block;
}
.btn-filled:hover { background:#1b5e20; }
.nav-toggle { display:none; background:none; border:none; font-size:1.4rem; color:#103D29; cursor:pointer; }
.user-chip { display:flex; align-items:center; gap:.5rem; color:#1b5e20; font-weight:600; }

@media (max-width: 820px) {
  .nav-toggle { display:block; }
  .nav-links, .auth-buttons { display:none; width:100%; flex-direction:column; align-items:flex-start; gap:.75rem; margin-top:.75rem; }
  .navbar.open { flex-wrap:wrap; }
  .navbar.open .nav-links, .navbar.open .auth-buttons { display:flex; }
}

/* ---------- Hero ---------- */
.hero-section {
  background: linear-gradient(rgba(6,40,25,.45), rgba(6,40,25,.45)), url('/assests/taka homepage.jpg') no-repeat center center/cover;
  padding: 6rem 2rem 4rem; text-align:center; color:#fff; position:relative;
}
.hero-content h1 { font-size:3rem; font-weight:bold; margin:0; text-shadow:0 2px 8px rgba(0,0,0,.4); }
.hero-content p { font-size:1.2rem; margin-top:1rem; text-shadow:0 1px 6px rgba(0,0,0,.4); }
.hero-buttons { margin-top:2rem; }
.btn-primary, .btn-secondary {
  padding:.75rem 2rem; margin:0 1rem; border:none; border-radius:25px; cursor:pointer;
  font-weight:bold; transition:background-color .3s ease; display:inline-block;
}
.btn-primary { background:#2e7d32; color:#fff; }
.btn-secondary { background:#fff; color:#2e7d32; border:2px solid #2e7d32; }
.btn-primary:hover { background:#1b5e20; }
.btn-secondary:hover { background:#2e7d32; color:#fff; }

/* Home feature cards (hero features) */
.features-band { display:flex; justify-content:center; flex-wrap:wrap; padding:3rem 2rem; gap:2rem; background:#f9f9f9; }
.features-band .card {
  flex:1 1 250px; max-width:340px; background:#fff; padding:2rem; border-radius:16px;
  box-shadow:0 6px 12px rgba(0,0,0,.1); transition:transform .3s ease, box-shadow .3s ease; text-align:center;
}
.features-band .card:hover { transform:translateY(-8px); box-shadow:0 12px 20px rgba(0,0,0,.15); }
.features-band .card h3 { margin-bottom:1rem; color:#2e7d32; }
.features-band .card p { color:#555; margin:0; }

/* ---------- Marketplace / waste-categories ---------- */
.marketplace-wrap { padding:1.5rem 1rem; max-width:1200px; margin:0 auto; }
.mkt-header { text-align:center; margin-bottom:1.25rem; }
.mkt-header h2 { font-weight:700; color:#1b5e20; margin-bottom:.3rem; }
.mkt-subtitle { color:#666; font-size:.95rem; }
.mkt-broker-banner {
  background:#e8f5e9; border:1px solid #a5d6a7; border-radius:8px; padding:.65rem 1rem;
  font-size:.82rem; color:#1b5e20; margin-bottom:1.25rem; display:flex; align-items:flex-start; gap:.5rem;
}
.mkt-broker-banner i { color:#2e7d32; margin-top:2px; flex-shrink:0; }
.mkt-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.5rem; }
.tab-btn { padding:.4rem 1rem; border:1px solid #2e7d32; background:#fff; color:#2e7d32; border-radius:20px; font-size:.85rem; cursor:pointer; transition:.2s; text-decoration:none; }
.tab-btn:hover, .tab-btn.active { background:#2e7d32; color:#fff; }
.mkt-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:1.25rem; }
.mkt-card { border:1px solid #e0e0e0; border-radius:12px; overflow:hidden; background:#fff; transition:box-shadow .2s; display:flex; flex-direction:column; }
.mkt-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.10); }
.card-image { width:100%; height:180px; overflow:hidden; background:#f0fdf4; }
.card-image img { width:100%; height:100%; object-fit:cover; }
.no-img { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#c8e6c9; font-size:3rem; }
.card-body { padding:1rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }
.card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:.5rem; }
.card-title { margin:0; font-size:1rem; font-weight:700; color:#212121; }
.grade-badge { background:#e8f5e9; color:#1b5e20; font-size:.72rem; padding:.15rem .5rem; border-radius:10px; font-weight:600; white-space:nowrap; }
.cat-badge { background:#c8e6c9; color:#1b5e20; font-size:.75rem; padding:.15rem .55rem; border-radius:10px; font-weight:600; width:fit-content; }
.card-desc { font-size:.85rem; color:#666; line-height:1.4; margin:0; }
.price-block { background:#f9fdf9; border:1px solid #c8e6c9; border-radius:8px; padding:.65rem .8rem; }
.price-main { display:flex; justify-content:space-between; align-items:center; margin-bottom:.25rem; }
.price-label { font-size:.78rem; color:#666; }
.price-value { font-size:1.1rem; font-weight:700; color:#1b5e20; }
.price-unit { font-size:.8rem; font-weight:400; color:#555; }
.price-secondary { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; font-size:.78rem; color:#888; }
.seller-price { color:#555; }
.margin-chip { background:#fff8e1; color:#e65100; font-size:.72rem; padding:.1rem .45rem; border-radius:8px; font-weight:600; }
.card-meta { display:flex; flex-direction:column; gap:.2rem; font-size:.8rem; color:#777; }
.card-meta span { display:flex; align-items:center; gap:.35rem; }
.seller-trust { display:flex; align-items:center; gap:.4rem; font-size:.78rem; color:#2e7d32; background:#f1f8e9; border-radius:6px; padding:.35rem .6rem; }
.seller-trust i { color:#43a047; }
.buy-btn { margin-top:auto; width:100%; padding:.6rem; background:#2e7d32; color:#fff; border:none; border-radius:8px; font-size:.9rem; font-weight:600; cursor:pointer; transition:background .2s; display:flex; align-items:center; justify-content:center; gap:.4rem; text-decoration:none; }
.buy-btn:hover { background:#1b5e20; }
.mkt-empty { text-align:center; padding:4rem 1rem; color:#aaa; }
.mkt-empty i { font-size:3rem; color:#c8e6c9; display:block; margin-bottom:.75rem; }
.mkt-empty p { font-size:1rem; margin:0; }
.mkt-empty small { font-size:.85rem; }

/* ---------- Platform impact ---------- */
.impact-section { background:#f3fdf6; text-align:center; padding:3rem 1rem; }
.impact-section .section-title { font-size:2rem; color:#1b1c1e; font-weight:700; }
.impact-section .section-subtitle { font-size:1rem; color:#6c757d; margin-bottom:2.5rem; }
.impact-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:1.5rem; max-width:1000px; margin:0 auto; }
.impact-card { padding:2rem 1.5rem; border-radius:1rem; box-shadow:0 2px 8px rgba(0,0,0,.06); background:#fff; transition:transform .3s ease, box-shadow .3s ease; }
.impact-card:hover { transform:translateY(-5px); box-shadow:0 8px 20px rgba(0,0,0,.08); }
.impact-value { font-size:1.75rem; color:#2e7d32; font-weight:700; margin:0; }
.impact-title { margin:.5rem 0 .25rem; font-weight:600; }
.impact-description { margin:0; color:#6c757d; font-size:.85rem; }

/* ---------- Platform features ---------- */
.pf-section { text-align:center; padding:3rem 2rem; background:#f9fdfb; }
.pf-section h2 { font-size:2.5rem; margin-bottom:.5rem; font-weight:bold; }
.pf-section > p { margin-bottom:2rem; color:#6c757d; }
.features-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:1.5rem; justify-items:center; max-width:1200px; margin:0 auto; }
.feature-card { background:#fff; border-radius:10px; box-shadow:0 4px 8px rgba(0,0,0,.08); transition:transform .3s ease, box-shadow .3s ease; padding:1.5rem 1rem; width:100%; max-width:300px; text-align:center; }
.feature-card:hover { transform:translateY(-5px); box-shadow:0 6px 16px rgba(0,0,0,.12); }
.feature-card .fc-icon { font-size:2rem; color:#2e7d32; margin-bottom:.75rem; }
.feature-card h3 { font-size:1.1rem; margin:.25rem 0 .5rem; color:#1b1c1e; }
.feature-card p { color:#6c757d; font-size:.88rem; margin:0; }
@media (max-width: 900px){ .features-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 520px){ .features-grid { grid-template-columns:1fr; } }

/* ---------- Footer ---------- */
.footer-container { background:#064e3b; color:#fff; padding:3rem 1rem 2rem; }
.footer-content { display:flex; flex-direction:column; gap:2rem; }
@media (min-width:768px){ .footer-content { flex-direction:row; justify-content:space-between; } }
.footer-section { flex:1; }
.footer-section h3 { font-size:1.2rem; margin-bottom:1rem; color:#bbf7d0; }
.footer-section .logo { display:flex; align-items:center; gap:.5rem; }
.footer-section .logo img { width:32px; height:32px; border-radius:50%; }
.footer-section .logo h2 { font-size:1.5rem; color:#fff; margin:0; }
.footer-section p { margin:.5rem 0; line-height:1.5; color:#e5e5e5; }
.footer-section ul { list-style:none; padding:0; margin:0; }
.footer-section ul li { margin-bottom:.5rem; }
.footer-section ul li a { color:#fff; transition:color .3s; }
.footer-section ul li a:hover { color:#22c55e; }
.footer-section .location, .footer-section.contact p { display:flex; align-items:center; gap:.5rem; font-size:.95rem; }
.footer-section.contact a { color:#fff; }
.footer-section.contact a:hover { color:#86efac; }
.footer-bottom { border-top:1px solid #14532d; margin-top:2rem; text-align:center; padding-top:1rem; font-size:.85rem; color:#d1fae5; }

/* ---------- Flash alerts ---------- */
.flash { max-width:1200px; margin:1rem auto 0; padding:.75rem 1rem; border-radius:8px; font-size:.9rem; }
.flash-error { background:#fdecea; border:1px solid #f5c2c0; color:#b71c1c; }
.flash-success { background:#e8f5e9; border:1px solid #a5d6a7; color:#1b5e20; }

/* ---------- Auth (login / signup / forgot) ---------- */
.auth-wrap { min-height:calc(100vh - 160px); display:flex; align-items:center; justify-content:center; padding:2.5rem 1rem; background:#f3fdf6; }
.auth-card { background:#fff; border-radius:16px; box-shadow:0 8px 30px rgba(0,0,0,.08); padding:2.25rem; width:100%; max-width:460px; }
.auth-card.wide { max-width:640px; }
.auth-card h2 { color:#1b5e20; margin:0 0 .25rem; font-weight:700; }
.auth-card .auth-sub { color:#666; font-size:.9rem; margin:0 0 1.25rem; }
.form-group { margin-bottom:1rem; }
.form-group label { display:block; font-size:.85rem; font-weight:600; color:#333; margin-bottom:.35rem; }
.form-control { width:100%; padding:.6rem .8rem; border:1px solid #cfd8dc; border-radius:8px; font-size:.92rem; transition:border-color .2s, box-shadow .2s; }
.form-control:focus { outline:none; border-color:#2e7d32; box-shadow:0 0 0 3px rgba(46,125,50,.12); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media (max-width:560px){ .form-row { grid-template-columns:1fr; } }
.btn-block { width:100%; justify-content:center; }
.auth-alt { text-align:center; font-size:.88rem; margin-top:1rem; color:#555; }
.auth-alt a { color:#2e7d32; font-weight:600; }
.role-toggle { display:flex; gap:.75rem; margin-bottom:1.25rem; }
.role-toggle input { display:none; }
.role-toggle label { flex:1; text-align:center; padding:.7rem; border:2px solid #c8e6c9; border-radius:10px; cursor:pointer; font-weight:600; color:#2e7d32; transition:.2s; }
.role-toggle input:checked + label { background:#2e7d32; color:#fff; border-color:#2e7d32; }

/* ---------- Generic page headers / content sections ---------- */
.page-section { max-width:1000px; margin:0 auto; padding:3rem 1.25rem; }
.page-section h1 { color:#1b5e20; font-weight:700; }
.lead { font-size:1.1rem; color:#555; }
.info-card { background:#fff; border:1px solid #e0e0e0; border-radius:12px; padding:1.75rem; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.info-card h4 { color:#2e7d32; margin-top:0; }
.steps-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; }
@media (max-width:768px){ .steps-grid { grid-template-columns:1fr; } }
.text-taka { color:#2e7d32; }
.btn-taka { background:#2e7d32; color:#fff; border:none; border-radius:8px; padding:.6rem 1.4rem; font-weight:600; cursor:pointer; display:inline-block; }
.btn-taka:hover { background:#1b5e20; color:#fff; }

/* ---------- Dashboard shell (seller/admin/buyer) ---------- */
.dash { display:flex; min-height:calc(100vh - 72px); background:#f4f7f5; }
.dash-side { width:250px; background:#0f3d29; color:#dcefe3; flex-shrink:0; padding:1.25rem 0; }
.dash-side .dash-brand { padding:0 1.25rem 1rem; font-weight:700; color:#fff; border-bottom:1px solid rgba(255,255,255,.1); margin-bottom:.75rem; }
.dash-side .dash-brand small { display:block; font-weight:400; color:#9cccb3; font-size:.78rem; }
.dash-side a { display:flex; align-items:center; gap:.65rem; padding:.7rem 1.25rem; color:#cfe6da; font-size:.92rem; transition:.15s; }
.dash-side a i { width:18px; text-align:center; }
.dash-side a:hover { background:rgba(255,255,255,.06); color:#fff; }
.dash-side a.active { background:#2e7d32; color:#fff; font-weight:600; }
.dash-main { flex:1; padding:1.75rem; min-width:0; }
.dash-main h1 { color:#1b5e20; font-weight:700; margin-top:0; }
.stat-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.stat-tile { background:#fff; border-radius:12px; padding:1.25rem; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.stat-tile .val { font-size:1.8rem; font-weight:700; color:#2e7d32; }
.stat-tile .lbl { color:#777; font-size:.85rem; }
.panel { background:#fff; border-radius:12px; padding:1.25rem; box-shadow:0 2px 8px rgba(0,0,0,.05); margin-bottom:1.25rem; }
.panel h5 { margin-top:0; color:#1b5e20; }
.tbl { width:100%; border-collapse:collapse; font-size:.88rem; }
.tbl th, .tbl td { text-align:left; padding:.6rem .5rem; border-bottom:1px solid #eee; }
.tbl th { color:#555; font-weight:600; background:#f7faf8; }
.chip { display:inline-block; padding:.15rem .55rem; border-radius:12px; font-size:.72rem; font-weight:600; text-transform:uppercase; }
.chip.green { background:#e8f5e9; color:#1b5e20; }
.chip.amber { background:#fff8e1; color:#e65100; }
.chip.grey { background:#eceff1; color:#546e7a; }
.chip.red { background:#fdecea; color:#b71c1c; }
.chip.blue { background:#e3f2fd; color:#1565c0; }
.form-inline-card { background:#fff; border-radius:12px; padding:1.25rem; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.btn-danger-sm { background:#fdecea; color:#b71c1c; border:1px solid #f5c2c0; border-radius:6px; padding:.3rem .55rem; cursor:pointer; font-size:.8rem; text-decoration:none; }
.btn-danger-sm:hover { background:#f5c2c0; }
/* Compact row action, sized to sit beside .btn-danger-sm in admin tables. */
.btn-sm { padding:.3rem .55rem !important; font-size:.8rem !important; border-width:1px !important; border-radius:6px !important; }
.dash-toggle { display:none; }
@media (max-width: 820px){
  .dash { flex-direction:column; }
  .dash-side { width:100%; }
}

/* ---------- Product details ---------- */
.product-container { display:flex; flex-direction:row; max-width:1200px; margin:40px auto; background:#fff; border-radius:12px; box-shadow:0 2px 10px rgba(0,128,0,.1); padding:30px; gap:40px; }
.product-container .image-section { flex:1; display:flex; flex-direction:column; align-items:center; }
.product-container .main-img { width:100%; max-width:420px; border-radius:10px; object-fit:cover; box-shadow:0 0 10px rgba(0,0,0,.05); }
.product-container .details-section { flex:1.2; padding-right:20px; }
.product-name { font-size:28px; font-weight:bold; margin-bottom:10px; color:#333; }
.prod-badges { display:flex; gap:.5rem; margin-bottom:1rem; }
.product-description { font-size:15px; color:#555; margin-bottom:20px; line-height:1.6; }
.info-row { display:flex; gap:20px; align-items:center; margin-bottom:10px; }
.price { font-size:22px; font-weight:bold; color:#2e7d32; }
.rating { font-size:16px; color:#f9a825; }
.available-weight { font-size:14px; color:#666; margin-bottom:20px; }
.prod-meta { list-style:none; padding:0; margin:0 0 1.5rem; color:#555; font-size:.9rem; }
.prod-meta li { margin-bottom:.4rem; display:flex; align-items:center; gap:.5rem; }
.prod-meta i { color:#2e7d32; width:18px; }
.qty-row { display:flex; align-items:center; gap:.75rem; margin-bottom:1rem; }
.qty-row input { width:120px; padding:.55rem .7rem; border:1px solid #cfd8dc; border-radius:8px; }
.action-buttons { display:flex; gap:16px; }
.buy-now-btn { background:#2e7d32; color:#fff; padding:12px 28px; font-size:15px; border:none; border-radius:25px; cursor:pointer; font-weight:600; }
.buy-now-btn:hover { background:#1b5e20; }
.contact-btn { background:transparent; color:#2e7d32; padding:12px 28px; font-size:15px; border:2px solid #2e7d32; border-radius:25px; cursor:pointer; font-weight:600; text-decoration:none; }
.back-link { display:inline-block; max-width:1200px; margin:20px auto 0; color:#666; font-size:.9rem; }
@media (max-width:768px){ .product-container { flex-direction:column; } }

/* ---------- Print (NEMA manifest) ---------- */
@media print {
  .navbar, .dash-side, .footer-container, .btn-outline, .btn-taka, .btn-filled { display: none !important; }
  .dash { display: block; }
  .dash-main { padding: 0; }
  .panel { box-shadow: none; border: none; }
}

/* ---------- Language switcher ---------- */
.lang-switch { display:inline-flex; align-items:center; gap:.35rem; font-size:.82rem; font-weight:600; color:#777; }
.lang-switch i { color:#2e7d32; font-size:.9rem; }
.lang-switch a { color:#777; padding:.15rem .35rem; border-radius:5px; text-decoration:none; }
.lang-switch a:hover { color:#2e7d32; background:#e8f5e9; }
.lang-switch a.active { color:#fff; background:#2e7d32; }
