/* ============================================================
   MieterScore AI — Dashboard Styles
   Ranking table, detail panel, comparison view, modals
   ============================================================ */


/* ============================================================
   1. SHARED HEADER (dashboard variant)
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}


.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--bg-subtle);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: white;
  text-decoration: none;
}


/* ============================================================
   2. DASHBOARD LAYOUT
   ============================================================ */

.dashboard {
  min-height: calc(100vh - 64px);
  background: var(--bg);
  padding: var(--space-6) 0 var(--space-10);
}

.dashboard-inner {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}


/* ============================================================
   3. OBJECT OVERVIEW CARD
   ============================================================ */

.object-overview {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  box-shadow: var(--shadow);
}

.object-overview__main {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.object-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.object-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.object-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.object-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.object-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  color: var(--text-light);
}

.object-meta-item svg {
  color: var(--text-xlight);
  flex-shrink: 0;
}

.object-meta-sep {
  color: var(--border-strong);
  font-size: 0.875rem;
}

.object-overview__status {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-shrink: 0;
}

.object-stats {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.object-stat {
  text-align: center;
}

.object-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.object-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.object-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.object-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge--active {
  background: var(--success-light);
  color: #16a34a;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}


/* ============================================================
   4. RANKING SECTION
   ============================================================ */

.ranking-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ranking-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.ranking-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.ranking-subtitle {
  font-size: 0.8rem;
  color: var(--text-xlight);
  margin: 3px 0 0;
  max-width: none;
}

.ranking-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ---- TABLE ---- */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ranking-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ranking-table thead tr {
  background: var(--bg-subtle);
}

.ranking-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.ranking-table thead th.col-score,
.ranking-table thead th:nth-child(n+5):nth-child(-n+9) {
  text-align: center;
}

.ranking-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.ranking-table tbody tr:last-child {
  border-bottom: none;
}

.ranking-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.ranking-table tbody tr:hover {
  background: var(--accent-light);
}

.ranking-table tbody tr.is-selected {
  background: #eff6ff;
}

.ranking-table tbody tr.is-active {
  background: var(--accent-light);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ranking-table td {
  padding: 14px 14px;
  vertical-align: middle;
}

.col-check {
  width: 44px;
  text-align: center !important;
}

.col-rank {
  width: 56px;
}

.col-name {
  min-width: 180px;
}

.col-score {
  width: 110px;
  text-align: center;
}

.col-status {
  width: 130px;
}

/* Checkboxes */
.ranking-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Rank number */
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-1 { background: #fef9c3; color: #854d0e; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #fef3ec; color: #9a3412; }
.rank-4 { background: var(--bg-subtle); color: var(--text-light); }

/* Name cell with avatar */
.applicant-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.applicant-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.applicant-employer {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* Score circle (inline in table) */
.score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 auto;
}

.score-circle--excellent { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }
.score-circle--good      { border-color: #22c55e; color: #15803d; background: #f0fdf4; }
.score-circle--medium    { border-color: #f59e0b; color: #b45309; background: #fffbeb; }
.score-circle--weak      { border-color: #f97316; color: #c2410c; background: #fff7ed; }
.score-circle--critical  { border-color: #ef4444; color: #dc2626; background: #fef2f2; }

/* Category indicators */
.cat-indicator {
  display: block;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  cursor: help;
}

/* Status badges in table */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill--empfohlen { background: #dcfce7; color: #15803d; }
.status-pill--pruefen   { background: #fef9c3; color: #854d0e; }
.status-pill--risiko    { background: #fee2e2; color: #dc2626; }
.status-pill--neu       { background: #dbeafe; color: #1d4ed8; }


/* ============================================================
   5. DETAIL PANEL
   ============================================================ */

.detail-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Detail header */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--primary);
  color: white;
}

.detail-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  border: 3px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.detail-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.detail-meta-item {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.detail-score-block {
  text-align: center;
}

.detail-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  margin: 0 auto 6px;
}

.detail-score-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.detail-score-label {
  font-size: 0.625rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-score-tier {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.detail-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}

.btn-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Detail body */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.detail-col {
  padding: var(--space-5) var(--space-6);
  border-right: 1px solid var(--border);
}

.detail-col:last-child,
.detail-col:nth-child(even) {
  border-right: none;
}

.detail-col + .detail-col {
  border-left: 1px solid var(--border);
}

.detail-section {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-4);
}

.detail-section-icon {
  font-size: 1rem;
}

/* Score breakdown bars */
.score-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  align-items: center;
  gap: var(--space-3);
}

.score-bar-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}

.score-bar-track {
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.score-bar-fill--green  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.score-bar-fill--yellow { background: linear-gradient(90deg, #d97706, #f59e0b); }
.score-bar-fill--red    { background: linear-gradient(90deg, #dc2626, #ef4444); }

.score-bar-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* Documents section */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.doc-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-icon {
  font-size: 1rem;
}

.doc-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.doc-status--verified { background: #dcfce7; color: #15803d; }
.doc-status--pending  { background: #fef9c3; color: #854d0e; }
.doc-status--missing  { background: #fee2e2; color: #dc2626; }

/* Social proof cards */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.social-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  transition: border-color var(--transition);
}

.social-card.verified {
  border-color: #86efac;
  background: #f0fdf4;
}

.social-card.unverified {
  opacity: 0.7;
}

.social-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.social-platform {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.social-platform-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.platform-linkedin { background: #0a66c2; }
.platform-xing     { background: #006567; }
.platform-instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.platform-facebook { background: #1877f2; }

.social-verified-badge {
  font-size: 0.7rem;
  font-weight: 600;
}

.social-card-info {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Schufa summary */
.schufa-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.schufa-score-block {
  text-align: center;
  flex-shrink: 0;
}

.schufa-rating {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin: 0 auto 6px;
}

.schufa-rating--ab { background: #16a34a; }
.schufa-rating--c  { background: #d97706; }
.schufa-rating--def { background: #dc2626; }

.schufa-percent {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.schufa-details {
  flex: 1;
}

.schufa-index {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.schufa-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Red flags */
.red-flags-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.red-flag-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #991b1b;
  line-height: 1.4;
}

.red-flag-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.no-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--success-light);
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #15803d;
  font-weight: 500;
}

/* AI Recommendation */
.ai-recommendation {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border: 2px solid;
}

.ai-recommendation--green  { background: #f0fdf4; border-color: #86efac; }
.ai-recommendation--yellow { background: #fffbeb; border-color: #fde68a; }
.ai-recommendation--red    { background: #fef2f2; border-color: #fecaca; }
.ai-recommendation--blue   { background: #eff6ff; border-color: #bfdbfe; }

.ai-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.ai-rec-body {}

.ai-rec-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-xlight);
  margin-bottom: 5px;
}

.ai-rec-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  max-width: none;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid;
  white-space: nowrap;
}

.btn-action--invite {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-action--invite:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.btn-action--reject {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-light);
}

.btn-action--reject:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-action--request {
  background: var(--accent-light);
  border-color: #bfdbfe;
  color: var(--accent);
}

.btn-action--request:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Personal info grid in detail */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {}

.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-xlight);
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}


/* ============================================================
   6. COMPARISON VIEW
   ============================================================ */

.comparison-view {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slideDown 0.25s ease;
}

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.comparison-header h2 {
  font-size: 1.125rem;
  color: var(--primary);
}

.comparison-body {
  padding: var(--space-5) var(--space-6);
}

.comparison-placeholder {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--text-light);
}

.comparison-placeholder-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  opacity: 0.4;
}

/* ── Comparison: new Task-12 layout ───────────────────── */
.comparison-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.comparison-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
}

.cmp-applicant {
  flex: 0 0 160px;
}

.cmp-chart-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cmp-chart-wrap canvas {
  max-width: 400px;
  max-height: 400px;
  width: 100%;
  height: auto;
}

/* Applicant summary card */
.cmp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cmp-applicant--left .cmp-card {
  border-left: 3px solid #3b82f6;
}

.cmp-applicant--right .cmp-card {
  border-left: 3px solid #f59e0b;
}

.cmp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
}

.cmp-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.2;
}

.cmp-employer {
  font-size: 0.75rem;
  color: var(--text-light);
}

.cmp-score-circle {
  width: 56px !important;
  height: 56px !important;
  font-size: 1.1rem !important;
}

.cmp-pill {
  margin-top: var(--space-1);
}

/* Category comparison table */
.comparison-table-wrap {
  padding: 0 var(--space-6) var(--space-4);
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.cmp-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
}

.cmp-table th {
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  color: var(--text-dark);
}

.cmp-table tbody tr {
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  transition: background 0.15s;
}

.cmp-table tbody tr:hover {
  background: var(--bg-subtle);
}

.cmp-table-cat {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  font-weight: 500;
  width: 40%;
}

.cmp-table-score {
  text-align: center;
  padding: var(--space-2) var(--space-3);
  font-size: 0.9375rem;
  width: 25%;
  border-radius: var(--radius);
}

.cmp-table-arrow {
  text-align: center;
  padding: var(--space-2) var(--space-1);
  font-size: 1rem;
  font-weight: 700;
  width: 10%;
}

/* Footer */
.comparison-footer {
  display: flex;
  justify-content: center;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

@media (max-width: 700px) {
  .comparison-top {
    flex-direction: column;
  }
  .cmp-applicant {
    flex: unset;
    width: 100%;
  }
  .cmp-chart-wrap canvas {
    max-width: 340px;
  }
}


/* ============================================================
   7. MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-5);
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-success {
  text-align: center;
  padding: var(--space-5) 0;
}

.modal-success-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
}

.modal-success-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.modal-doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-5);
}

.modal-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition);
}

.modal-doc-item:hover {
  background: var(--accent-light);
  border-color: #bfdbfe;
}

.modal-doc-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
}


/* ============================================================
   8. SHARE TOAST
   ============================================================ */

.share-toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.share-toast.visible {
  transform: translateX(-50%) translateY(0);
}


/* ============================================================
   9. RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .detail-col + .detail-col {
    border-left: none;
  }
}

@media (max-width: 768px) {
  .object-overview {
    flex-direction: column;
    align-items: flex-start;
  }

  .object-overview__status {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    width: 100%;
  }

  .ranking-header {
    padding: var(--space-4) var(--space-4);
  }

  .detail-header {
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .detail-section {
    padding: var(--space-4);
  }

  .detail-score-circle {
    width: 64px;
    height: 64px;
  }

  .detail-score-number {
    font-size: 1.375rem;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    flex-direction: column;
  }

  .btn-action {
    width: 100%;
    justify-content: center;
  }

  .site-header nav .nav-link {
    display: none;
  }
}

@media (max-width: 480px) {
  .dashboard {
    padding: var(--space-4) 0 var(--space-8);
  }

  .dashboard-inner {
    padding-inline: var(--space-3);
    gap: var(--space-3);
  }

  .object-overview {
    padding: var(--space-4);
  }

  .object-icon {
    width: 44px;
    height: 44px;
    font-size: 1.375rem;
  }

  .object-title {
    font-size: 1.05rem;
  }

  .score-bar-row {
    grid-template-columns: 90px 1fr 36px;
  }
}
