/* ==========================================================================
   Cyphers Hub — CA Section Stylesheet
   Shared across: overview, issue, certificates, revocation, trust
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.ca-header {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(34,211,238,0.04));
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.ca-header::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 20% 30%, rgba(139,92,246,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.ca-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}
.ca-header-back {
  color: #64748b;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.ca-header-back:hover {
  color: #94a3b8;
}
.ca-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ca-subtitle {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
  position: relative;
}
.ca-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  position: relative;
}
.ca-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #94a3b8;
}
.ca-meta-item .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.ca-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.ca-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.ca-header-action-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Stat Cards
   -------------------------------------------------------------------------- */
.ca-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ca-stat-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  position: relative;
  transition: border-color 0.2s;
  text-decoration: none;
  display: block;
}
.ca-stat-card:hover {
  border-color: rgba(148,163,184,0.25);
}
.ca-stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.ca-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.ca-stat-card .stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Quick Actions (overview)
   -------------------------------------------------------------------------- */
.ca-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ca-quick-action {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  cursor: pointer;
}
.ca-quick-action:hover {
  border-color: rgba(34,211,238,0.3);
  background: rgba(15,23,42,0.8);
  transform: translateY(-1px);
}
.ca-quick-action .action-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ca-quick-action .action-body {
  flex: 1;
  min-width: 0;
}
.ca-quick-action .action-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.ca-quick-action .action-desc {
  font-size: 0.82rem;
  color: #94a3b8;
}
.ca-quick-action .action-arrow {
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.ca-quick-action:hover .action-arrow {
  transform: translateX(3px);
  color: #22d3ee;
}

/* --------------------------------------------------------------------------
   Activity Items (overview)
   -------------------------------------------------------------------------- */
.ca-activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(148,163,184,0.06);
}
.ca-activity-item:last-child {
  border-bottom: none;
}
.ca-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ca-activity-body {
  flex: 1;
  min-width: 0;
}
.ca-activity-desc {
  font-size: 0.82rem;
  color: #e2e8f0;
}
.ca-activity-time {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Pro Gate Overlay
   -------------------------------------------------------------------------- */
.ca-pro-gate {
  position: relative;
  overflow: hidden;
}
.ca-pro-gate-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(15,23,42,0.7);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.ca-pro-gate-content {
  text-align: center;
}
.ca-pro-gate-full {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}
.ca-pro-gate-overlay-full {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(15,23,42,0.7);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* --------------------------------------------------------------------------
   Filter Bar (certificates)
   -------------------------------------------------------------------------- */
.ca-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.ca-filter-search {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  min-width: 200px;
  flex: 1;
  max-width: 300px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.ca-filter-search:focus {
  border-color: rgba(139,92,246,0.5);
}
.ca-filter-search::placeholder {
  color: #475569;
}
.ca-filter-pills {
  display: flex;
  gap: 0.35rem;
}
.ca-filter-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.12);
  color: #94a3b8;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ca-filter-pill:hover {
  background: rgba(255,255,255,0.08);
}
.ca-filter-pill.active {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  color: #c4b5fd;
}
.ca-filter-select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

/* --------------------------------------------------------------------------
   Tables (certificates, revocation)
   -------------------------------------------------------------------------- */
.ca-table {
  width: 100%;
  border-collapse: collapse;
}
.ca-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(148,163,184,0.08);
}
.ca-table tbody tr {
  border-bottom: 1px solid rgba(148,163,184,0.05);
  transition: background 0.15s;
}
.ca-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.ca-table tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}
.ca-cert-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ca-cert-identity .ci-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(148,163,184,0.1);
  background: rgba(255,255,255,0.03);
}
.ca-cert-identity .ci-name {
  font-weight: 500;
  color: #e2e8f0;
}
.ca-cert-identity .ci-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
}
.ca-expires-normal { color: #94a3b8; }
.ca-expires-warning { color: #fbbf24; }
.ca-expires-danger { color: #f87171; }
.ca-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
}
.ca-status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.ca-status-dot.active::before { background: #34d399; }
.ca-status-dot.active { color: #34d399; }
.ca-status-dot.expiring::before { background: #fbbf24; }
.ca-status-dot.expiring { color: #fbbf24; }
.ca-status-dot.revoked::before { background: #f87171; }
.ca-status-dot.revoked { color: #f87171; }
.ca-action-btn-sm {
  background: none;
  border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ca-action-btn-sm:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(148,163,184,0.3);
}
.ca-action-btn-sm.danger {
  border-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.ca-action-btn-sm.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}
.ca-empty-table-state {
  text-align: center;
  padding: 4rem 2rem;
}
.ca-empty-table-state svg {
  margin: 0 auto 1rem;
  display: block;
  opacity: 0.4;
}
.ca-empty-table-state .title {
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}
.ca-empty-table-state .desc {
  color: #64748b;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Wizard (issue)
   -------------------------------------------------------------------------- */
.ca-wizard-container {
  max-width: 760px;
}
.ca-wizard-step {
  margin-bottom: 1rem;
}
.ca-wizard-panel {
  display: none;
}
.ca-wizard-panel.active {
  display: block;
}
.ca-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.ca-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.4);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ca-step-number.active {
  background: rgba(139,92,246,0.3);
  border-color: #8b5cf6;
  color: #c4b5fd;
}
.ca-step-number.completed {
  background: rgba(52,211,153,0.2);
  border-color: rgba(52,211,153,0.4);
  color: #34d399;
}
.ca-step-title {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}
.ca-step-title.muted {
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Identity Selection (issue)
   -------------------------------------------------------------------------- */
.ca-identity-search {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  width: 100%;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.ca-identity-search:focus {
  border-color: rgba(139,92,246,0.5);
}
.ca-identity-search::placeholder {
  color: #475569;
}
.ca-identity-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ca-identity-tab {
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(0,0,0,0.18);
  color: #cbd5e1;
  border-radius: 9px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ca-identity-tab.active {
  border-color: rgba(139,92,246,0.55);
  background: rgba(139,92,246,0.2);
  color: #f5f3ff;
}
.ca-identity-panels {
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(0,0,0,0.12);
}
.ca-identity-panel {
  display: none;
}
.ca-identity-panel.active {
  display: block;
}
.ca-identity-col-title {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
  font-weight: 600;
}
.ca-identity-list {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 0.75rem;
  border: 1px solid rgba(148,163,184,0.08);
  border-radius: 10px;
}
.ca-identity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148,163,184,0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.ca-identity-item:last-child {
  border-bottom: none;
}
.ca-identity-item:hover {
  background: rgba(139,92,246,0.06);
}
.ca-identity-item.selected {
  background: rgba(139,92,246,0.12);
  border-left: 3px solid #8b5cf6;
}
.ca-identity-item .id-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(148,163,184,0.1);
  background: rgba(255,255,255,0.03);
}
.ca-identity-item .id-info {
  flex: 1;
  min-width: 0;
}
.ca-identity-item .id-name {
  font-weight: 500;
  color: #e2e8f0;
  font-size: 0.88rem;
}
.ca-identity-item .id-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
}

/* --------------------------------------------------------------------------
   Create Inline / Entity Type (issue)
   -------------------------------------------------------------------------- */
.ca-create-inline {
  margin-top: 1rem;
  padding: 1.25rem;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
}
.ca-create-inline-title {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  font-weight: 500;
}
.ca-entity-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.ca-entity-type-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 10px;
  padding: 0.875rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.ca-entity-type-card:hover {
  border-color: rgba(148,163,184,0.25);
}
.ca-entity-type-card.selected {
  border-color: rgba(139,92,246,0.5);
  background: rgba(139,92,246,0.08);
}
.ca-entity-type-card .et-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.ca-entity-type-card .et-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}
.ca-entity-type-card.selected .et-label {
  color: #c4b5fd;
}

/* --------------------------------------------------------------------------
   Endpoint Select (issue)
   -------------------------------------------------------------------------- */
.ca-endpoint-select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  width: 100%;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.ca-endpoint-select:focus {
  border-color: rgba(139,92,246,0.5);
}

/* --------------------------------------------------------------------------
   Policy Card (issue)
   -------------------------------------------------------------------------- */
.ca-policy-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.ca-policy-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148,163,184,0.08);
}
.ca-policy-header svg {
  flex-shrink: 0;
}
.ca-policy-header-title {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.9rem;
}
.ca-policy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(148,163,184,0.05);
}
.ca-policy-row:last-child {
  border-bottom: none;
}
.ca-policy-label {
  font-size: 0.82rem;
  color: #94a3b8;
}
.ca-policy-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
}
.ca-policy-note {
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid rgba(148,163,184,0.08);
  background: rgba(0,0,0,0.15);
}

/* --------------------------------------------------------------------------
   Issue Button & Wizard Nav (issue)
   -------------------------------------------------------------------------- */
.ca-issue-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ca-issue-btn:hover:not(:disabled) {
  box-shadow: 0 0 30px rgba(139,92,246,0.5);
  transform: translateY(-1px);
}
.ca-issue-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.ca-wizard-nav {
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
}
.ca-wizard-nav .btn {
  min-width: 110px;
}
.ca-reason-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  width: 100%;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.ca-reason-input:focus {
  border-color: rgba(139,92,246,0.5);
}
.ca-reason-input::placeholder {
  color: #475569;
}

/* --------------------------------------------------------------------------
   Success Panel (issue)
   -------------------------------------------------------------------------- */
.ca-success-panel {
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: 12px;
  padding: 1.5rem;
  display: none;
}
.ca-success-panel.visible {
  display: block;
}
.ca-success-panel h3 {
  color: #34d399;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ca-download-row {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.ca-dl-btn {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  color: #34d399;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.ca-dl-btn:hover {
  background: rgba(52,211,153,0.18);
}
.ca-key-warning {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: #fbbf24;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ca-key-warning svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.ca-next-steps {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.6;
}
.ca-next-steps strong {
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Helper / Form (issue)
   -------------------------------------------------------------------------- */
.ca-form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  color: #f87171;
  font-size: 0.85rem;
  display: none;
  margin-bottom: 1rem;
}
.ca-helper-text {
  color: #94a3b8;
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
  line-height: 1.45;
}
.ca-link-btn {
  background: rgba(59,130,246,0.16);
  border: 1px solid rgba(59,130,246,0.5);
  color: #dbeafe;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
  width: 100%;
}
.ca-link-btn:hover {
  border-color: rgba(96,165,250,0.8);
  color: #ffffff;
  background: rgba(59,130,246,0.28);
}
.ca-link-btn.secondary {
  background: rgba(139,92,246,0.16);
  border-color: rgba(139,92,246,0.5);
  color: #ede9fe;
}
.ca-link-btn.secondary:hover {
  border-color: rgba(167,139,250,0.8);
  background: rgba(139,92,246,0.3);
  color: #faf5ff;
}
.ca-no-results {
  margin-top: 0.65rem;
  border: 1px dashed rgba(148,163,184,0.25);
  border-radius: 10px;
  padding: 0.65rem;
  color: #94a3b8;
  font-size: 0.76rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

/* --------------------------------------------------------------------------
   Summary Card (issue)
   -------------------------------------------------------------------------- */
.ca-summary-card {
  margin-top: 1rem;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 12px;
  background: rgba(15,23,42,0.45);
  padding: 1rem;
}
.ca-summary-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.65rem;
}
.ca-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.ca-summary-item {
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(0,0,0,0.2);
}
.ca-summary-item .k {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.ca-summary-item .v {
  font-size: 0.78rem;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  word-break: break-word;
}
.ca-summary-hint {
  font-size: 0.76rem;
  color: #94a3b8;
}
.ca-summary-hint.ready {
  color: #34d399;
}

/* --------------------------------------------------------------------------
   Status Cards (revocation)
   -------------------------------------------------------------------------- */
.ca-status-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ca-crl-status-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.25rem;
}
.ca-crl-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.ca-crl-status-header .label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ca-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.ca-status-badge.current {
  background: rgba(52,211,153,0.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.3);
}
.ca-status-badge.stale {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
}
.ca-status-badge.online {
  background: rgba(52,211,153,0.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.3);
}
.ca-status-badge.offline {
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
}
.ca-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.ca-status-badge.current::before { background: #34d399; }
.ca-status-badge.stale::before { background: #fbbf24; }
.ca-status-badge.online::before { background: #34d399; }
.ca-status-badge.offline::before { background: #f87171; }
.ca-crl-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148,163,184,0.05);
}
.ca-crl-detail-row:last-child {
  border-bottom: none;
}
.ca-crl-detail-row .dl {
  font-size: 0.78rem;
  color: #64748b;
}
.ca-crl-detail-row .dd {
  font-size: 0.75rem;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
}

/* --------------------------------------------------------------------------
   CRL Action Bar (revocation)
   -------------------------------------------------------------------------- */
.ca-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.ca-dl-format-group {
  display: flex;
  align-items: center;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.ca-dl-format-btn {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  border-right: 1px solid rgba(148,163,184,0.1);
}
.ca-dl-format-btn:last-child {
  border-right: none;
}
.ca-dl-format-btn:hover {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
}
.ca-dl-format-btn.active {
  background: rgba(34,211,238,0.12);
  color: #22d3ee;
}
.ca-regen-btn {
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  color: #fbbf24;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ca-regen-btn:hover {
  background: rgba(251,191,36,0.18);
}
.ca-search-log {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.55rem 0.875rem;
  border-radius: 8px;
  font-size: 0.82rem;
  min-width: 200px;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.ca-search-log::placeholder { color: #475569; }
.ca-search-log:focus { border-color: rgba(139,92,246,0.5); }
.ca-revoked-cn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ca-empty-revocation {
  text-align: center;
  padding: 3rem 2rem;
  color: #64748b;
}
.ca-empty-revocation svg {
  margin: 0 auto 0.75rem;
  display: block;
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   Trust Store Cards (trust)
   -------------------------------------------------------------------------- */
.ca-trust-cert-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ca-trust-cert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ca-trust-cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(139,92,246,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ca-trust-cert-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
}
.ca-trust-cert-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}
.ca-cert-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(148,163,184,0.08);
}
.ca-cert-detail-item .label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.ca-cert-detail-item .value {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e8f0;
}
.ca-cert-detail-item .value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  word-break: break-all;
}
.ca-download-buttons {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.ca-trust-dl-btn {
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: #a78bfa;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.ca-trust-dl-btn:hover {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.4);
}

/* --------------------------------------------------------------------------
   SPKI Card (trust)
   -------------------------------------------------------------------------- */
.ca-spki-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ca-spki-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ca-spki-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}
.ca-spki-hash-box {
  position: relative;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #22d3ee;
  word-break: break-all;
  margin-bottom: 0.75rem;
}
.ca-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Inter', sans-serif;
}
.ca-copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
}
.ca-spki-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Installation Guide (trust)
   -------------------------------------------------------------------------- */
.ca-install-card {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ca-install-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.ca-install-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}
.ca-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  margin-bottom: 1.25rem;
}
.ca-tab-btn {
  background: none;
  border: none;
  color: #64748b;
  padding: 0.625rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ca-tab-btn:hover {
  color: #94a3b8;
}
.ca-tab-btn.active {
  color: #22d3ee;
  border-bottom-color: #22d3ee;
}
.ca-tab-panel {
  display: none;
}
.ca-tab-panel.active {
  display: block;
}
.ca-code-block {
  position: relative;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.ca-code-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
}
.ca-code-block .comment {
  color: #64748b;
}
.ca-code-block .cmd {
  color: #22d3ee;
}
.ca-code-copy-btn {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Inter', sans-serif;
}
.ca-code-copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Bundle Card (trust)
   -------------------------------------------------------------------------- */
.ca-bundle-card {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(34,211,238,0.04));
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.ca-bundle-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ca-bundle-body {
  flex: 1;
}
.ca-bundle-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}
.ca-bundle-desc {
  font-size: 0.82rem;
  color: #64748b;
}
.ca-bundle-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.ca-bundle-btn:hover {
  box-shadow: 0 0 30px rgba(139,92,246,0.5);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Modals (certificates revoke, revocation regen)
   -------------------------------------------------------------------------- */
.ca-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.ca-modal.visible {
  display: flex;
}
.ca-modal-box {
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
}
.ca-modal-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ca-modal-box p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.ca-modal-box.warn {
  border-color: rgba(251,191,36,0.2);
}
.ca-modal-box.warn h3 {
  color: #fbbf24;
}
.ca-modal-box.danger h3 {
  color: #f87171;
}
.ca-modal-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  color: white;
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 100%;
  font-family: 'Inter', sans-serif;
  outline: none;
  margin-bottom: 1.25rem;
}
.ca-modal-input::placeholder { color: #475569; }
.ca-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Spinner animation
   -------------------------------------------------------------------------- */
@keyframes ca-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .ca-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ca-quick-actions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ca-header { padding: 1.5rem; }
  .ca-header-top { flex-direction: column; }
  .ca-filter-bar { flex-direction: column; align-items: stretch; }
  .ca-filter-search { max-width: none; }
  .ca-table { font-size: 0.8rem; }
  .ca-status-cards { grid-template-columns: 1fr; }
  .ca-action-bar { flex-wrap: wrap; }
  .ca-cert-details { grid-template-columns: 1fr; }
  .ca-bundle-card { flex-direction: column; text-align: center; }
  .ca-download-buttons { justify-content: center; }
}

@media (max-width: 600px) {
  .ca-entity-type-grid { grid-template-columns: repeat(2, 1fr); }
  .ca-download-row { flex-direction: column; }
  .ca-summary-grid { grid-template-columns: 1fr; }
  .ca-identity-tabs { flex-direction: column; }
}
