/* ============================================================
   ECO-ONEBRANDHOMES — Dashboard Styles
   ============================================================ */

/* ── Dashboard Layout ── */
.dash-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #F0F4F8;
}

/* ── Sidebar ── */
.dash-sidebar {
  background: var(--dark);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--white); font-size: 1rem;
  flex-shrink: 0;
}
.user-name { font-weight: 700; color: var(--white); font-size: .9rem; }
.user-role { font-size: .72rem; color: rgba(255,255,255,.45); }
.user-verified {
  display: flex; align-items: center; gap: .3rem;
  font-size: .7rem; color: var(--green-300); margin-top: .1rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0;
}

.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.3);
  padding: .5rem 1.5rem;
  margin-top: .75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 1.5rem;
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  font-weight: 500;
  transition: all 200ms;
  position: relative;
}
.sidebar-link:hover {
  color: var(--white);
  background: rgba(255,255,255,.05);
}
.sidebar-link.active {
  color: var(--white);
  background: rgba(82,183,136,.15);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green-500);
  border-radius: 0 2px 2px 0;
}
.sidebar-icon { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--green-600);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  padding: .5rem 0;
  transition: color 200ms;
}
.sidebar-footer a:hover { color: rgba(255,255,255,.8); }

/* ── Main Content ── */
.dash-main { overflow-x: hidden; }

.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left h2 { font-size: 1.1rem; color: var(--dark); }
.topbar-left p  { font-size: .78rem; color: var(--gray-500); }

.topbar-actions { display: flex; align-items: center; gap: 1rem; }

.topbar-notif {
  position: relative;
  width: 40px; height: 40px;
  background: var(--gray-100);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: background 200ms;
}
.topbar-notif:hover { background: var(--gray-300); }
.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.dash-content { padding: 2rem; }

/* ── Overview Cards ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.overview-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--transition);
}
.overview-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.overview-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.icon-green  { background: var(--green-100); }
.icon-gold   { background: #FEF3C7; }
.icon-blue   { background: #DBEAFE; }
.icon-purple { background: #EDE9FE; }

.overview-label { font-size: .78rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.overview-value { font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1; }
.overview-change {
  display: flex; align-items: center; gap: .3rem;
  font-size: .75rem;
  margin-top: .4rem;
}
.change-up   { color: var(--success); }
.change-down { color: var(--danger); }

/* ── Bid Table ── */
.dash-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.dash-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-card-header h3 { font-size: 1rem; color: var(--dark); }
.dash-card-body { padding: 1.5rem; }

.bid-table { width: 100%; border-collapse: collapse; }
.bid-table th {
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-500);
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--gray-100);
  white-space: nowrap;
}
.bid-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: .875rem;
  vertical-align: middle;
}
.bid-table tr:last-child td { border-bottom: none; }
.bid-table tr:hover td { background: var(--gray-100); }

.property-cell { display: flex; align-items: center; gap: .875rem; }
.prop-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.prop-name { font-weight: 600; color: var(--dark); font-size: .875rem; }
.prop-type { font-size: .75rem; color: var(--gray-500); }

.amount-cell { font-weight: 700; color: var(--dark); }
.amount-cell .my-bid  { font-size: .78rem; color: var(--gray-500); font-weight: 400; }

.progress-bar-wrap { width: 100%; }
.progress-label { display: flex; justify-content: space-between; font-size: .72rem; color: var(--gray-500); margin-bottom: .3rem; }
.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
  width: 140px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--green-600), var(--green-400));
  border-radius: 3px;
  transition: width .5s ease;
}
.progress-fill.danger { background: linear-gradient(to right, var(--danger), #FCA5A5); }

.action-cell { display: flex; gap: .5rem; }

/* ── Timeline ── */
.timeline { padding: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px; top: 40px; bottom: 0;
  width: 2px;
  background: var(--gray-100);
}
.timeline-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  z-index: 1;
}
.dot-green  { background: var(--green-100); color: var(--green-700); }
.dot-gold   { background: #FEF3C7; color: #92400E; }
.dot-blue   { background: #DBEAFE; color: #1D4ED8; }
.dot-red    { background: #FEE2E2; color: var(--danger); }

.timeline-content { padding-top: .25rem; }
.timeline-title { font-weight: 600; color: var(--dark); font-size: .875rem; margin-bottom: .2rem; }
.timeline-desc  { font-size: .8rem; color: var(--gray-500); }
.timeline-time  { font-size: .72rem; color: var(--gray-300); margin-top: .3rem; }

/* ── Watchlist ── */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.watchlist-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  transition: all 200ms;
}
.watchlist-item:hover { border-color: var(--green-300); background: var(--green-100); }
.watchlist-info { flex: 1; }
.watchlist-name { font-weight: 600; color: var(--dark); font-size: .875rem; }
.watchlist-price { font-size: .8rem; color: var(--gray-500); }
.watchlist-remove { color: var(--gray-300); font-size: .875rem; cursor: pointer; transition: color 200ms; border: none; background: none; }
.watchlist-remove:hover { color: var(--danger); }

/* ── Profile Form ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.profile-grid.full { grid-template-columns: 1fr; }

/* ── Dashboard Mobile ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 52px; height: 52px;
  background: var(--green-700);
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  border: none;
  cursor: pointer;
}

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

@media (max-width: 768px) {
  .dash-wrap { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: fixed;
    left: -260px;
    top: 0; bottom: 0;
    z-index: 500;
    transition: left 300ms ease;
  }
  .dash-sidebar.open { left: 0; box-shadow: var(--shadow-xl); }
  .sidebar-toggle { display: flex; }
  .dash-topbar { padding: 0 1rem; }
  .dash-content { padding: 1rem; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .watchlist-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .overview-grid { grid-template-columns: 1fr; }
  .bid-table thead { display: none; }
  .bid-table, .bid-table tbody, .bid-table tr, .bid-table td { display: block; width: 100%; }
  .bid-table tr { border: 1px solid var(--gray-100); border-radius: var(--radius); margin-bottom: .75rem; padding: .75rem; }
  .bid-table td { padding: .3rem 0; border: none; }
  .bid-table td::before {
    content: attr(data-label);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    display: block;
    margin-bottom: .15rem;
  }
}
