:root {
    --primary-color: #0a2342;
    --primary-color-txt: #0a2342;
    /* Dark Blue */
    --secondary-color: #d4af37;
    /* Gold */
    --background-color: #f4f7f6;
    /* Light Grayish White */
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #ffffff;
    --dark-color: #212529;
    --header-height: 60px;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);

    /* Chart Colors */
    --chart-grid-color: #e0e0e0;
    --chart-text-color: #666;
}

[data-theme="dark"] {
    --primary-color: #30363d;
    --primary-color-txt: #ffffff;
    /* Soft Blue */
    --secondary-color: #d29922;
    /* Muted Gold */
    --background-color: #0d1117;
    --light-color: #0d1117;
    /* Very Dark Slate */
    --card-bg: #161b22;
    /* Dark Slate */
    --text-color: #c9d1d9;
    /* Off-white */
    --text-muted: #8b949e;
    /* Gray */
    --border-color: #30363d;
    /* Subtle Gray */
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.7);

    /* Adjust specific colors for dark mode visibility */
    --success-color: #2ea043;
    /* Green */
    --warning-color: #d29922;
    /* Muted Gold (same as secondary) */
    --danger-color: #f85149;
    /* Red */
    --info-color: #0dcaf0;
    /*#388bfd*/
    /* Blue */

    /* Chart Colors */
    --chart-grid-color: #30363d;
    --chart-text-color: #8b949e;

}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header & Navigation */
.top-header {
    background-color: var(--primary-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-left,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* Navigation Logo */
.nav-logo-link {
    display: flex;
    align-items: center;
    margin-right: 20px;
    text-decoration: none;
}

.nav-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Organization Dropdown */
.org-dropdown-menu {
    min-width: 350px;
    right: auto;
    left: 0;
}

.org-list-scroll {
    max-height: 300px;
    overflow-y: auto;
}

.org-name-text {
    max-width: 200px;
}

/* Layout */
.main-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    /*margin: 0 -15px;*/
}

.col {
    padding: 0 15px;
    flex: 1;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

.col-20 {
    flex: 0 0 20%;
    max-width: 20%;
}

.col-25 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-33 {
    flex: 0 0 33.33%;
    max-width: 33.33%;
}

.col-50 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-100 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-lg-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding: 0 15px;
}

.col-lg-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding: 0 15px;
}

.position-sticky {
    position: -webkit-sticky;
    position: sticky;
}

/* Responsive Grid */
@media (max-width: 992px) {
    .col-20 {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }

    .col-lg-2,
    .col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    .col-20,
    .col-25,
    .col-33,
    .col-50,
    .col-lg-2,
    .col-lg-10 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .top-header {
        height: auto;
    }
}

@media (max-width: 576px) {

    .col-20,
    .col-25,
    .col-33,
    .col-50,
    .col-lg-2,
    .col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stat-card {
    text-align: center;
    border-top: 4px solid transparent;
}

.stat-card.primary {
    border-color: var(--primary-color);
}

.stat-card.success {
    border-color: var(--success-color);
}

.stat-card.info {
    border-color: var(--info-color);
}

.stat-card.danger {
    border-color: var(--danger-color);
}

.stat-card.secondary {
    border-color: var(--text-muted);
}

.stat-value {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.stat-label-sm {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-scrollable-y {
    max-height: 500px;
    /* Approx 10 rows */
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
}

.table-scrollable-y thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    /* Ensure background is opaque so scrolling content doesn't show through */
    background-color: var(--primary-color);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

.data-table th:hover {
    background-color: #15325b;
}

[data-theme="dark"] .data-table th:hover {
    background-color: #2a2a40;
}

.data-table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
    /* Light Gold tint */
}

[data-theme="dark"] .data-table tbody tr:hover {
    background-color: rgba(56, 139, 253, 0.1);
    /* Subtle Blue Tint */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 4px 12px;
    /* Slim padding */
    height: 32px;
    /* Fixed slim height */
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
    margin: 0 4px;
    /* Spacing between buttons */
}

.btn i {
    font-size: 1.1em;
}

.btn-menu {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
}

.btn-sm {
    padding: 2px 8px;
    height: 28px;
    /* Even slimmer for small buttons */
    font-size: 0.8rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #15325b;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.btn-outline-info {
    background-color: transparent;
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

.btn-outline-info:hover {
    background-color: var(--info-color);
    color: white;
}

.btn-outline-success {
    background-color: transparent;
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: white;
}

.btn-outline-warning {
    background-color: transparent;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.btn-outline-warning:hover {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}


/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: bold;
    color: white;
    margin-right: 4px;
}

.badge.bg-success {
    background-color: var(--success-color);
}

.badge.bg-danger {
    background-color: var(--danger-color);
}

.badge.bg-warning {
    background-color: var(--warning-color);
    color: #333;
}

.badge.bg-dark {
    background-color: var(--dark-color);
    color: #fff;
}

.badge.bg-secondary {
    background-color: var(--text-muted);
}

.badge.bg-primary {
    background-color: var(--primary-color);
}

.badge.bg-info {
    background-color: var(--info-color);
}

.badge.bg-light {
    background-color: var(--light-color);
}

/* Utilities */
.justify-content-center {
    justify-content: center;
}

.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters>.col,
.no-gutters>[class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-3 {
    margin-bottom: 16px;
    margin-right: 4px;
}

.mb-4 {
    margin-bottom: 24px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.fw-bold {
    font-weight: bold;
}

.text-center {
    text-align: center;
}

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

.text-decoration-none {
    text-decoration: none;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap !important;
}

/* Input Group - Minimal Bootstrap-like implementation */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.input-group>.form-control,
.input-group>.form-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    border-radius: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.input-group> :not(:first-child):not(:last-child) {
    border-radius: 0;
}

.input-group> :last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .btn {
    height: auto;
    margin: 0;
    z-index: 2;
}

/* Ensure buttons don't have rounded corners on the side attaching to inputs */
.input-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-auto {
    margin-bottom: auto;
}

.small {
    font-size: 0.875rem;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-4 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 16px;
}

.rounded {
    border-radius: 8px;
}

.border {
    border: 1px solid var(--border-color);
}

.border-end {
    border-right: 1px solid var(--border-color);
}

.border-start {
    border-left: 1px solid var(--border-color);
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.shadow-sm {
    box-shadow: var(--shadow);
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

.me-auto {
    margin-right: auto !important;
}

.ms-auto {
    margin-left: auto !important;
}

/* Collapsible Sections (Accordion) */
.collapse {
    display: none;
}

.collapse.show {
    display: block;
}

/* Forms */
.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

.form-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-select:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

.form-select-sm {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    font-size: .875rem;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Toast / Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: white;
    border-left: 4px solid var(--success-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    margin-top: 10px;
    border-radius: 4px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-close {
    float: right;
    cursor: pointer;
    color: #aaa;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    display: block;
    padding: 8px 12px;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    border-radius: 4px;
}

.page-link:hover {
    background-color: #e9ecef;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.list-group-item {
    display: block;
    padding: 0px 12px;
    color: var(--text-color);
    text-decoration: none;
}

/* Text Colors */
.text-primary {
    color: var(--primary-color-txt) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

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

.text-dark {
    color: var(--text-color) !important;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 4px;
    right: 0;
    top: 100%;
    margin-top: 5px;
    border: 1px solid var(--border-color);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 5px 0;
}

.btn-dropdown {
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Probes List Header */
.probes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.probes-title {
    min-width: 200px;
    font-size: 1.1rem;
}

.probes-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-value-lg {
    font-size: 1.4rem;
    font-weight: bold;
}


.table-row-inactive {
    background-color: #f8f9fa;
}


/* Task Detail */
.scan-progress-container {
    max-width: 800px;
    margin-top: 50px;
    text-align: center;
}

.scan-card-body {
    padding: 50px;
}

.progress-lg {
    height: 25px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.export-group {
    margin-right: 10px;
    align-items: center;
}

.excel-link {
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2rem;
}

.task-info-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.btn-json-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: bold;
    color: var(--primary-color);
}


.subdomain-list {
    max-height: 300px;
    overflow-y: auto;
}

.tech-badge {
    font-size: 0.9rem;
    margin-right: 4px;
    margin-bottom: 4px;
}


/* Dashboard */
.filter-reset-btn {
    margin-left: 10px;
}

.chart-container-sm {
    height: 300px;
    max-height: 300px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-stats-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-stat-item {
    text-align: center;
    font-size: 0.9rem;
}

.dashboard-stat-value {
    font-size: 0.9rem;
    font-weight: bold;
}

.chart-container-lg {
    position: relative;
    height: 335px;
}


/* Settings */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.settings-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.company-logo-preview {
    max-height: 50px;
}

.update-config-container {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.input-auto-width {
    width: auto;
}

.update-config-container {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.input-auto-width {
    width: auto;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    position: relative;
    margin: 50px auto;
    max-width: 800px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

.modal-header-custom {
    padding: 20px 25px;
    background-color: white;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-custom h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.modal-close-btn {
    border: none;
    background: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.modal-close-btn:hover {
    color: var(--danger-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content-scroll {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.log-detail-box {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    white-space: pre-wrap;
}

.log-json-pre {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
}

/* Base / Navigation */
.nav-user-item {
    margin-left: auto;
    position: relative;
}

.nav-user-link {
    cursor: pointer;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: white;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu:hover .user-dropdown,
.user-dropdown:hover {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: #f8f9fa;
}


/* Supervision */
.supervision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.supervision-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* Supervision Grid Container - 8px gap between cards */
#gridView.row,
#categoryView .row {
    gap: 8px;
}

/* Supervision Target Cards - Professional Design */
.supervision-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 0 8px 8px 8px;
}

.supervision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--border-color), var(--border-color));
    transition: background 0.3s ease;
}

.supervision-card.border-success::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.supervision-card.border-danger::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.supervision-card.border-warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.supervision-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.supervision-card .card-body {
    padding: 20px;
}

/* Clickable Card Styling */
.supervision-card {
    cursor: pointer;
}

.supervision-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

/* Card Footer - Category and Date */
.supervision-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.supervision-card-footer .badge {
    font-size: 0.65rem;
}

.supervision-card-footer small {
    font-size: 0.75rem;
}

.supervision-card h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

/* Status Indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    opacity: 0.3;
}

.status-indicator.status-up {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: pulse-green 2s infinite;
}

.status-indicator.status-up::after {
    background: #22c55e;
}

.status-indicator.status-down {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: pulse-red 1.5s infinite;
}

.status-indicator.status-down::after {
    background: #ef4444;
}

.status-indicator.status-degraded {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulse-orange 2s infinite;
}

.status-indicator.status-degraded::after {
    background: #f59e0b;
}

.status-indicator.status-unknown {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 0 4px rgba(107, 114, 128, 0.3);
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    }

    50% {
        box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
    }
}

@keyframes pulse-red {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    }

    50% {
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
    }
}

@keyframes pulse-orange {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    }

    50% {
        box-shadow: 0 0 16px rgba(245, 158, 11, 0.8);
    }
}

/* Service Badges in Cards */
.supervision-card .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease;
}

.supervision-card .badge:hover {
    transform: scale(1.05);
}

/* Category Badge */
.supervision-card .badge.bg-light {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-muted);
    font-weight: 500;
}

[data-theme="dark"] .supervision-card .badge.bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted);
}

/* Card Footer Actions */
.supervision-card .btn-outline-info {
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.supervision-card .btn-outline-info:hover {
    transform: scale(1.05);
}

/* Category Section in Category View */
.category-header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04)) !important;
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

[data-theme="dark"] .category-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05)) !important;
}

/* Dark Mode Adjustments for Cards */
[data-theme="dark"] .supervision-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .supervision-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-label-bold {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-body-custom {
    padding: 20px;
}

.modal-footer-custom {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-header-primary {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Task Create Form */
.form-label-bold-block {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.form-divider {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.flex-align-center {
    display: flex;
    align-items: center;
}

.btn-flex-1 {
    flex: 1;
}

.periodic-options-container {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.card-warning-border {
    border-left: 4px solid var(--warning-color);
}

.card-header-warning {
    background-color: #fff3cd;
    color: #856404;
}

.row-gap-20 {
    row-gap: 20px;
}

/* User Profile */
.avatar-circle {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Services List in Modals */
.services-list-container {
    min-height: 100px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    padding: 8px;
}

.actions-cell-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    gap: 4px;
}

.actions-cell-container .btn-group {
    display: flex;
    flex-wrap: nowrap;
}

.p-1 {
    padding: 2px 6px !important;
    font-size: 0.8rem !important;
    height: 24px !important;
    min-height: 0 !important;
    line-height: 1 !important;
}

.text-xs {
    font-size: 0.75rem !important;
}