/* ============================================================
   3E Digital Evidence Certification — Application Styles
   Bootstrap 5 based, professional legal theme
   ============================================================ */

:root {
  --color-primary: #1a3a5c;
  --color-primary-dark: #112540;
  --color-accent: #2c7be5;
  --color-success: #198754;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-info: #0dcaf0;
  --color-light-bg: #f8f9fa;
  --color-border: #dee2e6;
  --color-text: #212529;
  --color-muted: #6c757d;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
}

/* === GLOBAL === */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  flex: 1;
}

/* === NAVBAR === */
.navbar.bg-primary-dark {
  background: var(--color-primary-dark) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-shield {
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: white;
}

.brand-sub {
  color: rgba(255,255,255,0.65);
  font-weight: 400;
  font-size: 0.9rem;
}

.navbar .nav-link {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white !important;
}

.user-avatar {
  width: 30px;
  height: 30px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.navbar .dropdown-menu {
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  min-width: 220px;
}

/* === AUTH PAGES === */
.auth-body {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1e4976 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-card-wide {
  max-width: 480px;
}

.auth-container.auth-wide {
  max-width: 480px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 1rem;
}

/* === STAT CARDS === */
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Color utilities for stat icons */
.bg-primary-light { background: rgba(26, 58, 92, 0.1); }
.bg-success-light { background: rgba(25, 135, 84, 0.1); }
.bg-warning-light { background: rgba(255, 193, 7, 0.15); }
.bg-info-light { background: rgba(13, 202, 240, 0.1); }
.bg-danger-light { background: rgba(220, 53, 69, 0.1); }

/* === CARDS === */
.card {
  border-radius: var(--radius) !important;
}

.card-header {
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
}

/* === UPLOAD ZONE === */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: var(--color-light-bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--color-accent);
  background: rgba(44, 123, 229, 0.04);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.upload-prompt,
.upload-selected {
  pointer-events: none;
}

.upload-selected button {
  pointer-events: all;
}

/* === HASH DISPLAY === */
.hash-display {
  background: #f4f6fa;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  word-break: break-all;
}

.hash-display code {
  font-size: 0.8rem;
  color: var(--color-primary);
  flex: 1;
  letter-spacing: 0.02em;
}

/* === PROOF DETAIL === */
.proof-icon {
  width: 52px;
  height: 52px;
  background: rgba(44, 123, 229, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.proof-num {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* === STEP INDICATORS === */
.step-num {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 0.75rem;
}

/* === CASE CARDS === */
.case-card {
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--color-border) !important;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
}

.case-icon {
  width: 36px;
  height: 36px;
  background: rgba(13, 202, 240, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-info);
  font-size: 1rem;
}

/* === VERIFY RESULT === */
.verify-icon {
  width: 72px;
  height: 72px;
  background: var(--color-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.result-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 2px solid transparent;
}

.result-success { background: rgba(25, 135, 84, 0.08); border-color: rgba(25, 135, 84, 0.3); }
.result-danger { background: rgba(220, 53, 69, 0.08); border-color: rgba(220, 53, 69, 0.3); }
.result-warning { background: rgba(255, 193, 7, 0.1); border-color: rgba(255, 193, 7, 0.4); }

.result-icon {
  font-size: 3rem;
  display: block;
}
.result-success .result-icon { color: var(--color-success); }
.result-danger .result-icon { color: var(--color-danger); }
.result-warning .result-icon { color: #856404; }

/* === LANDING === */
.landing-hero {
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, #1e4976 60%, #163d68 100%);
  color: white;
}

.landing-hero .text-muted {
  color: rgba(255,255,255,0.65) !important;
}

.landing-hero .lead {
  color: rgba(255,255,255,0.8) !important;
}

.landing-cert-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-mock {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
}

.cert-mock-header {
  background: var(--color-primary);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.cert-mock-body {
  padding: 1.5rem;
}

.cert-mock-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  gap: 1rem;
}

.cert-mock-label {
  color: var(--color-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.cert-mock-val {
  color: var(--color-text);
  text-align: right;
  font-size: 0.8rem;
  word-break: break-all;
}

.cert-mock-badge {
  margin-top: 1rem;
  background: var(--color-success);
  color: white;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  border: 1px solid var(--color-border);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* === FOOTER === */
.site-footer {
  background: white;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin: 0 0.75rem;
}

.footer-link:hover { color: var(--color-primary); }

/* === MISC UTILITIES === */
.font-monospace { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
.copy-btn { border: none; background: transparent; color: var(--color-muted); padding: 0.25rem 0.5rem; }
.copy-btn:hover { color: var(--color-primary); }

/* Subtle badge variants */
.bg-success-subtle { background: rgba(25, 135, 84, 0.1) !important; }
.bg-danger-subtle { background: rgba(220, 53, 69, 0.1) !important; }
.bg-warning-subtle { background: rgba(255, 193, 7, 0.15) !important; }
.bg-info-subtle { background: rgba(13, 202, 240, 0.1) !important; }
.bg-primary-subtle { background: rgba(26, 58, 92, 0.08) !important; }
.bg-secondary-subtle { background: rgba(108, 117, 125, 0.1) !important; }

/* Primary color overrides */
.btn-primary {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-primary:hover {
  background: var(--color-primary-dark) !important;
  border-color: var(--color-primary-dark) !important;
}

.btn-outline-primary {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover {
  background: var(--color-primary) !important;
  color: white !important;
}

.text-primary { color: var(--color-primary) !important; }
.bg-primary { background: var(--color-primary) !important; }
.border-primary { border-color: var(--color-primary) !important; }

/* Badge bg-primary */
.badge.bg-primary { background: var(--color-primary) !important; }

/* Progress bar */
.progress-bar.bg-primary { background: var(--color-accent) !important; }

/* === RESPONSIVE === */
@media (max-width: 576px) {
  .hash-display { flex-direction: column; align-items: flex-start; }
  .cert-mock { font-size: 0.8rem; }
  .auth-card { padding: 1.5rem; }
}
