/**
 * Kajarbi 54 Gamification Styles
 * User Profile & Badge System
 */

/* ================================
   CSS Variables
   ================================ */
:root {
    --gam-bg-primary: #0d0d1a;
    --gam-bg-secondary: #1a1a2e;
    --gam-bg-tertiary: #252540;
    --gam-border: #2d2d44;
    --gam-gold: #c9a227;
    --gam-gold-light: #d4af37;
    --gam-text-primary: #ffffff;
    --gam-text-secondary: #a0a0a0;
    --gam-text-muted: #666666;
}

/* ================================
   User Profile - Full Layout
   ================================ */
.kajarbi-profile {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Profile Header */
.profile-header {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.profile-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-bg-primary);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

.profile-actions {
    flex-shrink: 0;
}

.btn-edit-profile {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gam-text-primary);
    color: var(--gam-bg-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: var(--gam-gold);
    transform: translateY(-2px);
}

/* Progress Section */
.profile-progress {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.progress-hint {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 16px 0;
}

.progress-bar {
    height: 8px;
    background: var(--gam-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gam-gold) 0%, var(--gam-gold-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.profile-progress.max-level {
    background: linear-gradient(135deg, var(--gam-bg-secondary) 0%, rgba(201, 162, 39, 0.1) 100%);
    border: 1px solid var(--gam-gold);
}

.profile-progress.max-level .progress-title {
    color: var(--gam-gold);
}

/* Badges Section */
.profile-badges,
.profile-all-badges {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 20px 0;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
}

.badge-item:hover .badge-icon {
    transform: scale(1.1);
}

.badge-name {
    font-size: 11px;
    color: var(--gam-text-secondary);
    text-align: center;
}

.no-badges {
    color: var(--gam-text-muted);
    font-size: 14px;
    margin: 0;
}

/* All Badges List */
.badges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.badge-list-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.badge-list-item .badge-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.badge-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-list-item .badge-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    text-align: left;
}

.badge-desc {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.badge-status {
    color: var(--gam-text-muted);
}

.badge-list-item.locked {
    opacity: 0.6;
}

.badge-list-item.locked .badge-icon {
    filter: grayscale(100%);
}

/* ================================
   Profile Card (Compact/Mobile)
   ================================ */
.kajarbi-profile-card {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

.card-header {
    margin-bottom: 20px;
}

.card-label {
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 3px;
}

.card-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.card-avatar .avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 12px 0;
}

.card-level {
    display: inline-block;
    padding: 6px 16px;
    border: 2px solid var(--gam-gold);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.card-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 20px 0;
    border-top: 1px solid var(--gam-border);
    border-bottom: 1px solid var(--gam-border);
    margin-bottom: 10px;
}

.card-stats .stat-item {
    text-align: center;
}

.card-stats .stat-value {
    font-size: 24px;
}

.card-stats .stat-label {
    font-size: 10px;
}

.card-badges {
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    padding: 16px;
}

.badges-label {
    display: block;
    font-size: 12px;
    color: var(--gam-text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    text-align: left;
}

.badges-icons {
    display: flex;
    gap: 12px;
}

.mini-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ================================
   Leaderboard
   ================================ */
.kajarbi-leaderboard {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
}

.leaderboard-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 20px 0;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.leaderboard-item .rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    border-radius: 50%;
}

.leaderboard-item .rank.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: var(--gam-bg-primary);
}

.leaderboard-item .rank.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--gam-bg-primary);
}

.leaderboard-item .rank.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: var(--gam-bg-primary);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials.small {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.leader-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leader-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.leader-level {
    font-size: 11px;
    font-weight: 500;
}

.leader-points {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-gold);
}

/* ================================
   Badges Showcase
   ================================ */
.kajarbi-badges-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.showcase-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.showcase-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.showcase-badge .badge-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.showcase-badge .badge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-badge .badge-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.showcase-badge .badge-desc {
    font-size: 13px;
    color: var(--gam-text-secondary);
}

.showcase-badge.locked {
    opacity: 0.5;
}

/* ================================
   Login Prompt
   ================================ */
.kajarbi-profile-login {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    color: var(--gam-text-secondary);
    font-size: 16px;
}

.kajarbi-profile-login a {
    color: var(--gam-gold);
    text-decoration: none;
    font-weight: 600;
}

.kajarbi-profile-login a:hover {
    text-decoration: underline;
}

/* ================================
   Responsive Styles
   ================================ */
@media (max-width: 768px) {
    .profile-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        width: 100%;
        margin-top: 16px;
    }
    
    .btn-edit-profile {
        width: 100%;
        text-align: center;
    }
    
    .badge-list-item {
        flex-wrap: wrap;
    }
    
    .kajarbi-badges-showcase {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Dark Theme Override (default)
   ================================ */
body.institute-dashboard-page .kajarbi-profile,
body.institute-dashboard-page .kajarbi-profile-card,
body.institute-dashboard-page .kajarbi-leaderboard,
body.institute-dashboard-page .kajarbi-badges-showcase {
    color: var(--gam-text-primary);
}

/* ================================
   Animations
   ================================ */
@keyframes badge-unlock {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.badge-item.newly-earned .badge-icon {
    animation: badge-unlock 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes points-pop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.5);
        opacity: 0;
    }
}

.points-notification {
    position: fixed;
    top: 100px;
    right: 24px;
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    animation: points-pop 1s ease forwards;
    z-index: 9999;
}

/* ================================
   Citizen's Journey - Tier Colors
   ================================ */
:root {
    --tier-citizen: #6b7280;
    --tier-federalist: #3b82f6;
    --tier-ambassador: #a855f7;
    --tier-architect: #c9a227;
}

/* ================================
   Citizenship Dashboard
   ================================ */
.citizenship-dashboard {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 8px 0;
}

.dashboard-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.dashboard-tier-badge.tier-citizen { background: var(--tier-citizen); }
.dashboard-tier-badge.tier-federalist { background: var(--tier-federalist); }
.dashboard-tier-badge.tier-ambassador { background: var(--tier-ambassador); }
.dashboard-tier-badge.tier-architect { background: linear-gradient(135deg, var(--tier-architect) 0%, #b8860b 100%); }

.dashboard-points {
    text-align: right;
}

.points-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gam-gold);
}

.points-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

/* Journey Progress Track */
.journey-progress {
    margin-bottom: 32px;
}

.progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.progress-track::before {
    content: '';
    position: absolute;
    left: 48px;
    right: 48px;
    top: 50%;
    height: 4px;
    background: var(--gam-bg-tertiary);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-track::after {
    content: '';
    position: absolute;
    left: 48px;
    top: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--tier-citizen), var(--tier-federalist), var(--tier-ambassador), var(--tier-architect));
    transform: translateY(-50%);
    z-index: 2;
    width: var(--progress-width, 0%);
    max-width: calc(100% - 96px);
    transition: width 0.5s ease;
}

.tier-station {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tier-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--gam-bg-tertiary);
    border: 3px solid var(--gam-border);
    transition: all 0.3s ease;
}

.tier-station.completed .tier-marker {
    background: var(--gam-gold);
    border-color: var(--gam-gold);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.4);
}

.tier-station.current .tier-marker {
    border-color: var(--gam-gold);
    animation: pulse-glow 2s ease-in-out infinite;
}

.tier-station.locked .tier-marker {
    opacity: 0.5;
}

.tier-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-muted);
    letter-spacing: 0.5px;
}

.tier-station.completed .tier-label,
.tier-station.current .tier-label {
    color: var(--gam-text-primary);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(201, 162, 39, 0.3); }
    50% { box-shadow: 0 0 25px rgba(201, 162, 39, 0.6); }
}

/* Progress Stats */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--gam-border);
}

.progress-stat {
    text-align: center;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
}

.progress-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
}

.progress-stat-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ================================
   Mission Control Widget
   ================================ */
.mission-control {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mission-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.mission-count {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.mission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mission-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mission-item:hover {
    background: rgba(201, 162, 39, 0.1);
    transform: translateX(4px);
}

.mission-item.completed {
    opacity: 0.6;
}

.mission-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gam-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mission-item.completed .mission-checkbox {
    background: var(--gam-gold);
    border-color: var(--gam-gold);
}

.mission-checkbox svg {
    width: 14px;
    height: 14px;
    color: var(--gam-bg-primary);
    opacity: 0;
}

.mission-item.completed .mission-checkbox svg {
    opacity: 1;
}

.mission-content {
    flex: 1;
}

.mission-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin-bottom: 4px;
}

.mission-desc {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.mission-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(201, 162, 39, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gam-gold);
}

.mission-item.completed .mission-reward {
    background: var(--gam-bg-secondary);
    color: var(--gam-text-muted);
}

/* ================================
   Digital ID Card
   ================================ */
.digital-id-card {
    background: linear-gradient(135deg, var(--gam-bg-secondary) 0%, var(--gam-bg-tertiary) 100%);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.digital-id-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.id-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.id-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.id-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.id-logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--gam-text-primary);
    letter-spacing: 2px;
}

.id-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    padding: 8px 16px;
    border-radius: 8px;
}

.id-body {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.id-avatar {
    width: 100px;
    height: 100px;
    background: var(--gam-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.id-avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.id-info {
    flex: 1;
}

.id-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.id-tier {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.id-tier.tier-citizen { background: var(--tier-citizen); }
.id-tier.tier-federalist { background: var(--tier-federalist); }
.id-tier.tier-ambassador { background: var(--tier-ambassador); }
.id-tier.tier-architect { background: var(--tier-architect); }

.id-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.id-detail {
    font-size: 12px;
}

.id-detail-label {
    color: var(--gam-text-muted);
    margin-bottom: 2px;
}

.id-detail-value {
    color: var(--gam-text-primary);
    font-weight: 600;
}

.id-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px dashed var(--gam-border);
}

.id-badges {
    display: flex;
    gap: 8px;
}

.id-mini-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.id-qr {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.id-qr svg {
    width: 100%;
    height: 100%;
}

/* ================================
   Unity Leaderboard (Country)
   ================================ */
.unity-leaderboard {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
}

.unity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.unity-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.unity-filter {
    display: flex;
    gap: 8px;
}

.unity-filter-btn {
    padding: 6px 12px;
    background: var(--gam-bg-tertiary);
    border: none;
    border-radius: 6px;
    font-size: 11px;
    color: var(--gam-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unity-filter-btn.active,
.unity-filter-btn:hover {
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
}

.unity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.unity-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.unity-item.current-user {
    border: 1px solid var(--gam-gold);
    background: rgba(201, 162, 39, 0.1);
}

.unity-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    border-radius: 8px;
}

.unity-rank.gold {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: var(--gam-bg-primary);
}

.unity-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: var(--gam-bg-primary);
}

.unity-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: var(--gam-bg-primary);
}

.unity-flag {
    font-size: 24px;
}

.unity-country {
    flex: 1;
}

.unity-country-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.unity-citizens {
    font-size: 11px;
    color: var(--gam-text-secondary);
}

.unity-points {
    text-align: right;
}

.unity-points-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--gam-gold);
}

.unity-points-label {
    font-size: 10px;
    color: var(--gam-text-muted);
}

/* ================================
   Privileges List
   ================================ */
.privileges-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.privilege-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gam-text-primary);
}

.privilege-item.locked {
    opacity: 0.5;
    color: var(--gam-text-muted);
}

.privilege-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gam-gold);
}

.privilege-item.locked .privilege-icon {
    color: var(--gam-text-muted);
}

/* ================================
   Kajarbi Citizenship Dashboard (Full)
   ================================ */
.kajarbi-citizenship-dashboard {
    background: var(--gam-bg-secondary);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
}

/* ================================
   Service Record Header — Card Style
   ================================ */
.service-record-header {
    background: #0d0d1a;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 3px solid var(--srh-tier-color, #c9a227);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 28px;
}

/* Kente bar */
.srh-kente {
    display: flex;
    height: 6px;
    width: 100%;
}
.srh-kente span { flex: 1; }
.srh-k-r { background: #CC2936; }
.srh-k-b { background: #1a1a2a; }
.srh-k-g { background: #2D7D46; }

/* Body row */
.srh-body {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 22px 14px;
}

/* Avatar */
.srh-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.srh-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}
.srh-tier-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0d0d1a;
    color: #fff;
}
.srh-tier-badge svg { width: 12px; height: 12px; fill: #fff; }

/* Info column */
.srh-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.srh-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.srh-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #a0a0a0;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.srh-citizen-num { font-family: 'Monaco', 'Consolas', monospace; }
.srh-sep { opacity: 0.4; }
.srh-region { font-size: 11px; }
.srh-tier-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

/* Points pill */
.srh-points-pill {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 64px;
}
.srh-pts-val {
    font-size: 22px;
    font-weight: 800;
    color: #c9a227;
    line-height: 1;
}
.srh-pts-lbl {
    font-size: 8px;
    color: #a0a0a0;
    letter-spacing: 1.5px;
    margin-top: 3px;
    text-transform: uppercase;
}

/* Progress bar */
.srh-progress {
    padding: 0 22px 18px;
}
.srh-prog-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #a0a0a0;
    margin-bottom: 6px;
}
.srh-prog-labels strong { font-weight: 700; }
.srh-prog-pct { font-weight: 600; color: #fff; }
.srh-prog-track {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
}
.srh-prog-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.16,1,0.3,1);
}
.srh-max-tier {
    padding: 0 22px 18px;
    font-size: 12px;
    color: #c9a227;
    text-align: center;
    font-weight: 600;
}

/* Legacy selectors kept for any other references */
.citizen-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gam-border);
    margin-bottom: 24px;
}

.citizen-avatar {
    width: 100px;
    height: 100px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.citizen-avatar .avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.tier-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gam-bg-secondary);
    color: white;
    font-size: 16px;
}

.citizen-info {
    flex: 1;
}

.citizen-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.citizen-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.citizen-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-tertiary);
    padding: 4px 12px;
    border-radius: 4px;
}

.citizen-region {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.citizen-points {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.citizen-points .points-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gam-gold);
}

.citizen-points .points-label {
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

/* Tier Progress Roadmap */
.tier-progress-roadmap {
    margin-bottom: 32px;
}

.roadmap-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 20px 0;
}

.tier-stations {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.tier-stations .tier-station {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.station-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gam-bg-tertiary);
    border: 3px solid var(--gam-border);
    color: var(--gam-text-muted);
    transition: all 0.3s ease;
}

.tier-station.completed .station-icon,
.tier-station.current .station-icon {
    color: white;
    border-color: transparent;
}

.tier-station.locked .station-icon {
    opacity: 0.5;
}

.station-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-muted);
}

.tier-station.completed .station-name,
.tier-station.current .station-name {
    color: var(--gam-text-primary);
}

.station-current-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--gam-gold);
    background: rgba(201, 162, 39, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.station-connector {
    width: 60px;
    height: 3px;
    background: var(--gam-border);
    margin: 0 -4px;
    z-index: 1;
}

.station-connector.completed {
    background: linear-gradient(90deg, var(--tier-citizen), var(--tier-federalist));
}

/* Current Status Card */
.current-status-card {
    background: var(--gam-bg-tertiary);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid;
    margin-bottom: 24px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.status-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

.status-tier {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-description {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.next-tier-progress {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--gam-text-secondary);
}

.progress-percent {
    font-weight: 700;
    color: var(--gam-gold);
}

.max-tier-achieved {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--gam-gold);
    border-radius: 12px;
    padding: 20px;
}

.achievement-icon {
    font-size: 32px;
}

.max-tier-achieved p {
    margin: 0;
    font-size: 14px;
    color: var(--gam-text-primary);
}

/* Privileges Section */
.privileges-section {
    margin-top: 24px;
}

.privileges-section .section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 16px 0;
}

.privileges-section .privileges-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.privilege-item.unlocked svg {
    color: #22c55e;
}

.locked-privileges-title {
    font-size: 12px;
    color: var(--gam-text-muted);
    margin: 24px 0 12px 0;
}

/* ================================
   Kajarbi Mission Control (Full)
   ================================ */
.kajarbi-mission-control {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.mission-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mission-control-header .mission-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.mission-tier-badge {
    font-size: 10px;
    font-weight: 700;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.missions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.missions-list .mission-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.missions-list .mission-item:hover {
    background: rgba(201, 162, 39, 0.08);
}

.missions-list .mission-item.completed {
    opacity: 0.6;
}

.mission-status {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-check {
    width: 28px;
    height: 28px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.status-pending {
    font-size: 24px;
    color: var(--gam-border);
}

.missions-list .mission-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.missions-list .mission-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.missions-list .mission-desc {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.missions-list .mission-reward {
    padding: 0;
    background: none;
}

.reward-points {
    font-size: 12px;
    font-weight: 700;
    color: var(--gam-gold);
}

.mission-action-btn {
    padding: 8px 16px;
    background: var(--gam-gold);
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.mission-action-btn:hover {
    transform: scale(1.05);
}

.mission-control-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gam-border);
}

.reward-preview {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin: 0;
    text-align: center;
}

/* ================================
   Digital ID Generator (Full)
   ================================ */
.kajarbi-digital-id-generator {
    text-align: center;
}

.kajarbi-digital-id-generator .digital-id-card {
    max-width: 380px;
    margin: 0 auto 24px;
    background: linear-gradient(145deg, var(--gam-bg-secondary), var(--gam-bg-tertiary));
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.id-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.id-card-title {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--gam-gold);
    letter-spacing: 3px;
}

.id-card-subtitle {
    display: block;
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin-top: 4px;
}

.id-card-body {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.id-card-body .id-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.id-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.id-card-body .id-details {
    text-align: left;
}

.id-card-body .id-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin-bottom: 4px;
}

.id-card-body .id-region {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin-bottom: 8px;
}

.id-card-body .id-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    color: var(--gam-gold);
    background: var(--gam-bg-primary);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.id-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px dashed var(--gam-border);
}

.id-card-footer .id-tier {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.id-hologram {
    width: 50px;
    height: 50px;
    position: relative;
}

.hologram-effect {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(201, 162, 39, 0.3) 25%,
        transparent 50%,
        rgba(201, 162, 39, 0.3) 75%,
        transparent 100%
    );
    border-radius: 50%;
    animation: hologram-spin 3s linear infinite;
}

@keyframes hologram-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Digital ID Actions */
.digital-id-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-generate-id,
.btn-share-id {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--gam-gold), #b8860b);
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-generate-id:hover,
.btn-share-id:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(201, 162, 39, 0.4);
}

.btn-icon {
    font-size: 20px;
}

.share-hint {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin: 0;
}

/* Login Prompt */
.kajarbi-login-prompt {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}

.kajarbi-login-prompt p {
    font-size: 16px;
    color: var(--gam-text-secondary);
    margin: 0 0 20px 0;
}

.btn-login {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

/* ================================
   Responsive - Citizen Journey
   ================================ */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .dashboard-points {
        text-align: left;
    }
    
    .progress-track {
        flex-direction: column;
        gap: 24px;
        padding: 0;
    }
    
    .progress-track::before,
    .progress-track::after {
        display: none;
    }
    
    .tier-station {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .id-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .id-details {
        grid-template-columns: 1fr;
    }
    
    .mission-item {
        flex-wrap: wrap;
    }
    
    .mission-reward {
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
    
    /* Citizenship Dashboard Responsive */
    .citizen-header {
        flex-direction: column;
        text-align: center;
    }
    
    .citizen-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .citizen-points {
        justify-content: center;
    }

    /* Service Record Header mobile */
    .srh-body {
        gap: 12px;
        padding: 16px 14px 10px;
    }
    .srh-avatar {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
    .srh-name { font-size: 15px; }
    .srh-pts-val { font-size: 18px; }
    .srh-points-pill { padding: 8px 10px; min-width: 52px; }
    .srh-progress { padding: 0 14px 14px; }
    
    .tier-stations {
        flex-direction: column;
        gap: 12px;
    }
    
    .tier-stations .tier-station {
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }
    
    .station-connector {
        display: none;
    }
    
    .id-card-body {
        flex-direction: column;
        text-align: center;
    }
    
    .id-card-body .id-details {
        text-align: center;
    }
    
    .missions-list .mission-item {
        flex-wrap: wrap;
    }
    
    .mission-action-btn {
        width: 100%;
        margin-top: 12px;
    }
}

/* ================================
   Tier Upgrade Modal
   ================================ */
.tier-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.tier-upgrade-content {
    background: var(--gam-bg-secondary);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tier-upgrade-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    animation: bounce 0.6s ease 0.3s;
}

.tier-upgrade-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--gam-text-primary);
    margin: 0 0 8px;
}

.tier-upgrade-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--gam-gold);
    margin: 0 0 8px;
}

.tier-upgrade-desc {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 24px;
}

.tier-upgrade-close {
    padding: 14px 32px;
    background: var(--gam-gold);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tier-upgrade-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

/* ================================
   Badge Unlock Modal
   ================================ */
.badge-unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.badge-unlock-content {
    background: var(--gam-bg-secondary);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 360px;
}

.badge-unlock-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.badge-unlock-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px;
}

.badge-unlock-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--gam-gold);
    margin: 0 0 8px;
}

.badge-unlock-desc {
    font-size: 13px;
    color: var(--gam-text-secondary);
    margin: 0 0 24px;
}

.badge-unlock-close {
    padding: 12px 28px;
    background: var(--gam-gold);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-unlock-close:hover {
    transform: scale(1.05);
}

/* ================================
   Toast Notifications
   ================================ */
.gamification-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gam-bg-secondary);
    color: var(--gam-text-primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.gamification-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================
   Extra Animations
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}


/* ===========================================================
   MISSION: MINT I.D. — special button
   =========================================================== */
.mission-item--mint {
    border: 1px solid rgba(201, 162, 39, 0.25);
    position: relative;
}
.mission-item--mint::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, transparent, rgba(201,162,39,0.06), transparent);
    animation: k54-shimmer-sweep 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes k54-shimmer-sweep {
    0%   { transform: translateX(-100%); opacity: 0; }
    40%  { opacity: 1; }
    60%  { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.mission-mint-id-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #c9a227, #d4af37);
    color: #0d0d1a;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(201,162,39,0.35);
}
.mission-mint-id-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(201,162,39,0.55);
}
.mission-view-id-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(201,162,39,0.4);
    color: #c9a227;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .04em;
    white-space: nowrap;
}
.mission-view-id-btn:hover { background: rgba(201,162,39,0.08); }

/* ===========================================================
   MISSION: SECURE CONNECTION — VPN button
   =========================================================== */
.mission-item--vpn {
    border: 1px solid rgba(45, 125, 70, 0.25);
    position: relative;
}
.mission-item--vpn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, transparent, rgba(45,125,70,0.07), transparent);
    animation: k54-shimmer-sweep 3.5s ease-in-out infinite;
    pointer-events: none;
}
.mission-vpn-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1e7a3e, #2D7D46);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(45,125,70,0.4);
}
.mission-vpn-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(45,125,70,0.6);
}
.mission-vpn-done-badge {
    font-size: 11px;
    font-weight: 700;
    color: #2D7D46;
    letter-spacing: .04em;
    white-space: nowrap;
}

.mission-vpn-done-badge {
    font-size: 11px;
    font-weight: 700;
    color: #2D7D46;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ===========================================================
   MISSION: HARDEN DNS — button + row
   =========================================================== */
.mission-item--dns {
    border: 1px solid rgba(74, 158, 255, 0.25);
    position: relative;
}
.mission-item--dns::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, transparent, rgba(74,158,255,0.07), transparent);
    animation: k54-shimmer-sweep 4s ease-in-out infinite;
    pointer-events: none;
}
.mission-dns-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #2563eb, #4a9eff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(74,158,255,0.35);
}
.mission-dns-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(74,158,255,0.55);
}
.mission-dns-done-badge {
    font-size: 11px;
    font-weight: 700;
    color: #4a9eff;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* -----------------------------------------------------------
   THE WIRE MISSION BUTTON
   ----------------------------------------------------------- */
.mission-wire-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #7a5c1e, #c9a227);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(201,162,39,0.35);
}
.mission-wire-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(201,162,39,0.55);
    color: #0a0a0a;
    text-decoration: none;
}
.mission-wire-done-badge {
    font-size: 11px;
    font-weight: 700;
    color: #c9a227;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ===========================================================
   DNS HARDENING MODAL
   =========================================================== */
.k54-dns-modal-inner {
    max-width: 540px;
}
.k54-dns-globe-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(74,158,255,0.12);
    border: 2px solid rgba(74,158,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #4a9eff;
}
.k54-dns-globe-done {
    background: rgba(74,158,255,0.22);
    border-color: #4a9eff;
    color: #93c5fd;
}

/* Explainer flow diagram */
.k54-dns-explainer {
    margin-bottom: 24px;
}
.k54-dns-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.k54-dns-flow-node {
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
}
.k54-dns-flow-bad {
    background: rgba(204,41,54,0.08);
    border: 1px solid rgba(204,41,54,0.2);
}
.k54-dns-flow-good {
    background: rgba(74,158,255,0.08);
    border: 1px solid rgba(74,158,255,0.25);
}
.k54-dns-flow-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a0a0a0;
    margin-bottom: 6px;
}
.k54-dns-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e0e0e0;
}
.k54-dns-flow-warn { color: #f87171; font-weight: 600; }
.k54-dns-flow-ok   { color: #4ade80; font-weight: 600; }
.k54-dns-flow-arrow {
    text-align: center;
    font-size: 18px;
    color: #a0a0a0;
    line-height: 1.6;
}

/* Provider grid */
.k54-dns-providers { margin-bottom: 24px; }
.k54-dns-provider-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.k54-dns-provider {
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    text-align: left;
}
.k54-dns-provider--recommended {
    background: rgba(74,158,255,0.07);
    border-color: rgba(74,158,255,0.3);
}
.k54-dns-provider-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #4a9eff;
    margin-bottom: 4px;
}
.k54-dns-provider-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.k54-dns-provider-addr {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 8px;
}
.k54-dns-provider-addr code {
    font-family: 'Monaco','Consolas',monospace;
    background: rgba(255,255,255,0.08);
    padding: 1px 6px;
    border-radius: 4px;
    color: #c9a227;
}
.k54-dns-provider-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.k54-dns-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.k54-dns-tag--green { background: rgba(45,125,70,0.2); color: #4ade80; }
.k54-dns-tag--blue  { background: rgba(74,158,255,0.15); color: #93c5fd; }
.k54-dns-tag--gold  { background: rgba(201,162,39,0.15); color: #c9a227; }
.k54-dns-tag--warn  { background: rgba(204,41,54,0.15); color: #f87171; }

/* Platform tabs */
.k54-dns-platforms { margin-bottom: 20px; }
.k54-dns-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 14px;
}
.k54-dns-tab {
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s;
}
.k54-dns-tab.active,
.k54-dns-tab:hover {
    background: rgba(74,158,255,0.15);
    border-color: rgba(74,158,255,0.4);
    color: #4a9eff;
}
.k54-dns-tab-intro {
    font-size: 12px;
    color: #a0a0a0;
    margin: 0 0 10px;
    line-height: 1.5;
}
.k54-dns-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 9px 16px;
    background: rgba(74,158,255,0.12);
    border: 1px solid rgba(74,158,255,0.3);
    border-radius: 7px;
    font-size: 12px;
    color: #4a9eff;
    text-decoration: none;
    transition: background 0.2s;
}
.k54-dns-app-btn:hover { background: rgba(74,158,255,0.2); }
.k54-dns-browser-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.k54-dns-browser-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
}
.k54-dns-browser-item strong {
    display: block;
    font-size: 13px;
    color: #fff;
    margin-bottom: 8px;
}

/* Confirm button — blue variant */
.k54-dns-confirm-btn {
    background: linear-gradient(135deg, #2563eb, #4a9eff) !important;
    box-shadow: 0 4px 20px rgba(74,158,255,0.3) !important;
}
.k54-dns-confirm-btn:hover {
    box-shadow: 0 6px 28px rgba(74,158,255,0.55) !important;
}

/* Security stack on success */
.k54-dns-security-stack {
    margin: 20px 0 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 16px;
    text-align: left;
}
.k54-dns-stack-title {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #a0a0a0;
    margin: 0 0 12px;
}
.k54-dns-stack-item {
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 600;
}
.k54-dns-stack-item:last-child { border-bottom: none; }
.k54-dns-stack-item.active { color: #4ade80; }
.k54-dns-stack-item.inactive { color: #a0a0a0; }

@media (max-width: 540px) {
    .k54-dns-browser-grid { grid-template-columns: 1fr; }
    .k54-dns-tab-bar { gap: 4px; }
    .k54-dns-tab { font-size: 11px; padding: 5px 10px; }
}


/* ===========================================================
   VPN SETUP MODAL (extends .k54-id-modal styles)
   =========================================================== */
.k54-vpn-modal-inner {
    max-width: 520px;
}
.k54-vpn-shield-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(45,125,70,0.15);
    border: 2px solid rgba(45,125,70,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #2D7D46;
}
.k54-vpn-shield-done {
    background: rgba(45,125,70,0.25);
    border-color: #2D7D46;
    color: #4ade80;
}

/* Why VPN */
.k54-vpn-why-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px;
    background: rgba(45,125,70,0.07);
    border: 1px solid rgba(45,125,70,0.2);
    border-radius: 10px;
}
.k54-vpn-why-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}
.k54-vpn-why-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }
.k54-vpn-why-item strong { font-size: 13px; color: #fff; display: block; margin-bottom: 2px; }
.k54-vpn-why-item p { font-size: 12px; color: #a0a0a0; margin: 0; }

/* Setup blocks */
.k54-vpn-setup-block {
    margin-bottom: 24px;
    text-align: left;
}
.k54-vpn-step-num {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #2D7D46;
    background: rgba(45,125,70,0.15);
    border: 1px solid rgba(45,125,70,0.3);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
.k54-vpn-step-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}
.k54-vpn-step-desc {
    font-size: 13px;
    color: #a0a0a0;
    margin: 0 0 14px;
    line-height: 1.5;
}
.k54-vpn-step-desc code {
    font-family: 'Monaco','Consolas',monospace;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: #c9a227;
}

/* Download grid */
.k54-vpn-dl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 0;
}
.k54-vpn-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}
.k54-vpn-dl-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.k54-vpn-dl-ios     { background: #1c1c1e; color: #fff; }
.k54-vpn-dl-android { background: #1a3a2a; color: #4ade80; }
.k54-vpn-dl-windows { background: #0078d4; color: #fff; }
.k54-vpn-dl-mac     { background: #2c2c2e; color: #fff; }

/* VPNgate button */
.k54-vpn-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: linear-gradient(135deg, #1e7a3e, #2D7D46);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 12px rgba(45,125,70,0.4);
    margin-bottom: 16px;
}
.k54-vpn-gate-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Steps list */
.k54-vpn-steps-list {
    padding-left: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.k54-vpn-steps-list li {
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.5;
}
.k54-vpn-steps-list li strong { color: #fff; }
.k54-vpn-steps-list li code {
    font-family: 'Monaco','Consolas',monospace;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
    color: #c9a227;
}

/* Disclosure */
.k54-vpn-disclosure {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(204,41,54,0.08);
    border: 1px solid rgba(204,41,54,0.25);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    text-align: left;
    color: #a0a0a0;
    font-size: 12px;
    line-height: 1.5;
}
.k54-vpn-disclosure svg { flex-shrink: 0; margin-top: 2px; color: #CC2936; }
.k54-vpn-disclosure strong { color: #fff; }
.k54-vpn-disclosure em { color: #4ade80; font-style: normal; font-weight: 600; }

/* Confirm button (green variant) */
.k54-vpn-confirm-btn {
    background: linear-gradient(135deg, #1e7a3e, #2D7D46) !important;
    box-shadow: 0 4px 20px rgba(45,125,70,0.4) !important;
}
.k54-vpn-confirm-btn:hover {
    box-shadow: 0 6px 28px rgba(45,125,70,0.6) !important;
}

/* Done stats */
.k54-vpn-done-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
}
.k54-vpn-done-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.k54-vpn-done-stat-val {
    font-size: 32px;
    font-weight: 800;
    color: #2D7D46;
    line-height: 1;
}
.k54-vpn-done-stat-lbl {
    font-size: 9px;
    color: #a0a0a0;
    letter-spacing: 2px;
    font-weight: 700;
}


/* ===========================================================
   DIGITAL I.D. MINT MODAL
   =========================================================== */
.k54-id-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}
.k54-id-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.k54-id-modal-inner {
    position: relative;
    z-index: 1;
    background: #111118;
    border: 1px solid rgba(201,162,39,0.18);
    border-radius: 20px;
    padding: 32px 28px 28px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,162,39,0.12);
}
.k54-id-modal-inner::-webkit-scrollbar { width: 4px; }
.k54-id-modal-inner::-webkit-scrollbar-track { background: transparent; }
.k54-id-modal-inner::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.3); border-radius: 2px; }

.k54-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 18px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.k54-modal-close:hover { color: #fff; }

.k54-id-modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.k54-modal-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    color: #c9a227;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.k54-id-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: .02em;
}
.k54-modal-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0;
    line-height: 1.5;
}


/* ===========================================================
   PAN-AFRICAN DIGITAL I.D. CARD
   =========================================================== */
:root {
    --k54-red:   #CC2936;
    --k54-black: #111118;
    --k54-green: #2D7D46;
    --k54-gold:  #C9A227;
    --k54-gold-light: #D4AF37;
}

.k54-pan-african-id {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0e0e18;
    box-shadow:
        0 4px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(201,162,39,0.22),
        inset 0 1px 0 rgba(201,162,39,0.12);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    user-select: none;
}

/* Preview (un-minted) = desaturated */
.k54-id--preview {
    filter: saturate(0.45) brightness(0.85);
}
.k54-id--minted {
    animation: k54-id-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes k54-id-appear {
    from { opacity: 0; transform: scale(0.9) rotateX(8deg); }
    to   { opacity: 1; transform: scale(1) rotateX(0deg); }
}

/* Kente stripe (top & bottom) */
.k54-id-kente-top,
.k54-id-kente-bottom {
    display: flex;
    height: 10px;
    width: 100%;
}
.k54-id-kente-top span,
.k54-id-kente-bottom span {
    flex: 1;
    display: block;
}
.k54-kente-r { background: var(--k54-red); }
.k54-kente-b { background: #1a1a2a; }
.k54-kente-g { background: var(--k54-green); }

/* Card body */
.k54-id-body {
    position: relative;
    padding: 20px 22px 18px;
    background:
        /* subtle diagonal kente weave */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 18px,
            rgba(201,162,39,0.03) 18px,
            rgba(201,162,39,0.03) 19px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 18px,
            rgba(201,162,39,0.03) 18px,
            rgba(201,162,39,0.03) 19px
        ),
        radial-gradient(ellipse at 80% 20%, rgba(44,125,70,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(204,41,54,0.07) 0%, transparent 60%),
        #0e0e18;
}

/* Adinkra Gye Nyame watermark */
.k54-id-watermark {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    opacity: 0.05;
    color: var(--k54-gold);
    pointer-events: none;
}
.k54-id-watermark svg { width: 100%; height: 100%; }

/* Header row */
.k54-id-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.k54-id-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.k54-id-logo-emblem {
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(201,162,39,0.4));
}
.k54-id-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.k54-id-org {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--k54-gold);
    text-transform: uppercase;
}
.k54-id-org-sub {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .18em;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
}
.k54-id-country-code {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .1em;
    color: rgba(255,255,255,0.18);
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Main content row */
.k54-id-main-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

/* Avatar */
.k54-id-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.k54-id-avatar-ring {
    padding: 3px;
    border-radius: 12px;
    background: conic-gradient(
        var(--k54-red)    0deg   90deg,
        var(--k54-black)  90deg  180deg,
        var(--k54-green)  180deg 270deg,
        var(--k54-gold)   270deg 360deg
    );
    box-shadow: 0 0 16px rgba(201,162,39,0.3);
}
.k54-id-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1a1a2e, #252540);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.k54-id-initials {
    font-size: 26px;
    font-weight: 900;
    color: var(--k54-gold);
    letter-spacing: -.02em;
    text-transform: uppercase;
    line-height: 1;
}
.k54-id-tier-badge {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #0d0d1a;
    padding: 3px 9px;
    border-radius: 20px;
    width: max-content;
}

/* Details */
.k54-id-details {
    flex: 1;
    min-width: 0;
}
.k54-id-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .15em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.k54-id-name {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.k54-id-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}
.k54-id-meta-value {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
}
.k54-id-citizen-no {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--k54-gold);
    font-weight: 700;
    letter-spacing: .08em;
}

/* Seal / QR area */
.k54-id-seal-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.k54-id-seal {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.k54-seal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    width: 100%;
}
.k54-seal-grid {
    display: grid;
    grid-template-columns: repeat(5, 8px);
    gap: 2px;
}
.k54-seal-dot {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: rgba(201,162,39,0.12);
}
.k54-seal-dot.on {
    background: rgba(201,162,39,0.7);
}
.k54-seal-text {
    font-size: 8px;
    font-family: 'Monaco', monospace;
    color: rgba(201,162,39,0.6);
    letter-spacing: .06em;
}

/* Hologram shimmer (minted only) */
.k54-hologram {
    width: 44px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(
        125deg,
        rgba(204,41,54,0.7)  0%,
        rgba(201,162,39,0.9) 25%,
        rgba(45,125,70,0.7)  50%,
        rgba(74,158,255,0.6) 75%,
        rgba(201,162,39,0.8) 100%
    );
    background-size: 300% 300%;
    animation: k54-holo-shift 3s ease-in-out infinite alternate;
    border: 1px solid rgba(255,255,255,0.15);
}
@keyframes k54-holo-shift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Pending overlay (preview) */
.k54-id-pending-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
}
.k54-id-pending-overlay span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 5px 14px;
    border-radius: 4px;
    transform: rotate(-12deg);
}


/* ===========================================================
   MINT CONFIRM BUTTON
   =========================================================== */
.k54-mint-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding: 15px 24px;
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 50%, #b8942a 100%);
    color: #0d0d1a;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(201,162,39,0.45);
    box-sizing: border-box;
}
.k54-mint-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201,162,39,0.6);
}
.k54-mint-confirm-btn:active { transform: translateY(0); }
.k54-mint-btn-icon { font-size: 18px; line-height: 1; }
.k54-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #0d0d1a;
    border-radius: 50%;
    animation: k54-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes k54-spin { to { transform: rotate(360deg); } }


/* ===========================================================
   SHARE ROW & CAPTION
   =========================================================== */
.k54-id-share-row {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.k54-id-share-btn,
.k54-id-download-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}
.k54-id-share-btn {
    background: linear-gradient(135deg, #2D7D46, #3a9e59);
    color: #fff;
    box-shadow: 0 3px 12px rgba(45,125,70,0.35);
}
.k54-id-share-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,125,70,0.5); }
.k54-id-download-btn {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.1);
}
.k54-id-download-btn:hover { background: rgba(255,255,255,0.1); }
.k54-share-caption {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    line-height: 1.5;
}
.k54-share-caption strong { color: var(--k54-gold); }

/* Mobile */
@media (max-width: 540px) {
    .k54-id-main-row    { flex-wrap: wrap; }
    .k54-id-seal-wrap   { flex-direction: row; gap: 10px; }
    .k54-id-meta-grid   { grid-template-columns: 1fr; }
    .k54-id-share-row   { flex-direction: column; }
    .k54-id-modal-inner { padding: 24px 16px 20px; }
}

body.k54-modal-open { overflow: hidden; }
