/* ========================================
   ADMIN MOBILE BILLING STYLES
   ======================================== */

/* Mobile Mapping Styles */
.mobile-mapping-container {
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.mobile-mapping-header {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-mapping-content {
    padding-top: 80px;
    padding-bottom: 100px;
    height: 100vh;
    overflow-y: auto;
}

.mobile-map-container {
    height: 50vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 1rem;
    position: relative;
}

.mobile-map-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    margin: 0 1rem 1rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-map-stat {
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.mobile-map-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--admin-primary);
    margin-bottom: 0.25rem;
}

.mobile-map-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-map-controls {
    background: white;
    margin: 0 1rem 1rem 1rem;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-map-controls .btn {
    border-radius: 8px;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
}

.mobile-map-legend {
    background: white;
    margin: 0 1rem 1rem 1rem;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-map-legend h6 {
    color: var(--admin-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.mobile-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.mobile-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mobile-map-actions {
    position: fixed;
    bottom: 100px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-map-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--admin-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-map-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.6);
}

.mobile-map-action-btn.active {
    background: var(--admin-success);
}

.mobile-map-action-btn:active {
    transform: scale(0.95);
}

/* Map markers for mobile */
.mobile-customer-marker {
    background-color: #28a745;
    border: 2px solid white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    cursor: pointer;
    animation: mobileCustomerGlow 4s ease-in-out infinite;
}

.mobile-onu-marker {
    background-color: #007bff;
    border: 2px solid white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    cursor: pointer;
    animation: none !important;
}

.mobile-offline-marker {
    background-color: #dc3545;
    border: 2px solid white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    cursor: pointer;
    animation: none !important;
}

.mobile-odp-marker {
    background-color: #ffc107;
    border: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Mobile map animations */
@keyframes mobileCustomerGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
        transform: scale(1.1);
    }
}

@keyframes mobileOnuBlink {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.3;
        transform: scale(0.9);
    }
}

@keyframes mobileOfflinePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mobile-map-container {
        height: 45vh;
        margin: 0.5rem;
    }
    
    .mobile-map-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
        padding: 0.75rem;
        margin: 0 0.5rem 0.75rem 0.5rem;
    }
    
    .mobile-map-stat {
        padding: 0.5rem;
    }
    
    .mobile-map-stat-number {
        font-size: 1.25rem;
    }
    
    .mobile-map-stat-label {
        font-size: 0.7rem;
    }
    
    .mobile-map-controls,
    .mobile-map-legend {
        margin: 0 0.5rem 0.75rem 0.5rem;
        padding: 0.75rem;
    }
    
    .mobile-map-actions {
        bottom: 90px;
        right: 10px;
    }
    
    .mobile-map-action-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .mobile-map-container {
        height: 40vh;
    }
    
    .mobile-map-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    .mobile-map-stat {
        padding: 0.4rem;
    }
    
    .mobile-map-stat-number {
        font-size: 1.1rem;
    }
    
    .mobile-map-stat-label {
        font-size: 0.65rem;
    }
}

/* Mobile-first responsive design for admin billing */
:root {
    --admin-primary: #4361ee;
    --admin-secondary: #3f37c9;
    --admin-accent: #4895ef;
    --admin-success: #4cc9f0;
    --admin-warning: #f72585;
    --admin-info: #560bad;
    --admin-light: #f8f9fa;
    --admin-dark: #212529;
    --admin-card-radius: 16px;
    --admin-btn-radius: 50px;
    --admin-transition: 0.3s ease;
    --admin-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --admin-shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
}

/* Mobile Header Styling */
.mobile-header {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.mobile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.mobile-header h4 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.mobile-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--admin-card-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--admin-shadow);
    transition: all var(--admin-transition);
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-primary), var(--admin-accent));
    transform: scaleX(0);
    transition: transform var(--admin-transition);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--admin-shadow-hover);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: all var(--admin-transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
    opacity: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    transition: all var(--admin-transition);
}

.stat-card:hover .stat-value {
    transform: scale(1.05);
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Billing Menu */
.billing-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.menu-card {
    background: white;
    border-radius: var(--admin-card-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--admin-shadow);
    transition: all var(--admin-transition);
    cursor: pointer;
    border: 1px solid rgba(67, 97, 238, 0.1);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: block;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--admin-shadow-hover);
    color: inherit;
    text-decoration: none;
}

.menu-card:active {
    transform: translateY(-2px) scale(0.98);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67, 97, 238, 0.1), transparent);
    transition: left 0.5s ease;
}

.menu-card:hover::before {
    left: 100%;
}

.menu-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: all var(--admin-transition);
}

.menu-card:hover .menu-icon {
    transform: scale(1.1) rotate(5deg);
}

.menu-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: all var(--admin-transition);
}

.menu-card:hover .menu-title {
    color: var(--admin-primary);
}

.menu-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    transition: all var(--admin-transition);
}

.menu-card:hover .menu-description {
    color: #495057;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: var(--admin-card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--admin-shadow);
    position: relative;
    overflow: hidden;
}

.quick-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-success), var(--admin-warning));
}

.quick-actions h5 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.quick-actions h5 i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-btn {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--admin-transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn i {
    margin-right: 0.5rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(11,20,55,0.96), rgba(15,28,79,0.96));
    border-top: 1px solid rgba(255,255,255,0.08);
    height: 70px;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 8px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #93A1C6;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
    margin: 0 4px;
}

.nav-item.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-item i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item:hover {
    color: #fff;
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}

/* Special styling for Home button (center button) */
.nav-item.home-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin: -8px auto 0 auto;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.4);
    transform: translateY(-4px);
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    animation: float-home 3s ease-in-out infinite;
}

/* Pulsing animation for home button */
@keyframes pulse-home {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
}

/* Glow animation for home button */
@keyframes glow-home {
    0% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(102, 126, 234, 0.3));
    }
    50% {
        filter: brightness(1.1) drop-shadow(0 0 15px rgba(102, 126, 234, 0.6));
    }
    100% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(102, 126, 234, 0.3));
    }
}

/* Floating animation */
@keyframes float-home {
    0%, 100% {
        transform: translateY(-4px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Add particle effect */
.nav-item.home-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: particle-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particle-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}

.nav-item.home-button:hover {
    animation: float-home 3s ease-in-out infinite, glow-home 1.5s ease-in-out infinite;
}

.nav-item.home-button:active {
    animation: none;
    filter: brightness(1.2) drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
}

.nav-item.home-button i {
    font-size: 24px;
    color: #fff;
    margin-bottom: 2px;
}

.nav-item.home-button span {
    font-size: 10px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Adjust other nav items for home button */
.nav-item:not(.home-button) {
    margin-top: 4px;
}

.nav-item:not(.home-button) i {
    font-size: 18px;
}

.nav-item:not(.home-button) span {
    font-size: 11px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .billing-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .menu-card {
        padding: 1.25rem;
    }
    
    .menu-icon {
        font-size: 2rem;
    }
    
    .menu-title {
        font-size: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .billing-menu {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .menu-card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .quick-actions {
        padding: 1rem;
    }
    
    .mobile-header {
        padding: 0.75rem;
    }
    
    .mobile-header h4 {
        font-size: 1.1rem;
    }
    
    .mobile-header p {
        font-size: 0.8rem;
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .billing-menu {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Touch feedback animations */
@keyframes touch-feedback {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

.touch-feedback {
    animation: touch-feedback 0.2s ease;
}

/* Success/Error states */
.success-state {
    border-left: 4px solid var(--admin-success);
    background: rgba(76, 201, 240, 0.1);
}

.error-state {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.warning-state {
    border-left: 4px solid var(--admin-warning);
    background: rgba(247, 37, 133, 0.1);
}

/* Accessibility improvements */
.btn:focus,
.menu-card:focus,
.nav-item:focus {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .stat-card,
    .menu-card,
    .quick-actions {
        background: #2d3748;
        color: #e2e8f0;
        border-color: rgba(255,255,255,0.1);
    }
    
    .stat-label,
    .menu-description {
        color: #a0aec0;
    }
    
    .menu-card:hover .menu-description {
        color: #e2e8f0;
    }
}
