/* Protrack Enterprise Management Portal - Styling System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #090d16;
    --bg-card: rgba(21, 31, 50, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --primary: #f59e0b;
    --primary-glow: rgba(245, 158, 11, 0.15);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --info: #0ea5e9;
    --info-glow: rgba(14, 165, 233, 0.15);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 20%, rgba(245, 158, 11, 0.03) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(14, 165, 233, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Glassmorphism Containers */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

.text-muted-custom {
    color: var(--text-secondary);
}

/* Side navigation panel */
.sidebar {
    height: 100vh;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(11, 16, 27, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: var(--text-primary);
    background-color: var(--primary-glow);
    border-left: 3px solid var(--primary);
    padding-left: 1.25rem;
}

/* Content Area offset */
.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

/* Tables styling */
.custom-table {
    color: var(--text-primary);
}

.custom-table thead th {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

.custom-table tbody tr {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.custom-table td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
}

/* Status Badges */
.badge-custom {
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-online {
    background-color: var(--success-glow);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-offline {
    background-color: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-expired {
    background-color: var(--danger-glow);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-blocked {
    background-color: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px dashed rgba(239, 68, 68, 0.4);
}

/* Pulsing indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot-online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 1.8s infinite;
}

.status-dot-offline {
    background-color: var(--text-secondary);
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Input Fields styling */
.form-control-custom {
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.25s ease;
}

.form-control-custom:focus {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
    outline: none;
}

/* Buttons style */
.btn-primary-custom {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #0b0f19;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Dashboard summary widgets */
.metric-card {
    padding: 1.5rem;
}

.metric-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.metric-primary { background-color: var(--primary-glow); color: var(--primary); }
.metric-success { background-color: var(--success-glow); color: var(--success); }
.metric-danger { background-color: var(--danger-glow); color: var(--danger); }
.metric-info { background-color: var(--info-glow); color: var(--info); }

/* Playback map view */
#map {
    height: 500px;
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.map-container {
    position: relative;
}

/* Modal designs */
.modal-custom .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
}

.modal-custom .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-custom .modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Expiry Management Grid */
.expiry-matrix-card {
    border-left: 4px solid var(--primary);
}

.expiry-matrix-expired {
    border-left: 4px solid var(--danger);
}
