﻿/* ============================================================
   Solomon ID — shared stylesheet
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; }

:root {
  --primary: #0B3D91;
  --primary-light: #1a4fa0;
  --teal: #008080;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0b1e33;
  --text-muted: #4a5b6e;
  --border-light: #dde3ea;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

body { background: var(--bg-light); color: var(--text-dark); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.app-header { background: var(--primary); color: white; padding: 0.9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.35rem; letter-spacing: -0.3px; color: white; text-decoration: none; }
.logo span { background: rgba(255,255,255,0.2); padding: 0.2rem 0.6rem; border-radius: 30px; font-size: 0.9rem; font-weight: 500; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; font-weight: 500; font-size: 1rem; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: white; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.app-footer { background: #0a1e3a; color: #b0c4de; padding: 1.5rem; text-align: center; font-size: 0.9rem; margin-top: auto; }
.app-footer a { color: #d0e2ff; text-decoration: none; margin: 0 0.75rem; font-weight: 500; }
.app-footer a:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem; flex: 1; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--primary); color: white; border: none; padding: 0.9rem 1.8rem; border-radius: 40px; font-size: 1.05rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s, transform 0.1s; box-shadow: var(--shadow-sm); border: 1px solid transparent; }
.btn:hover { background: var(--primary-light); }
.btn:active { transform: scale(0.98); }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn-secondary:hover { background: rgba(11,61,145,0.05); }
.btn-teal { background: var(--teal); }
.btn-teal:hover { background: #006666; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- cards ---------- */
.card { background: var(--card-bg); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 2rem 0 2.5rem; }
.hero h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.5px; color: var(--primary); margin-bottom: 1rem; line-height: 1.2; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 2rem; }
.install-btn-wrapper { margin-top: 1.2rem; display: flex; justify-content: center; }
.install-btn { background: white; color: var(--primary); border: 1.5px solid var(--primary); padding: 0.65rem 1.5rem; border-radius: 40px; font-weight: 600; font-size: 0.95rem; display: none; align-items: center; gap: 0.4rem; cursor: pointer; transition: all 0.15s; box-shadow: var(--shadow-sm); }
.install-btn:hover { background: #f0f6ff; }

/* ---------- feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin: 3rem 0 1rem; }
.feature-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.8rem 1.5rem; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: transform 0.15s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 2.4rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--primary); }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- progress bar ---------- */
.progress-container { margin-bottom: 2rem; }
.progress-bar { display: flex; justify-content: space-between; position: relative; margin-bottom: 0.5rem; }
.progress-bar::before { content: ''; position: absolute; top: 18px; left: 0; right: 0; height: 3px; background: var(--border-light); z-index: 1; }
.progress-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 25%; }
.step-circle { width: 38px; height: 38px; border-radius: 50%; background: white; border: 3px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-muted); font-size: 1rem; transition: all 0.2s; }
.progress-step.active .step-circle { border-color: var(--primary); background: var(--primary); color: white; }
.progress-step.completed .step-circle { border-color: var(--teal); background: var(--teal); color: white; }
.step-label { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); text-align: center; }
.progress-step.active .step-label { color: var(--primary); font-weight: 600; }

/* ---------- forms ---------- */
.form-step { display: none; }
.form-step.active { display: block; }
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--text-dark); }
input, select, textarea { width: 100%; padding: 0.85rem 1rem; border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); font-size: 1rem; background: white; transition: border 0.15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,61,145,0.1); }

.radio-group { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }
.radio-option { display: flex; align-items: center; gap: 0.75rem; background: #f9fcff; padding: 1rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border-light); cursor: pointer; }
.radio-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); }

.upload-preview { margin-top: 1rem; border: 2px dashed var(--border-light); border-radius: var(--radius-sm); padding: 1.5rem; text-align: center; background: #fafdff; }
.upload-preview img { max-width: 100%; max-height: 180px; border-radius: 8px; object-fit: contain; }
.photo-preview { margin-top: 1rem; text-align: center; }
.photo-preview img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 4px solid var(--primary); box-shadow: var(--shadow-sm); }

.form-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

.summary-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
.summary-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border-light); font-size: 0.95rem; vertical-align: top; }
.summary-table td:first-child { font-weight: 600; color: var(--text-muted); width: 38%; }
.edit-link { color: var(--teal); font-weight: 600; text-decoration: none; font-size: 0.9rem; cursor: pointer; }
.edit-link:hover { text-decoration: underline; }
.checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; margin: 1.5rem 0; }
.checkbox-group input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 0.2rem; }

/* ---------- ID card ---------- */
.id-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 1.75rem; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; border: 1px solid var(--border-light); }
.id-photo { flex: 0 0 140px; text-align: center; }
.id-photo img { width: 140px; height: 140px; object-fit: cover; border-radius: 16px; border: 3px solid var(--primary); background: #eef4ff; }
.id-details { flex: 1; min-width: 240px; }
.id-details h2 { font-size: 1.7rem; color: var(--primary); margin-bottom: 0.5rem; }
.id-details p { margin: 0.3rem 0; color: var(--text-muted); }
.id-details strong { color: var(--text-dark); font-weight: 600; }

.qr-section { text-align: center; margin: 2rem 0 1.5rem; }
.qr-code { display: inline-block; background: white; padding: 1.2rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.qr-caption { font-size: 0.95rem; color: var(--text-muted); margin-top: 0.5rem; }
.id-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.5rem 0; }
.notice-box { background: #e8f0fe; border-left: 5px solid var(--primary); padding: 1rem 1.25rem; border-radius: var(--radius-sm); color: #1a3d6e; font-size: 0.95rem; margin: 1.5rem 0; }

/* ---------- admin ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: white; border-radius: var(--radius-sm); padding: 1.25rem; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.table-wrapper { overflow-x: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: #f0f5fe; color: var(--text-dark); font-weight: 600; text-align: left; padding: 0.9rem 1rem; white-space: nowrap; }
td { padding: 0.9rem 1rem; border-top: 1px solid var(--border-light); vertical-align: middle; }

.status-badge { display: inline-block; padding: 0.25rem 0.8rem; border-radius: 40px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

/* ---------- modal ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; padding: 1rem; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal-content { background: white; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-md); position: relative; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-content h3 { margin-bottom: 1rem; color: var(--primary); }
.modal-detail-row { margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.modal-detail-row strong { min-width: 130px; font-weight: 600; }
.modal-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- about ---------- */
.about-section { max-width: 700px; margin: 0 auto; }
.about-section h1 { color: var(--primary); margin-bottom: 1rem; font-size: 2rem; }
.about-section p { margin-bottom: 1rem; color: var(--text-muted); }
.disclaimer { background: #fff8e7; border-left: 5px solid #f0b400; padding: 1rem 1.25rem; border-radius: var(--radius-sm); font-size: 0.95rem; margin: 2rem 0; color: #5e4a1a; }

/* ---------- utility ---------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .app-header { padding: 0.7rem 1rem; }
  .logo { font-size: 1.2rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.9rem; }
  .card { padding: 1.25rem; }
  .id-card { flex-direction: column; text-align: center; }
  .id-details { text-align: center; }
  .step-label { font-size: 0.65rem; }
  .btn { padding: 0.8rem 1.4rem; font-size: 1rem; }
  .form-nav { flex-direction: column; }
}
