/* Ark Secrets UI — Dark Theme (Arkana Labs branding) */
/* Arkana red: #EA1D2D  |  Dark: #C41825 */
/* Neutral dark palette — no blue tints */
/*   Page bg:     #111111  |  Surface:    #1c1c1c  */
/*   Border:      #2a2a2a  |  Subtle border: #222222  */
/*   Input bg:    #111111  |  Dim text:   #555555  */

/* ── Tab navigation ─────────────────────────────────────────────────────── */
.tab-btn {
  padding: 0.75rem 1.25rem;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: #e2e8f0; }
.tab-btn.active { color: #EA1D2D; border-bottom-color: #EA1D2D; }

/* ── Sub-tab navigation (within certs) ──────────────────────────────────── */
.sub-tab-btn {
  padding: 0.4rem 0.9rem;
  color: #94a3b8;
  border: 1px solid #2a2a2a;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.sub-tab-btn:hover { color: #e2e8f0; border-color: #3d3d3d; }
.sub-tab-btn.active { background: rgba(234,29,45,0.12); color: #EA1D2D; border-color: #EA1D2D; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.ark-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ark-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  color: #94a3b8;
  font-weight: 500;
  border-bottom: 1px solid #2a2a2a;
  background: #1c1c1c;
  white-space: nowrap;
}
.ark-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #1c1c1c;
  vertical-align: middle;
}
.ark-table tr:hover td { background: rgba(255,255,255,0.03); }
.ark-table .actions-cell { white-space: nowrap; }
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover { color: #e2e8f0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-sm {
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s;
  display: inline-block;
}
.btn-primary   { background: #3d3d3d; color: #f8fafc; }
.btn-primary:hover   { background: #4d4d4d; }
.btn-secondary { background: #2a2a2a; color: #e2e8f0; }
.btn-secondary:hover { background: #3d3d3d; }
.btn-danger    { background: #dc2626; color: white; }
.btn-danger:hover    { background: #b91c1c; }
.btn-success   { background: #16a34a; color: white; }
.btn-success:hover   { background: #15803d; }
.btn-warning   { background: #d97706; color: white; }
.btn-warning:hover   { background: #b45309; }
.btn-ghost     { background: transparent; color: #94a3b8; border: 1px solid #2a2a2a; }
.btn-ghost:hover     { background: #1c1c1c; color: #e2e8f0; }
.btn-lg {
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s;
}

/* ── Form controls ───────────────────────────────────────────────────────── */
.ark-input, .ark-textarea, .ark-select {
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}
.ark-input:focus, .ark-textarea:focus, .ark-select:focus {
  outline: none;
  border-color: #EA1D2D;
  box-shadow: 0 0 0 2px rgba(234, 29, 45, 0.18);
}
.ark-textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.ark-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}
.ark-form-group { margin-bottom: 1rem; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.ark-card {
  background: #1c1c1c;
  border-radius: 0.75rem;
  border: 1px solid #252525;
  overflow: hidden;
}
.ark-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-green  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.badge-red    { background: rgba(239,68,68,0.15);  color: #ef4444; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-blue   { background: rgba(148,163,184,0.12); color: #94a3b8; }
.badge-gray   { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* ── Cert expiry colors ───────────────────────────────────────────────────── */
.expiry-ok      { color: #22c55e; }
.expiry-warning { color: #f59e0b; }
.expiry-danger  { color: #ef4444; }
.expiry-expired { color: #6b7280; text-decoration: line-through; }

/* ── Availability indicators (SSL backups) ──────────────────────────────── */
.avail-yes { color: #22c55e; font-weight: 600; }
.avail-no  { color: #2a2a2a; }

/* ── Secret value display ────────────────────────────────────────────────── */
.secret-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  white-space: pre-wrap;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 0.375rem;
  padding: 0.6rem 0.75rem;
  color: #86efac;
}
.secret-obscured {
  filter: blur(5px);
  cursor: pointer;
  transition: filter 0.2s;
  user-select: none;
}
.secret-obscured:hover { filter: blur(3px); }

/* ── PEM viewer ──────────────────────────────────────────────────────────── */
.pem-viewer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 0.375rem;
  padding: 0.75rem;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  min-width: 260px;
  max-width: 420px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: toastIn 0.2s ease;
}
.toast-success { background: #14532d; color: #bbf7d0; border-left: 3px solid #22c55e; }
.toast-error   { background: #7f1d1d; color: #fecaca; border-left: 3px solid #ef4444; }
.toast-info    { background: #2a1215; color: #fca5a5; border-left: 3px solid #EA1D2D; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #3d3d3d;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state .empty-title { color: #555555; font-weight: 500; margin-bottom: 0.5rem; }

/* ── Deleted section toggle ──────────────────────────────────────────────── */
.deleted-section {
  margin-top: 1.5rem;
  border: 1px dashed #2a2a2a;
  border-radius: 0.5rem;
  overflow: hidden;
}
.deleted-section-header {
  padding: 0.6rem 1rem;
  background: #1c1c1c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #555555;
  font-size: 0.8rem;
  font-weight: 500;
}
.deleted-section-header:hover { color: #94a3b8; }

/* ── Info row (detail label/value pairs) ─────────────────────────────────── */
.info-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #1c1c1c;
  font-size: 0.85rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: #555555; min-width: 120px; flex-shrink: 0; }
.info-value { color: #e2e8f0; word-break: break-all; }

/* ── Download format select group ───────────────────────────────────────── */
.download-group { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ── Scrollbar styling (dark) ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111111; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }
