/* ── Admin-only styles (login, kanban dashboard, claim detail) ── */

/* ── Admin Nav ── */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
}
.admin-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link-muted {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
}
.nav-link-muted:hover { color: var(--fg); }
.nav-logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.nav-logout-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Admin Login ── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
}
.admin-login-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.admin-login-sub {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

/* ── Pipeline Summary Bar ── */
.pipeline-summary {
  display: flex;
  gap: 0;
  padding: 16px 32px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.pipeline-summary::-webkit-scrollbar { display: none; }
.summary-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  min-width: 90px;
}
.summary-pill:last-child { border-right: none; }
.summary-count {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}
.summary-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.summary-total .summary-count { color: var(--fg); }

/* ── Kanban Board ── */
.kanban-outer {
  overflow-x: auto;
  padding: 24px 32px 48px;
  min-height: calc(100vh - 180px);
}
.kanban-board {
  display: flex;
  gap: 16px;
  min-width: max-content;
  align-items: flex-start;
}
.kanban-col {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(232, 168, 56, 0.04);
}
.kanban-stage-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}
.kanban-col-count {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(232, 168, 56, 0.12);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kanban-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
}

/* Kanban Card */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.15s, transform 0.1s;
  cursor: default;
}
.kanban-card:hover { border-color: rgba(232, 168, 56, 0.35); }

.kcard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.kcard-id {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
}
.kcard-damage {
  font-size: 0.7rem;
  background: rgba(232, 168, 56, 0.1);
  border: 1px solid rgba(232, 168, 56, 0.2);
  border-radius: 100px;
  padding: 2px 8px;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}
.kcard-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.kcard-address {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kcard-contractor {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.kcard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.kcard-date {
  font-size: 0.72rem;
  color: var(--fg-muted);
}
.kcard-detail-link {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}
.kcard-detail-link:hover { text-decoration: underline; }

.kcard-move { margin-top: 2px; }
.stage-select {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0a0b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.stage-select:focus { outline: none; border-color: var(--accent); }
.stage-select:disabled { opacity: 0.5; cursor: wait; }

.kanban-empty {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

/* ── Admin Claim Detail ── */
.admin-claim-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.claim-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.claim-detail-id {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.claim-detail-name { font-size: 1rem; color: var(--fg-muted); }

.claim-detail-stage-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(232, 168, 56, 0.15);
  border: 1px solid rgba(232, 168, 56, 0.3);
  color: var(--accent);
  white-space: nowrap;
}
.claim-detail-stage-badge.stage-badge--commission_earned {
  background: rgba(100, 220, 100, 0.15);
  border-color: rgba(100, 220, 100, 0.3);
  color: #6ddc6d;
}

.claim-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Detail Card */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.detail-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 18px;
}
.detail-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 168, 56, 0.07);
  font-size: 0.9rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  color: var(--fg-muted);
  font-weight: 500;
  min-width: 110px;
  flex-shrink: 0;
}
.detail-link { color: var(--accent); text-decoration: none; }
.detail-link:hover { text-decoration: underline; }
.detail-desc { color: var(--fg-muted); line-height: 1.5; }
.damage-tag {
  font-size: 0.8rem;
  background: rgba(232, 168, 56, 0.1);
  border: 1px solid rgba(232, 168, 56, 0.2);
  border-radius: 100px;
  padding: 2px 10px;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

/* Stage Move Form */
.stage-move-form {}
.stage-move-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
}
.stage-move-select:focus { outline: none; border-color: var(--accent); }
.stage-move-status {
  margin-top: 10px;
  font-size: 0.85rem;
  min-height: 20px;
}
.stage-move-status.success { color: #6ddc6d; }
.stage-move-status.error { color: #ff7070; }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 8px;
}
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  width: 2px;
  bottom: 0;
  background: var(--border);
}
.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.timeline-dot--current {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline-content { flex: 1; }
.timeline-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-from { color: var(--fg-muted); }
.timeline-arrow { color: var(--fg-muted); font-size: 0.7rem; }
.timeline-to { color: var(--fg); }
.timeline-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-style: italic;
  margin-bottom: 4px;
}
.timeline-date {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.timeline-empty {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .claim-detail-grid { grid-template-columns: 1fr; }
  .kanban-outer { padding: 16px; }
  .pipeline-summary { padding: 12px 16px; }
  .admin-claim-wrap { padding: 24px 16px 60px; }
}
