/* =========================
   BASE
========================= */

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #F7F9FA;
  margin: 0;
  color: #1F2933;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   TYPOGRAPHY
========================= */

h1 {
  margin-bottom: 25px;
}

h2 {
  font-size: clamp(20px, 1.4vw, 22px);
  color: #5EBCBC;
  margin-bottom: 12px;
  font-weight: 600;
}

.metric {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
}

.label {
  font-size: 13px;
  color: #6B7280;
}

.small {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.4;
}

.split-grid h3 {
  font-size: 13px;
}

.subsection-title {
  font-size: 13px;
  font-weight: 600;
}

/* TEXTAREA (what you type) */
#adminMessageText {
  font-size: 13px;   /* adjust to 12px if you want tighter */
  line-height: 1.4;
}

/* MESSAGE BODY (actual messages) */
.message-body {
  font-size: 13px;
  line-height: 1.4;
}

/* MESSAGE META (date / admin) */
.message-meta {
  font-size: 11px;
  color: #6B7280;
}


.range-toggle {
  display: flex;
  gap: 6px;
  margin: 8px 0 12px 0;
}

.range-btn {
  background: #000000d6;
  color: #fff;
  border: none;
  padding: 4px 10px;
  font-size: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.range-btn.active {
  background: #5EBCBC;
}

.metric-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

.metric-group {
  text-align: left;
}

.lifetime-block {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

/* =========================
   STATUS COLORS
========================= */

.success { color: #3FAE9C; font-weight: 600; }
.warning { color: #D4A85A; font-weight: 600; }

/* =========================
   CARD SYSTEM
========================= */

.card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  width: 100%;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-desc {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}

/* =========================
   GRID SYSTEM (FIXED)
========================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 30px;

  grid-template-areas:
    "identity performance traffic traffic"
    "health status commission login"
    "profile profile social social"
    "stripe stripe demo demo"
    "referral referral associate associate"
    "milestone_setup milestone_setup milestone_setup milestone_setup"
    "messaging messaging notes notes";
}

/* =========================
   GRID AREA MAPPING
========================= */

.identity { grid-area: identity; }
.performance { grid-area: performance; }
.traffic-milestone { grid-area: traffic; }

.health { grid-area: health; }
.account-status { grid-area: status; }
.commission { grid-area: commission; }
.login { grid-area: login; }

.profile { grid-area: profile; }
.social { grid-area: social; }

.stripe { grid-area: stripe; }
.demo-admin { grid-area: demo; }

.referral { grid-area: referral; }
.associate { grid-area: associate; }

.milestone-admin { grid-area: milestone_setup; }
.messaging { grid-area: messaging; }
.notes { 
  grid-area: notes; 
  grid-column: span 4;
}

/* =========================
   RESPONSIVE
========================= */

/* TABLET */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 2;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;   /* 🔥 THIS FIXES IT */
  }

  .dashboard-grid > * {
    grid-area: auto;            /* 🔥 reset placement */
  }
}

  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }

/* =========================
   TABLES
========================= */

.card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.card th,
.card td {
  padding: 8px;
  border-bottom: 1px solid #E5E7EB;
  text-align: left;
}

/* =========================
   FORMS
========================= */

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  font-size: 13px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* =========================
   BUTTONS
========================= */

button {
  background: #0b0b0b;
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  border: none;
}

button:hover {
  background: #222;
}

.btn-copy {
  background: white;
  color: #1F2933;
  border: 1px solid #D1D5DB;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-copy:hover {
  background: #F3F4F6;
}



/* Button alignment (if using bottom align system) */
.card-actions {
  margin-top: auto;
  padding-top: 5px;   /* 👈 adds space above button */
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;   /* 🔥 force left alignment */
  width: auto;                   /* 🔥 prevents stretch */
  cursor: pointer;
}

.radio-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;  /* 🔥 keeps everything left */
}



/* =========================
   STATUS PILL
========================= */

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.status-active { background: #5EBCBC; }
.status-pending { background: #f1e106; }
.status-hold { background: #ef7d03; }
.status-cancelled { background: #e72a2a; }
.status-archived { background: #9CA3AF; }

/* =========================
   UTILITIES
========================= */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

.timeline {
  margin-top: 6px;
  padding-left: 0;          /* 🔥 remove indent */
  list-style: none;         /* 🔥 remove bullets */
  max-height: 180px;
  overflow-y: auto;
}

.timeline li {
  font-size: 12px;
  margin-bottom: 6px;
  color: #6B7280;
}

.timeline li {
  list-style: none;
}

/* =========================
   SWITCH
========================= */

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  background: #ccc;
  border-radius: 26px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .25s;
}

input:checked + .slider {
  background: #5EBCBC;
}

input:checked + .slider:before {
  transform: translateX(20px);
}


.demo-admin ul {
  margin: 6px 0 0 16px;
  padding: 0;
}

.demo-admin li {
  font-size: 12px;
  margin-bottom: 4px;
}

.login .radio-row span {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}


.demo-meta {
  margin-top: 8px;
}

.card-actions {
  margin-top: auto;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field {
  margin-bottom: 16px;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 🔥 THIS IS THE IMPORTANT ONE */
.inline-row input {
  flex: 0 0 65%;
}

/* RIGHT SIDE DISPLAY */
.inline-display {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  color: #111111e9;
}

/* =========================
   STATUS (ON / OFF)
========================= */

.status-pill.status-on {
    background-color: #3FAE9C;
    color: #ffffff;
}

.status-pill.status-off {
    background-color: #6B7280;
    color: #ffffff;
}

/* =========================
   BUTTONS
========================= */

.btn-primary-custom {
    background-color: #5EBCBC;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.btn-primary-custom:hover {
    background-color: #4fa5a5;
}

.btn-danger-custom {
    background-color: transparent;
    color: #D46A6A;
    border: 1px solid #D46A6A;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.btn-danger-custom:hover {
    background-color: #D46A6A;
    color: #ffffff;
}

settings-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.settings-left {
  flex: 1;
  min-width: 0;
}

.form-check-input {
  transform: scale(1.2);
}


/* =========================
   CHECK SYSTEM (GLOBAL)
========================= */

.check-block {
  margin-bottom: 18px;
}

/* 🔥 KEY: checkbox + label inline */
.check-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* checkbox */
.check-input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #5EBCBC;
}

/* label */
.check-label {
  font-weight: 600;
  font-size: 13px;
}

/* subtext */
.check-sub {
  margin-left: 26px;
  font-size: 13px;
  color: #6B7280;
}

/* warning (payout only) */
.check-warning {
  margin-left: 26px;
  margin-top: 4px;
  font-size: 12px;
  color: #D4A85A;
}

/* status */
.check-block .status {
  margin-left: 26px;
  font-size: 12px;
  margin-top: 4px;
}