:root {
    --bg-navy: #122444;
    --bg-navy-dark: #0a1526;
    --bg-navy-card: rgba(18, 36, 68, 0.94);
    --bg-navy-card-border: rgba(190, 227, 84, 0.25);
    --bg-navy-light: #1c3560;
    --accent-chartreuse: #BEE354;
    --accent-chartreuse-hover: #d2f068;
    --accent-chartreuse-glow: rgba(190, 227, 84, 0.45);
    --text-on-chartreuse: #0a1526;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-navy-dark);
    color: #f1f5f9;
}

/* Fullscreen Map */
#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: var(--bg-navy-dark);
}

/* Leaflet Container */
.leaflet-container {
    background: var(--bg-navy-dark) !important;
}

.leaflet-control-zoom {
    display: none; /* Hide default zoom for cleaner mobile UX */
}

.leaflet-control-attribution {
    background: rgba(10, 21, 38, 0.8) !important;
    color: #94a3b8 !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: var(--accent-chartreuse) !important;
}

/* Top Floating Bar */
.topbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.user-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: rgba(18, 36, 68, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(190, 227, 84, 0.35);
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 14px rgba(190, 227, 84, 0.2);
}

.avatar-badge {
    width: 38px;
    height: 38px;
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 14px var(--accent-chartreuse-glow);
    overflow: hidden;
    position: relative;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 13px;
    color: #f8fafc;
}

.battery-status {
    font-size: 11px;
    color: var(--accent-chartreuse);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-actions {
    pointer-events: auto;
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(18, 36, 68, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(190, 227, 84, 0.3);
    border-radius: 9999px;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.action-btn.active {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    border-color: var(--accent-chartreuse);
    box-shadow: 0 0 16px var(--accent-chartreuse-glow);
}

/* Floating Controls (Right) */
.floating-controls {
    position: absolute;
    right: 16px;
    bottom: 110px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icon-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-navy-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--bg-navy-card-border);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.icon-fab:hover {
    border-color: var(--accent-chartreuse);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-chartreuse-glow);
}

.icon-fab:active {
    transform: scale(0.92);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 9999px;
    border: 2px solid var(--bg-navy);
    box-shadow: 0 0 8px var(--accent-chartreuse-glow);
}

/* Zenly Custom Map Marker */
.zenly-marker-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.marker-halo {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent-chartreuse-glow);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.marker-bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-navy);
    border: 3px solid var(--accent-chartreuse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 10px var(--accent-chartreuse-glow);
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.marker-bubble:hover {
    transform: scale(1.1);
}

.marker-bottom-status {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(18, 36, 68, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--bg-navy-card-border);
    border-radius: 12px;
    padding: 2px 7px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55);
    z-index: 10;
}

.marker-bottom-status.offline {
    background: rgba(18, 36, 68, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}

.marker-batt-pill {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    line-height: 1.1;
}

.marker-name-tag {
    position: absolute;
    top: -18px;
    background: rgba(18, 36, 68, 0.92);
    border: 1px solid var(--bg-navy-card-border);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    white-space: nowrap;
    z-index: 3;
}

.marker-ghost-tag {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 14px;
    z-index: 4;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.7);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Bottom Sheet / Friends Drawer */
.friends-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 55vh;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 1001;
    padding: 12px 18px 24px 18px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
}

.friends-drawer.collapsed {
    transform: translateY(calc(100% - 48px));
}

.drawer-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 0 auto 10px auto;
    cursor: pointer;
}

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

.drawer-header h3 {
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
}

.btn-text-action {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.friends-list {
    overflow-y: auto;
    max-height: 40vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.friend-item:hover {
    background: rgba(51, 65, 85, 0.8);
}

.friend-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-avatar {
    width: 42px;
    height: 42px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 2px solid #6366f1;
}

.friend-details {
    display: flex;
    flex-direction: column;
}

.friend-title {
    font-weight: 700;
    font-size: 14px;
    color: #f8fafc;
}

.friend-sub {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.empty-state {
    text-align: center;
    padding: 24px 12px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

/* Floating Reaction Bar */
.reaction-bar {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 9999px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-bar.hidden {
    display: none;
}

.reaction-target {
    font-size: 11px;
    font-weight: 700;
    color: #a5b4fc;
}

.emoji-picker {
    display: flex;
    gap: 6px;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.15s;
}

.emoji-btn:hover {
    transform: scale(1.3);
}

.emoji-btn:active {
    transform: scale(0.9);
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}

/* Reaction Pop Particles */
.reaction-particle {
    position: absolute;
    z-index: 2000;
    font-size: 32px;
    pointer-events: none;
    animation: floatUp 1.8s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6);
    }
    50% {
        opacity: 1;
        transform: translate(var(--x-offset), -70px) scale(1.4);
    }
    100% {
        opacity: 0;
        transform: translate(var(--x-offset), -140px) scale(1);
    }
}

@keyframes popIn {
    0% {
        transform: translateX(-50%) scale(0.7);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Join Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.zenly-logo {
    margin-bottom: 20px;
}

.logo-emoji {
    font-size: 40px;
    display: inline-block;
    filter: drop-shadow(0 0 10px #6366f1);
}

.zenly-logo h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-top: 6px;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.zenly-logo p {
    color: #94a3b8;
    font-size: 13px;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.avatar-opt {
    background: #1f2937;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.avatar-opt.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

#input-nickname {
    width: 100%;
    padding: 12px 16px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

#input-nickname:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-chartreuse), #a3cb38);
    border: none;
    border-radius: 16px;
    color: var(--text-on-chartreuse);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--accent-chartreuse-glow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-chartreuse-hover), var(--accent-chartreuse));
    box-shadow: 0 12px 24px var(--accent-chartreuse-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Toast */
.toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: popIn 0.2s ease;
}

.toast.hidden {
    display: none;
}

/* GPS Accuracy Pill */
.accuracy-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.acc-dot {
    font-size: 12px;
}

/* Quick Presets for Amel & Ilprad */
.preset-section {
    margin-bottom: 14px;
    text-align: left;
}

.preset-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-preset-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #1e293b;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.btn-preset-profile:hover {
    transform: translateY(-2px);
}

.btn-preset-amel {
    border-color: rgba(236, 72, 153, 0.5);
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.15), rgba(30, 41, 59, 0.8));
}

.btn-preset-amel:hover {
    border-color: #ec4899;
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

.btn-preset-ilprad {
    border-color: rgba(6, 182, 212, 0.5);
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.15), rgba(30, 41, 59, 0.8));
}

.btn-preset-ilprad:hover {
    border-color: #06b6d4;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}

.preset-emoji {
    font-size: 26px;
}

.preset-text strong {
    display: block;
    font-size: 13px;
    color: #f8fafc;
}

.preset-text small {
    display: block;
    font-size: 10px;
    color: #94a3b8;
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 14px 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.or-divider span {
    padding: 0 10px;
}

/* Dev Fab Button */
.dev-fab {
    border-color: rgba(245, 158, 11, 0.4) !important;
    background: rgba(17, 24, 39, 0.95) !important;
}

.dev-fab:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.5) !important;
}

/* Dev Card Modal */
.dev-card {
    max-width: 440px !important;
    max-height: 88vh;
    overflow-y: auto;
    text-align: left;
    padding: 22px 20px !important;
}

.modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-title h3 {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
}

.dev-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 16px 0;
}

.btn-close-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-circle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dev-section {
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px 14px;
}

.dev-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dev-toggle-row {
    display: flex;
    gap: 8px;
}

.dev-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 12px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.dev-tab-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.dev-tip {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    font-size: 11px;
    color: #bfdbfe;
    line-height: 1.4;
}

.slider-val {
    display: block;
    font-size: 11px;
    color: #38bdf8;
    font-weight: 700;
}

/* OTW Trigger Button in Reaction Bar */
.btn-otw-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid #60a5fa;
    border-radius: 9999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-otw-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.7);
}

.btn-otw-trigger:active {
    transform: scale(0.95);
}

/* Google Maps Style OTW Navigation Banner */
.otw-banner {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1005;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.25);
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.otw-banner.hidden {
    display: none;
}

.otw-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.otw-vehicle-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.otw-text-info {
    display: flex;
    flex-direction: column;
}

.otw-eta-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.otw-eta {
    font-size: 18px;
    font-weight: 800;
    color: #10b981;
}

.otw-dist {
    font-size: 13px;
    font-weight: 700;
    color: #93c5fd;
}

.otw-desc {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
}

.otw-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-otw-action {
    border: none;
    cursor: pointer;
    font-weight: 800;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.btn-drive-play {
    padding: 8px 14px;
    background: #10b981;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-drive-play:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-drive-play.driving {
    background: #f59e0b;
}

.btn-drive-close {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-drive-close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
}

/* Meetup Trigger Button */
.btn-meetup-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 1px solid #fbbf24;
    border-radius: 9999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-meetup-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.7);
}

/* Proximity Alert Banner (< 200m) */
.proximity-banner {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    max-width: 440px;
    margin: 0 auto;
    z-index: 1006;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border: 1px solid #fca5a5;
    border-radius: 18px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.6);
    animation: pulseAlert 1.5s infinite alternate;
}

.proximity-banner.hidden {
    display: none;
}

.prox-icon {
    font-size: 24px;
    margin-right: 10px;
}

.prox-info {
    display: flex;
    flex-direction: column;
    color: #fff;
}

.prox-info strong {
    font-size: 14px;
}

.prox-info span {
    font-size: 11px;
    opacity: 0.9;
}

@keyframes pulseAlert {
    from { transform: scale(1); box-shadow: 0 10px 25px rgba(239, 68, 68, 0.5); }
    to { transform: scale(1.02); box-shadow: 0 12px 35px rgba(239, 68, 68, 0.85); }
}

/* Real-time Chat Drawer */
.chat-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 90vw;
    height: 100%;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1010;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
}

.chat-drawer.collapsed {
    transform: translateX(100%);
    pointer-events: none;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-tabs {
    display: flex;
    gap: 6px;
}

.chat-tab {
    padding: 6px 14px;
    border-radius: 12px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.chat-tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #60a5fa;
}

.chat-private-selector {
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.chat-target-dropdown {
    background: #1e293b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    outline: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-empty {
    text-align: center;
    color: #64748b;
    font-size: 12px;
    margin-top: 40px;
    line-height: 1.5;
}

.msg-row {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.msg-row.self {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-row.other {
    align-self: flex-start;
    align-items: flex-start;
}

.msg-sender {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.msg-row.self .msg-bubble {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.msg-row.other .msg-bubble {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
}

.msg-loc-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 8px 10px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.msg-time {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 3px;
}

.chat-quick-bar {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
}

.btn-quick-chat {
    padding: 5px 10px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-quick-chat-emoji {
    padding: 5px 8px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
}

.chat-input-form {
    display: flex;
    padding: 12px 16px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 8px;
}

#chat-input {
    flex: 1;
    padding: 10px 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

#chat-input:focus {
    border-color: #3b82f6;
}

.btn-chat-send {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.btn-chat-send:active {
    transform: scale(0.92);
}

/* Meetup Modals */
.meetup-card {
    max-width: 420px !important;
}

.meetup-place-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-place-opt {
    padding: 10px 8px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.btn-place-opt.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fef3c7;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

#meetup-note-input {
    width: 100%;
    padding: 10px 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

/* Incoming Meetup Card */
.incoming-card {
    max-width: 360px !important;
    text-align: center;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.3);
}

.incoming-badge {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.incoming-note {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    padding: 10px 12px;
    color: #fde68a;
    font-size: 12px;
    font-style: italic;
    margin: 12px 0 18px 0;
}

.incoming-actions {
    display: flex;
    gap: 10px;
}

.btn-accept {
    flex: 2;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.4) !important;
    padding: 12px !important;
    font-size: 13px !important;
}

.btn-reject {
    flex: 1;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 16px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.btn-reject:hover {
    background: #ef4444;
    color: #fff;
}

/* =========================================================
   FASE 3: RIWAYAT 7 HARI, REPLAY, KODE TEMAN, & DWELL TIME
   ========================================================= */

/* Zenly Marker Dwell Time & Offline state */
.zenly-marker-wrapper.offline {
    filter: grayscale(70%) opacity(0.65);
}

.zenly-marker-wrapper.offline .marker-halo {
    animation: none;
    background: rgba(148, 163, 184, 0.2);
}

/* Clickable Topbar Profile Pill */
.clickable-pill {
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.clickable-pill:hover {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

.edit-pill-badge {
    font-size: 11px;
    margin-left: 6px;
    opacity: 0.65;
    transition: opacity 0.15s, transform 0.15s;
}

.clickable-pill:hover .edit-pill-badge {
    opacity: 1;
    transform: scale(1.15);
}

/* Custom Profile & Settings Hub Modal Styling */
.settings-fab {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
    border: 1.5px solid rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.35) !important;
}

.settings-fab:hover {
    border-color: #c084fc !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 22px rgba(168, 85, 247, 0.6) !important;
    transform: scale(1.08);
}

.settings-card {
    max-width: 450px !important;
    max-height: 88vh;
    padding: 22px 20px !important;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.settings-scroll-content {
    overflow-y: auto;
    max-height: 72vh;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.settings-scroll-content::-webkit-scrollbar {
    width: 5px;
}

.settings-scroll-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.settings-section {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 16px;
}

.section-badge-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.section-badge-title span {
    font-size: 11px;
    font-weight: 800;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-code-box {
    background: rgba(30, 41, 59, 0.85);
    border: 1px dashed rgba(168, 85, 247, 0.5);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* Segmented Control for Map Layer */
.segmented-control {
    display: flex;
    background: #1e293b;
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
}

.seg-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.seg-btn:hover {
    color: #f1f5f9;
}

.seg-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

/* Switch Toggle (iOS/Zenly Style) */
.setting-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toggle-meta {
    display: flex;
    flex-direction: column;
}

.toggle-meta strong {
    font-size: 13px;
    color: #f8fafc;
}

.toggle-meta small {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .25s ease;
    border-radius: 26px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s ease;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background: linear-gradient(135deg, #10b981, #059669);
}

input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* Settings Tools Grid */
.settings-feature-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-settings-tool {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.btn-settings-tool:hover {
    background: #334155;
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.btn-settings-tool .tool-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.btn-settings-tool .tool-texts {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-settings-tool .tool-texts strong {
    font-size: 13px;
    color: #f1f5f9;
}

.btn-settings-tool .tool-texts small {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.btn-settings-tool .tool-arrow {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 700;
}

.edit-profile-card {
    max-width: 420px;
}

.color-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.color-opt {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.color-opt:hover {
    transform: scale(1.18);
}

.color-opt.active {
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.preview-code-box {
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed rgba(168, 85, 247, 0.5);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 10px;
}

/* Reaction Bar Header Info & Dwell Badge */
.reaction-header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: 6px;
}

.reaction-dwell-badge {
    font-size: 11px;
    font-weight: 700;
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    padding: 2px 6px;
    display: inline-block;
    width: fit-content;
}

/* Friend Code Card in Friends Drawer */
.friend-code-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.code-info {
    display: flex;
    flex-direction: column;
}

.code-label {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
}

.code-value {
    font-size: 16px;
    font-weight: 800;
    color: #a5b4fc;
    letter-spacing: 0.5px;
}

.btn-copy-code {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-code:hover {
    background: #6366f1;
    transform: scale(1.05);
}

/* Add Friend Input Bar */
.add-friend-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.add-friend-bar input {
    flex: 1;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
    text-transform: uppercase;
}

.add-friend-bar input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.btn-primary-sm {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border: none;
    border-radius: 12px;
    color: #fff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary-sm:hover {
    opacity: 0.9;
}

/* Friend Item Enhancements: Favorite Star & Dwell Text */
.friend-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-fav-star {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s;
    padding: 4px;
}

.btn-fav-star.active {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px #f59e0b);
}

.friend-item.offline {
    opacity: 0.65;
    background: rgba(15, 23, 42, 0.6);
}

.friend-item.offline .friend-avatar {
    filter: grayscale(80%);
    border-color: #64748b;
}

.friend-dwell-sub {
    font-size: 11px;
    color: #93c5fd;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.friend-dwell-sub.offline {
    color: #94a3b8;
}

/* =========================================================
   7-DAY HISTORY & TIMELINE DRAWER
   ========================================================= */
.history-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 75vh;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    z-index: 1002;
    padding: 14px 18px 26px 18px;
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.7);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.history-drawer.collapsed {
    transform: translateY(110%);
    pointer-events: none;
}

.history-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-header-title h3 {
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
}

/* 7-Day Horizontal Date Pills */
.date-pills-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 2px 12px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.date-pills-scroll::-webkit-scrollbar {
    display: none;
}

.date-pill {
    flex: 0 0 auto;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px 14px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-pill .pill-sub {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.75;
}

.date-pill:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #fff;
}

.date-pill.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #c084fc;
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* History Mode Tabs: Sendiri vs Bersama */
.history-mode-tabs {
    display: flex;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 14px;
}

.hist-tab {
    flex: 1;
    background: none;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.hist-tab.active {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

/* History Stats Grid */
.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.stat-val {
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
}

.stat-label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

/* History Replay Box */
.history-replay-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

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

.replay-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #e2e8f0;
}

.replay-speed-group {
    display: flex;
    gap: 6px;
}

.speed-pill {
    background: rgba(51, 65, 85, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.speed-pill.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #000;
}

.replay-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-replay-action {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: transform 0.15s;
}

.btn-replay-action:hover {
    transform: scale(1.03);
}

.btn-replay-action.playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.replay-slider {
    flex: 1;
    accent-color: #a855f7;
    cursor: pointer;
}

.btn-clear-history {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    font-size: 14px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-history:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* History Timeline Log */
.history-timeline-list {
    max-height: 22vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeline-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-badge {
    font-size: 16px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}

.timeline-time {
    font-size: 11px;
    color: #94a3b8;
}

.timeline-together-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(236, 72, 153, 0.25));
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fde68a;
}

/* =========================================================
   AVATAR FOTO PROFIL KUSTOM & FRIENDS REQUEST/REMOVE STYLING
   TEMA: CHARTREUSE (#BEE354) & NAVY BLUE (#122444)
   ========================================================= */

/* Avatar Image Element */
.avatar-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Avatar Upload Controls in Settings */
.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(18, 36, 68, 0.7);
    border: 1px solid var(--bg-navy-card-border);
    border-radius: 16px;
}

.avatar-preview-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--bg-navy);
    border: 3px solid var(--accent-chartreuse);
    box-shadow: 0 0 16px var(--accent-chartreuse-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.btn-photo-upload {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--accent-chartreuse-glow);
    width: fit-content;
}

.btn-photo-upload:hover {
    background: var(--accent-chartreuse-hover);
    box-shadow: 0 6px 18px var(--accent-chartreuse-glow);
}

.btn-photo-remove {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: background 0.15s;
}

.btn-photo-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

.upload-hint {
    font-size: 10px;
    color: #94a3b8;
}

/* Friends Drawer Sub-Tabs */
.friends-subtabs {
    display: flex;
    background: var(--bg-navy-dark);
    border-radius: 14px;
    padding: 4px;
    gap: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--bg-navy-card-border);
}

.friends-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.friends-tab-btn:hover {
    color: #f1f5f9;
}

.friends-tab-btn.active {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    box-shadow: 0 2px 10px var(--accent-chartreuse-glow);
}

/* Friend Request Card */
.request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(28, 53, 96, 0.6);
    border: 1px solid var(--bg-navy-card-border);
    border-radius: 16px;
    margin-bottom: 8px;
}

.request-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request-actions {
    display: flex;
    gap: 6px;
}

.btn-accept-req {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--accent-chartreuse-glow);
    transition: transform 0.15s;
}

.btn-accept-req:active {
    transform: scale(0.95);
}

.btn-reject-req {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-reject-req:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Remove Friend Action Button in Friend Card */
.btn-remove-friend {
    background: none;
    border: none;
    font-size: 15px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s;
    padding: 4px;
    margin-left: 2px;
}

.btn-remove-friend:hover {
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.7));
}

/* Friend Code Search Result Box */
.search-result-box {
    background: rgba(28, 53, 96, 0.7);
    border: 1.5px solid var(--accent-chartreuse);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 16px var(--accent-chartreuse-glow);
    animation: popIn 0.2s ease;
}

.search-result-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-send-req {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--accent-chartreuse-glow);
}

/* ==========================================================================
   MODERN DESIGN SYSTEM & VECTOR ICON ENHANCEMENTS (Lucide + 3D Aesthetics)
   ========================================================================== */

/* 1. Global Lucide SVG Icon Styling */
.lucide, i[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    vertical-align: -2px;
    flex-shrink: 0;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Floating Action Button Icons */
.icon-fab .lucide, .icon-fab i[data-lucide] {
    width: 22px;
    height: 22px;
    stroke-width: 2.2px;
}

/* Close Circle Buttons */
.btn-close-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-circle:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg) scale(1.05);
}

.btn-close-circle .lucide {
    width: 16px;
    height: 16px;
}

/* Modal Icon Badges */
.modal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(190, 227, 84, 0.12);
    border: 1px solid rgba(190, 227, 84, 0.3);
    color: var(--accent-chartreuse);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(190, 227, 84, 0.15);
    flex-shrink: 0;
}

.modal-icon-badge.small {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

.modal-icon-badge.small .lucide {
    width: 16px;
    height: 16px;
}

.modal-icon-badge .lucide {
    width: 20px;
    height: 20px;
}

.modal-icon-badge.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

/* Tool icon wraps in Settings */
.tool-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-chartreuse);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-settings-tool:hover .tool-icon-wrap {
    background: rgba(190, 227, 84, 0.16);
    border-color: var(--accent-chartreuse);
    transform: scale(1.08);
}

/* 2. Sonar Radar Pulse Dot (GPS Accuracy) */
.radar-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-chartreuse);
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--accent-chartreuse);
}

.radar-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-chartreuse);
    animation: sonarPing 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes sonarPing {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

.radar-dot.warn {
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}
.radar-dot.warn::after {
    border-color: #f59e0b;
}

.radar-dot.danger {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}
.radar-dot.danger::after {
    border-color: #ef4444;
}

/* 3. Battery Pill & Edit Badge in Topbar */
.battery-status {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-chartreuse);
    font-size: 11px;
    font-weight: 700;
}

.battery-status .bat-icon {
    width: 14px;
    height: 14px;
}

.edit-pill-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    margin-left: 2px;
    transition: all 0.2s ease;
}

.edit-pill-badge .lucide {
    width: 12px;
    height: 12px;
}

.user-pill:hover .edit-pill-badge {
    background: var(--accent-chartreuse);
    color: var(--text-on-chartreuse);
    transform: scale(1.1);
}

/* 4. Glossy 3D Reaction Buttons */
.reaction-btn-glossy {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-btn-glossy:hover {
    transform: translateY(-4px) scale(1.14);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.2);
}

.reaction-btn-glossy:active {
    transform: scale(0.92);
}

.reaction-glyph {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.reaction-btn-glossy:hover .reaction-glyph {
    transform: scale(1.15);
}

/* 5. Modern Avatar System & Selectors */
.avatar-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.avatar-opt {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.avatar-opt svg {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    pointer-events: none;
}

.avatar-opt:hover {
    transform: translateY(-2px) scale(1.06);
    border-color: var(--accent-chartreuse);
    background: rgba(190, 227, 84, 0.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.avatar-opt.active {
    border-color: var(--accent-chartreuse);
    background: rgba(190, 227, 84, 0.22);
    box-shadow: 0 0 16px var(--accent-chartreuse-glow);
    transform: scale(1.1);
}

.avatar-opt.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: var(--accent-chartreuse);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-chartreuse);
}

/* Preset Avatars for Amel & Ilprad in Join Modal */
.preset-avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.preset-avatar-badge svg {
    width: 100%;
    height: 100%;
}

/* 6. Empty States with Clean Vector Illustrations */
.empty-state, .chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 16px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
    gap: 10px;
}

.empty-icon {
    width: 42px;
    height: 42px;
    color: #475569;
    stroke-width: 1.5px;
    margin-bottom: 4px;
}

/* 7. Replay & Statistics Clean Icons */
.stat-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(190, 227, 84, 0.12);
    border: 1px solid rgba(190, 227, 84, 0.25);
    color: var(--accent-chartreuse);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap .lucide {
    width: 18px;
    height: 18px;
}

/* 8. Button Icons & Alignment */
.btn-primary, .btn-primary-sm, .btn-otw-trigger, .btn-meetup-trigger, .btn-replay-action, .btn-copy-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary .lucide, .btn-primary-sm .lucide, .btn-otw-trigger .lucide, .btn-meetup-trigger .lucide {
    width: 16px;
    height: 16px;
}

.btn-place-opt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-place-opt .lucide {
    width: 16px;
    height: 16px;
    color: var(--accent-chartreuse);
    flex-shrink: 0;
}

/* Danger Modal Improvements */
.btn-danger-solid {
    background: #ef4444 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
}

.btn-cancel-clean {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    padding: 12px;
}

/* ==========================================================================
   PREMIUM DIALOG BOX & FORM INPUT DESIGN SYSTEM (APPLE / ZENLY GLASSMORPHISM)
   ========================================================================== */

/* Universal Dark Glassmorphism for all Modal Dialogs */
.modal-overlay {
    background: rgba(3, 7, 18, 0.78) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card,
.settings-card,
.meetup-card,
.dev-card {
    background: linear-gradient(165deg, rgba(23, 32, 54, 0.92), rgba(12, 18, 33, 0.96)) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 26px !important;
    box-shadow: 0 25px 65px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 35px rgba(190, 227, 84, 0.06) !important;
    animation: modalCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalCardPop {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Universal Modern Dark Form Inputs (Eliminates raw browser white boxes) */
.form-group input[type="text"],
.settings-section input[type="text"],
#settings-input-name,
#input-nickname,
#meetup-note-input,
.add-friend-bar input,
.chat-input-form input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    padding: 12px 16px !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.form-group input[type="text"]::placeholder,
.settings-section input[type="text"]::placeholder,
#settings-input-name::placeholder,
#input-nickname::placeholder,
#meetup-note-input::placeholder,
.add-friend-bar input::placeholder,
.chat-input-form input::placeholder {
    color: #64748b !important;
    font-weight: 500 !important;
}

.form-group input[type="text"]:focus,
.settings-section input[type="text"]:focus,
#settings-input-name:focus,
#input-nickname:focus,
#meetup-note-input:focus,
.add-friend-bar input:focus,
.chat-input-form input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-chartreuse) !important;
    box-shadow: 0 0 0 3.5px rgba(190, 227, 84, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

/* Polished Labels with Micro-Typography */
.form-group label,
.settings-section label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 8px !important;
}

/* Settings Sections Glass Card */
.settings-section {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 20px !important;
    padding: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

/* Avatar Preview Circle in Settings */
.avatar-preview-circle {
    width: 68px !important;
    height: 68px !important;
    border-radius: 50% !important;
    border: 2.5px solid var(--accent-chartreuse) !important;
    box-shadow: 0 0 20px rgba(190, 227, 84, 0.35) !important;
    background: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.avatar-preview-circle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Avatar Grid Selectors in Modals */
.avatar-selector {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
    padding: 6px 0 !important;
}

.avatar-opt {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 8px 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.avatar-opt:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-2px) scale(1.06) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.avatar-opt.active {
    background: rgba(190, 227, 84, 0.15) !important;
    border-color: var(--accent-chartreuse) !important;
    box-shadow: 0 0 16px rgba(190, 227, 84, 0.35) !important;
    transform: scale(1.08) !important;
}

/* Photo Upload Button */
.btn-photo-upload {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    padding: 9px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.btn-photo-upload:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--accent-chartreuse) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   MAGIC INVITE LINK 1-CLICK SYSTEM STYLING
   ========================================================================== */

.magic-invite-share-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(190, 227, 84, 0.25);
    border-radius: 18px;
    padding: 14px;
    margin: 10px 0 14px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 15px rgba(190, 227, 84, 0.05);
}

.magic-invite-share-card.in-settings {
    margin: 10px 0 0 0;
    padding: 4px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.magic-invite-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.magic-invite-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(190, 227, 84, 0.15);
    color: var(--accent-chartreuse);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.magic-invite-icon-wrap i {
    width: 18px;
    height: 18px;
}

.magic-invite-header strong {
    display: block;
    font-size: 13px;
    color: #ffffff;
    font-weight: 700;
}

.magic-invite-header small {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

.magic-invite-btn-row {
    display: flex;
    gap: 8px;
}

.btn-magic-share-link {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-chartreuse), #a3cb38);
    border: none;
    border-radius: 12px;
    color: var(--text-on-chartreuse);
    font-size: 12px;
    font-weight: 800;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(190, 227, 84, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-magic-share-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(190, 227, 84, 0.45);
}

.btn-magic-share-link:active {
    transform: scale(0.97);
}

.btn-magic-share-wa {
    flex: 1;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-magic-share-wa:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn-magic-share-wa:active {
    transform: scale(0.97);
}

/* Join Modal Personalized Invite Banner */
.join-invite-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1.5px solid var(--accent-chartreuse);
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(190, 227, 84, 0.25);
    animation: bannerFloat 0.3s ease-out;
}

@keyframes bannerFloat {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.invite-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-chartreuse);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invite-banner-icon i {
    width: 20px;
    height: 20px;
}

.invite-banner-info {
    text-align: left;
}

.invite-banner-badge {
    font-size: 9px;
    font-weight: 900;
    color: var(--accent-chartreuse);
    letter-spacing: 0.8px;
    display: block;
}

.invite-banner-info h4 {
    margin: 2px 0 2px 0;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.invite-banner-info p {
    margin: 0;
    font-size: 11px;
    color: #cbd5e1;
}

/* Magic Invite Greeting Modal (Returning Users) */
.magic-invite-card {
    max-width: 380px !important;
    text-align: center;
    padding: 32px 24px !important;
}

.magic-invite-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px auto;
}

.magic-invite-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-chartreuse);
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 30px rgba(190, 227, 84, 0.4);
}

.magic-invite-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magic-invite-pulse-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-chartreuse);
    opacity: 0.8;
    animation: pingRing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: 1;
}

@keyframes pingRing {
    0% { transform: scale(1); opacity: 0.8; }
    75%, 100% { transform: scale(1.35); opacity: 0; }
}

.invite-tag-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent-chartreuse);
    background: rgba(190, 227, 84, 0.12);
    border: 1px solid rgba(190, 227, 84, 0.3);
    border-radius: 20px;
    padding: 4px 10px;
    display: inline-block;
    margin-bottom: 10px;
}

.magic-inviter-name {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.magic-inviter-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 22px;
}

/* ==========================================================================
   Modern Login Page & Auth Form Styles (Apple / Zenly Dark Glass)
   ========================================================================== */

.btn-preset-carrjies {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.15), rgba(30, 41, 59, 0.8));
}

.btn-preset-carrjies:hover {
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.login-card {
    max-width: 420px;
    padding: 32px 28px;
}

.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-group .input-leading-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-icon-group input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-icon-group input:focus {
    border-color: var(--accent-chartreuse);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(190, 227, 84, 0.22);
}

.input-icon-group input:focus + .btn-eye-toggle {
    color: #cbd5e1;
}

.input-icon-group:focus-within .input-leading-icon {
    color: var(--accent-chartreuse);
}

.btn-eye-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-eye-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.btn-eye-toggle svg {
    width: 17px;
    height: 17px;
}

.login-error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fca5a5;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
    animation: shakeError 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.login-error-banner svg {
    width: 18px;
    height: 18px;
    color: #ef4444;
    flex-shrink: 0;
}

@keyframes shakeError {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

.btn-submit-login {
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(190, 227, 84, 0.35);
}

.guest-toggle-row {
    margin-top: 18px;
    text-align: center;
}

.btn-guest-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.btn-guest-text:hover {
    color: var(--accent-chartreuse);
}

.guest-form-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    animation: fadeIn 0.25s ease-out;
}

.btn-guest-submit {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-guest-submit:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Logout button in Settings */
.btn-logout-action:hover {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.icon-logout {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #ef4444 !important;
}

/* ------------------------------------------------------------- */
/* Registration Modal & Password Rules Styles (Sesuai Gambar 2)  */
/* ------------------------------------------------------------- */
.auth-register-subtitle {
    font-size: 12.5px;
    color: #94a3b8;
    text-align: center;
    margin: -4px 0 16px 0;
    line-height: 1.4;
}

.password-rules-box {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 4px 0 14px 0;
}

.rules-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rule-item {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.rule-bullet {
    font-size: 14px;
    line-height: 1;
    color: #64748b;
}

.rule-item.valid {
    color: #10b981;
    font-weight: 600;
}

.rule-item.valid .rule-bullet {
    color: #10b981;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.custom-auth-select {
    width: 100%;
    height: 44px;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0 38px 0 14px;
    font-size: 13px;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-auth-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.custom-auth-select option {
    background: #0f172a;
    color: #f8fafc;
}

.select-chevron-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.btn-submit-register {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    height: 48px !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.38) !important;
    border: none !important;
    font-size: 15px !important;
    width: 100% !important;
    margin-top: 12px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-submit-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5) !important;
    filter: brightness(1.06);
}

.btn-submit-register:active {
    transform: translateY(1px);
}

.btn-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.15s ease;
}

.btn-back-link:hover {
    color: #f1f5f9;
}

.btn-back-link i, .btn-back-link svg {
    width: 16px;
    height: 16px;
}

.auth-switch-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: #94a3b8;
}

.btn-text-link {
    background: transparent;
    border: none;
    color: #10b981;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.15s ease;
}

.btn-text-link:hover {
    opacity: 0.85;
}

.login-success-banner {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease-out;
}

/* Dedicated Register Popup Modal Card */
.register-modal-card {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 26px !important;
    padding: 26px 22px !important;
    width: 100% !important;
    max-width: 430px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
    text-align: left !important;
    position: relative !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.register-modal-card::-webkit-scrollbar {
    width: 6px;
}
.register-modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

.modal-close-circle {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 10;
}

.modal-close-circle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: scale(1.08);
}

.modal-close-circle i, .modal-close-circle svg {
    width: 16px;
    height: 16px;
}

.register-header {
    text-align: center;
    margin-bottom: 14px;
}

.register-badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.28));
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.register-badge-icon i, .register-badge-icon svg {
    width: 26px;
    height: 26px;
}

.register-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}





