/* ==========================================================================
   ISP NOC Inventory & Power Management - Responsive Design System
   Full Mobile, Tablet, and Desktop Ergonomics (Strict CSP Compliant)
   ========================================================================== */

/* --- Mobile Navigation Drawer Animation --- */
#mobile-nav-menu {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-out;
}

#mobile-nav-menu:not(.hidden) {
    display: flex;
    flex-direction: column;
}

/* --- Mobile Hamburger Button (Strictly hidden on Laptop/Desktop >= 768px) --- */
.responsive-mobile-menu-btn {
    display: inline-flex;
}
@media (min-width: 768px) {
    .responsive-mobile-menu-btn {
        display: none !important;
    }
}

/* --- Responsive Table Wrapper with Touch Momentum & Scroll Indicators --- */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border-radius: 1rem;
}

/* Subtle scrollbar for modern browsers */
.table-responsive-wrapper::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #0d1322;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #223254;
    border-radius: 3px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

/* Table Column Minimum Width Preservations */
.table-devices {
    min-width: 820px;
}

.table-floors {
    min-width: 680px;
}

.table-ups {
    min-width: 780px;
}

.table-users {
    min-width: 660px;
}

.table-types {
    min-width: 600px;
}

.table-dashboard-activity {
    min-width: 640px;
}

/* Scroll Hint Badge for Small Screens */
.mobile-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 11px;
    font-family: JetBrains Mono, monospace;
    color: #64748b;
    padding: 0.375rem 0.5rem;
    margin-bottom: 0.375rem;
}

@media (min-width: 768px) {
    .mobile-scroll-hint {
        display: none !important;
    }
}

/* --- Dynamic Viewport Heights for Modals --- */
.modal-overlay {
    min-height: 100vh;
    min-height: 100dvh;
}

.modal-dialog-card {
    max-height: 90vh;
    max-height: 90dvh;
}

/* --- Touch Targets & Input Enhancements on Mobile Devices --- */
@media (max-width: 640px) {
    /* Prevent iOS Safari 16px auto-zoom while maintaining crisp NOC styling */
    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    select {
        font-size: 16px !important;
    }

    /* Modal action buttons stack full-width for effortless thumb tap */
    .modal-actions-bar {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
        gap: 0.625rem;
    }

    .modal-actions-bar > button,
    .modal-actions-bar > a {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }

    /* Adjust cockpit SVG radial arc scale on small screens */
    .radial-gauge-wrap {
        transform: scale(0.92);
    }
}

/* Small tablet optimizations (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .modal-actions-bar {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        gap: 0.75rem;
    }
}

/* --- User Role Badge Responsive Visibility --- */
.user-role-short {
    display: inline;
}
.user-role-full {
    display: none;
}
@media (min-width: 640px) {
    .user-role-short {
        display: none !important;
    }
    .user-role-full {
        display: inline !important;
    }
}

/* --- Responsive Display Utilities (for pre-compiled Tailwind) --- */
@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }
    .sm\:inline {
        display: inline !important;
    }
    .sm\:block {
        display: block !important;
    }
    .sm\:flex {
        display: flex !important;
    }
}
@media (max-width: 767px) {
    .md\:block {
        display: none !important;
    }
}
@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
    .md\:block {
        display: block !important;
    }
    .md\:flex {
        display: flex !important;
    }
    .md\:inline {
        display: inline !important;
    }
}
@media (min-width: 1024px) {
    .lg\:hidden {
        display: none !important;
    }
    .lg\:block {
        display: block !important;
    }
    .lg\:flex {
        display: flex !important;
    }
}

/* --- Dashboard Telemetry Metric Cards Equal-Height & Alignment on Laptops --- */
.dashboard-metric-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    align-items: stretch !important;
}
@media (min-width: 640px) {
    .dashboard-metric-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}
@media (min-width: 1024px) {
    .dashboard-metric-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

.dashboard-metric-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    min-height: 185px;
    box-sizing: border-box !important;
}
.dashboard-metric-card-footer {
    margin-top: auto !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(34, 50, 84, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.75rem !important;
}

/* ==========================================================================
   Advanced Carrier-Grade NOC Visual Telemetry Graphics & Micro-Animations
   ========================================================================== */

/* --- Cyber Grid Mesh Background Texture --- */
.noc-cyber-mesh {
    background-image: radial-gradient(rgba(6, 182, 212, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
}

.noc-cyber-mesh-purple {
    background-image: radial-gradient(rgba(168, 85, 247, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* --- Animated Oscilloscope Telemetry Wave --- */
@keyframes telemetryDash {
    0% {
        stroke-dashoffset: 160;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.telemetry-wave-path {
    stroke-dasharray: 160;
    animation: telemetryDash 2.5s linear infinite;
}

/* --- Pulsing Status Indicator --- */
@keyframes neonPulseGlow {
    0%, 100% {
        opacity: 0.85;
        filter: drop-shadow(0 0 3px currentColor);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px currentColor);
    }
}

.neon-pulse-glow {
    animation: neonPulseGlow 2.5s ease-in-out infinite;
}

/* --- Mini Vertical Server Rack Silhouette Visualizer --- */
.rack-silhouette-mini {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    width: 26px;
    height: 72px;
    background: #060a14;
    border: 1.5px solid #1e293b;
    border-radius: 5px;
    padding: 3px 2.5px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
    position: relative;
    flex-shrink: 0;
}

.rack-silhouette-mini::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 2px;
    right: 2px;
    height: 2px;
    background: #475569;
    border-radius: 1px;
}

.rack-silhouette-mini::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 2px;
    right: 2px;
    height: 2px;
    background: #475569;
    border-radius: 1px;
}

.rack-slot-led {
    width: 100%;
    height: 3px;
    border-radius: 1px;
    margin-top: 1.5px;
    transition: all 0.3s ease;
}

/* --- Telemetry Sparkline Curves --- */
.sparkline-glow {
    filter: drop-shadow(0 0 4px currentColor);
}



