/* Tenant-specific brand theming for ATC and MEPES (Domain Multi-Tenancy) */

[data-company="ATC"] .point-action-outline {
  color: #174ba3 !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline:hover,
[data-company="ATC"] .point-action-outline:active {
  background: #e8f0fd !important;
  color: #00195c !important;
  border-color: #00195c !important;
}

[data-company="ATC"] .program-page .program-hero {
  background: linear-gradient(135deg, #00195c 0%, #174ba3 100%) !important;
}

[data-company="ATC"] .program-page h2 {
  color: #00195c !important;
}

[data-company="ATC"] .program-page .program-back-link {
  color: #00195c !important;
  border-color: #dbeafe !important;
}

[data-company="ATC"] .program-page .program-back-link:hover {
  background: #e8f0fd !important;
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-tx-head strong:not(.negative) {
  color: #174ba3 !important;
}

/* =========================================================================
   ATC THEME (Blue #00195c / #174ba3 / #2e7cea / Gold #ffc42e)
   ========================================================================= */
[data-company="ATC"] {
  --mak-deep: #000f3a;
  --mak-deep-2: #00195c;
  --mak-deep-3: #174ba3;
  --mak-green: #174ba3;
  --mak-green-dark: #00195c;
  --mak-green-bright: #2e7cea;
  --mak-green-soft: #e8f0fd;
  --mak-gold: #ffc42e;
}

[data-company="ATC"] .mak-app-shell .figma-mobile-frame,
[data-company="ATC"] .mak-app-shell .figma-app-main-content {
  background: #f8fafc !important;
}

[data-company="ATC"] .mak-role-header {
  background: linear-gradient(135deg, #00195c 0%, #174ba3 100%) !important;
  box-shadow: 0 2px 10px rgba(23, 75, 163, 0.15) !important;
}

[data-company="ATC"] .mak-role-tab.active {
  color: #174ba3 !important;
}

[data-company="ATC"] .mak-role-tab-center .mak-role-tab-icon {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 60%, #d97706 100%) !important;
  color: #000f3a !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
}

[data-company="ATC"] .mak-role-mascot-btn {
  border-color: #174ba3 !important;
}

[data-company="ATC"] .dealer-identity h1 {
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-status {
  background: #e0edff !important;
  color: #0d47a1 !important;
}

[data-company="ATC"] .dealer-quota-card,
[data-company="ATC"] .dealer-quota-home-card {
  background: linear-gradient(135deg, #00195c 0%, #2e7cea 100%) !important;
  box-shadow: 0 8px 22px rgba(11, 47, 125, 0.25) !important;
}

[data-company="ATC"] .dealer-scan-cta {
  background: linear-gradient(135deg, #00195c 0%, #2e7cea 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(11, 47, 125, 0.28) !important;
}

[data-company="ATC"] .dealer-scan-cta:hover {
  background: #00195c !important;
}

[data-company="ATC"] .dealer-quick-link i {
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-history-row strong,
[data-company="ATC"] .dealer-latest-credit strong {
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-delta {
  background: #e0edff !important;
  color: #0d47a1 !important;
}

[data-company="ATC"] .btn-card-scan-gold {
  background: linear-gradient(135deg, #00195c 0%, #2e7cea 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(11, 47, 125, 0.25) !important;
}

[data-company="ATC"] .btn-card-scan-gold:hover {
  background: linear-gradient(135deg, #00195c 0%, #1f63c8 100%) !important;
}

[data-company="ATC"] .promo-banner-card.promo-season {
  background: linear-gradient(135deg, #00195c 0%, #0c347d 40%, #174ba3 100%) !important;
  box-shadow: 0 8px 20px rgba(12, 52, 125, 0.25) !important;
}

[data-company="ATC"] .see-all-link,
[data-company="ATC"] .promo-link-action {
  color: #2e7cea !important;
}

[data-company="ATC"] .point-wallet {
  background: linear-gradient(120deg, #00195c, #174ba3) !important;
}

[data-company="ATC"] .point-wallet-stats {
  background: rgba(0, 25, 92, 0.35) !important;
}

[data-company="ATC"] .point-wallet-badge-gold {
  background: #ffc42e !important;
  color: #000f3a !important;
}

[data-company="ATC"] .member-qr-link i {
  color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline {
  color: #174ba3 !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline:hover,
[data-company="ATC"] .point-action-outline:active {
  background: #e8f0fd !important;
  color: #00195c !important;
  border-color: #00195c !important;
}

[data-company="ATC"] .dealer-tx-head strong:not(.negative) {
  color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline {
  color: #174ba3 !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline:hover,
[data-company="ATC"] .point-action-outline:active {
  background: #e8f0fd !important;
  color: #00195c !important;
  border-color: #00195c !important;
}

[data-company="ATC"] .dealer-tx-head strong:not(.negative) {
  color: #174ba3 !important;
}

/* =========================================================================
   MEPES THEME (Emerald Green #017b56 / Lime #a9cf37 / #00a44e)
   ========================================================================= */
[data-company="MEPES"] {
  --mak-deep: #061a14;
  --mak-deep-2: #0a2e23;
  --mak-deep-3: #0f4031;
  --mak-green: #017b56;
  --mak-green-dark: #005e42;
  --mak-green-bright: #00a44e;
  --mak-green-soft: #e6f6f1;
}

[data-company="MEPES"] .mak-role-header {
  background: #017b56 !important;
}

[data-company="MEPES"] .mak-role-tab.active {
  color: #017b56 !important;
}

[data-company="MEPES"] .mak-role-mascot-btn {
  border-color: #017b56 !important;
}

[data-company="MEPES"] .dealer-identity h1 {
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-status {
  background: #e6f4f0 !important;
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-quota-card,
[data-company="MEPES"] .dealer-quota-home-card {
  background: linear-gradient(135deg, #013827 0%, #017b56 100%) !important;
  box-shadow: 0 6px 18px rgba(1, 123, 86, 0.22) !important;
}

[data-company="MEPES"] .dealer-scan-cta {
  background: linear-gradient(90deg, #a9cf37 0%, #74bf44 36%, #00a44e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 164, 78, 0.25) !important;
}

[data-company="MEPES"] .dealer-quick-link i {
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-history-row strong,
[data-company="MEPES"] .dealer-latest-credit strong {
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-delta {
  background: #e5f2ee !important;
  color: #017b56 !important;
}

[data-company="MEPES"] .btn-card-scan-gold {
  background: linear-gradient(90deg, #a9cf37 0%, #74bf44 36%, #00a44e 100%) !important;
  color: #ffffff !important;
}

[data-company="MEPES"] .promo-banner-card.promo-season {
  position: relative !important;
  background: linear-gradient(135deg, #013827 0%, #015e42 40%, #017b56 100%) !important;
  box-shadow: 0 8px 20px rgba(1, 123, 86, 0.22) !important;
}

[data-company="MEPES"] .promo-season-mascot {
  position: absolute !important;
  right: 12px !important;
  top: 10px !important;
  bottom: 10px !important;
  width: auto !important;
  max-width: 68px !important;
  height: calc(100% - 20px) !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  align-self: flex-end !important;
}

[data-company="MEPES"] .see-all-link,
[data-company="MEPES"] .promo-link-action {
  color: #00a44e !important;
}

[data-company="MEPES"] .point-action-outline {
  color: #017b56 !important;
  border-color: #017b56 !important;
}

[data-company="MEPES"] .point-action-outline:hover,
[data-company="MEPES"] .point-action-outline:active {
  background: #e6f6f1 !important;
  color: #015f43 !important;
  border-color: #015f43 !important;
}

[data-company="MEPES"] .program-page .program-hero {
  background: linear-gradient(135deg, #014d36 0%, #017b56 100%) !important;
}

[data-company="MEPES"] .program-page h2 {
  color: #017b56 !important;
}

[data-company="MEPES"] .program-page .program-back-link {
  color: #017b56 !important;
  border-color: #d1fae5 !important;
}

[data-company="MEPES"] .program-page .program-back-link:hover {
  background: #ecfdf5 !important;
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-tx-head strong:not(.negative) {
  color: #017b56 !important;
}

[data-company="MEPES"] .point-wallet {
  background: linear-gradient(120deg, #004430, #087856) !important;
}

[data-company="MEPES"] .point-wallet--member {
  background: #fad04a !important;
  color: #1f2a24 !important;
}

[data-company="MEPES"] .point-wallet--member .point-wallet-badge {
  background: #017b56 !important;
  color: #fff !important;
}

[data-company="MEPES"] .point-wallet--member .point-wallet-stats {
  background: #017b56 !important;
}

[data-company="MEPES"] .member-qr-link i {
  color: #017b56 !important;
}

[data-company="ATC"] .point-action-outline {
  color: #174ba3 !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline:hover,
[data-company="ATC"] .point-action-outline:active {
  background: #e8f0fd !important;
  color: #00195c !important;
  border-color: #00195c !important;
}

[data-company="ATC"] .dealer-tx-head strong:not(.negative) {
  color: #174ba3 !important;
}

/* =========================================================================
   Order Management (Duyệt đơn, Đơn của tôi)
   ========================================================================= */
.dealer-filter-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.dealer-filter-tabs a,
.dealer-filter-tabs button,
.dealer-tab-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #e5f2e9 !important;
  color: #076837 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  text-align: center !important;
}

.dealer-filter-tabs .active,
.dealer-tab-btn.active {
  background: #076837 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(7, 104, 55, 0.25) !important;
}

.order-quota-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
  padding: 14px 18px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1px solid #eef1ed !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

.order-quota-row .order-quota {
  margin: 0 !important;
  font-size: 14px !important;
  color: #4b5a51 !important;
}

.order-quota-row .order-quota strong {
  color: #076837 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

.dealer-orders-reload-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #076837 !important;
  font-size: 16px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.dealer-orders-reload-btn:hover {
  background: #e5f2e9 !important;
  border-color: #076837 !important;
}

.dealer-list {
  display: grid !important;
  gap: 12px !important;
}

.order-card {
  display: block !important;
  padding: 16px 18px !important;
  background: #ffffff !important;
  border: 1px solid #eef1ed !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  text-decoration: none !important;
  color: inherit !important;
}

.order-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.order-card-farmer-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #19362a !important;
}

.order-status {
  padding: 4px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
}

.order-status-pending {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.order-status-approved {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.order-status-rejected {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.order-status-cancelled {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

.dealer-kv-box {
  display: grid !important;
  gap: 2px !important;
  padding: 10px 14px !important;
  border: 1px solid #eef1ed !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
}

.dealer-kv {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 5px 0 !important;
  font-size: 13px !important;
}

.dealer-kv+.dealer-kv {
  border-top: 1px dashed #e2e8f0 !important;
}

.dealer-kv span {
  color: #64748b !important;
}

.dealer-kv strong {
  color: #1e293b !important;
  text-align: right !important;
}

.order-card-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 13px !important;
  padding-top: 4px !important;
}

.order-total-points {
  color: #076837 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

/* --- ATC BRAND SPECIFIC --- */
[data-company="ATC"] .dealer-filter-tabs a,
[data-company="ATC"] .dealer-filter-tabs button,
[data-company="ATC"] .dealer-tab-btn {
  background: #e8f0fd !important;
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-filter-tabs .active,
[data-company="ATC"] .dealer-tab-btn.active {
  background: #174ba3 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(23, 75, 163, 0.3) !important;
}

[data-company="ATC"] .order-quota-row .order-quota strong {
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-orders-reload-btn {
  color: #174ba3 !important;
}

[data-company="ATC"] .dealer-orders-reload-btn:hover {
  background: #e8f0fd !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .order-card-farmer-title {
  color: #00195c !important;
}

[data-company="ATC"] .order-total-points {
  color: #174ba3 !important;
}

[data-company="ATC"] .order-accept {
  background: linear-gradient(135deg, #00195c 0%, #2e7cea 100%) !important;
  color: #fff !important;
}

/* --- MEPES BRAND SPECIFIC --- */
[data-company="MEPES"] .dealer-filter-tabs a,
[data-company="MEPES"] .dealer-filter-tabs button,
[data-company="MEPES"] .dealer-tab-btn {
  background: #e6f6f1 !important;
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-filter-tabs .active,
[data-company="MEPES"] .dealer-tab-btn.active {
  background: #017b56 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(1, 123, 86, 0.3) !important;
}

[data-company="MEPES"] .order-quota-row .order-quota strong {
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-orders-reload-btn {
  color: #017b56 !important;
}

[data-company="MEPES"] .dealer-orders-reload-btn:hover {
  background: #e6f6f1 !important;
  border-color: #017b56 !important;
}

[data-company="MEPES"] .order-card-farmer-title {
  color: #013827 !important;
}

[data-company="MEPES"] .order-total-points {
  color: #017b56 !important;
}

[data-company="MEPES"] .order-accept {
  background: linear-gradient(90deg, #a9cf37 0%, #74bf44 36%, #00a44e 100%) !important;
  color: #fff !important;
}

[data-company="ATC"] .point-action-outline {
  color: #174ba3 !important;
  border-color: #174ba3 !important;
}

[data-company="ATC"] .point-action-outline:hover,
[data-company="ATC"] .point-action-outline:active {
  background: #e8f0fd !important;
  color: #00195c !important;
  border-color: #00195c !important;
}

[data-company="ATC"] .dealer-tx-head strong:not(.negative) {
  color: #174ba3 !important;
}

/* =========================================================================
   Admin topbar, sidebar and brand badges
   ========================================================================= */
[data-company="ATC"] .topbar {
  background: #00195c !important;
}

[data-company="ATC"] .sidebar {
  background: #00123f !important;
}

[data-company="ATC"] .brand-badge {
  background: #2e7cea !important;
  color: #fff !important;
}

[data-company="MEPES"] .topbar {
  background: #017b56 !important;
}

[data-company="MEPES"] .sidebar {
  background: #013827 !important;
}

[data-company="MEPES"] .brand-badge {
  background: #00a44e !important;
  color: #fff !important;
}


/* ATC Menu Icons Parity */
[data-company="ATC"] .dealer-menu-icon {
  background: #e3ecfc;
  color: #00195c;
}
[data-company="ATC"] .dealer-menu-icon-red {
  background: #fdeeea !important;
  color: #c0392b !important;
}
[data-company="ATC"] .point-history-link > span:nth-child(2) {
  color: #00195c;
}
[data-company="ATC"] .dealer-row-chevron {
  color: #174ba3;
}
[data-company="ATC"] .menu-icon-wrap.text-emerald {
  background: #e3ecfc;
  color: #00195c;
}

/* MEPES Menu Icons Parity */
[data-company="MEPES"] .dealer-menu-icon {
  background: #e2f4ed;
  color: #01523a;
}
[data-company="MEPES"] .dealer-menu-icon-red {
  background: #fdeeea !important;
  color: #c0392b !important;
}
[data-company="MEPES"] .point-history-link > span:nth-child(2) {
  color: #01523a;
}
[data-company="MEPES"] .dealer-row-chevron {
  color: #017b56;
}
[data-company="MEPES"] .menu-icon-wrap.text-emerald {
  background: #e2f4ed;
  color: #01523a;
}

/* Point deltas: credits keep each company colour above, every debit is red for all companies. */
.dealer-delta.negative,
[data-company] .dealer-delta.negative {
  background: #fee7e7 !important;
  color: #dc2626 !important;
}

/* Typography colours for every member/dealer screen, all three companies:
   H1-H3 use the company's dark brand colour, small "eyebrow" labels the company colour,
   subtitles stay grey and body/values stay dark. Headings on dark/colour cards keep their own colour. */
.mak-app-shell .figma-app-main-content :is(h1, h2, h3):not([class*="hero"] *):not([class*="quota"] *):not([class*="wallet"] *):not([class*="banner"] *):not([class*="program-card"] *):not([class*="program-hero"]) {
  color: var(--mak-green-dark, #076837);
}
.mak-app-shell .figma-app-main-content [class*="eyebrow"]:not([class*="hero"] *):not([class*="quota"] *):not([class*="wallet"] *):not([class*="banner"] *):not([class*="program-card"] *) {
  color: var(--mak-green, #0a6836);
}
