@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Premium HSL Dark Mode */
    --bg-dark: hsl(222, 47%, 6%);
    --bg-card: hsla(223, 47%, 11%, 0.85);
    --border-color: hsla(217, 32%, 18%, 0.7);
    --text-primary: hsl(210, 40%, 96%);
    --text-secondary: hsl(215, 20%, 65%);
    --accent-blue: hsl(217, 91%, 60%);
    --accent-blue-glow: hsla(217, 91%, 60%, 0.35);
    --accent-cyan: hsl(190, 90%, 50%);
    --accent-cyan-glow: hsla(190, 90%, 50%, 0.35);
    --accent-green: hsl(142, 70%, 45%);
    --accent-green-glow: hsla(142, 70%, 45%, 0.25);
    --accent-orange: hsl(24, 90%, 50%);
    --accent-orange-glow: hsla(24, 90%, 50%, 0.25);
    --accent-red: hsl(0, 84%, 60%);
    --accent-red-glow: hsla(0, 84%, 60%, 0.25);
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow-x: hidden;
}

/* Sidebar Styling */
aside {
    background-color: hsla(223, 47%, 8%, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Show scrollbar only for sidebar */
aside::-webkit-scrollbar {
    display: block;
    width: 4px;
}

aside::-webkit-scrollbar-track {
    background: transparent;
}

aside::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand-icon {
    font-size: 1.8rem;
}

.brand-name h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-name span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    display: block;
    margin-top: 2px;
}

.menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-primary);
    background-color: hsla(217, 91%, 60%, 0.1);
    border-color: hsla(217, 91%, 60%, 0.2);
}

.menu-item.active {
    box-shadow: 0 0 15px var(--accent-blue-glow);
    border-color: var(--accent-blue);
}

.menu-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

/* Control Panel Card inside Sidebar */
.sidebar-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: auto;
}

.sidebar-panel-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.btn-outage {
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-red-glow);
    transition: var(--transition-smooth);
}

.btn-outage:hover {
    transform: translateY(-2px);
    background-color: hsl(0, 84%, 65%);
    box-shadow: 0 6px 20px hsla(0, 84%, 60%, 0.4);
}

.btn-outage.active {
    background-color: var(--accent-green);
    box-shadow: 0 4px 15px var(--accent-green-glow);
}

.btn-outage.active:hover {
    background-color: hsl(142, 70%, 50%);
    box-shadow: 0 6px 20px hsla(142, 70%, 45%, 0.4);
}

/* Main Content Area */
main {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    overflow-y: auto;
}

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

.header-title h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green-glow);
    display: inline-block;
}

.status-dot.pulsing {
    animation: pulse 1.5s infinite alternate;
}

.status-dot.outage {
    background-color: var(--accent-orange);
    box-shadow: 0 0 10px var(--accent-orange-glow);
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px currentColor; }
}

/* Tab Panels */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* VLAN Control Bar */
.vlan-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.vlan-bar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vlan-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vlan-chip {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: hsla(223, 47%, 15%, 0.5);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.vlan-chip-icon {
    font-size: 0.75rem;
}

.vlan-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.vlan-chip.active[data-vlan="all"] {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

.vlan-chip.active[data-vlan="10"] {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue-glow);
}

.vlan-chip.active[data-vlan="20"] {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.vlan-chip.active[data-vlan="30"] {
    background-color: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px var(--accent-orange-glow);
}

.vlan-chip.active[data-vlan="40"] {
    background-color: hsl(280, 85%, 60%);
    color: #fff;
    border-color: hsl(280, 85%, 60%);
    box-shadow: 0 0 15px hsla(280, 85%, 60%, 0.35);
}

.vlan-chip.active[data-vlan="99"] {
    background-color: var(--accent-purple, #8b5cf6);
    color: #fff;
    border-color: var(--accent-purple, #8b5cf6);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
}

/* Topology Interactive Canvas Area */
.topology-container {
    background: linear-gradient(180deg, hsla(223, 47%, 8%, 0.95), hsla(223, 47%, 5%, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--card-shadow), 0 0 60px rgba(56, 189, 248, 0.03);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Zoom Controls */
.topology-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 5;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.zoom-btn:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

/* Topology Legend */
.topology-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    background-color: hsla(222, 47%, 6%, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-item svg {
    flex-shrink: 0;
}

.svg-topology {
    width: 100%;
    height: 780px;
    display: block;
    transition: transform 0.2s ease-out;
}

/* SVG Connection Types */
.svg-connection {
    stroke: var(--border-color);
    stroke-width: 2.5;
    fill: none;
    transition: var(--transition-smooth);
    stroke-dasharray: none;
}

.svg-connection.fiber-10g {
    stroke: #38bdf8;
    stroke-width: 3;
    filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.3));
}

.svg-connection.copper-1g {
    stroke: #64748b;
    stroke-width: 2.5;
}

.svg-connection.dac-10g {
    stroke: #a78bfa;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 2px rgba(167, 139, 250, 0.3));
}

.svg-connection.poe-link {
    stroke: #22c55e;
    stroke-width: 2;
    stroke-dasharray: 4 4;
    opacity: 0.7;
}

.svg-connection.redundant {
    stroke: var(--accent-red);
    stroke-dasharray: 6 4;
}

.svg-connection.active-path {
    stroke-width: 4;
    filter: drop-shadow(0 0 6px currentColor);
    animation: flowPulse 1.5s infinite;
}

.svg-connection.inactive-path {
    opacity: 0.12;
}

/* Bandwidth Labels */
.bandwidth-label {
    fill: var(--text-secondary);
    font-size: 8px;
    font-weight: 700;
    font-family: var(--font-body);
    text-anchor: start;
    pointer-events: none;
}

.bandwidth-label.copper-text {
    fill: #94a3b8;
}

.bandwidth-label.dac-text {
    fill: #a78bfa;
}

.bandwidth-label.redundant-text {
    fill: var(--accent-red);
}

/* Zone Labels */
.zone-label {
    fill: rgba(255, 255, 255, 0.12);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-anchor: middle;
    letter-spacing: 3px;
    text-transform: uppercase;
    pointer-events: none;
}

/* SVG Node Types (Visual Hierarchy) */
.svg-node {
    cursor: pointer;
    transition: var(--transition-smooth);
}

.svg-node circle {
    fill: var(--bg-card);
    stroke: var(--border-color);
    stroke-width: 2;
    transition: var(--transition-smooth);
}

/* Core Router - Largest, most prominent */
.svg-node.node-core circle.node-router {
    fill: hsla(217, 91%, 20%, 0.4);
    stroke: var(--accent-blue);
    stroke-width: 3;
}

.svg-node.node-core circle.node-router:hover,
.svg-node.node-core.selected circle.node-router {
    filter: drop-shadow(0 0 12px var(--accent-blue-glow));
}

.node-label-core {
    fill: var(--accent-cyan) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

/* Controller */
.svg-node circle.node-controller {
    fill: hsla(239, 84%, 20%, 0.3);
    stroke: hsl(239, 84%, 65%);
}

/* Switch */
.svg-node circle.node-switch {
    fill: hsla(199, 89%, 15%, 0.3);
    stroke: hsl(199, 89%, 60%);
}

/* Switch Exterior */
.svg-node circle.node-switch-ext {
    fill: hsla(24, 90%, 15%, 0.3);
    stroke: hsl(24, 90%, 55%);
}

/* Access Points */
.svg-node circle.node-ap {
    fill: hsla(142, 70%, 15%, 0.3);
    stroke: hsl(142, 70%, 50%);
    stroke-width: 1.5;
}

/* Power Equipment */
.svg-node circle.node-power {
    fill: hsla(45, 90%, 15%, 0.3);
    stroke: hsl(45, 90%, 55%);
    stroke-width: 1.5;
}

/* WAN */
.svg-node circle.node-wan {
    fill: hsla(280, 85%, 20%, 0.3);
    stroke: hsl(280, 85%, 65%);
}

/* Hover & Selection */
.svg-node:hover circle {
    stroke-width: 3;
    filter: drop-shadow(0 0 8px currentColor);
}

.svg-node.selected circle {
    stroke: var(--accent-blue) !important;
    stroke-width: 3;
    filter: drop-shadow(0 0 10px var(--accent-blue-glow));
}

.svg-node.inactive {
    opacity: 0.25;
}

.svg-node.active-vlan circle {
    stroke: currentColor;
    filter: drop-shadow(0 0 10px currentColor);
}

.svg-node text {
    fill: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
    pointer-events: none;
}

.svg-node .node-type {
    fill: var(--text-secondary);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.svg-node .node-icon {
    font-family: var(--font-body);
    font-size: 16px;
    fill: var(--text-primary);
}

/* Interactive Tooltip Card */
.node-tooltip {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    background: linear-gradient(145deg, hsla(223, 47%, 10%, 0.98), hsla(223, 47%, 6%, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05) inset;
    backdrop-filter: blur(20px);
    display: none;
    z-index: 10;
    animation: tooltipFadeIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, hsla(217, 91%, 20%, 0.4), hsla(190, 90%, 15%, 0.3));
    border-bottom: 1px solid var(--border-color);
}

.tooltip-title h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.tooltip-title span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-cyan);
    font-weight: 600;
}

.node-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.node-badge.active-status {
    background-color: hsla(142, 70%, 45%, 0.15);
    color: var(--accent-green);
    border: 1px solid hsla(142, 70%, 45%, 0.3);
}

.tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 0.8rem;
    padding: 0.75rem 1.25rem;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tooltip-row:last-child {
    border-bottom: none;
}

.tooltip-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 0.25rem 0;
}

.tooltip-status-row {
    padding-top: 0.5rem;
}

.tooltip-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.tooltip-value {
    font-weight: 500;
    font-size: 0.8rem;
    text-align: right;
    max-width: 55%;
}

/* Equipment Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.equipment-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.equipment-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.card-img-container {
    height: 180px;
    background-color: hsla(223, 47%, 6%, 0.6);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.equipment-card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.card-header-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.card-header-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.specs-list {
    list-style: none;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.specs-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.25rem;
}

.specs-label {
    color: var(--text-secondary);
}

.specs-value {
    font-weight: 500;
}

/* Rack Visualizer Styling */
.racks-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rack-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rack-card-title h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.rack-card-title p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.rack-cabinet {
    background-color: hsl(222, 47%, 4%);
    border: 4px solid #1a2236;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
}

.rack-slot {
    height: 38px;
    background-color: #1c2333;
    border: 1.5px solid #2d3852;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.rack-slot-with-image {
    height: 60px;
    padding: 0.25rem;
    gap: 0.5rem;
    background: linear-gradient(180deg, #2a3550 0%, #1c2333 100%);
    border: 1.5px solid #3d4f7c;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 4px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.rack-slot-with-image img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)) brightness(0.95);
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.rack-slot-with-image .rack-slot-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.rack-slot-with-image .rack-slot-info span {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rack-slot-with-image .device-leds {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.rack-slot.active-device {
    background-color: #212c45;
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.rack-slot-with-image.active-device {
    background: linear-gradient(180deg, #2a3550 0%, #1c2333 100%);
    border: 1.5px solid #3d4f7c;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 4px rgba(0,0,0,0.3);
    height: 50px;
}

.rack-slot.active-device:hover {
    box-shadow: 0 0 10px var(--accent-blue-glow);
    transform: scale(1.01);
}

.rack-slot-u {
    position: absolute;
    left: -24px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.rack-slot-brand {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 700;
}

.rack-slot-brand.mikrotik {
    background-color: rgba(56, 189, 248, 0.15);
    color: hsl(199, 89%, 60%);
}

.rack-slot-brand.ubiquiti {
    background-color: rgba(99, 102, 241, 0.15);
    color: hsl(239, 84%, 65%);
}

.device-leds {
    display: flex;
    gap: 4px;
}

.device-led {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 5px var(--accent-green-glow);
}

.device-led.pulsing {
    animation: pulse 1.2s infinite alternate;
}

.device-led.red-led {
    background-color: var(--accent-red);
    box-shadow: 0 0 5px var(--accent-red-glow);
}

/* Power backup simulator styling */
.power-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.power-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.power-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.power-card-icon {
    font-size: 1.8rem;
}

.power-card-title h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.power-card-title p {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.battery-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    gap: 0.5rem;
}

.battery-shape {
    width: 140px;
    height: 70px;
    border: 4px solid var(--text-primary);
    border-radius: 8px;
    position: relative;
    padding: 4px;
    display: flex;
}

.battery-shape::after {
    content: '';
    width: 6px;
    height: 25px;
    background-color: var(--text-primary);
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 0 4px 4px 0;
}

.battery-fill {
    height: 100%;
    width: 100%;
    border-radius: 3px;
    background-color: var(--accent-green);
    box-shadow: 0 0 15px var(--accent-green-glow);
    transition: width 1s linear, background-color 1s ease;
}

.battery-percentage {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.backup-time {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    text-align: center;
}

.backup-time span {
    font-size: 0.8rem;
    display: block;
    color: var(--text-secondary);
    font-family: var(--font-body);
    margin-top: 0.25rem;
}

.power-flow-indicator {
    background-color: hsla(222, 47%, 6%, 0.6);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.8rem;
}

.power-flow-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.power-flow-row:last-child {
    margin-bottom: 0;
}

.power-flow-label {
    color: var(--text-secondary);
}

.power-flow-val {
    font-weight: 600;
}

.pulse-power-flow {
    animation: flowPulse 2s infinite linear;
}

@keyframes flowPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; filter: brightness(1.2); }
    100% { opacity: 0.6; }
}

/* Outage mode styling adjustments */
body.outage-active {
    --bg-dark: hsl(15, 45%, 4%);
}

body.outage-active .status-dot {
    background-color: var(--accent-orange);
    box-shadow: 0 0 10px var(--accent-orange-glow);
}

body.outage-active .btn-outage {
    background-color: var(--accent-green);
    box-shadow: 0 4px 15px var(--accent-green-glow);
}

body.outage-active .battery-fill {
    background-color: var(--accent-orange);
    box-shadow: 0 0 15px var(--accent-orange-glow);
    animation: batteryDrain 10s infinite linear;
}

/* Materials Tab Styling */
.materials-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
}

.btn-print {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--accent-cyan);
    background-color: transparent;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.05);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-print:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px var(--accent-cyan-glow);
    transform: translateY(-1px);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: hsla(222, 47%, 6%, 0.5);
    color: var(--text-primary);
    padding: 0 1rem 0 2.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: hsla(223, 47%, 15%, 0.5);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.filter-chip.active {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.materials-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.summary-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    border-bottom: 3px solid var(--border-color);
}

.summary-card:hover {
    transform: translateY(-3px);
    border-bottom-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.summary-card-val {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.summary-card-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-card:nth-child(1) .summary-card-val { color: var(--accent-cyan); }
.summary-card:nth-child(2) .summary-card-val { color: var(--accent-blue); }
.summary-card:nth-child(3) .summary-card-val { color: var(--accent-green); }
.summary-card:nth-child(4) .summary-card-val { color: var(--accent-orange); }
.summary-card:nth-child(5) .summary-card-val { color: var(--accent-red); }

.table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
}

.materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.materials-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.materials-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.materials-table tbody tr {
    transition: var(--transition-smooth);
}

.materials-table tbody tr:hover {
    background-color: hsla(223, 47%, 15%, 0.35);
}

.materials-table th.col-qty, .materials-table td.col-qty {
    text-align: center;
    font-weight: 700;
}

.badge-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-category.routing-switching {
    background-color: rgba(56, 189, 248, 0.12);
    color: hsl(199, 89%, 60%);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-category.wireless {
    background-color: rgba(99, 102, 241, 0.12);
    color: hsl(239, 84%, 65%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-category.optics {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-category.copper {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-category.power {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-category.passive {
    background-color: rgba(156, 163, 175, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.25);
}

.materials-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.materials-empty-state h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.materials-empty-state p {
    font-size: 0.8rem;
}

/* Responsiveness */
/* Mobile sidebar toggle button - shown only on small screens */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    line-height: 1;
}
.mobile-menu-btn:hover {
    background: hsla(217, 91%, 60%, 0.1);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 98;
}

@media (max-width: 1024px) {
    .svg-topology { height: 520px; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .racks-layout { grid-template-columns: 1fr; }
    #report-modal-content h1 { font-size: 1.25rem; }
    #report-modal-content h2 { font-size: 1.05rem; }
    #report-modal-content table { font-size: 0.75rem; }
}

@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        height: 100vh;
        overflow: hidden;
    }
    aside {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 100;
        padding: 1.25rem 1rem;
        flex-direction: column;
    }
    aside.mobile-open {
        display: flex;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    main {
        padding: 1rem;
        gap: 1.25rem;
    }
    main > header {
        position: sticky;
        top: 0;
    }
    header { flex-wrap: wrap; gap: 0.75rem; }
    .header-title { flex-wrap: wrap; }
    .header-title h2 { font-size: 1.15rem; }
    .header-title p { font-size: 0.75rem; }
    .system-status { width: 100%; justify-content: flex-start; }
    .status-indicator { font-size: 0.7rem; padding: 0.35rem 0.75rem; }

    .svg-topology { height: 380px; }
    .topology-controls { top: 0.5rem; right: 0.5rem; }
    .topology-controls .zoom-btn { width: 28px; height: 28px; font-size: 0.9rem; }
    .topology-legend { gap: 0.75rem; font-size: 0.65rem; }

    .vlan-bar { padding: 0.75rem; }
    .vlan-bar-title { font-size: 0.75rem; }
    .vlan-chip { padding: 0.35rem 0.65rem; font-size: 0.7rem; }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .card-img-container { height: 150px; }
    .equipment-card .card-body { padding: 1rem; }

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

    .materials-controls { grid-template-columns: 1fr; }
    .filter-group { flex-wrap: wrap; }
    .materials-summary-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
    .summary-card-val { font-size: 1.4rem; }
    .table-container { padding: 0.75rem; overflow-x: auto; }
    .materials-table { font-size: 0.75rem; }
    .materials-table th, .materials-table td { padding: 0.4rem 0.5rem; }

    .node-tooltip {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
    }

    #report-modal {
        padding: 0.5rem !important;
    }
    #report-modal > div {
        max-height: calc(100vh - 1rem) !important;
    }
    #report-modal-content { padding: 1rem !important; font-size: 0.8rem !important; }

    /* Zone status cards */
    .zones-grid {
        grid-template-columns: 1fr !important;
    }

    /* Report cards grid */
    .reports-grid {
        grid-template-columns: 1fr !important;
    }

    .battery-shape { width: 100px; height: 50px; }
    .battery-percentage { font-size: 1.5rem; }
    .backup-time { font-size: 1rem; }
}

@media (max-width: 480px) {
    main { padding: 0.75rem; }
    .svg-topology { height: 280px; }
    .header-title img { height: 32px; }
    .header-title h2 { font-size: 1rem; }
    .materials-summary-grid { grid-template-columns: 1fr 1fr; }
    .vlan-chips { gap: 0.3rem; }
    .vlan-chip { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
    .rack-cabinet { padding: 0.75rem 0.25rem; }
    .rack-slot { height: 32px; font-size: 0.65rem; padding: 0 0.4rem; }
    .rack-slot-u { left: -18px; font-size: 0.55rem; }
    .power-card { padding: 1rem; }
    .topology-legend { gap: 0.5rem; flex-direction: column; }
    .search-box input { font-size: 0.8rem; padding: 0 0.75rem 0 2.25rem; }
}

/* Auth Overlay Styles */
#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e19 0%, #111827 50%, #0f172a 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#auth-overlay .auth-card {
    animation: authSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#auth-overlay input:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: rgba(15, 23, 42, 1);
}

#auth-overlay input::placeholder {
    color: #475569;
    opacity: 0.8;
}

#auth-overlay button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* App Shell default state */
#app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

@media (max-width: 768px) {
    #app-shell {
        grid-template-columns: 1fr;
    }
}

/* Header User Info */
#header-user-info {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

/* Status Badges */
.badge-status {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
    text-align: center;
}

.badge-status.completo {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-status.parcial {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-status.pendiente {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Report Cards */
.report-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
}

.tag-cyan { background: rgba(0,255,255,0.1); color: #00e5e5; border: 1px solid rgba(0,255,255,0.2); }
.tag-blue { background: rgba(56,189,248,0.1); color: var(--accent-cyan); border: 1px solid rgba(56,189,248,0.2); }
.tag-green { background: rgba(16,185,129,0.1); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.2); }
.tag-orange { background: rgba(245,158,11,0.1); color: var(--accent-orange); border: 1px solid rgba(245,158,11,0.2); }
.tag-red { background: rgba(239,68,68,0.1); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.2); }
.tag-purple { background: rgba(139,92,246,0.1); color: hsl(280,85%,65%); border: 1px solid rgba(139,92,246,0.2); }

.btn-report {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-report:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.btn-blue { background: var(--accent-blue); }
.btn-green { background: var(--accent-green); }
.btn-purple { background: hsl(280,85%,60%); }

.report-card { transition: var(--transition-smooth); }
.report-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* Zone hover effects for map */
.zone-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}
.zone-hover:hover {
    filter: brightness(1.3);
    stroke-width: 3;
}

/* Leaflet map overrides for dark theme */
#project-map {
    background: #0f172a;
    border-radius: 12px;
}
#project-map .leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
#project-map .leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.3);
}
#project-map .leaflet-popup-content {
    margin: 10px 14px;
    font-size: 0.82rem;
    line-height: 1.5;
}
#project-map .leaflet-popup-content strong {
    font-size: 0.9rem;
}
#project-map .leaflet-control-zoom a {
    background: rgba(15, 23, 42, 0.9) !important;
    color: #e2e8f0 !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}
#project-map .leaflet-control-zoom a:hover {
    background: rgba(99, 102, 241, 0.3) !important;
}
#project-map .leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.8) !important;
    color: rgba(148, 163, 184, 0.7) !important;
    font-size: 0.6rem !important;
}
#project-map .leaflet-control-attribution a {
    color: rgba(148, 163, 184, 0.8) !important;
}

/* Report Modal Content Styles */
#report-modal-content h1 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--accent-cyan); margin: 0 0 1rem 0; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); }
#report-modal-content h2 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin: 1.5rem 0 0.75rem 0; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border-color); }
#report-modal-content h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; color: var(--accent-cyan); margin: 1rem 0 0.5rem 0; }
#report-modal-content h4 { font-size: 0.9rem; font-weight: 600; margin: 0.75rem 0 0.25rem 0; }
#report-modal-content table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.8rem; }
#report-modal-content th { background: hsla(217,91%,20%,0.3); padding: 0.5rem 0.75rem; text-align: left; border: 1px solid var(--border-color); font-weight: 600; color: var(--accent-cyan); }
#report-modal-content td { padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); }
#report-modal-content tr:nth-child(even) { background: hsla(223,47%,10%,0.5); }
#report-modal-content ul, #report-modal-content ol { padding-left: 1.5rem; margin: 0.5rem 0; }
#report-modal-content li { margin-bottom: 0.25rem; }
#report-modal-content strong { color: var(--text-primary); }
#report-modal-content code { background: hsla(222,47%,6%,0.6); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.8rem; border: 1px solid var(--border-color); }
#report-modal-content hr { border: none; border-top: 1px solid var(--border-color); margin: 1rem 0; }
#report-modal-content blockquote { border-left: 3px solid var(--accent-blue); padding-left: 1rem; margin: 0.75rem 0; color: var(--text-secondary); font-style: italic; }

/* Admin Settings Modal */
.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-users-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: left;
}

.admin-users-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-users-table tbody tr {
    transition: var(--transition-smooth);
}

.admin-users-table tbody tr:hover {
    background-color: hsla(223, 47%, 15%, 0.35);
}

.admin-self-row {
    opacity: 0.7;
}

.admin-role-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background-color: hsla(217, 91%, 60%, 0.15);
    color: var(--accent-blue);
    border: 1px solid hsla(217, 91%, 60%, 0.3);
}

.admin-role-select {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-role-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue-glow);
}

.admin-save-btn {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    background-color: transparent;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-save-btn:hover {
    background-color: var(--accent-green);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-green-glow);
}

.admin-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-delete-btn {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--accent-red);
    background-color: transparent;
    color: var(--accent-red);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-delete-btn:hover {
    background-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.admin-self-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    #admin-settings-modal > div {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }
    .admin-users-table { font-size: 0.75rem; }
    .admin-users-table th, .admin-users-table td { padding: 0.5rem; }
}

/* Print Layout */
@media print {
    /* Hide interactive elements and layouts */
    aside,
    header,
    .materials-controls,
    .sidebar-panel,
    .btn-outage,
    .brand,
    .menu,
    .materials-header {
        display: none !important;
    }
    
    /* Clean layout */
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        grid-template-columns: 1fr !important;
        display: block !important;
    }
    
    main {
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    
    /* Ensure tab content is displayed */
    .tab-content {
        display: none !important;
    }
    
    .tab-content.active {
        display: block !important;
        animation: none !important;
    }
    
    .print-only-header {
        display: block !important;
        margin-bottom: 2rem;
    }
    
    /* Table layout for printing */
    .table-container {
        background: #ffffff !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    
    .materials-table {
        color: #000000 !important;
        border: 1px solid #cbd5e1 !important;
        width: 100% !important;
    }
    
    .materials-table th {
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
        background-color: #f1f5f9 !important;
        padding: 0.5rem !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .materials-table td {
        color: #0f172a !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 0.5rem !important;
    }
    
    .materials-table th.col-qty, 
    .materials-table td.col-qty {
        text-align: center !important;
        font-weight: 700 !important;
    }
    
    /* Badges category styling for print */
    .badge-category {
        background-color: transparent !important;
        border: 1px solid #475569 !important;
        color: #000000 !important;
        padding: 0.15rem 0.35rem !important;
        font-size: 0.65rem !important;
        border-radius: 4px !important;
    }
    
    /* Dynamic highlighting matching table category labels */
    .badge-category.routing-switching { border-color: #0284c7 !important; color: #0284c7 !important; }
    .badge-category.wireless { border-color: #4f46e5 !important; color: #4f46e5 !important; }
    .badge-category.optics { border-color: #059669 !important; color: #059669 !important; }
    .badge-category.copper { border-color: #d97706 !important; color: #d97706 !important; }
    .badge-category.power { border-color: #dc2626 !important; color: #dc2626 !important; }
    .badge-category.passive { border-color: #4b5563 !important; color: #4b5563 !important; }

    /* Summary cards layout for printing */
    .materials-summary-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .summary-card {
        background-color: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-bottom: 3px solid #64748b !important;
        box-shadow: none !important;
        padding: 0.5rem !important;
        border-radius: 8px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .summary-card-val {
        color: #000000 !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
    }
    
    .summary-card-lbl {
        color: #475569 !important;
        font-size: 0.6rem !important;
    }
}

/* ============================================
   POWER BI DASHBOARD STYLES
   ============================================ */

/* Dashboard Grid */
.pbi-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pbi-row {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.pbi-kpi-row {
    flex: 0 0 auto;
}

.pbi-chart-row {
    flex: 1 1 auto;
    min-height: 0;
}

/* Cards */
.pbi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pbi-card-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.pbi-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.pbi-card-subtitle {
    font-size: 0.6rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.1rem;
}

/* KPI Cards */
.pbi-kpi-card {
    flex: 1;
    min-width: 0;
    padding: 0.75rem;
}

.pbi-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.pbi-kpi-title {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pbi-kpi-trend {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pbi-kpi-trend.up {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.pbi-kpi-trend.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.pbi-kpi-trend.warn {
    color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

.pbi-kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.pbi-kpi-subtitle {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.pbi-sparkline {
    height: 24px;
    margin-top: 0.4rem;
    opacity: 0.6;
}

/* Chart Cards */
.pbi-chart-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pbi-chart-wide {
    flex: 2;
}

/* Donut Chart */
.pbi-donut-container {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

.pbi-donut {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.pbi-donut-center {
    font-size: 20px;
    font-weight: 800;
    fill: var(--text-primary);
}

.pbi-donut-label {
    font-size: 7px;
    fill: var(--text-secondary);
}

.pbi-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.pbi-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.pbi-legend-item b {
    color: var(--text-primary);
    margin-left: auto;
}

.pbi-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pbi-legend-line {
    width: 10px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.pbi-legend-line.dashed {
    background: repeating-linear-gradient(90deg, currentColor 0, currentColor 4px, transparent 4px, transparent 7px) !important;
}

/* Area Chart */
.pbi-area-chart {
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pbi-area-svg {
    width: 100%;
    flex: 1;
    min-height: 0;
}

.pbi-chart-legend {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.4rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Bar Chart */
.pbi-bar-chart {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.pbi-bar-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pbi-bar-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    width: 55px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pbi-bar-track {
    flex: 1;
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
}

.pbi-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.pbi-bar-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

/* Table */
.pbi-table-container {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.pbi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.pbi-table thead {
    background: var(--bg-dark);
}

.pbi-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.pbi-table td {
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.pbi-table tbody tr:hover {
    background: var(--bg-dark);
}

.pbi-status-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
}

.pbi-status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.pbi-status-badge.progress {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.pbi-status-badge.pending {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

/* Gauge */
.pbi-gauge-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-height: 0;
}

.pbi-gauge {
    width: 140px;
    height: 90px;
}

.pbi-gauge-value {
    font-size: 20px;
    font-weight: 800;
    fill: var(--text-primary);
}

.pbi-gauge-label {
    font-size: 7px;
    fill: var(--text-secondary);
}

/* ============================================
   RESPONSIVE — TABLETS & MOBILE
   ============================================ */
@media (max-width: 1100px) {
    .pbi-row {
        flex-wrap: wrap;
    }
    .pbi-chart-wide {
        flex: 1 1 100%;
    }
    .pbi-chart-row {
        flex: none;
    }
    .pbi-donut {
        width: 80px;
        height: 80px;
    }
    .pbi-donut-center {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .pbi-dashboard {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .pbi-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .pbi-kpi-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .pbi-kpi-card {
        padding: 0.6rem;
    }
    .pbi-kpi-value {
        font-size: 1.25rem;
    }
    .pbi-kpi-title {
        font-size: 0.55rem;
    }
    .pbi-donut-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.5rem;
    }
    .pbi-donut-legend {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
    }
    .pbi-table {
        font-size: 0.65rem;
    }
    .pbi-table th,
    .pbi-table td {
        padding: 0.4rem 0.5rem;
    }
    .pbi-chart-wide {
        flex: none;
    }
}

@media (max-width: 480px) {
    .pbi-kpi-row {
        grid-template-columns: 1fr;
    }
    .pbi-card-title {
        font-size: 0.7rem;
    }
    .pbi-bar-label {
        width: 45px;
        font-size: 0.6rem;
    }
    .pbi-gauge {
        width: 110px;
        height: 70px;
    }
    .pbi-gauge-value {
        font-size: 16px;
    }
}

/* ============================================
   GALLERY — Album cards, upload zone, photo cards
   ============================================ */

.gallery-upload-zone {
    grid-column: 1 / -1;
    background: #161b22;
    border: 2px dashed #30363d;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.gallery-upload-zone:hover {
    border-color: #58a6ff;
    background: #1c2333;
}

.gallery-album-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.gallery-album-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}
.gallery-album-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.gallery-album-info {
    padding: 0.6rem 0.75rem;
}
.gallery-album-date {
    color: #e6edf3;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}
.gallery-album-sub {
    color: #8b949e;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.gallery-photo-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.gallery-video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
}
.gallery-photo-info {
    padding: 0.5rem;
}
.gallery-photo-name {
    font-size: 0.7rem;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-photo-actions {
    display: flex;
    gap: 0.3rem;
    padding: 0 0.5rem 0.5rem;
}

.gallery-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    color: #fff;
}
.gallery-btn-danger {
    background: #da3633;
}
.gallery-btn-danger:hover {
    background: #f85149;
}

.gallery-viewer-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
