/* Sentinel - Custom Styles */

:root {
    --sentinel-primary: #0d6efd;
    --sentinel-success: #198754;
    --sentinel-warning: #ffc107;
    --sentinel-danger: #dc3545;
    --sentinel-info: #0dcaf0;
    --sentinel-dark: #212529;
}

/* Layout */
html, body {
    min-height: 100vh;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.nav-link {
    padding: 0.5rem 1rem !important;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Cards */
.card {
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 500;
}

/* Status colors */
.border-success {
    border-width: 2px !important;
}

.border-warning {
    border-width: 2px !important;
}

.border-danger {
    border-width: 2px !important;
}

.border-secondary {
    border-width: 2px !important;
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
}

/* Tables */
.table th {
    font-weight: 600;
    border-bottom-width: 2px;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--sentinel-primary);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--sentinel-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Status badge pulse animation for critical */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.badge.bg-danger {
    animation: pulse 2s infinite;
}

/* List group */
.list-group-item {
    transition: background-color 0.15s ease-in-out;
}

.list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Modal */
.modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Code and monospace */
code {
    background-color: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

.font-monospace {
    font-size: 0.875em;
}

/* Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .form-control,
    .form-select {
        display: none !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can be extended for dark mode support */
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
}

/* Temperature colors */
.temp-normal {
    color: var(--sentinel-success);
}

.temp-warning {
    color: var(--sentinel-warning);
}

.temp-critical {
    color: var(--sentinel-danger);
    font-weight: bold;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
