/* General Reset */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Header */
header {
    background-color: #006400; /* Vetcor Green */
    color: white;
    padding: 15px;
    text-align: center;
}

/* Card-style containers */
.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px auto;
    padding: 20px;
    max-width: 1500px;
    width: 100%;
}

/* Buttons */
button, .btn {
    background-color: #228B22;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
}

button:hover, .btn:hover {
    background-color: #006400;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #228B22;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Search & Filter */
.search-box, .filter-dropdown {
    padding: 10px;
    margin-bottom: 15px;
    width: 250px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.pagination button {
    margin: 0 5px;
}

/* Admin Buttons */
.admin-buttons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.admin-buttons .btn {
    margin-left: 10px;
}

/* Tabs Consistency */
.tab-pane {
    padding: 1rem;
    min-height: auto; /* Let it shrink naturally */
    transition: all 0.3s ease;
}

/* Reduce blank space for Tools */
.tab-content {
    padding-bottom: 0; /* Remove extra bottom padding */
    min-height: 700px;
}

/* Login Container */
.login-container {
    max-width: 300px;
    margin: auto;
    margin-top: 20px;
}

/* Configuration Tools Form */
#apply-template-form {
    margin-top: 10px;
    margin-bottom: 20px;
}

#apply-template-form .form-check {
    margin-bottom: 8px;
}

/* Limit overall body height and remove unintended scroll height */
main {
    flex: 1 0 auto;
}

.autocomplete-suggestions {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    z-index: 1050;
}

.autocomplete-item {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #e3f2fd;
    color: #0056b3;
}

/* Reports Module Styles */
.nav-pills .nav-link {
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
    text-align: left;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.nav-pills .nav-link i {
    margin-right: 8px;
    width: 20px;
}

.log-viewer {
    height: 700px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 4px;
}

.log-viewer pre {
    font-size: 0.85rem;
    white-space: pre-wrap;
    margin-bottom: 0;
}

.report-content {
    transition: opacity 0.3s ease;
}

.report-content.d-none {
    opacity: 0;
}

.report-content:not(.d-none) {
    opacity: 1;
}

/* ===== DASHBOARD STYLES ===== */
:root {
    /* Vetcor Brand Colors */
    --vetcor-green: #7AC142;           /* Primary - Grass green */
    --vetcor-green-dark: #5FA030;      /* Darker green for gradients */
    --vetcor-green-light: #8FD255;     /* Lighter green for hover */
    --vetcor-yellow: #FFD700;          /* Sunshine yellow accent */
    --vetcor-blue: #5DADE2;            /* Sky blue accent */

    /* Status Colors */
    --success-green: #7AC142;          /* Healthy status (matches primary) */
    --warning-orange: #FF9800;         /* Warning status */
    --critical-red: #D32F2F;           /* Critical/Failed status */

    /* Legacy aliases (for backwards compatibility) */
    --cisco-blue: #7AC142;             /* Redirect to Vetcor green */
    --cisco-dark-blue: #5FA030;        /* Redirect to Vetcor dark green */
}

.cisco-blue {
    color: var(--vetcor-green);
}

.vetcor-green {
    color: var(--vetcor-green);
}

/* Ensure all cards have visible borders */
.card {
    border: 2px solid #ccc !important;
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-body {
    padding: 1.5rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.card-header {
    border-bottom: 1px solid #dee2e6;
}

/* Add bottom borders to table rows inside cards */
.card-body table tr {
    border-bottom: 1px solid #e9ecef;
}

.card-body table tr:last-child {
    border-bottom: none;
}

/* For borderless tables in cards, add subtle row separators */
.card-body .table-borderless tr:not(:last-child) {
    border-bottom: 1px solid #f0f0f0 !important;
}

.metric-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 24px;
    text-align: center;
    transition: transform 0.2s;
    min-height: 140px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.metric-card h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.metric-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-card, .alerts-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.chart-card h5, .alerts-card h5 {
    color: #212121;
    font-weight: 600;
    margin-bottom: 15px;
}

.list-group-item {
    border-left: 3px solid transparent;
    transition: border-color 0.2s;
}

.list-group-item:hover {
    border-left-color: var(--cisco-blue);
    background-color: #f8f9fa;
}

.health-stat {
    padding: 10px;
}

.health-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.health-label {
    font-size: 0.9rem;
    color: #555;
}

.health-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212121;
}

/* ===== GLOBAL NAVIGATION ===== */
.bg-cisco {
    background: linear-gradient(135deg, var(--vetcor-green-dark) 0%, var(--vetcor-green) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bg-vetcor {
    background: linear-gradient(135deg, var(--vetcor-green-dark) 0%, var(--vetcor-green) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-dark .navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

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

.brand-text {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-dark .nav-link {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.navbar-dark .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.navbar-dark .nav-link.active {
    color: white;
    background-color: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.navbar-dark .dropdown-menu {
    background-color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.navbar-dark .dropdown-item {
    color: #212121;
    padding: 0.5rem 1.5rem;
}

.navbar-dark .dropdown-item:hover {
    background-color: #f0f9ff;
    color: #0073A8;
}

.nav-sync-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255,255,255,0.1);
    border-radius: 12px;
}

/* Adjust body padding for fixed navbar */
body {
    padding-top: 60px;
}

/* Make container full width under navbar */
.container {
    margin-top: 0;
}

/* ===== NETWORK DETAILS SIDEBAR LAYOUT ===== */
.network-header {
    margin-bottom: 20px;
}

.text-vetcor {
    color: var(--vetcor-green);
}

.btn-vetcor {
    background-color: var(--vetcor-green);
    border-color: var(--vetcor-green);
    color: white;
}

.btn-vetcor:hover {
    background-color: var(--vetcor-green-dark);
    border-color: var(--vetcor-green-dark);
    color: white;
}

.network-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.network-sidebar {
    flex: 0 0 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.nav-sections {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-section i {
    font-size: 1.2rem;
    width: 24px;
}

.nav-section:hover {
    background-color: #f8f9fa;
    color: var(--vetcor-green);
    border-left-color: var(--vetcor-green-light);
}

.nav-section.active {
    background-color: #f0f9ff;
    color: var(--vetcor-green);
    border-left-color: var(--vetcor-green);
    font-weight: 600;
}

.network-content {
    flex: 1;
    min-width: 0;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s;
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.content-section.active {
    display: block;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: -25px -25px 25px -25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid var(--vetcor-green);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 120px;
    height: 100%;
    width: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(122, 193, 66, 0.1);
}

.stat-icon.text-success {
    color: var(--success-green);
}

.stat-icon.text-primary {
    color: var(--vetcor-green);
}

.stat-icon.text-info {
    color: var(--vetcor-blue);
}

.stat-icon.text-secondary {
    color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h2 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    color: var(--vetcor-green);
}

.stat-info p {
    margin: 0;
    font-size: 0.9rem;
}

.nav-section-link {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-section-link:hover {
    color: var(--vetcor-green-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
    .network-layout {
        flex-direction: column;
    }

    .network-sidebar {
        flex: 0 0 auto;
        position: relative;
        top: 0;
    }

    .nav-sections {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-section {
        flex: 0 0 auto;
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 4px;
    }

    .nav-section.active {
        border-left: none;
        border-bottom-color: var(--vetcor-green);
    }
}
/* Report Builder Styles */
.report-sidebar {
    border-right: 1px solid #dee2e6;
    padding-right: 20px;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.template-category {
    margin-bottom: 20px;
}

.template-category h6 {
    color: #007f3d;
    font-weight: 600;
    margin-bottom: 10px;
}

.template-list {
    margin-left: 5px;
}

.template-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 4px;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.template-item:hover {
    background-color: #f8f9fa;
    border-left-color: #007f3d;
}

.template-item.active {
    background-color: #e7f3ff;
    border-left-color: #007f3d;
    font-weight: 500;
}

.saved-report-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 4px;
    border-left: 3px solid #6c757d;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.saved-report-item:hover {
    background-color: #f8f9fa;
}

.saved-report-item .delete-btn {
    float: right;
    color: #dc3545;
    font-size: 0.8rem;
    padding: 0 5px;
}

.report-content {
    padding-left: 20px;
}

#preview-table {
    font-size: 0.9rem;
}

#preview-table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

#preview-table td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-input {
    margin-bottom: 15px;
}

#loading-spinner {
    padding: 40px;
}

#preview-stats {
    font-size: 0.9rem;
}
