/* ── RADAR PAGE ── */
.radar-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}

.radar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 32px;
}

.radar-title {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  color: var(--slate);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.radar-sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 300;
}

/* Stats bar */
.radar-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 28px;
  flex-shrink: 0;
}

.rstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rstat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--slate);
  letter-spacing: -1px;
}

.rstat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

.rstat-div {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin: 0 24px;
}

/* Radar list */
.radar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  transition: box-shadow 0.15s;
}

.radar-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.radar-card-left {
  flex-shrink: 0;
}

.radar-urgency-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  min-width: 52px;
  text-align: center;
}

.radar-urgency-badge.normal {
  background: var(--cream-dark);
  color: var(--slate-light);
}

.radar-urgency-badge.warning {
  background: #fff3d0;
  color: var(--amber-dim);
}

.radar-urgency-badge.critical {
  background: #ffe0e0;
  color: #c0392b;
}

.radar-card-body {
  flex: 1;
  min-width: 0;
}

.radar-card-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.radar-client-name {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--slate);
  letter-spacing: -0.3px;
}

.radar-company {
  font-size: 13px;
  color: var(--muted);
}

.radar-card-meta {
  font-size: 14px;
  color: var(--slate-light);
  margin-bottom: 4px;
}

.radar-sep { margin: 0 6px; opacity: 0.4; }

.radar-expiry {
  font-size: 12px;
  color: var(--muted);
}

.radar-card-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons */
.btn-draft {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1.5px solid var(--amber);
  background: transparent;
  color: var(--amber-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-draft:hover {
  background: var(--amber);
  color: var(--white);
}

.btn-draft.btn-secondary {
  border-color: var(--border);
  color: var(--muted);
}

.btn-draft.btn-secondary:hover {
  background: var(--cream);
  color: var(--slate);
  border-color: var(--slate);
}

.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 4px;
  border: none;
  background: var(--amber);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s;
}

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

.btn-secondary {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--slate-light);
  cursor: pointer;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--slate-light);
}

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--slate); margin-bottom: 8px; }
.empty-state p { font-size: 15px; color: var(--muted); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,26,36,0.5);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 8px;
  width: 600px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--slate);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Email preview */
.email-preview { display: flex; flex-direction: column; gap: 12px; }
.email-field { display: flex; align-items: baseline; gap: 12px; }
.email-field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; min-width: 50px; }
.email-field span, .email-field input { font-size: 14px; color: var(--slate); }
.email-subject-input { width: 100%; border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px; font-size: 14px; }
.email-body-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.email-body-input { width: 100%; height: 200px; border: 1px solid var(--border); border-radius: 4px; padding: 10px; font-size: 14px; font-family: 'DM Sans', sans-serif; line-height: 1.6; resize: vertical; }

/* Loading dots */
.loading-dots { color: var(--slate-light); font-size: 15px; text-align: center; padding: 20px; }
.dot1, .dot2, .dot3 { animation: blink 1.2s infinite; }
.dot2 { animation-delay: 0.2s; }
.dot3 { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

/* Error */
.error-state { color: #c0392b; font-size: 14px; padding: 12px; background: #ffe0e0; border-radius: 4px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  animation: slideUp 0.3s ease;
}
.toast-success { background: #1a7f4b; color: white; }
.toast-error { background: #c0392b; color: white; }
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── CLIENTS PAGE ── */
.clients-page { max-width: 900px; margin: 0 auto; padding: 48px 48px 80px; }
.clients-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 40px; gap: 32px; }

.clients-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.clients-table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--cream); }
.clients-table td { padding: 14px 20px; font-size: 14px; color: var(--slate); border-bottom: 1px solid var(--border); }
.clients-table tr:last-child td { border-bottom: none; }
.clients-table tr:hover td { background: var(--cream); }

.badge { display: inline-block; background: var(--cream-dark); color: var(--slate-light); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.expiry-date { font-size: 13px; }
.expiry-date.warning { color: var(--amber-dim); font-weight: 600; }
.expiry-date.normal { color: var(--muted); }

/* Add client form */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--slate); }
.form-field input { border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.15s; }
.form-field input:focus { border-color: var(--amber); }

/* Responsive */
@media (max-width: 768px) {
  .radar-page, .clients-page { padding: 24px 24px 60px; }
  .radar-header { flex-direction: column; }
  .radar-stats { width: 100%; justify-content: center; }
  .radar-card { flex-direction: column; align-items: flex-start; }
  .radar-card-actions { width: 100%; }
  .radar-card-actions button { flex: 1; }
  .clients-table { font-size: 13px; }
}