/* General Body and Container Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Light grey background */
    color: #343a40; /* Darker text for readability */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

/* Wrapper for the entire layout */
#wrapper {
    display: flex;
}

/* Sidebar styles */
#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem; /* Hidden by default */
    transition: margin .25s ease-out;
    width: 19rem; /* Sidebar width */
    background-color: #343a40 !important; /* Dark background for sidebar */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.75rem 1.25rem;
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

#sidebar-wrapper .list-group {
    width: 100%;
}

#sidebar-wrapper .list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,.7);
    transition: background-color .2s ease, color .2s ease;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255,255,255,.1) !important;
    color: #ffffff !important;
}

#sidebar-wrapper .list-group-item.active {
    background-color: #007bff !important; /* OplComms blue for active item */
    color: #ffffff !important;
    font-weight: bold;
    border-radius: 0; /* Remove border-radius for list items */
}

/* Page Content Wrapper */
#page-content-wrapper {
    min-width: 100vw; /* Takes full width initially */
    flex-grow: 1; /* Allows it to grow */
}

/* Toggled state for sidebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: 0; /* Show sidebar */
}

#wrapper.toggled #page-content-wrapper {
    min-width: calc(100vw - 15rem); /* Adjust content width when sidebar is open */
}

/* Media queries for responsiveness */
@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0; /* Always show sidebar on larger screens */
    }

    #page-content-wrapper {
        min-width: 0; /* Reset min-width */
        width: 100%; /* Take remaining width */
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem; /* Hide sidebar on larger screens when toggled */
    }

    #wrapper.toggled #page-content-wrapper {
        min-width: 100vw; /* Full width when sidebar is hidden on larger screens */
    }
}

/* Top Navbar (within page-content-wrapper) */
.navbar {
    background-color: #ffffff !important; /* White background for top navbar */
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
}

.navbar .nav-link {
    color: #343a40 !important; /* Dark text for top navbar items */
}

.navbar .nav-link.active {
    background-color: transparent !important; /* No background for active link in top nav */
    color: #007bff !important; /* OplComms blue for active text */
    font-weight: normal;
}

.navbar .nav-link:hover {
    color: #007bff !important; /* OplComms blue on hover */
}

/* Content Area within page-content-wrapper */
.container-fluid {
    padding: 20px;
}

/* Existing styles from previous iterations (adjust as needed for new layout) */
h1, h2, h3, h4, h5, h6 {
    color: #007bff; /* OplComms blue for headings */
    margin-bottom: 25px;
    text-align: center; /* Keep centered for content area */
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #007bff;
    color: #ffffff;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    border-radius: 5px;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* ... (rest of your existing styles like .btn-success, .btn-danger, table styles, etc.) ... */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

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

.table thead th {
    background-color: #007bff;
    color: #ffffff;
    font-weight: bold;
}

.table tbody tr:nth-child(even) {
    background-color: #f2f7fc;
}

.table tbody tr:hover {
    background-color: #e9f2fb;
}

.sort-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sort-link:hover {
    color: #e0e0e0;
}

.sort-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.sort-arrow.asc {
    border-bottom: 4px solid currentColor;
}

.sort-arrow.desc {
    border-top: 4px solid currentColor;
}

.report-summary {
    text-align: right;
    margin-top: 15px;
    font-weight: bold;
    color: #555;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.pagination-links .page-item {
    display: inline-block;
    margin: 0 2px;
}

.pagination-links .page-link {
    padding: 6px 12px;
    border: 1px solid #007bff;
    border-radius: 0.25rem;
    color: #007bff;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination-links .page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-links .page-link:hover:not(.active) {
    background-color: #e9ecef;
    color: #0056b3;
}

.table pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-break: break-all;
}

.emergency-address-details {
    font-size: 0.9em;
    line-height: 1.4;
}

.emergency-address-details strong {
    display: block;
    margin-top: 5px;
    color: #007bff;
}

.login-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.login-container h2 {
    margin-bottom: 25px;
    color: #007bff;
    text-align: center;
}

.footer-info {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8em;
    color: #777;
}

/* Utility classes */
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.d-inline { display: inline-block !important; }
.w-auto { width: auto !important; }
.mr-2 { margin-right: 0.5rem !important; }
.form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
.input-group .form-control { flex: 1 1 auto; width: 1%; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group { display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.form-check-inline { display: inline-flex; align-items: center; padding-left: 0; margin-right: 0.75rem; }
.form-check-input { margin-right: 0.375rem; }
.alert { border-radius: 5px; }
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }
.alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
/* Edit Trunk Page Styles */
.card-header-custom {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.info-label {
    font-weight: bold;
    color: #555;
}

.info-value {
    margin-bottom: 10px;
}

/* IP Entry Styling */
.ip-entry {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.ip-entry input {
    flex-grow: 1;
    margin-right: 8px;
}

/* Endpoint Management Styles */
.endpoint-entry {
    margin-bottom: 1rem;
}

.drag-handle {
    cursor: move;
    user-select: none;
}

.drag-handle:hover {
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
    padding: 2px 4px;
}

/* Sortable.js states */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background-color: #f8f9fa;
}

.sortable-drag {
    transform: rotate(5deg);
}

/* Block visual grouping */
.endpoint-entry .card.border-primary {
    border-color: #007bff !important;
    border-width: 2px;
}

.endpoint-entry .card.border-success {
    border-color: #28a745 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-warning {
    border-color: #ffc107 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-info {
    border-color: #17a2b8 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-secondary {
    border-color: #6c757d !important;
    border-width: 2px;
}

/* Form improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Balance form validation styles */
.bg-light.form-control[readonly] {
    background-color: #e9ecef !important;
    opacity: 0.7;
}

/* Container and layout improvements */
.container {
    max-width: 1200px;
}

/* Destination ACL styling */
pre.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Additional settings form spacing */
.additional-settings-form .row {
    margin-bottom: 0;
}

.additional-settings-form .mb-3 {
    margin-bottom: 1rem !important;
}
/* Edit Trunk Page Styles */
.card-header-custom {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.info-label {
    font-weight: bold;
    color: #555;
}

.info-value {
    margin-bottom: 10px;
}

/* IP Entry Styling */
.ip-entry {
    margin-bottom: 0.75rem;
}

.ip-entry .input-group {
    width: 100%;
}

.ip-entry .remove-ip-btn {
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-entry .remove-ip-btn i {
    font-size: 0.875rem;
}

/* Endpoint Management Styles */
.endpoint-entry {
    margin-bottom: 1rem;
}

.drag-handle {
    cursor: move;
    user-select: none;
}

.drag-handle:hover {
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
    padding: 2px 4px;
}

/* Sortable.js states */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background-color: #f8f9fa;
}

.sortable-drag {
    transform: rotate(5deg);
}

/* Block visual grouping */
.endpoint-entry .card.border-primary {
    border-color: #007bff !important;
    border-width: 2px;
}

.endpoint-entry .card.border-success {
    border-color: #28a745 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-warning {
    border-color: #ffc107 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-info {
    border-color: #17a2b8 !important;
    border-width: 2px;
}

.endpoint-entry .card.border-secondary {
    border-color: #6c757d !important;
    border-width: 2px;
}

/* Form improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Balance form validation styles */
.bg-light.form-control[readonly] {
    background-color: #e9ecef !important;
    opacity: 0.7;
}

/* Container and layout improvements */
.container {
    max-width: 1200px;
}

/* Destination ACL styling */
pre.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Additional settings form spacing */
.additional-settings-form .row {
    margin-bottom: 0;
}

.additional-settings-form .mb-3 {
    margin-bottom: 1rem !important;
}
    .password-strength {
        height: 5px;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    .strength-weak { background-color: #dc3545; }
    .strength-medium { background-color: #ffc107; }
    .strength-strong { background-color: #198754; }
    
    .password-criteria {
        font-size: 0.875rem;
    }
    .criteria-met { color: #198754; }
    .criteria-unmet { color: #6c757d; }
    
    .btn-password-toggle {
        border: none;
        background: none;
        color: #6c757d;
        padding: 0.375rem 0.75rem;
    }
    .btn-password-toggle:hover {
        color: #495057;
    }
/* Make text white when Tekton account is selected */
.list-group-item.active h6,
.list-group-item.active h6.mb-1,
.list-group-item.active small,
.list-group-item.active .text-muted,
.list-group-item.active p {
    color: #ffffff !important;
}