/* Global button overrides */
.btn-primary {
    background-color: #0D406A;
    border-color: #0D406A;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: #0b3558;
    border-color: #0b3558;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #0D406A;
    border-color: #0D406A;
}
/* Layout: sidebar + content */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0D406A 0%, #00143A 100%);
    color: #ffffff;
}

.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.admin-sidebar .sidebar-brand .btn-link {
    color: #ffffff !important;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.admin-sidebar .sidebar-brand .btn-link:hover {
    opacity: 1;
}

.admin-sidebar .sidebar-brand img {
    max-height: 90px;
}

.admin-sidebar .nav {
    padding: 1rem 0;
}

.admin-sidebar .nav-category {
    padding: 0.75rem 1.5rem 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

.admin-sidebar .nav-link {
    color: #e5e7eb;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border-radius: 0;
}

.admin-sidebar .nav-link .bi {
    font-size: 1.1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-content {
    flex: 1;
    background-color: #f3f4f6;
}

/* Top bar styled to match sidebar */
.admin-topbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(90deg, #0D406A 0%, #00143A 100%);
    color: #ffffff;
}

.admin-topbar .navbar-brand,
.admin-topbar .navbar-text,
.admin-topbar .nav-link,
.admin-topbar .nav-link:hover,
.admin-topbar .nav-link:focus {
    color: #ffffff;
}

.admin-topbar .btn-link {
    color: #ffffff !important;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.admin-topbar .btn-link:hover {
    opacity: 1;
}

.admin-page {
    padding: 1.5rem 1.5rem 2rem;
}

@media (max-width: 1199.98px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        width: 100%;
    }

    /* Overlay for mobile menu */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Card header theming to match sidebar primary color */
.card-header {
    background-color: #0D406A;
    color: #ffffff;
    border-bottom: 1px solid #0b3558;
}

.card-header .btn,
.card-header .form-label,
.card-header .nav-link,
.card-header .bi {
    color: #ffffff;
}

/* Drill sets pills */
.selected-set-pill {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 999px;
    gap: 0.4rem;
    cursor: move;
}

.selected-set-pill .btn-close {
    width: 0.6rem;
    height: 0.6rem;
}

/* Sidebar submenu styles */
.admin-sidebar .nav-link {
    position: relative;
}

.admin-sidebar .submenu-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.admin-sidebar .nav-link[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.admin-sidebar .submenu {
    padding-left: 0;
    background-color: rgba(0, 0, 0, 0.1);
}

.admin-sidebar .submenu .nav-item {
    margin: 0;
}

.admin-sidebar .submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.85rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.admin-sidebar .submenu .nav-link .bi {
    font-size: 0.9rem;
}

.admin-sidebar .submenu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    border-left: 3px solid #ffffff;
}

/* Consistent padding, height, and line-height for all form inputs */
input.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
input[type="search"] {
    padding: 0.375rem 0.75rem !important;
    height: calc(1.5em + 0.75rem + 2px) !important;
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    line-height: 1.5 !important;
    border-radius: 0.375rem !important;
}

/* Consistent border radius for textarea, selects, and Select2 */
textarea.form-control,
select.form-select,
select.form-control,
.form-control,
.form-select,
select,
textarea {
    border-radius: 0.375rem !important;
}

/* Textarea specific - allow height to grow but consistent padding */
textarea.form-control,
textarea {
    padding: 0.375rem 0.75rem !important;
    line-height: 1.5 !important;
}

/* Select2 design to match Bootstrap form-select / form-control */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    background-color: #fff !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.select2-results__option {
    padding: 0.375rem 0.75rem !important;
}

/* Consistent select box padding, height, and line-height */
select.form-select,
select.form-control,
.form-select,
select {
    height: calc(1.5em + 0.75rem + 2px) !important;
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 2.5rem 0.375rem 0.75rem !important;
    line-height: 1.5 !important;
}

/* Select2 height and padding consistency */
.select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    min-height: calc(1.5em + 0.75rem + 2px) !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    padding-left: 0.75rem !important;
    padding-right: 2.5rem !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem + 2px) !important;
    right: 0.5rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    font-size: 1.2em;
    margin-right: 4px;
}

