/* ssp-verify/styles.css — SSP Verify · shared styles (frontend, login + admin) */
/* SSP VERIFY — styles.css v1
   Tokens sourced from SSP Design System v1.2 (reference only, not linked). */

html {
  --bg: #ffffff;
  --surface: #f3f4f6;
  --surface-raised: #e5e7eb;
  --border: #d1d5db;
  --border-strong: #9ca3af;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-light: #10b981;
  --danger: #dc2626;
  --danger-dark: #991b1b;
  --warning: #f59e0b;
  --info: #2563eb;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg);
}

html[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --surface-raised: #374151;
  --border: #374151;
  --border-strong: #4b5563;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-light: #34d399;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #f59e0b;
  --info: #3b82f6;
}

* { box-sizing: border-box; }
body { margin: 0; padding: 0; }

/* ── TYPOGRAPHY (ported from SSP_Styles.css, unchanged) ── */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code, pre {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  background-color: var(--surface);
  color: var(--text-secondary);
  padding: 0.25em 0.5em;
  border-radius: 4px;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 0;
}

/* ── RESET (ported, unchanged) ── */

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── FORM INPUTS (ported from SSP_Styles.css, unchanged, includes focus ring) ── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── BUTTONS (ported from SSP_Styles.css, unchanged — cubic-bezier + translateY hover) ── */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-raised);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-dark);
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── BADGES (ported, unchanged) ── */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--surface-raised);
  color: var(--text-secondary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--accent);
}

.badge-danger {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-info {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--info);
}

/* ── CHIPS (ported, unchanged) ── */

.chip {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.chip.category {
  background-color: var(--surface-raised);
  color: var(--text-secondary);
}

.chip.priority-critical {
  background-color: var(--danger);
  color: #ffffff;
}

.chip.priority-high {
  background-color: var(--warning);
  color: #111827;
}

.chip.priority-medium {
  background-color: var(--info);
  color: #ffffff;
}

.chip.priority-low {
  background-color: var(--accent);
  color: #ffffff;
}

/* ── STATUS DOT (ported, unchanged) ── */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-strong);
  flex-shrink: 0;
  display: inline-block;
}

.status-dot.accent  { background-color: var(--accent); }
.status-dot.danger  { background-color: var(--danger); }
.status-dot.warning { background-color: var(--warning); }
.status-dot.info    { background-color: var(--info); }

/* ── TABLES (ported, unchanged) ── */

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

thead {
  background-color: var(--surface-raised);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody tr:hover {
  background-color: var(--surface-raised);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ── MODAL (ported, unchanged) ── */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 1000;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ── TOAST (ported, unchanged) ── */

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  pointer-events: all;
}

.toast-success {
  border-color: var(--accent);
  color: var(--accent);
}

.toast-error {
  border-color: var(--danger);
  color: var(--danger);
}

.toast-warning {
  border-color: var(--warning);
  color: var(--warning);
}

.toast-info {
  border-color: var(--info);
  color: var(--info);
}

/* ── SKELETON LOADING (ported, unchanged) ── */

@keyframes skeleton-shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.skeleton-card {
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-raised) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-text {
  height: 12px;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-raised) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-80 { width: 80%; }
.skeleton-text.w-full { width: 100%; }

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-raised) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* ── SPINNER (ported, unchanged) ── */

.spinner {
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── RESPONSIVE (ported, unchanged) ── */

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .btn {
    padding: 0.65rem 1.25rem;
  }
}

/* ── ACCESSIBILITY (ported, unchanged) ── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── AUTH CARD (new, Verify-specific — not in SSP_Styles.css) ── */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(5,150,105,0.06) 0%, rgba(5,150,105,0) 70%);
  pointer-events: none;
}

.auth-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  position: relative;
}

.auth-mark-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-mark-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-mark-name { font-size: 0.9375rem; font-weight: 600; }
.auth-mark-sub  { font-size: 0.75rem; color: var(--text-tertiary); }

.auth-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.375rem; }
.auth-lede  {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.auth-note {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78125rem;
  color: var(--text-secondary);
}

.auth-note svg { flex-shrink: 0; margin-top: 1px; color: var(--text-tertiary); }

.auth-foot {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.auth-confirm-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.hidden { display: none; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
