/* GreenUp Energy brand theme — from logo: green, orange, white, black */

:root {
  --primary: #7AC943;
  --primary-dark: #5FA832;
  --accent: #fc840f;
  --accent-dark: #e0740d;
  --light: #F7FAF3;
  --dark: #1C1C1C;
  --ink: #222222;
  --bs-primary: #7AC943;
  --bs-primary-rgb: 122, 201, 67;
  --bs-dark: #1C1C1C;
  --bs-light: #F7FAF3;
}

body {
  color: var(--ink);
  background: #ffffff;
}

/* Bootstrap primary overrides */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.btn-primary {
  color: #fff !important;
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  color: #fff !important;
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-outline-primary:hover {
  color: #fff !important;
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.bg-light { background-color: var(--light) !important; }
.bg-dark { background-color: var(--dark) !important; }

/* Orange accent CTAs (matches "Up" in logo) */
.btn-accent {
  color: #fff !important;
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}
.btn-accent:hover,
.btn-accent:focus {
  color: #fff !important;
  background-color: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
}
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }

/* Logo — tightly cropped transparent PNG, shown large and uncropped */
.brand-logo {
  height: 104px;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}
@media (max-width: 991.98px) {
  .brand-logo {
    height: 80px;
  }
}

/* Top bar — readable light text on dark */
.topbar {
  background: var(--dark);
  color: #ffffff;
  font-size: 0.875rem;
}
.topbar-item {
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
}
.topbar-item i {
  color: var(--primary);
}
.topbar-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #ffffff !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  transition: color 0.2s ease, background 0.2s ease;
}
.topbar-social:hover {
  color: var(--primary) !important;
  background: rgba(255, 255, 255, 0.06);
}

/* Site header — 3-column: logo | centered tabs | right actions */
.site-header {
  z-index: 1030;
  border-bottom: 1px solid #eef2ea;
  overflow: visible;
}
.site-header.navbar,
.site-header.navbar.sticky-top {
  overflow: visible;
  top: 0 !important;
}
.site-header .navbar-brand,
.site-header .header-brand {
  min-height: auto;
  height: auto;
  margin-right: 0;
  margin-left: 0.75rem;
  border: none !important;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  overflow: visible;
  line-height: 1;
}
/* Equal spacing: every tab/dropdown has identical side padding, no extra margins */
.site-header .navbar-nav .nav-link,
.site-header .header-center .navbar-nav > .nav-link {
  white-space: nowrap;
  margin: 0 !important;
  padding-left: 0.8rem !important;
  padding-right: 0.8rem !important;
  letter-spacing: 0.01em;
}
.site-header .navbar-nav .nav-item {
  margin: 0 !important;
}

@media (min-width: 992px) {
  /* Full-width header so Get Quote reaches the right edge (not stuck in 1320px box) */
  .site-header .header-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    width: 100%;
    max-width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  .site-header .header-brand {
    grid-column: 1;
    justify-self: start;
  }
  .site-header .header-center {
    grid-column: 2;
    justify-content: center;
    min-width: 0;
  }
  .site-header .header-right {
    grid-column: 3;
    justify-self: end;
    justify-content: flex-end;
    gap: 1.1rem;
    flex-shrink: 0;
  }
  .site-header .header-right .btn-quote {
    margin-left: 1.75rem !important;
  }
  .site-header .header-mobile-tools,
  .site-header #navbarCollapse {
    display: none !important;
  }
}

.nav-icon-link {
  color: var(--dark);
  font-size: 1.05rem;
  line-height: 1;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
}
.nav-icon-link:hover {
  color: var(--primary);
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: var(--primary) !important;
}

/* Get Quote — compact, not full-height edge button */
.btn-quote {
  height: auto !important;
  padding: 0.65rem 1.35rem !important;
  border-radius: 6px !important;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(252, 132, 15, 0.35);
}
.btn-quote:hover {
  box-shadow: 0 4px 12px rgba(252, 132, 15, 0.45);
  transform: translateY(-1px);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  font-size: 0.65rem;
  background-color: var(--accent) !important;
}

.product-card .price {
  color: var(--primary);
  font-weight: 700;
}

/* Soft section polish */
.service-icon {
  background: #fff;
  color: var(--primary);
}
.btn-lg-square.bg-primary,
.btn-square.bg-primary {
  background-color: var(--primary) !important;
}

.footer .btn-link:hover {
  color: var(--primary) !important;
}

.footer-brand-logo {
  width: 170px;
  height: auto;
  object-fit: contain;
  margin-bottom: 25px;
  display: block;
}

.whatsapp-qr-box {
  display: inline-block;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  line-height: 0;
}
.whatsapp-qr-img {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  background: #1ebe57;
  color: #fff !important;
  transform: translateY(-2px);
}
@media (max-width: 575.98px) {
  .whatsapp-float {
    right: 16px;
    bottom: 88px;
    width: 52px;
    height: 52px;
  }
}

/* Toasts + field errors */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #1c1c1c;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.92rem;
  line-height: 1.4;
}
.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.app-toast-error { background: #912018; }
.app-toast-success { background: #3f6f14; }
.app-toast-info { background: #1d4f91; }
.app-toast-msg { flex: 1; }
.app-toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0;
}
.field-error {
  display: block;
  color: #b42318;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 0.15rem rgba(180, 35, 24, 0.12);
}

.estimate-note {
  background: #fff8ec;
  border-left: 4px solid var(--accent);
  padding: 1rem;
}

/* Final CTA band: green with orange button already via btn-accent if used */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Admin */
.admin-wrap {
  min-height: 100vh;
  background: var(--light);
}
.admin-sidebar {
  min-height: 100vh;
  background: var(--dark);
}
.admin-sidebar a {
  color: #e8f5dc;
  display: block;
  padding: 0.55rem 1rem;
  text-decoration: none;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--primary);
  color: #fff;
}
.admin-sidebar .admin-logo {
  width: 150px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  display: block;
}

.admin-page-title {
  color: var(--dark);
  font-weight: 700;
  margin: 0;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.admin-card {
  background: #fff;
  border: 1px solid #e8eee3;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 2px rgba(28, 28, 28, 0.04);
}
.admin-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7a63;
  margin-bottom: 0.85rem;
}
.admin-meta-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
  color: var(--ink);
}
.admin-meta-row i {
  width: 1.1rem;
  color: var(--primary);
  margin-top: 0.2rem;
  text-align: center;
}
.admin-meta-row .label {
  display: block;
  font-size: 0.75rem;
  color: #7a8774;
  margin-bottom: 0.1rem;
}
.admin-table {
  background: #fff;
  border: 1px solid #e8eee3;
  border-radius: 12px;
  overflow: hidden;
  vertical-align: middle;
}
.admin-table thead th {
  background: #f4f7f1;
  color: #5d6b57;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: #e0e8da;
  white-space: nowrap;
}
.admin-table td {
  border-color: #eef2ea;
}
.admin-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.admin-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e0e8da;
  background: #fff;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  padding: 0;
  line-height: 1;
}
.admin-action:hover {
  background: #f4f7f1;
  color: var(--primary-dark);
  border-color: #c9dbba;
}
.admin-action-danger {
  color: #b42318;
  border-color: #f0c7c2;
}
.admin-action-danger:hover {
  background: #fff5f4;
  color: #912018;
  border-color: #e8a39b;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  background: #eef2ea;
  color: #44503f;
}
.admin-badge-pending,
.admin-badge-requested { background: #fff4e5; color: #9a5b00; }
.admin-badge-confirmed,
.admin-badge-under-review,
.admin-badge-processing { background: #e8f1ff; color: #1d4f91; }
.admin-badge-shipped,
.admin-badge-ready { background: #e7f6ef; color: #0f6b45; }
.admin-badge-delivered,
.admin-badge-accepted,
.admin-badge-active { background: #e7f5d8; color: #3f6f14; }
.admin-badge-cancelled,
.admin-badge-rejected,
.admin-badge-disabled { background: #fdecea; color: #912018; }
.admin-badge-expired { background: #f1f1f1; color: #5f5f5f; }
.admin-items-table {
  width: 100%;
  margin: 0;
}
.admin-items-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6b7a63;
  border-bottom: 1px solid #e8eee3;
  padding: 0.55rem 0;
}
.admin-items-table td {
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f3ed;
  vertical-align: middle;
}
.admin-items-table tr:last-child td { border-bottom: 0; }
.admin-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 1px dashed #dbe4d4;
  font-weight: 600;
}
.admin-total-row.grand {
  color: var(--dark);
  font-size: 1.05rem;
}
.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #5d6b57;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.admin-back:hover { color: var(--primary-dark); }
.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.admin-detail-header h2 {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--dark);
}
.admin-detail-sub {
  color: #6b7a63;
  font-size: 0.9rem;
  margin: 0;
}
