/* BreezeBucks Affiliate Dashboard Pro – v1.5.2 UI */
.bb-aff-dashboard {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #111;
}

/* --- Welcome Header --- */
.bb-aff-welcome.no-card {
  text-align: center;
  padding: 6px 0 10px;
}
.bb-welcome-title {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: 4px;
}
.bb-welcome-sub {
  color: #374151;
  margin-bottom: 14px;
}

/* --- Metrics --- */
.bb-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.metric {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.metric .label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.metric .val {
  font-size: 18px;
  font-weight: 800;
}
.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  background: #f9fafb;
}

/* --- Badge --- */
.bb-badge-area {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bb-badge-inline {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.bb-badge-inline.affiliate {
  background: #1373b9;
}
.bb-badge-inline.silver-partner {
  background: #b0b0b0;
}
.bb-badge-inline.gold-partner {
  background: #d4af37;
}
.bb-badge-inline.pro-affiliate {
  background: #e5e4e2;
  color: #111;
}
.bb-badge-label {
  font-size: 12px;
  color: #6b7280;
}

/* --- Tabs --- */
.bb-aff-tabbar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}
.bb-tab {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  color: #0f172a;
  transition: all 0.2s ease;
}
.bb-tab:hover {
  background: #f9fafb;
  box-shadow: inset 0 0 0 1px #1373b91a;
  color: #1373b9; /* BreezeBucks Blue hover */
}
.bb-tab:focus {
  outline: none;
  box-shadow: 0 0 0 2px #1373b980;
  color: #1373b9;
}
.bb-tab.active {
  background: #f1f5f9;
  box-shadow: inset 0 0 0 2px #1373b933;
  color: #1373b9;
}
.bb-tab[data-tab="logout"] {
  color: #b91313;
  border-color: #f1c3c3;
}

/* --- Panels --- */
.bb-tabpanel {
  display: none;
}
.bb-tabpanel.active {
  display: block;
}

/* --- Tables --- */
.table-wrap {
  overflow: auto;
}
.bb-table {
  width: 100%;
  border-collapse: collapse;
}
.bb-table th,
.bb-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.bb-table tr:hover {
  background: #fafafa;
}

/* --- Forms --- */
.bb-form-flat label {
  display: block;
  margin: 10px 0;
}
.bb-form-flat input,
.bb-form-flat textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.bb-form-flat input[type=file] {
  padding: 4px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}
.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.note {
  color: #374151;
  font-size: 14px;
}

/* --- Buttons --- */
.btn {
  background: #e5e7eb;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: #1373b9;
  color: #fff;
}
.btn-danger-outline {
  background: #fff;
  color: #b91313;
  border: 1px solid #f1c3c3;
}
.btn:hover {
  opacity: 0.9;
}

/* --- Toasts --- */
.bb-toast {
  position: fixed;
  right: 18px;
  top: 18px;
  background: #111;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
}
.bb-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.bb-toast.success {
  background: #1373b9;
}
.bb-toast.error {
  background: #b91313;
}

/* --- Support Button --- */
#bb-support-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1373b9;
  color: #fff;
  border: none;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* --- Activity Feed --- */
#bb-aff-activity-feed {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
}
#bb-aff-activity-feed .item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f1f1f1;
}
#bb-aff-activity-feed .item:last-child {
  border-bottom: none;
}
#bb-aff-activity-feed .msg {
  font-size: 14px;
  color: #111;
}
#bb-aff-activity-feed .date {
  font-size: 12px;
  color: #6b7280;
}

/* ================================
   REPORTS GRID – MODERN RESPONSIVE
   ================================ */
.bb-report-cards.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

/* Card UI */
.bb-report-cards.modern-grid .metric {
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

/* Label */
.bb-report-cards.modern-grid .metric .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* Value */
.bb-report-cards.modern-grid .metric div[id^="stat-"] {
  font-size: 22px;
  font-weight: 700;
  color: #1b2637;
}


/* ================================
   MOBILE RESPONSIVE BEHAVIOUR
   ================================ */

/* Tablets (≤ 900px) */
@media (max-width: 900px) {
  .bb-report-cards.modern-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }
  .bb-report-cards.modern-grid .metric {
    min-height: 110px;
  }
}

/* Small Tablets / Large Phones (≤ 600px) */
@media (max-width: 600px) {
  .bb-report-cards.modern-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
  }
  .bb-report-cards.modern-grid .metric {
    padding: 14px 16px;
    min-height: 100px;
  }
}

/* Mobile Phones (≤ 420px) */
@media (max-width: 420px) {
  .bb-report-cards.modern-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bb-report-cards.modern-grid .metric div[id^="stat-"] {
    font-size: 20px;
  }
}


/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .bb-metric-row {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Logout button (match Customer Dashboard)
   ============================================================ */
.bb-aff-welcome.no-card{ text-align:left; }

.bbc-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}

.bbc-header-main{ flex:1; }

.bbc-header-actions{
  display:flex;
  justify-content:flex-end;
}

.bbc-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:10px;
  background:#0b5ed7;
  color:#fff;
  font-weight:700;
  text-decoration:none;
  line-height:1;
  white-space:nowrap;
}

.bbc-btn:hover{ opacity:.92; }

@media (max-width:600px){
  .bbc-header{ align-items:flex-start; }
}
