/* Header */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(10,14,23,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.header-container { max-width: 1400px; margin: 0 auto; padding: 0.75rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { font-size: 1.5rem; color: var(--accent-blue); }
.logo-text { font-size: 1.25rem; font-weight: 700; }
.logo-accent { color: var(--accent-blue); }
.nav { display: flex; gap: 2rem; }
.nav-link { color: var(--text-gray); font-weight: 500; font-size: 0.95rem; position: relative; padding: 0.5rem 0; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-blue); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text-white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-icon { position: relative; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: var(--text-gray); }
.header-icon:hover { background: rgba(255,255,255,0.1); color: var(--text-white); }
.notif-badge { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; background: var(--error-red); border-radius: 50%; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; }
.login-btn { display: flex; align-items: center; gap: 0.5rem; color: var(--text-gray); padding: 0.5rem 1rem; border-radius: var(--radius-full); }
.login-btn:hover { color: var(--text-white); background: rgba(255,255,255,0.05); }
.post-ad-btn { display: flex; align-items: center; gap: 0.5rem; background: var(--accent-blue); color: var(--text-white); padding: 0.6rem 1.25rem; border-radius: var(--radius-full); font-weight: 600; font-size: 0.9rem; }
.post-ad-btn:hover { background: var(--accent-blue-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,119,255,0.4); }
.user-menu { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 0.5rem; background: var(--tertiary-dark); padding: 0.5rem 1rem; border-radius: var(--radius-full); color: var(--text-white); cursor: pointer; border: 1px solid var(--border-color); font-family: inherit; }
.user-menu-btn:hover { border-color: var(--accent-blue); }
.user-avatar-sm { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; }
.user-dropdown { position: absolute; top: calc(100% + 0.5rem); right: 0; background: var(--secondary-dark); border: 1px solid var(--border-color); border-radius: var(--radius-md); min-width: 220px; display: none; box-shadow: var(--shadow); overflow: hidden; z-index: 100; }
.user-dropdown.show { display: block; }
.user-dropdown-header { padding: 1rem; border-bottom: 1px solid var(--border-color); }
.user-dropdown-header strong { display: block; }
.user-dropdown-header span { font-size: 0.85rem; color: var(--text-gray); }
.user-dropdown a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--text-gray); }
.user-dropdown a:hover { background: var(--tertiary-dark); color: var(--text-white); }
.user-dropdown a i { width: 20px; text-align: center; }
.user-dropdown .admin-link { color: var(--warning-orange); }
.user-dropdown .logout-link { color: var(--error-red); border-top: 1px solid var(--border-color); }

/* Mobile Menu Button */
.mobile-menu-btn { display: none; width: 44px; height: 44px; background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); color: var(--text-white); font-size: 1.25rem; border: none; cursor: pointer; align-items: center; justify-content: center; }

/* Mobile Menu Dropdown */
.mobile-menu { display: none; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; background: var(--secondary-dark); border-top: 1px solid var(--border-color); }
.mobile-menu.open { display: block; max-height: 500px; padding: 0.75rem 1.5rem; }
.mobile-menu-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 0.5rem; color: var(--text-gray); font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-menu-link:last-child { border-bottom: none; }
.mobile-menu-link:hover, .mobile-menu-link.active { color: var(--accent-blue); }
.mobile-menu-link.logout { color: var(--error-red); }
.mobile-menu-link i { width: 20px; text-align: center; }
.mobile-menu-divider { height: 1px; background: var(--border-color); margin: 0.5rem 0; }
.mobile-badge { background: var(--error-red); color: white; font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 10px; margin-left: auto; }

/* Footer */
.footer { background: var(--secondary-dark); border-top: 1px solid var(--border-color); padding: 3rem 2rem 1rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-gray); font-size: 0.9rem; }
.footer-links h4, .footer-contact h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.footer-links a { display: block; color: var(--text-gray); font-size: 0.9rem; margin-bottom: 0.75rem; }
.footer-links a:hover { color: var(--accent-blue); }
.footer-contact p { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-gray); font-size: 1.1rem; }
.social-links a:hover { background: var(--accent-blue); color: var(--text-white); }
.footer-bottom { text-align: center; padding-top: 1.5rem; color: var(--text-gray); font-size: 0.85rem; }

/* Styled Map - Light Clean Theme */
.leaflet-container { background: #f2efe9 !important; border-radius: var(--radius-md); }
.leaflet-tile-pane { filter: none; }
.leaflet-control-zoom a { background: var(--secondary-dark) !important; color: var(--text-white) !important; border-color: var(--border-color) !important; }
.leaflet-control-zoom a:hover { background: var(--tertiary-dark) !important; }
.leaflet-popup-content-wrapper { background: var(--secondary-dark) !important; color: var(--text-white) !important; border-radius: var(--radius-md) !important; box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important; }
.leaflet-popup-tip { background: var(--secondary-dark) !important; }
.leaflet-popup-content { margin: 0.75rem 1rem !important; font-family: 'Poppins', sans-serif !important; }
.leaflet-popup-content a { color: var(--accent-blue); }
.leaflet-popup-close-button { color: var(--text-gray) !important; }
.leaflet-popup-close-button:hover { color: var(--text-white) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,0.8) !important; color: #666 !important; font-size: 0.6rem !important; }
.leaflet-control-attribution a { color: var(--accent-blue) !important; }
.custom-marker { background: transparent !important; border: none !important; }

/* Toast */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--secondary-dark); border: 1px solid var(--border-color); padding: 1rem 1.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow); display: flex; align-items: center; gap: 0.75rem; z-index: 9999; transform: translateX(150%); transition: transform 0.3s ease; }
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--success-green); }
.toast.success i { color: var(--success-green); }
.toast.error { border-color: var(--error-red); }
.toast.error i { color: var(--error-red); }

/* RESPONSIVE */
@media (max-width: 992px) {
    .nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .user-menu-name { display: none; }
    .header-actions .login-btn span { display: none; }
    .post-ad-btn span { display: none; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .header-container { padding: 0.75rem 1rem; }
    .header-icon { width: 36px; height: 36px; font-size: 0.9rem; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .header-actions { gap: 0.5rem; }
    .user-menu { display: none; }
    .post-ad-btn { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
}
@media (max-width: 576px) {
    .header-container { padding: 0.6rem 0.75rem; gap: 0.5rem; }
    .logo-text { font-size: 1rem; }
    .logo-icon { font-size: 1.2rem; }
    .header-icon { display: none; }
    .post-ad-btn { padding: 0.5rem; }
    .post-ad-btn i { margin: 0; }
    .login-btn { padding: 0.4rem 0.6rem; }
}

/* ============ PRO POLISH (global) ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--tertiary-dark, #1a2540); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-color, #2d3748); }
::selection { background: var(--accent-blue); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-blue); outline-offset: 2px;
}

@keyframes ccFadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.header { animation: none; }

.post-ad-btn, .login-btn, .btn, .user-menu-btn { transition: var(--transition); }
.header-icon { transition: var(--transition); }
.header-icon:active, .post-ad-btn:active { transform: scale(0.95); }

.user-dropdown { animation: ccFadeInUp 0.2s ease; transform-origin: top right; }

/* Toast (shared with dashboards) */
#ccToastWrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { transform: translateX(120%); opacity: 0; }
.toast.show { transform: translateX(0); opacity: 1; }

/* Tooltip utility */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); background: #000; color: #fff; padding: 0.4rem 0.7rem; border-radius: 6px; font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.2s ease; z-index: 50; }
[data-tooltip]:hover::after { opacity: 0.95; transform: translateX(-50%) translateY(0); }
