:root {
    --dropdown-closed: "\f107"; /* la la-angle-down */
    --dropdown-open: "\f106"; /* la la-angle-up */
    --dropdown-icon-size: 14px;
    --dropdown-icon-color: #000;
    --dropdown-icon-hover-color: #185655;
}

.sidebar-brand {
    background-color: #f3f4f6;
    color: #000;
    border-bottom: 1px solid #fafafa;
}

.sidebar-nav .nav-link {
    color: #333;
    font-weight: 500;
}

.sidebar-nav .nav-icon {
    color: #333;
}

.sidebar-nav .nav-link:hover {
    color: #185655;
    background-color: rgba(24, 86, 85, 0.1);
}

.sidebar-nav .nav-link:hover .nav-icon {
    color: #185655;
}

.sidebar-nav .nav-link.active {
    background-color: #185655;
    color: #ffffff;
}

.sidebar-nav .nav-link.active .nav-icon {
    color: #ffffff;
}

.sidebar-nav .nav-group.show {
    background-color: #ffffff;
}

.sidebar-nav .nav-group.show .nav-group-toggle {
    color: #000;
}

.sidebar-nav .nav-group.show > .nav-group-toggle::after {
    color: #000;
}

/* Custom arrow for nav-group-toggle using Line Awesome icons */
.sidebar-nav .nav-group-toggle::after {
    display: block;
    flex: 0 12px;
    height: 12px;
    margin-left: auto;
    content: var(--dropdown-closed);
    font-family: "Line Awesome Free";
    font-weight: 900;
    font-size: var(--dropdown-icon-size);
    line-height: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    color: var(--dropdown-icon-color);
}

/* Custom Dropdown Menu Styles */
.nav-group {
    margin-bottom: 2px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-group:hover {
    background-color: rgba(24, 86, 85, 0.05);
}

.nav-group-toggle {
    padding: 12px 16px !important;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    /* gap: 10px; */
    color: #000;
}

.nav-group-toggle:hover {
    background-color: rgba(24, 86, 85, 0.1) !important;
    color: #185655 !important;
    transform: translateX(2px);
}

.nav-group-toggle:hover .nav-icon {
    color: #185655 !important;
    transform: scale(1.1);
}

.nav-group-toggle:hover::after {
    color: var(--dropdown-icon-hover-color) !important;
}

.nav-group-toggle .nav-icon {
    font-size: 20px;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
    color: #000;
}

.nav-group-toggle span {
    font-size: 14px;
    font-weight: 500;
}

/* Dropdown arrow animation */
.nav-group-toggle::after {
    transition: transform 0.3s ease;
    margin-left: auto;
    font-size: var(--dropdown-icon-size);
}

.nav-group.show .nav-group-toggle::after {
    transform: rotate(180deg);
    /* content: var(--dropdown-open); */
}

/* Dropdown items container */
.nav-dropdown-items {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    margin-left: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.nav-group.show .nav-dropdown-items {
    max-height: 500px;
    opacity: 1;
    padding: 8px 0;
}

/* Individual dropdown items */
.nav-dropdown-items .nav-item {
    margin: 0;
    border-radius: 0;
}

.nav-dropdown-items .nav-link {
    padding: 10px 16px 10px 20px !important;
    font-size: 14px;
    color: #495057;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    /* gap: 10px; */
    position: relative;
}

.nav-dropdown-items .nav-link:hover {
    background-color: rgba(24, 86, 85, 0.1) !important;
    color: #185655 !important;
    transform: translateX(5px);
}

.nav-dropdown-items .nav-link:hover .nav-icon {
    color: #185655 !important;
}

.nav-dropdown-items .nav-link.active {
    background-color: #185655 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(24, 86, 85, 0.3);
}

.nav-dropdown-items .nav-link.active .nav-icon {
    color: #ffffff !important;
}

.nav-dropdown-items .nav-link .nav-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    transition: all 0.3s ease;
    margin-left: 0 !important;
    color: #495057;
}

.nav-dropdown-items .nav-link span {
    font-weight: 400;
}

/* Active state for dropdown parent */
.nav-group.show .nav-group-toggle {
    background-color: rgba(24, 86, 85, 0.1) !important;
    color: #185655 !important;
}

.nav-group.show .nav-group-toggle .nav-icon {
    color: #185655 !important;
}

.nav-group.show .nav-group-toggle::after {
    color: var(--dropdown-icon-hover-color) !important;
}

/* Active state for dropdown toggle when child is active */
.nav-group-toggle.active {
    background-color: rgba(24, 86, 85, 0.15) !important;
    color: #185655 !important;
    font-weight: 600;
}

.nav-group-toggle.active .nav-icon {
    color: #185655 !important;
}

.nav-group-toggle.active::after {
    color: var(--dropdown-icon-hover-color) !important;
}

/* Hover effect for dropdown items */
.nav-dropdown-items .nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #185655;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-dropdown-items .nav-link:hover::before {
    transform: scaleY(1);
}

/* Form controls */
.form-control:focus {
    border-color: #185655;
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(13, 114, 106, 0.25);
}

.form-control[readonly],
.form-control[disabled] {
    background-color: #fff !important;
    opacity: 1 !important;
    cursor: default;
}

.form-control[readonly]:focus,
.form-control[disabled]:focus {
    border-color: #ced4da;
    box-shadow: none;
    outline: none;
}

/* Server table custom styles */
.table td {
    vertical-align: middle !important;
    padding: 12px 8px !important;
    min-height: 50px;
    height: 50px;
}

/* Style for switch with warning */
.switch-with-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.switch-with-warning .badge {
    font-size: 10px;
    padding: 2px 6px;
    white-space: nowrap;
}

/* Make enabled column wider */
.table th[data-column-name="enabled"],
.table td:has(.switch-with-warning) {
    min-width: 120px;
    width: 120px;
}

/* Better spacing for table cells */
.table tbody tr {
    min-height: 50px !important;
    height: 50px !important;
}

.table tbody td {
    line-height: 1.4 !important;
    min-height: 50px !important;
    height: 50px !important;
}

/* Table header height */
.table thead th {
    padding: 15px 8px !important;
    min-height: 50px !important;
    height: 50px !important;
    vertical-align: middle !important;
}

/* Specific styling for server table */
.table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table.table-striped tbody tr:nth-of-type(even) {
    background-color: rgba(0, 0, 0, 0.05);
}
