/* dashboard.css — Landlord portfolio dashboard styles.
   Uses design tokens from theme.css (:root vars). */

/* ── Body / Layout ────────────────────────────────────────────────────────── */

.dash-body {
  background: var(--offwhite);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.dash-header {
  background: var(--slate);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dash-section-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 12px;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-email {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-export:hover { background: rgba(245, 158, 11, 0.25); }

.btn-ghost-sm {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.btn-ghost-sm:hover { color: var(--white); background: rgba(255,255,255,0.07); }

/* ── Main content ────────────────────────────────────────────────────────────── */

.dash-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 32px var(--pad-x) 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dash-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* ── KPI strip ─────────────────────────────────────────────────────────────── */

.kpi-strip {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(30,41,59,0.07);
  display: flex;
  align-items: center;
  padding: 24px 36px;
  gap: 0;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--slate);
  letter-spacing: -0.03em;
  line-height: 1;
}

.kpi-attention { color: var(--amber-dim); }

.kpi-label {
  font-size: 0.78rem;
  color: var(--slate-light);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-divider {
  width: 1px;
  height: 48px;
  background: rgba(30,41,59,0.08);
  margin: 0 36px;
  flex-shrink: 0;
}

/* ── Info banner (FHL) ─────────────────────────────────────────────────────── */

.info-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-banner-icon {
  width: 28px;
  height: 28px;
  background: #3B82F6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-banner-body {
  font-size: 0.88rem;
  color: #1E3A5F;
  line-height: 1.6;
}

.info-expand-btn {
  background: none;
  border: none;
  color: #3B82F6;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  text-decoration: underline;
}

.info-expand {
  display: none;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #1E3A5F;
  line-height: 1.7;
  border-top: 1px solid #BFDBFE;
  padding-top: 12px;
}
.info-expand.open { display: block; }
.info-expand p { margin: 0 0 10px; }

.info-link {
  color: #3B82F6;
  font-weight: 600;
  text-decoration: none;
}
.info-link:hover { text-decoration: underline; }

/* ── Portfolio table ─────────────────────────────────────────────────────────── */

.portfolio-section {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(30,41,59,0.07);
  overflow: hidden;
}

.section-head {
  padding: 20px 28px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.01em;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(30,41,59,0.07);
}

.table-wrap {
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate-light);
  padding: 14px 16px;
  background: var(--offwhite);
  border-bottom: 1px solid rgba(30,41,59,0.07);
  white-space: nowrap;
}

.portfolio-table th:first-child { padding-left: 28px; }
.portfolio-table th:last-child { padding-right: 28px; }

.portfolio-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(30,41,59,0.05);
  font-size: 0.88rem;
  color: var(--slate);
  vertical-align: middle;
}

.portfolio-table td:first-child { padding-left: 28px; }
.portfolio-table td:last-child { padding-right: 28px; }

.prop-row:hover > td { background: #FAFAF9; }

.td-address { min-width: 160px; }
.prop-address { display: block; font-weight: 500; color: var(--slate); }
.prop-postcode { display: block; font-size: 0.78rem; color: var(--slate-light); margin-top: 2px; }

.td-num { font-variant-numeric: tabular-nums; font-weight: 500; }
.td-date { color: var(--slate-mid); font-size: 0.85rem; white-space: nowrap; }

/* Status badges */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-live      { background: #DCFCE7; color: #15803D; }
.status-onboarding { background: #FEF9C3; color: #A16207; }
.status-paused    { background: #F1F5F9; color: #64748B; }

/* Compliance badges */
.compliance-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red   { background: #FEE2E2; color: #B91C1C; }

/* Detail toggle button */
.btn-detail-toggle {
  background: none;
  border: 1px solid rgba(30,41,59,0.15);
  color: var(--slate-mid);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-detail-toggle:hover { background: var(--offwhite); color: var(--slate); }

/* ── Detail panel ─────────────────────────────────────────────────────────────── */

.detail-row td {
  padding: 0 !important;
  background: var(--cream) !important;
  border-bottom: 1px solid rgba(30,41,59,0.07) !important;
}

.detail-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 24px 28px;
}

.detail-col {
  padding: 0 24px;
}
.detail-col:first-child { padding-left: 0; border-right: 1px solid rgba(30,41,59,0.08); }
.detail-col:last-child  { padding-right: 0; }

