/* =========================================================
   digital-passport/assets/css/style.css
   ---------------------------------------------------------
   GLOBAL UI STYLE
   - Mobile-first
   - Modern, clean, event-ready
   - Shared by public + admin
   ---------------------------------------------------------
   MARKING NOTES:
   ✅ ChatGPT builds this file fully
   ⬇️ Uses Bootstrap as base
   ========================================================= */

/* ===============================
   CSS RESET / BASE
   =============================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell,
                 "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f6f9;
    color: #111827;
    line-height: 1.45;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: #0d6efd;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ===============================
   TYPOGRAPHY
   =============================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    letter-spacing: 0.2px;
    margin-bottom: .5rem;
}

h1 { font-size: clamp(28px, 6vw, 44px); }
h2 { font-size: clamp(24px, 5vw, 36px); }
h3 { font-size: clamp(20px, 4vw, 28px); }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    margin-bottom: .75rem;
}

.tiny {
    font-size: 12px;
    color: rgba(0,0,0,0.55);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
                 Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ===============================
   LAYOUT HELPERS
   =============================== */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section {
    padding: 24px 0;
}

.container-narrow {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ===============================
   CARDS
   =============================== */
.card,
.cardx {
    border-radius: 20px;
    border: none;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.cardx {
    padding: 20px;
}

.card-soft {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
}

/* ===============================
   BUTTONS
   =============================== */
.btn {
    font-weight: 800;
}

.btn-round {
    border-radius: 999px;
}

.btn-strong {
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 16px;
}

.btn-xl {
    padding: 18px 22px;
    font-size: 18px;
    border-radius: 20px;
}

.btn-glow:hover {
    box-shadow: 0 0 0 rgba(0,0,0,0);
    animation: glowPulse .6s ease-in-out forwards;
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 rgba(13,110,253,0); }
    100% { box-shadow: 0 0 28px rgba(13,110,253,.45); }
}

/* ===============================
   FORMS
   =============================== */
.form-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(0,0,0,0.65);
}

.form-control,
.form-select {
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13,110,253,0.15);
}

.input-pill {
    border-radius: 999px;
}

/* ===============================
   TOP BAR / HEADER
   =============================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.brand-pill {
    border-radius: 999px;
    padding: 10px 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ===============================
   PROGRESS BAR
   =============================== */
.progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
}

.progress-bar {
    border-radius: 999px;
    transition: width .35s ease;
}

/* ===============================
   BADGES / CHIPS
   =============================== */
.badge-pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 12px;
}

.chip {
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    font-weight: 800;
    font-size: 12px;
}

/* ===============================
   TABLES
   =============================== */
.table thead th {
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,0.65);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.table tbody td {
    font-size: 14px;
}

.table-hover tbody tr:hover {
    background: rgba(13,110,253,0.04);
}

/* ===============================
   PASSPORT / JOURNEY UI
   =============================== */
.passport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.passport-item {
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.passport-item.completed {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}

.passport-item .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

/* ===============================
   SCANNER FALLBACK / CODE INPUT
   =============================== */
.code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.code-input input {
    width: 42px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.2);
}

/* ===============================
   ANIMATIONS
   =============================== */
.fade-in {
    animation: fadeIn .35s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.shake {
    animation: shake .45s linear;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

/* ===============================
   UTILITIES
   =============================== */
.text-muted-soft {
    color: rgba(0,0,0,0.45) !important;
}

.bg-soft {
    background: rgba(255,255,255,0.6);
}

.shadow-soft {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ===============================
   MOBILE OPTIMIZATION
   =============================== */
@media (max-width: 575px) {
    .card, .cardx {
        border-radius: 16px;
    }

    .btn-xl {
        font-size: 16px;
        padding: 16px;
    }

    .passport-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}