/* ==========================================================================
   BumiPesa — Clean, Simple & Modern Fintech UI/UX
   ========================================================================== */

:root {
  --bp-primary: #1b5e20;
  --bp-primary-hover: #145216;
  --bp-primary-active: #0d3d0f;
  --bp-primary-light: #e8f5e9;
  --bp-primary-gradient: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  --bp-bg: #f8f9fa;
  --bp-card-bg: #ffffff;
  --bp-text: #1a1a2e;
  --bp-muted: #6c757d;
  --bp-border: #e9ecef;
  --bp-border-input: #ced4da;
  --bp-danger: #dc3545;
  --bp-danger-light: #f8d7da;
  --bp-warning: #f59e0b;
  --bp-warning-light: #fef3c7;
  --bp-success: #198754;
  --bp-success-light: #d1e7dd;
  --bp-radius-sm: 8px;
  --bp-radius-md: 12px;
  --bp-radius-lg: 16px;
  --bp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bp-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --bp-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--bp-font);
  background: var(--bp-bg);
  min-height: 100vh;
  color: var(--bp-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Main Layout ---------------- */
.container {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 16px 90px 16px;
  min-height: 100vh;
}

.auth-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 30px 16px 60px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-header {
  text-align: center;
  padding: 20px 0 25px;
}

.logo-header img {
  height: 52px;
  object-fit: contain;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 20px;
}

.header-logo {
  height: 38px;
}

.header-greeting {
  font-size: 13px;
  color: var(--bp-muted);
}

.header-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--bp-text);
}

/* ---------------- Cards & Inputs ---------------- */
.card {
  background: var(--bp-card-bg);
  border-radius: var(--bp-radius-md);
  padding: 22px;
  box-shadow: var(--bp-shadow-sm);
  border: 1px solid var(--bp-border);
  margin-bottom: 20px;
}

.card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--bp-text);
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--bp-text);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #495057;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bp-border-input);
  border-radius: var(--bp-radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff;
  color: var(--bp-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px rgba(27,94,32,0.12);
}

.row {
  display: flex;
  gap: 12px;
}

.row .form-group {
  flex: 1;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  background: var(--bp-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--bp-radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--bp-primary-hover);
}

.btn:active {
  background: var(--bp-primary-active);
  transform: scale(0.99);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--bp-primary);
  color: var(--bp-primary);
}

.btn-outline:hover {
  background: var(--bp-primary-light);
}

.btn-danger {
  background: #e63946;
  color: #ffffff;
}

.btn-danger:hover {
  background: #d62839;
}

.link {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
}

.link a {
  color: var(--bp-primary);
  text-decoration: none;
  font-weight: 600;
}

.link a:hover {
  text-decoration: underline;
}

/* ---------------- Alerts / Flash ---------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--bp-radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  text-align: center;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--bp-success-light);
  color: #0f5132;
  border-color: #badbcc;
}

.alert-danger, .alert-error {
  background: var(--bp-danger-light);
  color: #842029;
  border-color: #f5c2c7;
}

.alert-warning {
  background: var(--bp-warning-light);
  color: #664d03;
  border-color: #ffecb5;
}

/* ---------------- Balance Card ---------------- */
.balance-card {
  background: var(--bp-primary-gradient);
  border-radius: var(--bp-radius-lg);
  padding: 24px 20px;
  color: #ffffff;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(27,94,32,0.18);
}

.balance-main {
  margin-bottom: 18px;
}

.total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  font-weight: 500;
}

.total-amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 4px;
}

.balance-row {
  display: flex;
  gap: 12px;
}

.balance-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border-radius: var(--bp-radius-sm);
  padding: 12px 14px;
}

.balance-box .label {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}

.balance-box .value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------------- Stats Grid ---------------- */
.stats-section {
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--bp-shadow-sm);
}

.stat-label {
  font-size: 12px;
  color: var(--bp-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--bp-primary);
  margin-top: 4px;
}

.stat-sub {
  font-size: 11px;
  color: #adb5bd;
  margin-top: 2px;
}

.expand-btn {
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  background: #ffffff;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-sm);
  font-size: 12px;
  color: var(--bp-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.expand-btn:hover {
  background: #f1f3f5;
}

/* ---------------- Transactions ---------------- */
.recent-section {
  margin-bottom: 20px;
}

.tx-item {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: var(--bp-radius-sm);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--bp-border);
  box-shadow: var(--bp-shadow-sm);
}

.tx-info {
  font-size: 13px;
}

.tx-name {
  font-weight: 600;
  color: var(--bp-text);
}

.tx-phone {
  font-size: 12px;
  color: var(--bp-muted);
  margin-top: 2px;
}

.tx-time {
  font-size: 11px;
  color: #adb5bd;
  margin-top: 2px;
}

.tx-amount {
  text-align: right;
}

.tx-gross {
  font-weight: 700;
  color: var(--bp-primary);
  font-size: 15px;
}

.tx-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 3px;
}

.badge-completed {
  background: #d1e7dd;
  color: #0f5132;
}

.badge-pending, .badge-inprogress, .badge-created {
  background: #fff3cd;
  color: #664d03;
}

.badge-failed, .badge-cancelled {
  background: #f8d7da;
  color: #842029;
}

.empty-tx {
  text-align: center;
  padding: 40px 20px;
  color: #adb5bd;
  font-size: 14px;
  background: #ffffff;
  border-radius: var(--bp-radius-sm);
  border: 1px solid var(--bp-border);
}

/* ---------------- Network Selector (Withdraw) ---------------- */
.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.network-btn {
  padding: 12px 6px;
  background: #ffffff;
  border: 1.5px solid var(--bp-border);
  border-radius: var(--bp-radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--bp-text);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.network-btn:hover {
  border-color: #adb5bd;
}

.network-btn.active {
  border-color: var(--bp-primary);
  background: var(--bp-primary-light);
  color: var(--bp-primary);
}

/* ---------------- Filter Pills (History) ---------------- */
.filter-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill-btn {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--bp-border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bp-text);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.pill-btn.active {
  background: var(--bp-primary);
  border-color: var(--bp-primary);
  color: #ffffff;
}

/* ---------------- Settings Contact / Info Rows ---------------- */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f5;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 13px;
  color: var(--bp-muted);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f8faf9;
  border-radius: var(--bp-radius-sm);
  text-decoration: none;
  color: var(--bp-text);
  margin-bottom: 10px;
  border: 1px solid var(--bp-border);
  transition: background 0.2s;
}

.contact-card:hover {
  background: #eef5f0;
}

.contact-card svg {
  flex-shrink: 0;
}

.api-box {
  background: #f8f9fa;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-sm);
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
  display: block;
  margin: 8px 0 14px;
  color: #212529;
}

/* ---------------- PIN Pad ---------------- */
.pin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  text-align: center;
}

.pin-icon {
  width: 72px;
  height: 72px;
  background: var(--bp-primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.pin-icon svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
}

.pin-inputs {
  display: flex;
  gap: 12px;
  margin: 24px 0 28px;
}

.pin-inputs input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid var(--bp-border-input);
  border-radius: var(--bp-radius-sm);
  background: #ffffff;
}

.pin-inputs input:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px rgba(27,94,32,0.15);
}

/* ---------------- Modal Dialogs ---------------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--bp-radius-lg);
  padding: 26px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--bp-shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--bp-muted);
  cursor: pointer;
}

/* ---------------- Bottom Navigation (Mobile) ---------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--bp-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 10px;
  z-index: 1000;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--bp-muted);
  font-size: 11px;
  padding: 4px 10px;
  transition: color 0.2s;
  font-weight: 500;
}

.bottom-nav a.active {
  color: var(--bp-primary);
}

.bottom-nav a svg {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  fill: currentColor;
}

/* ---------------- Desktop Sidebar & Layout (min-width: 768px) ---------------- */
@media (min-width: 768px) {
  body {
    display: flex;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: auto;
    width: 220px;
    flex-direction: column;
    justify-content: flex-start;
    border-top: none;
    border-right: 1px solid var(--bp-border);
    padding: 25px 0;
    gap: 4px;
    background: #ffffff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.03);
  }

  .bottom-nav::before {
    content: '';
    display: block;
    width: 140px;
    height: 48px;
    background: url('/assets/logo.png') center/contain no-repeat;
    margin: 5px auto 25px;
  }

  .bottom-nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 20px;
    margin: 2px 14px;
    border-radius: var(--bp-radius-sm);
    font-size: 14px;
    font-weight: 500;
  }

  .bottom-nav a:hover {
    background: var(--bp-primary-light);
    color: var(--bp-primary);
  }

  .bottom-nav a.active {
    background: var(--bp-primary);
    color: #ffffff;
  }

  .bottom-nav a svg {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
  }

  .container {
    max-width: 960px;
    margin-left: 230px;
    padding: 30px 40px 60px 40px;
    width: calc(100% - 230px);
  }

  .header-logo {
    display: none;
  }

  .balance-card {
    padding: 30px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
  }

  .balance-main {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
  }

  .total-amount {
    font-size: 38px;
  }

  .balance-row {
    flex: 2;
    min-width: 280px;
  }

  .stats-grid {
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 20px;
  }

  .network-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ---------------- Products / Pokea Section (HarakaPay Style) ---------------- */
.product-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin: 24px 0 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card-badge {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.badge-system {
  background: #f3f0ff;
  color: #6941c6;
}

.badge-custom {
  background: #e8f5e9;
  color: #1b5e20;
}

.product-card-body {
  padding: 18px 20px;
  flex: 1;
}

.product-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-card-price {
  font-size: 18px;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: 14px;
}

.product-stats-row {
  display: flex;
  gap: 30px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.product-stat-item {
  display: flex;
  flex-direction: column;
}

.product-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.product-stat-lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: capitalize;
}

.product-link-row {
  display: flex;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  align-items: center;
  margin-top: 10px;
}

.product-link-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #475569;
  outline: none;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-copy-btn {
  background: #1b5e20;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.product-copy-btn:hover {
  background: #145216;
}

.product-card-footer {
  display: flex;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.product-action-btn {
  flex: 1;
  padding: 12px 10px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.product-action-btn:first-child {
  border-right: 1px solid #f1f5f9;
}

.product-action-btn:hover {
  background: #f1f5f9;
}

.product-action-btn.btn-delete {
  color: #dc2626;
}

.product-action-btn.btn-delete:hover {
  background: #fee2e2;
}

/* Modals */
.bp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bp-modal-box {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bp-modal-box-lg {
  max-width: 660px;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.bp-modal-header {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 5;
}

.bp-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.bp-modal-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.bp-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bp-modal-body {
  padding: 24px;
}

/* Modal 1: Options */
.start-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.start-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.start-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.start-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.start-card-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Modal 2: System Catalog */
.catalog-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cat-tab-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-tab-btn.active {
  background: #1b5e20;
  color: #ffffff;
  border-color: #1b5e20;
}

.cat-sub-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
}

.cat-sub-btn.active {
  border-color: #1b5e20;
  color: #1b5e20;
  background: #e8f5e9;
}

.catalog-item-card {
  display: flex;
  gap: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  align-items: center;
  background: #ffffff;
}

.catalog-item-thumb {
  width: 90px;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}

.catalog-item-info {
  flex: 1;
  min-width: 0;
}

.catalog-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.catalog-item-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-item-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.catalog-item-price {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.catalog-item-badge {
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Modal 3: Layout Options */
.layout-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.layout-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.layout-card.selected {
  border-color: #1b5e20;
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.2);
}

.layout-preview-kawaida {
  background: #1b5e20;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.layout-mini-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #1b5e20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.layout-preview-popup {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
}

.layout-mini-sheet {
  background: #ffffff;
  border-radius: 6px 6px 0 0;
  padding: 6px 12px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #4338ca;
  width: 85%;
}

.layout-card-label {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: #1e293b;
}

.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
}

.upload-zone:hover {
  border-color: #1b5e20;
  background: #f0fdf4;
}

/* ---------------- Admin Dashboard Layout (Left Sidebar + Right Content) ---------------- */
.admin-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #f8fafc;
}

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
}

.admin-brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

.admin-badge {
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.admin-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.admin-nav {
  flex: 1;
  padding: 14px 0;
  overflow-y: auto;
}

.admin-nav-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  padding: 14px 20px 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 3px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  border: none;
  background: transparent;
  width: calc(100% - 24px);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-nav-item.active {
  background: #1b5e20;
  color: #ffffff;
}

.admin-nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.admin-nav-badge {
  margin-left: auto;
  background: #ea580c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.admin-nav-item.active .admin-nav-badge {
  background: #ffffff;
  color: #ea580c;
}

.admin-nav-pill {
  margin-left: auto;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.admin-nav-item.active .admin-nav-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.admin-sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.admin-logout-btn {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.admin-logout-btn:hover {
  background: #fecaca;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.admin-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.admin-body {
  padding: 24px 28px 60px;
  flex: 1;
}

.admin-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-link-btn {
  background: none;
  border: none;
  color: #1b5e20;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.admin-link-btn:hover {
  text-decoration: underline;
  color: #144716;
}

.admin-stat-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  margin: 4px 0;
}

.stat-meta {
  font-size: 12px;
  color: #64748b;
}

.text-success {
  color: #16a34a !important;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table thead tr {
  background: #f8fafc;
  color: #64748b;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.admin-table th, 
.admin-table td {
  padding: 12px 16px;
}

.admin-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}

.admin-table tbody tr:hover {
  background: #fbfcfe;
}

@media (max-width: 899px) {
  .admin-layout {
    flex-direction: column;
  }
  
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-close-btn {
    display: block;
  }

  .admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
  }
  
  .admin-overlay.open {
    display: block;
  }
  
  .admin-mobile-toggle {
    display: flex;
  }

  .admin-topbar {
    padding: 14px 16px;
  }

  .admin-body {
    padding: 16px 14px 50px;
  }
}
