/* global.css - Consolidated admin + worker layout styles
   Generated from partials/admin_styles.php and partials/worker_styles.php
*/

/* --- Admin Layout --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
}

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #2c3e50;
    color: #ecf0f1;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.admin-sidebar .logo-area {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .logo-area img {
    width: auto;
    height: 60px;
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
}

.admin-sidebar .user-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .user-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #3498db;
}

.admin-sidebar .user-info h6 { margin: 0; font-size: 14px; font-weight: 600; }
.admin-sidebar .user-info .status { font-size: 12px; color: #2ecc71; margin-top: 5px; }
.admin-sidebar .user-info .status i { font-size: 8px; margin-right: 5px; }

.admin-sidebar .nav-menu { list-style: none; padding: 0; margin: 0; }
.admin-sidebar .nav-item { border-bottom: 1px solid rgba(255,255,255,0.05); }
.admin-sidebar .nav-link { align-items: center; padding: 15px 20px; color: #ecf0f1; text-decoration: none; transition: all 0.3s; }
.admin-sidebar .nav-link:hover { background: rgba(52, 152, 219, 0.2); padding-left: 25px; }
.admin-sidebar .nav-link.active { background: #3498db; border-left: 4px solid #2ecc71; }
.admin-sidebar .nav-link i { width: 20px; margin-right: 12px; font-size: 16px; }
.admin-sidebar .nav-link span { flex: 1; }
.admin-sidebar .badge { font-size: 11px; padding: 3px 7px; border-radius: 10px; }

/* Admin Top Bar */
.admin-topbar { position: fixed; top: 0; left: 225px; right: 0; height: 70px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; z-index: 999; }
.admin-topbar h4 { margin: 0; font-size: 18px; color: #2c3e50; font-weight: 600; }
.admin-topbar .top-actions { display: flex; align-items: center; gap: 15px; }
.admin-topbar .btn-icon { width: 40px; height: 40px; border: none; background: #f4f6f9; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #2c3e50; transition: all 0.3s; position: relative; }
.admin-topbar .btn-icon:hover { background: #3498db; color: #fff; }
.admin-topbar .badge-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: #e74c3c; border-radius: 50%; border: 2px solid #fff; }
.admin-topbar .user-profile { width: 40px; height: 40px; border-radius: 50%; overflow: visible; cursor: pointer; border: 2px solid #3498db; }
.admin-topbar .user-profile img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Notification bell dropdown styling */
.badge-sm { padding: 0.25em 0.5em; font-size: 0.75rem; }
.dropdown-item { transition: background-color 0.15s ease-in-out; }
.dropdown-item:hover { background-color: #f8f9fa; }
.d-flex.gap-2 { gap: 0.5rem; }

.admin-main-content { margin-left: 240px; margin-top: 70px; padding: 15px; min-height: auto; }
.admin-footer {
    position: relative;
    margin-left: 240px; /* align with content */
    height: 60px;
    background: #ddd;
    color: #333;
    padding: 16px 30px;
    display: flex;
    justify-content: center; /* center copyright */
    align-items: center;
    font-size: 14px;
    z-index: 995;
    box-shadow: none;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.admin-footer .footer-copy { margin: 0; text-align: center; width: 100%; } 
.admin-footer p { margin: 0; }
.admin-footer .footer-links { display: flex; gap: 20px; }
.admin-footer .footer-links a { color: #ecf0f1; text-decoration: none; transition: color 0.3s; }
.admin-footer .footer-links a:hover { color: #3498db; }

.page-header { margin-bottom: 30px; }
.page-header h5 { margin: 0; font-size: 24px; color: #2c3e50; font-weight: 600; }
.page-header p { margin: 5px 0 0 0; color: #7f8c8d; font-size: 14px; }

/* Dashboard Cards */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 10px; padding: 25px; color: #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.stat-card.orange { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card.blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card.green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stat-card.purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card.red { background: linear-gradient(135deg, #ff416c 0%, #c0392b 100%); }
.stat-card .card-icon { font-size: 40px; opacity: 0.3; float: right; }
.stat-card h6 { font-size: 14px; font-weight: 500; margin: 0 0 10px 0; opacity: 0.9; }
.stat-card .stat-number { font-size: 36px; font-weight: 700; margin: 10px 0; }
.stat-card .stat-label { font-size: 12px; opacity: 0.8; }

@media (max-width: 768px) {
    .admin-sidebar { width: 70px; }
    .admin-sidebar .logo-area h5, .admin-sidebar .user-info h6, .admin-sidebar .user-info .status, .admin-sidebar .nav-link span { display: none; }
    .admin-sidebar .nav-link { justify-content: center; padding: 15px; }
    .admin-sidebar .nav-link i { margin-right: 0; }
    .admin-topbar { left: 70px; }
    .admin-main-content, .admin-footer { margin-left: 70px; }
}

/* --- Worker Layout Styles --- */
html, body { overflow-y: auto !important; height: auto !important; min-height: 100vh; background: #f4f6f9; }

/* Sidebar Navigation */
.worker-sidebar { position: fixed; left: 0; top: 0; width: 240px; height: 100vh; background: #2c3e50; color: white; overflow-y: auto; z-index: 1000; box-shadow: 2px 0 5px rgba(0,0,0,0.1); }
.worker-sidebar .logo-area { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.worker-sidebar .logo-area img { width: auto; height: 60px; max-width: 100%; margin-bottom: 10px; display: block; margin-left: auto; margin-right: auto; }
.worker-sidebar .logo-area h5 { font-size: 16px; font-weight: 700; margin: 0; color: white; letter-spacing: 1px; }
.worker-sidebar .user-info { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.worker-sidebar .user-info img { width: 60px; height: 60px; border-radius: 50%; border: 3px solid white; margin-bottom: 10px; }
.worker-sidebar .user-info h6 { font-size: 14px; font-weight: 600; margin: 8px 0 4px 0; color: white; }
.worker-sidebar .user-info .status { font-size: 12px; color: #2ecc71; }
.worker-sidebar .status i { font-size: 8px; margin-right: 4px; }
.worker-sidebar .nav-menu { padding: 20px 0; list-style: none; margin: 0; }
.worker-sidebar .nav-item { list-style: none; }
.worker-sidebar .nav-link { position: relative; display: block; padding: 12px 25px; color: rgba(255,255,255,0.8); text-decoration: none; transition: all 0.2s; font-size: 14px; }
.worker-sidebar .nav-link:hover, .worker-sidebar .nav-link.active { background: rgba(255,255,255,0.1); color: white; border-left: 4px solid #3498db; padding-left: 21px; }
.worker-sidebar .nav-link i { width: 20px; margin-right: 12px; font-size: 16px; }
.worker-sidebar .nav-link .badge { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); background: #e74c3c; padding: 2px 8px; border-radius: 10px; font-size: 11px; }

/* Top Bar */
.worker-topbar { position: fixed; left: 240px; right: 0; top: 0; height: 70px; background: white; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; z-index: 999; }
.worker-topbar h4 { margin: 0; font-size: 20px; font-weight: 600; color: #2c3e50; }
.worker-topbar .top-actions { display: flex; align-items: center; gap: 15px; }
.worker-topbar .top-actions .btn-icon { width: 40px; height: 40px; border-radius: 50%; background: #f8f9fa; border: none; display: flex; align-items: center; justify-content: center; color: #6c757d; transition: all 0.2s; position: relative; cursor: pointer; }
.worker-topbar .top-actions .btn-icon:hover { background: #e9ecef; color: #2c3e50; }
.worker-topbar .top-actions .btn-icon .badge-dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; background: #e74c3c; border-radius: 50%; border: 2px solid white; }
.worker-topbar .user-profile img { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.2s; }
.worker-topbar .user-profile img:hover { box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3); }

.worker-main-content { margin-left: 240px; margin-top: 70px; padding: 30px 15px 80px 15px; min-height: calc(100vh - 70px); }

/* Footer */
.worker-footer { position: fixed; left: 240px; right: 0; bottom: 0; height: 60px; background: white; border-top: 1px solid #e9ecef; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; z-index: 996; font-size: 13px; color: #6c757d; box-shadow: 0 -2px 8px rgba(0,0,0,0.04); }
.worker-footer a { color: #3498db; text-decoration: none; }
.worker-footer a:hover { color: #2980b9; }

.worker-footer .user-profile img {
    width: 40px; height: 40px;
}

@media (max-width: 768px) {
    .worker-sidebar { width: 70px; }
    .worker-sidebar .logo-area h5, .worker-sidebar .user-info h6, .worker-sidebar .user-info .status, .worker-sidebar .nav-link span { display: none; }
    .worker-sidebar .nav-link { justify-content: center; padding: 15px; }
    .worker-sidebar .nav-link i { margin-right: 0; }
    .worker-topbar { left: 70px; }
    .worker-main-content, .admin-main-content { margin-left: 70px; }
    .worker-footer, .admin-footer { left: 70px; }
}

/* --- Vessel Tracking page tweaks --- */
.admin-main-content .vessel-layout,
.worker-main-content .vessel-layout {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Focused, non-global layout for Vessel Tracking */
.vessel-layout .row.vessel-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin: 0;
}

/* Support both custom col classes and Bootstrap cols inside vessel layout */
.vessel-layout .col-left, .vessel-layout .col-right,
.vessel-layout .row.vessel-row > .col-md-3:first-child,
.vessel-layout .row.vessel-row > .col-md-3:last-child {
    flex: 0 0 260px;
    max-width: 260px;
    padding: 0;
}
.vessel-layout .col-center,
.vessel-layout .row.vessel-row > .col-md-6 {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0 10px;
}

/* map container and panels */
.map-container {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 420px; /* reasonable default */
    max-height: calc(100vh - 220px); /* keep inside viewport */
    box-shadow: 0 8px 24px rgba(12,20,30,0.08);
    border: 1px solid rgba(15,20,30,0.06);
    margin-top: 0;
}

/* NOC (fullscreen) overrides: ensure map occupies full viewport and side panels are hidden */
.noc-main-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
}
.noc-main-content .admin-topbar,
.noc-main-content .admin-sidebar,
.noc-main-content .worker-sidebar,
.noc-main-content .right-menu,
.noc-main-content .page-header { display: none !important; }
.noc-main-content .vessel-layout { max-width: 100% !important; padding: 0 !important; margin: 0 !important; height: 100vh !important; }
.noc-main-content .vessel-row { margin: 0 !important; height: 100vh !important; }
.noc-main-content .vessel-row > .col-md-3,
.noc-main-content .vessel-row > .col-left,
.noc-main-content .vessel-row > .col-right { display: none !important; width: 0 !important; flex: 0 0 0 !important; max-width: 0 !important; padding: 0 !important; }
.noc-main-content .vessel-row > .col-12 { flex: 1 1 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; height: 100vh !important; }
.noc-main-content .map-container { border-radius: 0 !important; box-shadow: none !important; border: none !important; min-height: 100vh !important; max-height: 100vh !important; height: 100vh !important; width: 100vw !important; margin: 0 !important; padding: 0 !important; display: block !important; position: fixed !important; top: 0 !important; left: 0 !important; }
.noc-main-content #map { height: 100vh !important; width: 100vw !important; border-radius: 0 !important; min-width: 100vw !important; min-height: 100vh !important; display: block !important; }
.noc-main-content .map-controls { top: 10px !important; left: 10px !important; z-index: 1050 !important; }
.noc-main-content #nocVesselPanel { max-height: 36vh; width: 360px; right: 12px; left: auto; margin-left: 0; bottom: 12px; position: fixed !important; z-index: 1100 !important; }

/* Also apply same rules when body is explicitly set to noc-mode (ensures immediate layout before JS runs) */
body.noc-mode { margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
body.noc-mode .admin-sidebar,
body.noc-mode .admin-topbar,
body.noc-mode .worker-sidebar,
body.noc-mode .worker-topbar,
body.noc-mode .right-menu,
body.noc-mode .admin-footer,
body.noc-mode .page-header { display: none !important; }
body.noc-mode .admin-main-content,
body.noc-mode .noc-main-content,
body.noc-mode .worker-main-content { margin: 0 !important; padding: 0 !important; width: 100vw !important; height: 100vh !important; overflow: hidden !important; }
body.noc-mode .vessel-layout { max-width: 100% !important; padding: 0 !important; margin: 0 !important; width: 100vw !important; height: 100vh !important; }
body.noc-mode .vessel-row { margin: 0 !important; height: 100vh !important; gap: 0 !important; }
body.noc-mode .vessel-row > .col-md-3,
body.noc-mode .vessel-row > .col-left,
body.noc-mode .vessel-row > .col-right { display: none !important; width: 0 !important; flex: 0 0 0 !important; max-width: 0 !important; padding: 0 !important; }
body.noc-mode .vessel-row > .col-12 { flex: 1 1 100% !important; max-width: 100% !important; width: 100vw !important; padding: 0 !important; margin: 0 !important; height: 100vh !important; }
body.noc-mode .map-container { border-radius: 0 !important; box-shadow: none !important; border: none !important; min-height: 100vh !important; max-height: 100vh !important; height: 100vh !important; width: 100vw !important; margin: 0 !important; padding: 0 !important; display: block !important; position: fixed !important; top: 0 !important; left: 0 !important; }
body.noc-mode #map { height: 100vh !important; width: 100vw !important; border-radius: 0 !important; min-width: 100vw !important; min-height: 100vh !important; display: block !important; }
body.noc-mode .tracking-tabs { display: none !important; }
body.noc-mode .map-controls { top: 10px !important; left: 10px !important; z-index: 1050 !important; }
body.noc-mode #nocVesselPanel { max-height: 36vh; width: 360px; right: 12px; left: auto; margin-left: 0; bottom: 12px; position: fixed !important; z-index: 1100 !important; }

/* Map overlay controls */
.map-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
}
.map-controls label { margin: 0; font-size: 13px; color: #2c3e50; }
.map-controls .btn-light { border: 1px solid #e9ecef; }
#map {
    flex: 1 1 auto;
    min-height: 360px;
    width: 100%;
    border-radius: 10px;
}

.tracking-panel,
.cable-panel {
    padding: 20px;
    height: auto;
    max-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(12,20,30,0.08);
    border: 1px solid rgba(12,20,30,0.06);
    overflow: auto;
}

.tracking-panel h6, .cable-panel h6 {
    margin: 0 0 6px 0;
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}
.tracking-panel h6 i, .cable-panel h6 i { color: #3498db; font-size: 16px; }

.tracking-panel hr, .cable-panel hr { display: none; } /* hide duplicate hrs */

.tracking-panel .form-group { margin-bottom: 14px; }
.tracking-panel label { font-size: 13px; font-weight: 600; color: #495057; margin-bottom: 6px; }
.tracking-panel .form-control { font-size: 14px; border-radius: 6px; border: 1px solid #dee2e6; }
.tracking-panel .form-control:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(52,152,219,0.2);
    border-radius: 8px;
    transition: all .2s ease;
    padding: 10px 16px;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52,152,219,0.3);
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    padding: 10px 16px;
    transition: all .2s ease;
}
.btn-secondary:hover { background: #5a6268; transform: translateY(-1px); }

.btn-success { border-radius: 6px; font-weight: 600; }
.btn-block { margin-bottom: 10px; }

.cable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 8px;
    transition: all .15s ease;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
}
.cable-item:hover { background: rgba(52,152,219,0.04); border-bottom-color: transparent; }
.cable-item label { margin: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; }

.cable-color { width: 32px; height: 5px; border-radius: 3px; display: inline-block; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.cable-list {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    margin-right: -8px;
}

/* custom scrollbar for cable list */
.cable-list::-webkit-scrollbar { width: 8px; }
.cable-list::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 10px; }
.cable-list::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }
.cable-list::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* Vessel info box overlay */
.vessel-info-box {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    min-width: 220px;
    border: 1px solid rgba(0,0,0,0.05);
}
.vessel-info-box.active { display: block; }
.vessel-info-box h6 { margin: 0 0 10px 0; font-weight: 700; color: #2c3e50; }

/* Playback controls */
.playback-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    width: calc(100% - 80px);
    max-width: 900px;
    border: 1px solid rgba(0,0,0,0.05);
}
.playback-controls.active { display: block; }
.speed-control { display: inline-block; margin: 0 10px; }
.timeline { width: 100%; margin-top: 10px; }
.position-marker { opacity: 0.6; }

.page-header { margin-bottom: 20px; padding-top: 0; }
.page-header h5 { font-size: 24px; font-weight: 700; color: #2c3e50; margin-bottom: 4px; }
.page-header p { color: #7f8c8d; margin: 0; font-size: 14px; }

@media (max-width: 992px) {
    .vessel-layout .row.vessel-row { flex-direction: column; gap: 16px; }
    .vessel-layout .col-left, .vessel-layout .col-right,
    .vessel-layout .row.vessel-row > .col-md-3 { flex: 0 0 100%; max-width: 100%; }
    .vessel-layout .col-center,
    .vessel-layout .row.vessel-row > .col-md-6 { padding: 0; }
    .map-container { height: 500px; }
    .tracking-panel, .cable-panel { height: auto; max-height: 400px; }
    .playback-controls { width: calc(100% - 40px); }
}

@media (max-width: 768px) {
    #map { min-height: 350px; }
    .map-container { height: 400px; }
    .page-header h5 { font-size: 20px; }
    .tracking-panel, .cable-panel { padding: 16px; height: auto; }
    .playback-controls { width: calc(100% - 30px); padding: 12px; }
    .btn-primary, .btn-secondary { font-size: 14px; padding: 8px 12px; }
}

/* Use CSS Grid for desktop to avoid wrapping and ensure consistent 3-column layout */
@media (min-width: 992px) {
    .vessel-layout .row.vessel-row {
        display: grid;
        grid-template-columns: 260px 1fr 260px;
        gap: 24px;
        align-items: start;
        width: 100%;
    }

    /* ensure Bootstrap column padding doesn't add extra gutters */
    .vessel-layout .row.vessel-row > [class*='col-'] { padding-left: 0; padding-right: 0; }

    .vessel-layout .map-container { min-height: 520px; max-height: calc(100vh - 240px); }
    .vessel-layout .tracking-panel, .vessel-layout .cable-panel { max-height: calc(100vh - 240px); }
}

/* Fallback: keep flex for smaller screens */
@media (max-width: 991px) {
    .vessel-layout .row.vessel-row { display: flex !important; align-items: flex-start; flex-direction: column; gap: 16px; }
    .vessel-layout .row.vessel-row > [class*='col-'] { display: block; }
}

/* --- Bumper Zones Table Interaction --- */
.cable-row {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.cable-row:hover {
    background-color: rgba(52, 152, 219, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(52, 152, 219, 0.2);
}

.cable-row.table-active {
    background-color: rgba(52, 152, 219, 0.15) !important;
    box-shadow: inset 0 0 0 2px #3498db;
}

.cable-row .cable-code-cell {
    font-weight: 600;
    color: #2c3e50;
}

.cable-row:hover .cable-code-cell {
    color: #3498db;
}

/* Button group spacing for Bumper Zones actions */
.bumper-actions { display:flex; align-items:center; gap:12px; }
.bumper-actions .btn { margin-right: 0 !important; }
.bumper-actions .ml-auto { margin-left: auto !important; }

/* select checkbox column */
#bumperTable td.text-center input.select-cable { transform: scale(1.05); }
#bumperTable th.text-center { padding: 6px 8px; }


/* Preview modal legend and debug panel */
.map-legend {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px 10px;
    border-radius: 6px;
    z-index: 9999;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.map-legend .legend-item { margin-top:6px; display:flex; align-items:center; }
.map-legend .legend-swatch { width:16px; height:10px; display:inline-block; margin-right:8px; border-radius:2px; }
.map-legend .legend-swatch.blue { background: rgba(52,152,219,0.6); border:1px solid #3498db; }
.map-legend .legend-swatch.red { background: rgba(231,76,60,0.45); border:1px solid #e74c3c; }
.map-legend .legend-swatch.line { background: linear-gradient(90deg, #fff 0%, #ff6b35 50%); height:5px; width:28px; border-radius:2px; border:1px solid rgba(0,0,0,0.06); }

/* legend toggle (small ×) and peek button (mobile/compact) - used by multiple map views */
.map-legend .legend-toggle { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; border-radius: 3px; background: #fff; border: 1px solid #ddd; display:flex; align-items:center; justify-content:center; cursor:pointer; font-weight:600; font-size:11px; opacity:0.8; }
.map-legend .legend-toggle:hover { opacity:1; background:#f8f8f8; }
.map-legend-show { background: #28a745; border: none; color: #fff; border-radius: 50%; width: 40px; height: 40px; padding: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.18); font-size:14px; display: none; align-items:center; justify-content:center; }
.map-legend-show:hover { background: #218838; transform: translateY(-1px); }
.map-legend-show.visible { display:flex; }
