/* Mobile Responsive Styles - v2024-12-27 */
/* Comprehensive mobile styles for goviva.ai */

/* ============================================
   CSS VARIABLES (fallbacks)
   ============================================ */
:root {
    --brand-primary: #0D9488;
    --brand-primary-dark: #0F766E;
    --brand-primary-light: #14B8A6;
    --brand-accent: #F97316;
    --brand-dark: #1F2937;
    --brand-gray: #6B7280;
    --brand-light: #F9FAFB;
    --white: #FFFFFF;
}

/* ============================================
   LOGO WITH TAGLINE
   ============================================ */

.logo-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--brand-gray, #6B7280);
    letter-spacing: 0.05em;
    margin-top: 2px;
    display: block;
}

a.logo:has(.logo-tagline),
.logo:has(.logo-tagline) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

/* ============================================
   MOBILE MENU COMPONENT
   ============================================ */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--brand-dark, #1F2937);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    padding: 80px 24px 24px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 16px 0;
    color: var(--brand-dark, #1F2937);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    border-bottom: 1px solid #E5E7EB;
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: var(--brand-primary, #0D9488);
}

.mobile-menu a.btn-nav {
    display: inline-block;
    background: var(--brand-primary, #0D9488);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    border: none;
}

.mobile-menu a.btn-nav:hover {
    background: var(--brand-primary-dark, #0F766E);
}

.mobile-menu-section {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-gray, #6B7280);
    margin-top: 24px;
    margin-bottom: 8px;
    padding-bottom: 0;
    border: none;
}

/* ============================================
   TABLET BREAKPOINT (1024px and below)
   ============================================ */

@media (max-width: 1024px) {
    /* Grid adjustments - 2 columns */
    .stats-grid,
    .events-grid,
    .audience-grid,
    .surge-grid,
    .hire-grid,
    .benefits-grid,
    .steps-grid,
    .pricing-cards,
    .see-it-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .ai-grid,
    .two-col-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Hero adjustments */
    .hero-promise {
        font-size: 44px !important;
    }

    .hero-shift {
        font-size: 20px !important;
    }
}

/* ============================================
   MOBILE BREAKPOINT (768px and below)
   ============================================ */

@media (max-width: 768px) {
    /* Show mobile menu elements */
    .mobile-menu-btn {
        display: flex;
    }

    /* Mobile menu and overlay - only show when active */
    /* Don't set display:block here - it was causing touch events to be blocked */
    .mobile-menu.active {
        display: block;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    /* Hide desktop navigation */
    .nav-links {
        display: none !important;
    }

    .nav-dropdown-menu {
        display: none !important;
    }

    /* Navigation */
    .nav-container {
        padding: 0 1rem;
    }

    .logo img {
        height: 40px;
    }

    /* Container */
    .container {
        padding: 0 1rem !important;
    }

    /* Typography */
    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.75rem !important;
    }

    .section-header p {
        font-size: 1rem !important;
    }

    /* Section padding */
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* ========== HERO SECTION ========== */
    .hero {
        padding: 2rem 0 !important;
    }

    .hero-stat-badge {
        font-size: 12px !important;
        padding: 8px 14px !important;
        margin-bottom: 16px !important;
    }

    .hero-stat-badge .stat-number {
        font-size: 14px !important;
    }

    .hero-promise {
        font-size: 28px !important;
        margin-bottom: 16px !important;
        line-height: 1.15 !important;
        padding: 0 0.5rem;
    }

    .hero-shift {
        font-size: 16px !important;
        margin-bottom: 20px !important;
        padding: 0 1rem !important;
        line-height: 1.5 !important;
    }

    .hero-solution-label {
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }

    .hero h1 {
        font-size: 1.75rem !important;
    }

    .hero p {
        font-size: 0.95rem !important;
    }

    .hero-ctas {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0 1rem;
    }

    .hero-ctas a,
    .hero-ctas button {
        width: 100%;
        text-align: center;
    }

    .hero-stats,
    .hero-stats-row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .hero-stat {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        flex-direction: column !important;
        text-align: center;
        gap: 0.25rem !important;
    }

    .hero-stat svg {
        display: none;
    }

    /* ========== SEARCH/URL CLAIM BOX ========== */
    .search-container {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .search-box {
        flex-direction: column !important;
        border-radius: 12px !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .search-prefix {
        padding: 12px 16px !important;
        font-size: 14px !important;
        text-align: center !important;
        border-right: none !important;
        border-bottom: 1px solid #E5E7EB !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .search-input {
        padding: 14px 16px !important;
        font-size: 16px !important;
        text-align: center !important;
        min-width: auto !important;
    }

    .search-button {
        padding: 14px 20px !important;
        border-radius: 0 0 12px 12px !important;
        font-size: 15px !important;
    }

    .no-credit-card {
        font-size: 12px !important;
        margin-top: 10px !important;
    }

    /* ========== GRIDS - Single column ========== */
    .stats-grid,
    .events-grid,
    .audience-grid,
    .surge-grid,
    .hire-grid,
    .benefits-grid,
    .steps-grid,
    .pricing-cards,
    .chamber-benefits-grid,
    .see-it-grid,
    .more-features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Value props grid (What Your AI Chat Does) */
    .value-props-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Stats section - 2x2 grid */
    .stats-section .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .stat-item h3 {
        font-size: 2rem !important;
    }

    .stat-item p {
        font-size: 0.85rem !important;
    }

    /* ========== CARDS ========== */
    .stat-card,
    .benefit-card,
    .step-card,
    .pricing-card,
    .surge-card,
    .audience-card,
    .event-card {
        padding: 1.25rem !important;
    }

    .surge-card h3 {
        font-size: 1.1rem !important;
    }

    .surge-card p {
        font-size: 0.9rem !important;
    }

    .surge-stat {
        font-size: 0.95rem !important;
        padding: 0.75rem 1.25rem !important;
    }

    /* See It In Action cards */
    .see-it-card img {
        height: 180px !important;
    }

    .see-it-card-content {
        padding: 1rem !important;
    }

    .see-it-card h3 {
        font-size: 1.1rem !important;
    }

    .see-it-card p {
        font-size: 0.9rem !important;
    }

    /* ========== AI SECTION ========== */
    .ai-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .ai-content h2 {
        font-size: 1.75rem !important;
    }

    .ai-content p {
        font-size: 1rem !important;
    }

    .ai-features {
        gap: 0.75rem !important;
    }

    .ai-feature {
        font-size: 0.95rem !important;
    }

    .ai-visual {
        padding: 2rem 1.5rem !important;
        border-radius: 1rem !important;
    }

    .ai-visual h3 {
        font-size: 1.25rem !important;
    }

    .ai-visual .icon svg {
        width: 3rem !important;
        height: 3rem !important;
    }

    /* ========== MORE FEATURES SECTION ========== */
    .more-features-section {
        padding: 3rem 0 !important;
    }

    .more-features-title {
        font-size: 1.75rem !important;
    }

    .more-features-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .more-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .more-feature-item {
        padding: 1rem !important;
    }

    .more-feature-item h4 {
        font-size: 1rem !important;
    }

    .more-feature-item p {
        font-size: 0.8rem !important;
    }

    .more-feature-icon svg {
        width: 28px !important;
        height: 28px !important;
    }

    /* ========== CTA SECTIONS ========== */
    .cta-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
    }

    .cta-stat {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }

    .cta-stat strong {
        font-size: 1.25rem !important;
    }

    /* ========== FOOTER ========== */
    .footer {
        padding: 2.5rem 0 1.5rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand h4 {
        font-size: 1.25rem !important;
    }

    .footer-brand p {
        font-size: 0.9rem !important;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links h5 {
        font-size: 0.9rem !important;
    }

    .footer-links a {
        font-size: 0.9rem !important;
    }

    .footer-bottom {
        font-size: 0.8rem !important;
        padding-top: 1.5rem !important;
    }

    /* ========== FORMS ========== */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px !important;
    }

    .form-group {
        margin-bottom: 1rem !important;
    }

    .form-row,
    .booking-form-row {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Booking modal */
    .booking-modal {
        width: 95% !important;
        max-width: 100% !important;
        margin: 1rem !important;
    }

    .booking-modal-header {
        padding: 1rem 1.25rem !important;
    }

    .booking-modal-body {
        padding: 1.25rem !important;
    }

    .time-slots {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ========== MISC ========== */
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table table {
        min-width: 500px;
    }

    /* Success/claimed states */
    .success-celebration,
    .claimed-notice {
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }

    .success-title,
    .claimed-title {
        font-size: 22px !important;
    }

    .success-url,
    .claimed-url {
        font-size: 14px !important;
        padding: 10px 14px !important;
    }

    .success-cta-btn {
        font-size: 16px !important;
        padding: 14px 24px !important;
    }

    .suggestion-chip {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   SMALL MOBILE BREAKPOINT (480px and below)
   ============================================ */

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    .hero-promise {
        font-size: 24px !important;
    }

    .hero-shift {
        font-size: 14px !important;
    }

    .search-prefix {
        font-size: 13px !important;
    }

    .search-input {
        font-size: 16px !important;
    }

    /* Stats section - single column on very small */
    .stats-section .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-item h3 {
        font-size: 1.75rem !important;
    }

    /* More features - single column */
    .more-features-grid {
        grid-template-columns: 1fr !important;
    }

    .more-features-title {
        font-size: 1.5rem !important;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-white,
    .btn-outline-white,
    .btn-nav {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }

    /* Time slots */
    .time-slots {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .time-slot {
        padding: 0.4rem !important;
        font-size: 0.8rem !important;
    }
}

/* ============================================
   DASHBOARD MOBILE STYLES
   ============================================ */

@media (max-width: 768px) {
    /* Hide sidebar on mobile - use bottom nav instead */
    .ai-sidebar {
        display: none !important;
    }

    /* Make main content full-width */
    .ai-app {
        display: block;
    }

    .ai-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Add mobile header with hamburger for sidebar access */
    .ai-topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-layout {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
        gap: 4px;
    }

    .sidebar-nav a {
        flex-shrink: 0;
        padding: 8px 16px;
        white-space: nowrap;
    }

    .main-content {
        padding: 1rem !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .metric-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .communications-list {
        padding: 0.5rem !important;
    }

    .communication-item {
        padding: 1rem !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

body.mobile-menu-open {
    overflow: hidden;
}

/* ============================================
   TOUCH-FRIENDLY TARGETS
   ============================================ */

@media (max-width: 768px) {
    /* Ensure minimum touch target sizes */
    a, button, input[type="submit"], input[type="button"],
    .time-slot, .suggestion-chip, .nav-item {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better tap feedback */
    a, button {
        -webkit-tap-highlight-color: rgba(13, 148, 136, 0.1);
    }
}

/* ============================================
   SAFE AREA INSETS (notched phones)
   ============================================ */

@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .mobile-menu {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

/* ============================================
   PWA INSTALL BANNER
   ============================================ */

.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.pwa-install-banner.visible {
    transform: translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.pwa-install-text span {
    font-size: 12px;
    color: #6b7280;
}

.pwa-install-btn {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.pwa-install-btn:hover {
    background: #e55a2b;
}

.pwa-install-dismiss {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.pwa-install-dismiss:hover {
    color: #6b7280;
}

/* ============================================
   PWA UPDATE BANNER
   ============================================ */

.pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: white;
    z-index: 10001;
    animation: pwaSlideDown 0.3s ease;
}

@keyframes pwaSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.pwa-update-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
}

.pwa-update-content span {
    font-size: 14px;
}

.pwa-update-btn {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.pwa-update-dismiss {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

/* ============================================
   iOS INSTALL INSTRUCTIONS MODAL
   ============================================ */

.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-ios-modal.visible {
    opacity: 1;
    visibility: visible;
}

.pwa-ios-content {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.pwa-ios-modal.visible .pwa-ios-content {
    transform: translateY(0);
}

.pwa-ios-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-ios-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.pwa-ios-content p {
    margin: 0 0 16px;
    color: #6b7280;
}

.pwa-ios-content ol {
    margin: 0;
    padding-left: 20px;
}

.pwa-ios-content li {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ============================================
   MOBILE HEADER (Dashboard PWA)
   ============================================ */

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 18px;
}

.mobile-header-logo img {
    border-radius: 8px;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s, color 0.2s;
}

.mobile-header-btn:hover,
.mobile-header-btn:active {
    background: #e5e7eb;
    color: #111827;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION (Dashboard PWA)
   ============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Add padding to main content for bottom nav */
    .dashboard-main,
    .main-content,
    .dashboard-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 4px;
    color: #6b7280;
    text-decoration: none;
    font-size: 11px;
    position: relative;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
    color: #FF6B35;
}

.bottom-nav-item:active {
    opacity: 0.7;
}

.bottom-nav-item svg,
.bottom-nav-item .nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.bottom-nav-item span:not(.nav-badge) {
    font-weight: 500;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.nav-badge:empty {
    display: none;
}

/* ============================================
   MORE MENU (Bottom Nav Expansion)
   ============================================ */

.more-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.more-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.more-menu {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.more-menu-overlay.open .more-menu {
    transform: translateY(0);
}

.more-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 16px 16px 0 0;
}

.more-menu-header span {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.more-menu-close {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s, color 0.2s;
}

.more-menu-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.more-menu-list {
    padding: 8px 0;
}

.more-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    text-decoration: none;
    color: #374151;
    transition: background 0.15s;
}

.more-menu-item:hover,
.more-menu-item:active {
    background: #f9fafb;
}

.more-menu-icon {
    font-size: 22px;
    width: 32px;
    text-align: center;
}

.more-menu-label {
    font-size: 16px;
    font-weight: 500;
}

/* Hide more menu on desktop */
@media (min-width: 769px) {
    .more-menu-overlay {
        display: none;
    }
}

/* ============================================
   FLOATING ACTION BUTTON (FAB)
   ============================================ */

.fab-container {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
    right: 16px;
    z-index: 10001;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 769px) {
    .fab-container {
        bottom: 24px;
        right: 24px;
    }
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #FF6B35;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-main.open {
    background: #374151;
    transform: rotate(45deg);
}

.fab-main svg,
.fab-icon {
    width: 24px;
    height: 24px;
    color: white;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s;
}

.fab-menu {
    position: absolute;
    bottom: 64px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.2s ease;
    pointer-events: none;
}

.fab-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: none;
    border-radius: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.fab-action:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fab-action:active {
    transform: scale(0.98);
}

.fab-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #FF6B35;
}

.fab-action-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.fab-action-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.fab-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* FAB Quick Modal */
.fab-quick-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.fab-quick-modal.open {
    opacity: 1;
    visibility: visible;
}

.fab-quick-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.fab-quick-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.fab-quick-modal.open .fab-quick-modal-content {
    transform: translateY(0);
}

@media (min-width: 769px) {
    .fab-quick-modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(0.9);
        max-width: 480px;
        width: 100%;
        border-radius: 16px;
        max-height: 80vh;
    }

    .fab-quick-modal.open .fab-quick-modal-content {
        transform: translate(-50%, -50%) scale(1);
    }
}

.fab-quick-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 16px 16px 0 0;
}

.fab-quick-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #FF6B35;
}

.fab-quick-modal-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.fab-quick-modal-header h3 {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.fab-quick-modal-close {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s;
}

.fab-quick-modal-close:hover {
    background: #e5e7eb;
}

.fab-quick-modal-body {
    padding: 20px;
}

.fab-quick-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

.fab-modal-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    border: none;
}

.fab-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fab-modal-btn-primary {
    background: #FF6B35;
    color: white;
}

.fab-modal-btn-primary:hover:not(:disabled) {
    background: #e55a2b;
}

.fab-modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.fab-modal-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

/* FAB Toast Notifications */
.fab-toast {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 2001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.fab-toast-success {
    background: #059669;
}

.fab-toast-error {
    background: #dc2626;
}

@media (min-width: 769px) {
    .fab-toast {
        bottom: 40px;
    }
}

/* ============================================
   STANDALONE PWA MODE ADJUSTMENTS
   ============================================ */

@media (display-mode: standalone) {
    .dashboard-header {
        padding-top: env(safe-area-inset-top, 20px);
    }

    body {
        overscroll-behavior: none;
    }

    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

/* ============================================
   OFFLINE INDICATOR
   ============================================ */

.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    z-index: 10003;
    display: none;
}

.offline-indicator.visible {
    display: block;
}

/* ============================================
   QUICK ACTION MODALS (Mobile Optimized)
   ============================================ */

.quick-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-modal.visible {
    opacity: 1;
    visibility: visible;
}

.quick-modal-content {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.quick-modal.visible .quick-modal-content {
    transform: translateY(0);
}

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

.quick-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.quick-modal-close {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.quick-modal-footer button {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.quick-modal-footer .btn-secondary {
    background: #f3f4f6;
    border: none;
    color: #374151;
}

.quick-modal-footer .btn-primary {
    background: #FF6B35;
    border: none;
    color: white;
}
