/* Aria CyberShield — shared widget styles.
 * Light-weight, framework-free. Respects the app's existing design tokens. */

/* ── CERT-In countdown pill ─────────────────────────────── */
.certin-pill {
  display: inline-flex; gap: 10px; align-items: center;
  padding: 6px 12px; border-radius: 20px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  border: 1px solid; background: rgba(255,255,255,.02);
}
.certin-pill.idle     { border-color: #334155; color: #94a3b8; }
.certin-pill.green    { border-color: rgba(16,185,129,.4); color: #10b981; background: rgba(16,185,129,.08); }
.certin-pill.amber    { border-color: rgba(245,158,11,.4); color: #f59e0b; background: rgba(245,158,11,.08); }
.certin-pill.red      { border-color: rgba(239,68,68,.5);  color: #ef4444; background: rgba(239,68,68,.12); }
.certin-pill.breached { border-color: #ef4444; color: #fff; background: #ef4444; animation: pulse 1.2s infinite; }
.certin-pill.error    { border-color: #64748b; color: #94a3b8; }
.certin-pill .cp-label   { font-weight: 700; letter-spacing: 1px; }
.certin-pill .cp-clock   { font-weight: 700; font-size: 14px; }
.certin-pill .cp-status  { font-weight: 600; letter-spacing: .5px; }
.certin-pill .cp-deadline{ opacity: .7; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ── Risk gauge ─────────────────────────────────────────── */
.gauge-svg      { width: 140px; height: 140px; display: block; }
.gauge-empty    { font-size: 12px; color: #8b9dc3; text-align: center; padding: 40px; }
.gauge-note     { font-size: 10px; color: #f59e0b; text-align: center; margin-top: 4px; }

/* ── Residency badge ────────────────────────────────────── */
.residency-badge {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 4px 10px; border-radius: 4px; font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.3);
  color: #10b981;
}
.residency-badge.warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); color: #f59e0b; }
.residency-badge .rb-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; animation: pulse 2.4s infinite;
}

/* ── Headers card ───────────────────────────────────────── */
.sh-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #e8edf5; }
.sh-grade, .ssl-grade {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
}
.sh-grade.g-Aplus, .ssl-grade.g-Aplus { background: #10b981; color: white; }
.sh-grade.g-A, .ssl-grade.g-A         { background: #10b981; color: white; }
.sh-grade.g-B, .ssl-grade.g-B         { background: #3b82f6; color: white; }
.sh-grade.g-C, .ssl-grade.g-C         { background: #f59e0b; color: white; }
.sh-grade.g-D, .ssl-grade.g-D         { background: #ef4444; color: white; }
.sh-grade.g-F, .ssl-grade.g-F         { background: #dc2626; color: white; }
.sh-table  { width: 100%; font-size: 11px; border-collapse: collapse; }
.sh-table td { padding: 4px 6px; border-bottom: 1px solid #1a2744; color: #cbd5e1; }
.sh-table td.ok   { color: #10b981; text-align: right; font-weight: 600; }
.sh-table td.miss { color: #ef4444; text-align: right; font-weight: 600; }
.sh-foot   { font-size: 10px; color: #64748b; margin-top: 6px; font-family: 'IBM Plex Mono', monospace; }

/* ── SSL card ───────────────────────────────────────────── */
.ssl-head  { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #e8edf5; }
.ssl-dl    { display: grid; grid-template-columns: 80px 1fr; gap: 4px 12px; font-size: 11px; color: #cbd5e1; margin: 0; }
.ssl-dl dt { color: #64748b; font-family: 'IBM Plex Mono', monospace; }
.ssl-warn  { margin-top: 8px; padding: 0 0 0 16px; font-size: 11px; color: #f59e0b; }
.ssl-empty { font-size: 12px; color: #94a3b8; padding: 16px; text-align: center; }

/* ── Compliance calendar ────────────────────────────────── */
.cc-list   { list-style: none; padding: 0; margin: 0; }
.cc-entry  { display: grid; grid-template-columns: 100px 90px 1fr; gap: 12px;
             padding: 8px 12px; border-bottom: 1px solid #1a2744;
             font-size: 12px; color: #cbd5e1; align-items: center; }
.cc-entry.past { opacity: .55; }
.cc-entry.future { color: #e8edf5; }
.cc-date    { font-family: 'IBM Plex Mono', monospace; color: #00d4ff; font-weight: 600; }
.cc-reg     { font-family: 'IBM Plex Mono', monospace; font-weight: 700;
              font-size: 10px; padding: 2px 6px; border-radius: 3px;
              background: rgba(139,92,246,.15); color: #8b5cf6;
              text-align: center; }
.cc-milestone { font-size: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cc-due     { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #64748b; }
.cc-empty   { padding: 24px; text-align: center; color: #64748b; font-size: 12px; }

/* ── Compliance calendar: section headers ────────────────── */
.cc-section { margin-bottom: 10px; }
.cc-section-head {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  text-transform: uppercase; letter-spacing: 1.2px; color: #64748b;
  padding: 4px 12px; border-bottom: 1px solid #1a2744;
}
.cc-section-active .cc-section-head { color: #f59e0b; }

/* ── Compliance calendar: active live countdowns ─────────── */
.cc-active-list { padding: 4px 0; }
.cc-active {
  list-style: none;
  padding: 10px 12px; margin: 6px 8px;
  border-radius: 8px; border: 1px solid;
  background: rgba(255,255,255,.02);
  display: grid; gap: 4px;
  font-size: 12px;
}
.cc-active.cc-tier-red      { border-color: rgba(239,68,68,.5);  background: rgba(239,68,68,.10); }
.cc-active.cc-tier-orange   { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.08); }
.cc-active.cc-tier-yellow   { border-color: rgba(234,179,8,.4);  background: rgba(234,179,8,.06); }
.cc-active.cc-tier-green    { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.05); }
.cc-active.cc-tier-breached { border-color: #ef4444; background: rgba(239,68,68,.18); animation: pulse 1.2s infinite; }

.cc-active-head { display: flex; gap: 8px; align-items: center; font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.cc-active-reg  { font-weight: 700; letter-spacing: 1px; color: #e8edf5; }
.cc-active.cc-tier-red      .cc-active-reg { color: #fca5a5; }
.cc-active.cc-tier-orange   .cc-active-reg { color: #fcd34d; }
.cc-active.cc-tier-breached .cc-active-reg { color: #fff; }
.cc-active-form { color: #cbd5e1; }
.cc-active-id   { margin-left: auto; color: #64748b; }

.cc-active-line { display: flex; align-items: baseline; gap: 8px; }
.cc-active-clock {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  font-size: 18px; letter-spacing: 1px; color: #e8edf5;
  font-variant-numeric: tabular-nums;
}
.cc-active.cc-tier-red      .cc-active-clock { color: #fca5a5; }
.cc-active.cc-tier-orange   .cc-active-clock { color: #fcd34d; }
.cc-active.cc-tier-breached .cc-active-clock { color: #fff; }
.cc-active-label { font-size: 11px; color: #94a3b8; text-transform: lowercase; }

.cc-active-meta {
  display: flex; gap: 8px; align-items: center; font-size: 10px;
  font-family: 'IBM Plex Mono', monospace; color: #94a3b8; flex-wrap: wrap;
}
.cc-elapsed { color: #64748b; }
.cc-sev {
  font-weight: 700; padding: 1px 5px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .5px; font-size: 9px;
}
.cc-sev-critical { background: rgba(239,68,68,.18); color: #fca5a5; }
.cc-sev-high     { background: rgba(245,158,11,.18); color: #fcd34d; }
.cc-sev-medium   { background: rgba(234,179,8,.14);  color: #fde68a; }
.cc-sev-low      { background: rgba(16,185,129,.14); color: #6ee7b7; }
.cc-summary {
  flex: 1; min-width: 0; color: #cbd5e1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Tier accent for recurring rows (subtle left border) */
.cc-entry.cc-tier-red      { border-left: 3px solid #ef4444; padding-left: 9px; }
.cc-entry.cc-tier-orange   { border-left: 3px solid #f59e0b; padding-left: 9px; }
.cc-entry.cc-tier-yellow   { border-left: 3px solid #eab308; padding-left: 9px; }
.cc-entry.cc-tier-green    { border-left: 3px solid rgba(16,185,129,.4); padding-left: 9px; }
.cc-entry.cc-tier-breached { border-left: 3px solid #ef4444; padding-left: 9px; background: rgba(239,68,68,.06); }

/* ── Multi-regulator grid ───────────────────────────────── */
.mrg-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.mrg-card {
  padding: 12px; border-radius: 10px;
  background: rgba(255,255,255,.02); border: 1px solid #1a2744;
}
.mrg-card.mrg-green { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.06); }
.mrg-card.mrg-amber { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.06); }
.mrg-card.mrg-red   { border-color: rgba(239,68,68,.45);  background: rgba(239,68,68,.08); }
.mrg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mrg-name { font-size: 13px; font-weight: 700; color: #e8edf5; font-family: 'IBM Plex Mono', monospace; letter-spacing: .3px; }
.mrg-dot  { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mrg-dot-green  { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,.6); }
.mrg-dot-amber  { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.6); }
.mrg-dot-red    { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.6); animation: pulse 1.4s infinite; }
.mrg-dot-idle   { background: #475569; }
.mrg-summary { font-size: 11px; color: #cbd5e1; line-height: 1.5; }
.mrg-action  { font-size: 10px; color: #94a3b8; margin-top: 6px; font-family: 'IBM Plex Mono', monospace; }
.mrg-loading, .mrg-empty { padding: 18px; text-align: center; color: #64748b; font-size: 12px; font-family: 'IBM Plex Mono', monospace; }

/* ── Evidence ledger tail ───────────────────────────────── */
.elt-list { list-style: none; margin: 0; padding: 0; }
.elt-row  { display: grid; grid-template-columns: 100px 1fr auto; gap: 10px;
            padding: 6px 10px; border-bottom: 1px solid #1a2744;
            font-size: 11px; align-items: center; }
.elt-hash { font-family: 'IBM Plex Mono', monospace; color: #00d4ff; font-weight: 600; }
.elt-kind { color: #cbd5e1; }
.elt-time { color: #64748b; font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.elt-empty{ padding: 18px; text-align: center; color: #64748b; font-size: 12px; }

/* ── Advisory feed ──────────────────────────────────────── */
.af-list { list-style: none; margin: 0; padding: 0; }
.af-item { display: grid; grid-template-columns: 80px 1fr 80px; gap: 10px;
           padding: 8px 12px; border-bottom: 1px solid #1a2744;
           font-size: 12px; align-items: center; }
.af-src  { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700;
           color: #8b5cf6; padding: 2px 6px; background: rgba(139,92,246,.12);
           border-radius: 3px; text-align: center; }
.af-title{ color: #e8edf5; text-decoration: none; line-height: 1.4; }
.af-title:hover { color: #00d4ff; }
.af-date { color: #64748b; font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-align: right; }
.af-empty{ padding: 18px; text-align: center; color: #64748b; font-size: 12px; }
