/* =========================================
   Dirosales Dashboard (TikTok-style)
   — uses variables.css tokens
   ========================================= */

/* Base surface inherits from variables.css */
.dashboard-surface {
  background: linear-gradient(180deg, var(--color-bg), var(--panel-bg));
  color: var(--panel-text);
}

/* Links & buttons (inherit brand greens) */
a { color: var(--green-medium); text-decoration: none; }
a:hover { color: var(--green-soft); text-decoration: underline; }

.text-muted { color: var(--gray-medium) !important; }

.btn { border-radius: .9rem; }
.btn-outline-secondary {
  border-color: var(--panel-border-muted);
  color: var(--panel-text);
}
.btn-outline-secondary:hover {
  background: var(--panel-bg);
  border-color: var(--green-medium);
}
.btn-success {
  background: var(--green-medium);
  border-color: var(--green-medium);
}
.btn-success:hover {
  background: var(--green-soft);
  border-color: var(--green-soft);
}

/* ---------- Hero ---------- */
.profile-hero { padding: .9rem 0 .2rem; text-align: center; }
.profile-hero .avatar-xxl {
  width: 86px; height: 86px; border-radius: 50%;
  object-fit: cover; background: var(--panel-bg);
  border: 2px solid var(--panel-border-muted);
  box-shadow:
    0 0 0 3px var(--green-pale-transparent),
    inset 0 0 0 2px rgba(255,255,255,.02);
}
.role-badge {
  display: inline-block;
  margin-left: .4rem;
  background: var(--green-pale-transparent);
  color: var(--green-medium);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .78rem;
  vertical-align: middle;
}
.bio-text { color: var(--gray-medium); }

/* Pill buttons in hero */
.profile-hero .btn {
  border-radius: 999px !important;
  padding: .32rem 1rem;
  font-weight: 600;
}

/* ---------- Stats strip ---------- */
.profile-stats {
  background: var(--panel-bg);
  border-radius: 1rem;
  border: 1px solid var(--panel-border-muted);
  padding: .6rem .25rem;
  margin-top: .6rem;
}
.profile-stats .col-3 {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.profile-stats .stat-num { font-weight: 700; font-size: 1.06rem; }
.profile-stats .stat-label { font-size: .78rem; color: var(--gray-medium); }

/* ---------- Quick actions row ---------- */
.profile-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin: .6rem 0;
}
.profile-actions .link-secondary { color: var(--gray-medium) !important; }
.profile-actions .link-secondary:hover { color: var(--panel-text) !important; }

/* ---------- Pinned strip ---------- */
.pinned-strip { margin-top: .25rem; }
.pinned-strip .pinned-scroll {
  display: grid; grid-auto-flow: column; gap: .6rem;
  overflow-x: auto; padding-bottom: .25rem;
}
.pinned-card {
  position: relative; width: 140px; height: 140px;
  border-radius: .9rem; overflow: hidden; display: block;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border-muted);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.pinned-card img { width: 100%; height: 100%; object-fit: cover; }
.pinned-badge, .corner-badge {
  position:absolute; top:.5rem; left:.5rem;
  background: var(--color-warning);
  color:#111;
  font-size:.7rem; padding:.15rem .35rem; border-radius:.4rem;
}

/* ---------- Tabs ---------- */
.profile-tabs { list-style: none; padding-left: 0; margin: .6rem 0 0; }
.profile-tabs .nav-link {
  color: var(--panel-text); opacity:.72;
  padding: .35rem .25rem .45rem;
  text-transform: uppercase; letter-spacing: .4px; font-size: .82rem;
}
.profile-tabs .nav-link:hover { opacity:.9; }
.profile-tabs .nav-link.active {
  opacity:1; border-bottom:3px solid var(--green-medium);
  color: var(--panel-text);
}

/* ---------- Grid Cards ---------- */
.ad-card {
  display:block; border-radius:1rem; overflow:hidden; color:inherit;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border-muted);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  text-decoration: none;
}
.ad-card .ratio { background: var(--panel-bg); }
.ad-card .ad-meta { padding:.48rem .55rem; }
.ad-card .ad-title { font-weight: 600; }
.ad-card .ad-meta .text-muted { color: var(--gray-medium) !important; }

/* ---------- Bottom Nav (stays consistent with site) ---------- */
.bottom-nav {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border-muted);
  backdrop-filter: blur(6px);
}
.bottom-nav .active { color: var(--green-medium) !important; }

/* ---------- Layout width ---------- */
.container { max-width: 980px; }

/* ---------- Responsive tweaks ---------- */
@media (min-width: 768px){
  .profile-hero .avatar-xxl { width: 96px; height: 96px; }
}
/* ---------- Force 3-column grid layout ---------- */
.dashboard-surface .row-cols-3 {
  --bs-columns: 3;
}

.dashboard-surface .row-cols-3 > * {
  flex: 0 0 auto;
  width: calc(100% / 3);
}

/* Ensure proper spacing */
.dashboard-surface .g-2 {
  gap: 0.5rem;
}

/* Mobile responsive - keep 3 columns */
@media (max-width: 575.98px) {
  .dashboard-surface .row-cols-3 > * {
    width: calc(100% / 3);
  }
  .dashboard-surface .g-2 {
    gap: 0.25rem;
  }
}