/* ============================================================
   Re4ma Ambassador Dashboard — style.css v0.5.0
   Dark theme, Re4ma brand, WOW effects
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg: #1C2035;
  --bg-card: rgba(44, 51, 84, 0.65);
  --bg-card-solid: #2C3354;
  --bg-input: #232844;
  --bg-hover: #343a5e;
  --text: #FFFFFF;
  --text-secondary: #8A8FA8;
  --text-muted: #5a5f7a;
  --primary: #7CC61E;
  --primary-hover: #5A9416;
  --primary-dim: rgba(124, 198, 30, 0.10);
  --primary-glow: rgba(124, 198, 30, 0.15);
  --success: #7CC61E;
  --warning: #F5A623;
  --danger: #E74C3C;
  --danger-dim: rgba(231, 76, 60, 0.12);
  --border: rgba(58, 63, 92, 0.6);
  --border-light: #464c6e;
  --border-glow: rgba(124, 198, 30, 0.25);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(124, 198, 30, 0.12);
  --shadow-glow-strong: 0 0 40px rgba(124, 198, 30, 0.2), 0 0 80px rgba(124, 198, 30, 0.06);
  --glass: saturate(180%) blur(12px);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}


/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-right {
  text-align: right;
}

.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }


/* ============================================================
   2. LOGIN SCREEN
   ============================================================ */
.login-screen {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 198, 30, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(44, 51, 84, 0.5) 0%, transparent 50%),
    var(--bg);
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg,
    rgba(124, 198, 30, 0.03) 90deg,
    transparent 180deg,
    rgba(124, 198, 30, 0.02) 270deg,
    transparent 360deg);
  animation: loginRotate 60s linear infinite;
  pointer-events: none;
}

@keyframes loginRotate {
  to { transform: rotate(360deg); }
}

.login-screen.active {
  display: flex;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(44, 51, 84, 0.55);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 44px 36px;
  box-shadow: var(--shadow-glow-strong);
  position: relative;
  z-index: 1;
  animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo-img {
  width: 140px;
  height: auto;
  margin: 0 auto 8px;
}

.login-logo-subtitle {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-error {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--danger-dim);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}


/* ============================================================
   3. APP LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}


/* ============================================================
   4. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #1a1e33 0%, #1C2035 60%, #1a1e33 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 20px;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-img {
  width: 120px;
  height: auto;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}

.sidebar-close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: var(--primary-dim);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-dim);
  box-shadow: inset 0 0 20px rgba(124, 198, 30, 0.05);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary), 0 0 20px rgba(124, 198, 30, 0.3);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

/* Sidebar Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ============================================================
   5. MOBILE TOPBAR
   ============================================================ */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 150;
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  color: var(--text);
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--bg-hover);
}

.mobile-topbar-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  flex: 1;
}

.mobile-topbar-user {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 190;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.sidebar-overlay.visible,
.sidebar-overlay.show {
  display: block;
  opacity: 1;
}


/* Background Pattern */
.bg-pattern {
  position: fixed;
  inset: 0;
  background: url('img/pattern-dots.png') center / 500px repeat;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.app-layout {
  position: relative;
}

/* ============================================================
   6. MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse at 70% 10%, rgba(124, 198, 30, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 90%, rgba(124, 198, 30, 0.02) 0%, transparent 40%);
}


/* ============================================================
   7. SCREEN PANELS
   ============================================================ */
.screen-panel {
  display: none;
  animation: screenEnter 0.35s ease-out;
}

.screen-panel.active {
  display: block;
}

/* Screen Topbar */
.screen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.screen-title {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-user {
  font-size: 13px;
  color: var(--text-secondary);
}


/* ============================================================
   8. DASHBOARD BLOCKS
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-block {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dash-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dash-block:hover {
  box-shadow: var(--shadow-glow);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.dash-block:hover::before {
  opacity: 1;
}

.dash-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Money block */
#dash-money {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

#dash-money::before {
  opacity: 1;
}

.dash-money-amount {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(124, 198, 30, 0.2);
}

.dash-money-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.dash-money-sub {
  display: flex;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.dash-money-btn {
  margin-top: 4px;
}

/* Alerts block */
.dash-block--alerts {
  border-color: var(--border);
}

.dash-block--alerts .dash-block-title {
  color: var(--warning);
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-input);
  border-left: 3px solid var(--warning);
}

.alert-item--danger {
  border-left-color: var(--danger);
  background: var(--danger-dim);
}

.alert-item--success {
  border-left-color: var(--success);
  background: rgba(124, 198, 30, 0.08);
}

.alert-item--placeholder {
  border-left-color: var(--border);
  background: transparent;
}


/* ============================================================
   9. METRIC CARDS
   ============================================================ */
.metric-cards-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.metric-card {
  flex: 1;
  min-width: 100px;
  background: rgba(35, 40, 68, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
}

.metric-card:hover {
  border-color: var(--border-light);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-value--primary {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(124, 198, 30, 0.3);
}

.metric-value--success {
  color: var(--success);
}

.metric-value--warning {
  color: var(--warning);
}

.metric-value--danger {
  color: var(--danger);
}

.metric-value--muted {
  color: var(--text-muted);
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Large metric cards */
.metric-cards-row--lg {
  gap: 20px;
}

.metric-card--lg {
  padding: 28px 24px;
}

.metric-card--lg .metric-value {
  font-size: 36px;
}

.metric-card--lg .metric-label {
  font-size: 13px;
  margin-top: 6px;
}


/* ============================================================
   10. STRUCTURE LIST
   ============================================================ */
.structure-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.structure-member {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.structure-member:hover {
  border-color: var(--border-light);
}

.structure-member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background var(--transition);
}

.structure-member-header:hover {
  background: var(--bg-hover);
}

.structure-member-name {
  font-weight: 500;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.structure-member-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.structure-member-stats span {
  white-space: nowrap;
}

.structure-member-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.structure-member.expanded .structure-member-chevron {
  transform: rotate(90deg);
}

.structure-member-body {
  display: none;
  padding: 0 18px 14px;
  border-top: 1px solid var(--border);
}

.structure-member.expanded .structure-member-body {
  display: block;
}

/* Sub-level indentation */
.structure-member--level-1 {
  margin-left: 0;
}

.structure-member--level-2 {
  margin-left: 24px;
}

.structure-member--level-3 {
  margin-left: 48px;
}

/* View detail link */
.structure-member-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  margin-top: 8px;
  transition: color var(--transition);
}

.structure-member-detail-link:hover {
  color: var(--primary-hover);
}

/* Member cards (JS-rendered) */
.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  gap: 12px;
}

.member-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 15px rgba(124, 198, 30, 0.1);
  transform: translateX(4px);
}

.member-card--sm {
  padding: 12px 16px;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.member-stats span {
  white-space: nowrap;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}


/* ============================================================
   11. DRILL-DOWN PANEL
   ============================================================ */
.drill-down-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-card-solid);
  border-left: 1px solid var(--border-glow);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(124, 198, 30, 0.05);
  z-index: 300;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.drill-down-panel.visible,
.drill-down-panel.open {
  transform: translateX(0);
}

.drill-down-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.drill-down-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.drill-down-back:hover {
  color: var(--primary);
}

.drill-down-body {
  padding: 24px;
}

.drill-down-member-header {
  margin-bottom: 24px;
}

.drill-down-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.drill-down-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drill-down-section {
  margin-bottom: 28px;
}

.drill-down-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.drill-down-sub-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drill-down-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-xs);
  font-size: 13px;
}

.drill-down-sub-item-name {
  font-weight: 500;
}

.drill-down-sub-item-stats {
  display: flex;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}


/* ============================================================
   12. FINANCE TABS & TAB SYSTEM
   ============================================================ */
.tab-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--primary-dim);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-shadow: 0 0 10px rgba(124, 198, 30, 0.3);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: block;
}


/* ============================================================
   13. TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th {
  background: rgba(35, 40, 68, 0.8);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(44, 51, 84, 0.25);
}

.data-table tbody tr:hover {
  background: var(--primary-dim);
}

.data-table .text-right {
  text-align: right;
}

.data-table .cell-amount {
  font-family: var(--font-heading);
  font-weight: 700;
}

.data-table .cell-amount--positive {
  color: var(--success);
}

.data-table .cell-amount--negative {
  color: var(--danger);
}


/* ============================================================
   14. FORMS
   ============================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim), 0 0 15px rgba(124, 198, 30, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input[readonly] {
  opacity: 0.6;
  cursor: default;
}

.form-select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A8FA8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-select option {
  background: var(--bg-card);
  color: var(--text);
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  margin-top: 24px;
}

.form-section-title:first-child {
  margin-top: 0;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-checkbox-label {
  user-select: none;
}

/* Toggle */
.form-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
}

.form-toggle input[type="checkbox"] {
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-toggle-label {
  user-select: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}


/* ============================================================
   15. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5A9416 100%);
  color: #111;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(124, 198, 30, 0.3);
  transition: all 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #8dd42a 0%, var(--primary) 100%);
  box-shadow: 0 4px 20px rgba(124, 198, 30, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 1px 6px rgba(124, 198, 30, 0.2);
}

/* Outline */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-hover);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: var(--text);
  font-weight: 600;
}

.btn-danger:hover:not(:disabled) {
  background: #c0392b;
}

/* Sizes */
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}


/* ============================================================
   16. STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-active {
  background: rgba(124, 198, 30, 0.12);
  color: var(--success);
}

.status-pause {
  background: rgba(245, 166, 35, 0.12);
  color: var(--warning);
}

.status-removed {
  background: var(--danger-dim);
  color: var(--danger);
}

.status-error {
  background: var(--danger-dim);
  color: var(--danger);
}

.status-processing {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
}

.status-done {
  background: rgba(124, 198, 30, 0.12);
  color: var(--success);
}


/* ============================================================
   17. ROLE BADGES
   ============================================================ */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.role-ambassador {
  background: rgba(124, 198, 30, 0.12);
  color: var(--success);
}

.role-leader {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
}

.role-admin {
  background: rgba(155, 89, 182, 0.12);
  color: #9b59b6;
}

.role-finance_admin {
  background: rgba(245, 166, 35, 0.12);
  color: var(--warning);
}

/* Badge aliases (used by JS) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge--success { background: rgba(124, 198, 30, 0.15); color: var(--success); }
.badge--warning { background: rgba(245, 166, 35, 0.15); color: var(--warning); }
.badge--danger  { background: var(--danger-dim); color: var(--danger); }
.badge--info    { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.badge--primary { background: var(--primary-dim); color: var(--primary); }
.badge--role    { background: rgba(52, 152, 219, 0.12); color: #3498db; }


/* ============================================================
   18. TOAST NOTIFICATIONS
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform var(--transition-slow);
}

.toast.visible,
.toast.show {
  transform: translateX(0);
}

.toast-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(44, 51, 84, 0.9);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  min-width: 260px;
  max-width: 420px;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
}

.toast--success .toast-body {
  border-color: var(--success);
}

.toast--success .toast-icon {
  background: var(--success);
}

.toast--error .toast-body {
  border-color: var(--danger);
}

.toast--error .toast-icon {
  background: var(--danger);
}

.toast--warning .toast-body {
  border-color: var(--warning);
}

.toast--warning .toast-icon {
  background: var(--warning);
}

.toast-message {
  flex: 1;
  color: var(--text);
}


/* ============================================================
   19. LOADING OVERLAY
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 32, 53, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(58, 63, 92, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 20px rgba(124, 198, 30, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   20. CHARTS
   ============================================================ */
.chart-container {
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.chart-container:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.chart-container canvas {
  width: 100% !important;
  max-height: 340px;
}


/* ============================================================
   21. FILTERS BAR
   ============================================================ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters-search {
  flex: 1;
  min-width: 180px;
}


/* ============================================================
   22. PAYOUT FORM CARD
   ============================================================ */
.payout-form-card,
.details-form-card,
.reassign-card,
.grades-config-card,
.profile-card,
.admin-user-form {
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  box-shadow: var(--shadow);
}

.payout-bank-summary {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.offer-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.offer-status {
  margin-top: 12px;
  font-size: 13px;
}

.profile-logout {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}


/* ============================================================
   23. RESULTS SECTION
   ============================================================ */
.results-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.results-section-title:first-of-type {
  margin-top: 0;
}


/* ============================================================
   24. ADMIN USER FORM
   ============================================================ */
.admin-user-form {
  margin-top: 24px;
}


/* ============================================================
   25. SCROLLBAR (Webkit)
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}


/* ============================================================
   26. SELECTION
   ============================================================ */
::selection {
  background: var(--primary);
  color: #111;
}


/* ============================================================
   27. RESPONSIVE — Tablet (<1100px)
   ============================================================ */
@media (max-width: 1100px) {
  .dashboard-grid {
    gap: 16px;
  }

  .metric-cards-row--lg {
    gap: 14px;
  }

  .metric-card--lg {
    padding: 22px 18px;
  }

  .metric-card--lg .metric-value {
    font-size: 28px;
  }

  .drill-down-panel {
    width: 400px;
  }
}


/* ============================================================
   28. RESPONSIVE — Mobile (<900px)
   ============================================================ */
@media (max-width: 900px) {
  /* Show mobile topbar */
  .mobile-topbar {
    display: flex;
  }

  /* Sidebar: hidden off-screen, slides in */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
  }

  /* Main content: full width, add top padding for mobile topbar */
  .main-content {
    margin-left: 0;
    padding: 24px 16px;
    padding-top: calc(var(--topbar-height) + 20px);
  }

  /* Dashboard: single column */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Screen title */
  .screen-title {
    font-size: 20px;
  }

  /* Dash money */
  .dash-money-amount {
    font-size: 28px;
  }

  /* Metric cards: allow wrapping on small screens */
  .metric-cards-row {
    gap: 10px;
  }

  .metric-card {
    min-width: 80px;
    padding: 12px 10px;
  }

  .metric-value {
    font-size: 22px;
  }

  /* Large metric cards */
  .metric-cards-row--lg {
    flex-direction: column;
    gap: 10px;
  }

  .metric-card--lg {
    padding: 18px;
  }

  .metric-card--lg .metric-value {
    font-size: 28px;
  }

  /* Drill-down: full width */
  .drill-down-panel {
    width: 100%;
  }

  /* Tabs: scroll horizontal */
  .tab-buttons {
    gap: 0;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Filters */
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-search {
    min-width: unset;
  }

  /* Tables */
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Cards */
  .payout-form-card,
  .details-form-card,
  .reassign-card,
  .profile-card,
  .admin-user-form {
    max-width: 100%;
    padding: 20px;
  }

  /* Chart */
  .chart-container {
    padding: 16px;
  }

  .chart-container canvas {
    max-height: 240px;
  }

  /* Structure members */
  .structure-member-stats {
    display: none;
  }

  .structure-member--level-2 {
    margin-left: 16px;
  }

  .structure-member--level-3 {
    margin-left: 32px;
  }

  /* Topbar user badge hidden on mobile (shown in mobile-topbar) */
  .topbar-user {
    display: none;
  }

  /* Toast */
  .toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast-body {
    min-width: unset;
    max-width: 100%;
  }
}


/* ============================================================
   29. RESPONSIVE — Small Mobile (<480px)
   ============================================================ */
@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }

  .login-logo-text {
    font-size: 26px;
  }

  .dash-block {
    padding: 18px;
  }

  .dash-block-title {
    font-size: 12px;
  }

  .dash-money-amount {
    font-size: 24px;
  }

  .metric-cards-row {
    gap: 8px;
  }

  .metric-card {
    padding: 10px 8px;
    min-width: 70px;
  }

  .metric-value {
    font-size: 18px;
  }

  .metric-label {
    font-size: 10px;
  }

  .screen-title {
    font-size: 18px;
  }

  .btn {
    padding: 9px 16px;
    font-size: 13px;
  }

  .form-input,
  .form-select {
    padding: 9px 12px;
    font-size: 13px;
  }
}


/* ============================================================
   30. WOW EFFECTS — Floating Particles
   ============================================================ */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  display: none;
}

.particle--green {
  background: radial-gradient(circle, rgba(124,198,30,0.4), rgba(124,198,30,0) 70%);
}

.particle--white {
  background: radial-gradient(circle, rgba(255,255,255,0.15), rgba(255,255,255,0) 70%);
}

.particle--blue {
  background: radial-gradient(circle, rgba(52,152,219,0.2), rgba(52,152,219,0) 70%);
}

/* particleFloat removed */



/* ============================================================
   32. WOW EFFECTS — Staggered Card Entrance
   ============================================================ */
.dash-block {
  animation: cardEntrance 0.5s ease-out both;
}

.dashboard-grid .dash-block:nth-child(1) { animation-delay: 0.05s; }
.dashboard-grid .dash-block:nth-child(2) { animation-delay: 0.15s; }
.dashboard-grid .dash-block:nth-child(3) { animation-delay: 0.25s; }
.dashboard-grid .dash-block:nth-child(4) { animation-delay: 0.35s; }

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Metric cards entrance */
.metric-card {
  animation: metricPop 0.4s ease-out both;
}

.metric-cards-row .metric-card:nth-child(1) { animation-delay: 0.2s; }
.metric-cards-row .metric-card:nth-child(2) { animation-delay: 0.3s; }
.metric-cards-row .metric-card:nth-child(3) { animation-delay: 0.4s; }
.metric-cards-row .metric-card:nth-child(4) { animation-delay: 0.5s; }

@keyframes metricPop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* ============================================================
   33. WOW EFFECTS — Glowing Orbs Background
   ============================================================ */
.main-content::before,
.main-content::after {
  display: none;
}


/* ============================================================
   34. WOW EFFECTS — Count-Up Number Animation
   ============================================================ */
.metric-value,
.dash-money-amount {
  transition: color 0.3s ease;
}

.count-up {
  display: inline-block;
}


/* ============================================================
   35. WOW EFFECTS — Welcome Banner
   ============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, rgba(124,198,30,0.08), rgba(44,51,84,0.6));
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: welcomeSlide 0.6s ease-out;
  position: relative;
  overflow: hidden;
}

@keyframes welcomeSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.welcome-emoji {
  font-size: 32px;
}

.welcome-text {
  flex: 1;
}

.welcome-greeting {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.welcome-date {
  font-size: 13px;
  color: var(--text-secondary);
}


/* ============================================================
   36. WOW EFFECTS — Shimmer loading skeleton
   ============================================================ */
.shimmer {
  background: linear-gradient(90deg,
    var(--bg-card) 25%,
    rgba(124,198,30,0.08) 50%,
    var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ============================================================
   37. WOW EFFECTS — Enhanced Hover Micro-interactions
   ============================================================ */
.nav-item {
  overflow: hidden;
}

.nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-dim);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  z-index: -1;
}

.nav-item:hover::after {
  width: 200px;
  height: 200px;
  opacity: 1;
}

/* Table row hover glow */
.data-table tbody tr {
  position: relative;
}

.data-table tbody tr::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.data-table tbody tr:hover::after {
  opacity: 1;
}

/* metric card shine removed */


/* ============================================================
   38. WOW EFFECTS — Progress Bar (Finance Balance)
   ============================================================ */
.balance-progress {
  margin-top: 20px;
}

.progress-bar-container {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(35, 40, 68, 0.8);
  margin-bottom: 8px;
}

.progress-segment {
  height: 100%;
  transition: width 1s ease-out;
  position: relative;
}

.progress-segment--available {
  background: linear-gradient(90deg, var(--primary), #8dd42a);
  box-shadow: 0 0 10px rgba(124,198,30,0.4);
}

.progress-segment--processing {
  background: linear-gradient(90deg, var(--warning), #f7c948);
}

.progress-segment--paid {
  background: linear-gradient(90deg, #3498db, #5dade2);
}

.progress-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
}

.progress-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-dot--available { background: var(--primary); }
.progress-dot--processing { background: var(--warning); }
.progress-dot--paid { background: #3498db; }


.screen-panel {
  animation: screenEnter 0.35s ease-out;
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Member card stagger */
.member-card {
  animation: memberSlide 0.3s ease-out both;
}

.structure-list .member-card:nth-child(1) { animation-delay: 0.05s; }
.structure-list .member-card:nth-child(2) { animation-delay: 0.1s; }
.structure-list .member-card:nth-child(3) { animation-delay: 0.15s; }
.structure-list .member-card:nth-child(4) { animation-delay: 0.2s; }
.structure-list .member-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes memberSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}




/* ============================================================
   41. WOW EFFECTS — Demo Mode Badge
   ============================================================ */
.demo-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(124,198,30,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.demo-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* demoPulse/demoDot removed */


/* ============================================================
   42. CONTENT & COLLABORATIONS
   ============================================================ */

/* --- Trends Grid --- */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 8px 0;
}

.trend-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.trend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-glow);
}

.trend-card-preview {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.trend-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.trend-card:hover .trend-card-img {
  transform: scale(1.05);
}

.trend-card-body {
  padding: 14px 16px 16px;
}
.trend-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}
.trend-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trend-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Format Badges --- */
.format-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.format-badge--reels { background: rgba(131, 58, 180, 0.2); color: #c77dff; border: 1px solid rgba(131, 58, 180, 0.3); }
.format-badge--stories { background: rgba(245, 166, 35, 0.15); color: #f5a623; border: 1px solid rgba(245, 166, 35, 0.3); }
.format-badge--carousel { background: rgba(52, 152, 219, 0.15); color: #5dade2; border: 1px solid rgba(52, 152, 219, 0.3); }

/* --- Difficulty Badges --- */
.difficulty-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.difficulty-badge--success { background: rgba(124, 198, 30, 0.15); color: var(--success); border: 1px solid rgba(124, 198, 30, 0.3); }
.difficulty-badge--warning { background: rgba(245, 166, 35, 0.15); color: var(--warning); border: 1px solid rgba(245, 166, 35, 0.3); }
.difficulty-badge--danger { background: rgba(231, 76, 60, 0.15); color: var(--danger); border: 1px solid rgba(231, 76, 60, 0.3); }

/* --- Trend Detail Panel --- */
.trend-detail-preview {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.trend-detail-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}
.trend-detail-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  pointer-events: none;
  transition: background 0.2s ease;
}
.trend-detail-preview:hover .trend-detail-play-icon {
  background: rgba(124, 198, 30, 0.7);
}

.trend-detail-meta {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.trend-detail-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.trend-detail-post {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.85rem;
}

/* --- Checklist --- */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: rgba(124, 198, 30, 0.04); }
.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.checklist-text {
  font-size: 0.88rem;
  color: var(--text);
}
.checklist-item input:checked + .checklist-text {
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* --- Collaborations Grid --- */
.collabs-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.collab-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.collab-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.collab-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dim), rgba(124, 198, 30, 0.25));
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.collab-info { flex: 1; min-width: 0; }
.collab-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.collab-meta {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.collab-niche::after { content: ' \00B7'; margin-left: 4px; }
.collab-grade { margin-bottom: 6px; }
.collab-about {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.collab-actions {
  flex-shrink: 0;
  align-self: center;
}

/* --- Grade Badges --- */
.grade-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.grade-badge--bronze { background: rgba(176, 141, 87, 0.15); color: #b08d57; border: 1px solid rgba(176, 141, 87, 0.3); }
.grade-badge--silver { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; border: 1px solid rgba(192, 192, 192, 0.3); }
.grade-badge--gold { background: rgba(255, 215, 0, 0.15); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.3); }
.grade-badge--platinum { background: rgba(200, 220, 255, 0.15); color: #c8dcff; border: 1px solid rgba(200, 220, 255, 0.3); }

/* --- Grades Config (Admin) --- */
.grades-config-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 720px;
}

.grades-table-wrapper { margin-top: 16px; }

.grades-table .grade-row td { padding: 6px 4px; vertical-align: middle; }

.form-input--sm,
.form-select--sm {
  padding: 6px 8px;
  font-size: 0.85rem;
  height: auto;
}

.grade-input-name { min-width: 110px; }
.grade-input-min,
.grade-input-max { width: 80px; }

.grade-remove-btn {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 1rem;
}
.grade-remove-btn:hover { opacity: 1; color: #f44336; }

.grades-preview-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Suggest Form --- */
.suggest-form-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 560px;
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* --- Responsive: Content --- */
@media (max-width: 768px) {
  .trends-grid {
    grid-template-columns: 1fr;
  }
  .collab-card {
    flex-direction: column;
    align-items: stretch;
  }
  .collab-actions {
    align-self: flex-start;
    margin-top: 8px;
  }
}

/* ============================================================
   43. PRINT (hide non-essential)
   ============================================================ */
@media print {
  .sidebar,
  .mobile-topbar,
  .sidebar-overlay,
  .toast,
  .loading-overlay,
  .drill-down-panel,
  .btn,
  .filters-bar,
  .tab-buttons {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }

  body {
    background: #fff;
    color: #111;
  }

  .dash-block,
  .metric-card,
  .chart-container,
  .data-table th {
    background: #f5f5f5;
    border-color: #ddd;
    color: #111;
  }

  .metric-value,
  .dash-money-amount {
    color: #111;
  }
}
