/* Chiguru Books unified blue and cream palette. Loaded last so every panel shares one visual language. */
:root {
  --brand-primary: #123552;
  --brand-primary-dark: #0b2545;
  --brand-primary-light: #2f80ed;
  --brand-secondary: #f7f1e8;
  --brand-secondary-soft: #fffdf9;
  --brand-surface-blue: #eaf2ff;
  --brand-border: #e4d7c9;
  --brand-text: #203243;
  --brand-muted: #64748b;
  --primary: #123552;
  --secondary: #f7f1e8;
  --accent: #2f80ed;
  --success: #123552;
  --green: #123552;
  --mh-green: #123552;
  --mh-green-dark: #0b2545;
  --mh-green-2: #2f80ed;
  --app-green: #123552;
  --app-green-2: #2f80ed;
  --admin-brand-green: #123552;
  --admin-brand-green2: #2f80ed;
}

html, body { background-color: var(--brand-secondary) !important; color: var(--brand-text); }
a { color: var(--brand-primary); }
a:hover, a:focus { color: var(--brand-primary-light); }

/* Shared actions and Bootstrap success styles. */
.btn-success, .btn-primary, .btn-gradient, .btn-grad, .btn-machine, .btn-action, .btn-save, .btn-submit, .auth-submit,
.vendor-login-submit, .admin-action-btn, .visual-image-edit-badge {
  background: var(--brand-primary) !important;
  background-image: none !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}
.btn-success:hover, .btn-primary:hover, .btn-gradient:hover, .btn-grad:hover, .btn-machine:hover, .btn-action:hover, .btn-save:hover, .btn-submit:hover,
.auth-submit:hover, .vendor-login-submit:hover, .admin-action-btn:hover,
.visual-image-edit-badge:hover { background: var(--brand-primary-light) !important; border-color: var(--brand-primary-light) !important; }
.btn-outline-success, .btn-outline-primary { color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; background: transparent !important; }
.btn-outline-success:hover, .btn-outline-primary:hover { color: #fff !important; background: var(--brand-primary) !important; }
.text-success { color: var(--brand-primary) !important; }
.bg-success { background-color: var(--brand-primary) !important; }
.border-success { border-color: var(--brand-primary) !important; }

/* Green-themed panels, variables and component classes are remapped to blue. */
.admin-shell .sidebar, .vendor-sidebar, .customer-auth-visual, .customer-login-side,
.vendor-login-visual, .admin-login-page, .login-page {
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary)) !important;
}
.admin-shell .sidebar a.active, .vendor-sidebar nav a.active,
.vendor-sidebar nav a:hover, .admin-shell .sidebar a:hover { background: rgba(47,128,237,.22) !important; }
.admin-main, .vendor-main, .vendor-content { background: var(--brand-secondary) !important; }
.card, .v-card, .login-card, .customer-auth-card, .customer-login-form-panel { background-color: var(--brand-secondary-soft); }
.form-control:focus, .form-select:focus { border-color: var(--brand-primary-light) !important; box-shadow: 0 0 0 .2rem rgba(47,128,237,.16) !important; }

/* Customer registration/login form contrast */
.customer-login-form-panel,
.customer-login-form-panel .login-card {
  background: #fff !important;
  color: #203243 !important;
}
.customer-login-form-panel h3,
.customer-login-form-panel p,
.customer-login-form-panel label,
.customer-login-form-panel .form-label {
  color: #203243 !important;
  opacity: 1 !important;
}
.customer-login-form-panel .form-control {
  background: #fff !important;
  color: #203243 !important;
  border-color: #cbd5e1 !important;
  opacity: 1 !important;
}
.customer-login-form-panel .auth-tab {
  color: #203243 !important;
  opacity: 1 !important;
}
.customer-login-form-panel .auth-tab.active,
.customer-login-form-panel .btn-primary {
  opacity: 1 !important;
}

/* Public site surfaces. */
.site-header, .site-nav, .header-menu-row, .header-main-row { background: var(--brand-secondary) !important; }
.hero, .hero-slider-section, .page-hero, .newsletter-box { background-color: var(--brand-primary) !important; }
.section-kicker, .product-price, .market-price-row strong, .nav-link.active,
.customer-side-copy span, .customer-side-brand strong { color: var(--brand-primary) !important; }
.nav-link:after { background: var(--brand-primary-light) !important; }
.newsletter-section, .site-footer { background: var(--brand-primary-dark) !important; }
.header-menu-row .nav-link:hover, .header-menu-row .nav-link:focus,
.header-menu-row .nav-link.active { background: var(--brand-surface-blue) !important; color: var(--brand-primary) !important; }

/* Replace green status/action accents in panels while retaining red danger states. */
.status-success, .badge-success, .alert-success, .payment-action-btn.print,
[class*="success"], [class*="green"] { --bs-success: var(--brand-primary); }
.badge-success, .status-success { background-color: var(--brand-primary) !important; color: #fff !important; }

/* Accessible cream fields and borders. */
input, select, textarea, .form-control, .form-select { border-color: var(--brand-border); }
.table thead, .table-light { background: var(--brand-secondary) !important; }

/* Final pagination pass: legacy admin/vendor rules used the old green palette. */
.app-table-pagination a,
.app-table-pagination button,
.admin-table-pagination button,
.admin-visible-pagination .page-link,
.vendor-mobile-pagination .page-link,
.pagination .page-link {
  background: var(--brand-secondary-soft) !important;
  color: var(--brand-primary) !important;
  border-color: var(--brand-border) !important;
}

.app-table-pagination a:hover,
.app-table-pagination button:hover,
.admin-table-pagination button:hover,
.admin-visible-pagination .page-link:hover,
.vendor-mobile-pagination .page-link:hover,
.pagination .page-link:hover,
.admin-visible-pagination .page-item.active .page-link,
.pagination .page-item.active .page-link {
  background: var(--brand-primary) !important;
  color: #fff !important;
  border-color: var(--brand-primary) !important;
}

.app-table-pagination .active,
.admin-table-pagination button.active,
.vendor-table-pagination button.active {
  background: var(--brand-primary) !important;
  color: #fff !important;
  border-color: var(--brand-primary) !important;
}

.admin-visible-pagination .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link {
  background: var(--brand-secondary) !important;
  color: #94a3b8 !important;
  border-color: var(--brand-border) !important;
}

/* One common admin sidebar system. This intentionally comes last so legacy theme blocks cannot recolor individual menu groups. */
body .admin-shell > .sidebar,
body .admin-shell .sidebar {
  background: var(--brand-primary-dark) !important;
  color: #f7f1e8 !important;
  border-right: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 8px 0 28px rgba(11,37,69,.18) !important;
}
body .admin-shell .sidebar .brand-box,
body .admin-shell .sidebar .admin-sidebar-search .search-box,
body .admin-shell .sidebar .side-nav,
body .admin-shell .sidebar .side-group,
body .admin-shell .sidebar .side-nav > a,
body .admin-shell .sidebar .side-toggle,
body .admin-shell .sidebar .side-submenu,
body .admin-shell .sidebar .side-submenu a,
body .admin-shell .sidebar .admin-search-results a {
  background: transparent !important;
  color: #f7f1e8 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body .admin-shell .sidebar .side-nav,
body .admin-shell .sidebar .side-group,
body .admin-shell .sidebar .side-submenu {
  background: transparent !important;
}
body .admin-shell .sidebar .brand-box {
  border-bottom-color: rgba(247,241,232,.18) !important;
}
body .admin-shell .sidebar .side-nav > a,
body .admin-shell .sidebar .side-toggle,
body .admin-shell .sidebar .side-submenu a {
  margin: 4px 10px !important;
  border-radius: 10px !important;
  transition: background .18s ease, color .18s ease !important;
}
body .admin-shell .sidebar .side-nav > a:hover,
body .admin-shell .sidebar .side-nav > a.active,
body .admin-shell .sidebar .side-toggle:hover,
body .admin-shell .sidebar .side-submenu a:hover,
body .admin-shell .sidebar .side-submenu a.active,
body .admin-shell .sidebar .admin-search-results a:hover,
body .admin-shell .sidebar .admin-search-results a:focus {
  background: var(--brand-primary-light) !important;
  color: #fff !important;
  border-color: var(--brand-primary-light) !important;
  box-shadow: inset 3px 0 0 #f7f1e8 !important;
  transform: none !important;
}
body .admin-shell .sidebar .side-group.open > .side-toggle,
body .admin-shell .sidebar .side-group.active > .side-toggle {
  background: transparent !important;
  color: #f7f1e8 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body .admin-shell .sidebar .side-nav > a > i,
body .admin-shell .sidebar .side-toggle > span > i,
body .admin-shell .sidebar .side-toggle > .arrow,
body .admin-shell .sidebar .side-submenu a > i,
body .admin-shell .sidebar .admin-sidebar-search .search-box i,
body .admin-shell .sidebar .admin-sidebar-search .search-box input,
body .admin-shell .sidebar .admin-sidebar-search .search-box input::placeholder {
  color: #f7f1e8 !important;
}
body .admin-shell .sidebar .side-nav > a:hover > i,
body .admin-shell .sidebar .side-nav > a.active > i,
body .admin-shell .sidebar .side-toggle:hover > span > i,
body .admin-shell .sidebar .side-submenu a:hover > i,
body .admin-shell .sidebar .side-submenu a.active > i {
  color: #fff !important;
}
body .admin-shell .sidebar .side-group.open > .side-toggle > span > i,
body .admin-shell .sidebar .side-group.active > .side-toggle > span > i {
  color: #f7f1e8 !important;
}
/* The current page uses the cream/navy combination; only hover remains blue. */
body .admin-shell .sidebar .side-nav > a.active,
body .admin-shell .sidebar .side-submenu a.active {
  background: var(--brand-secondary) !important;
  color: var(--brand-primary) !important;
  border-color: var(--brand-border) !important;
  box-shadow: inset 3px 0 0 var(--brand-primary) !important;
}
body .admin-shell .sidebar .side-nav > a.active > i,
body .admin-shell .sidebar .side-submenu a.active > i {
  color: var(--brand-primary) !important;
}
body .admin-shell .sidebar .side-submenu {
  border-left: 1px solid rgba(247,241,232,.24) !important;
}
