/* =========================================================
   EDSIMS Enterprise Admin Theme
   Blue / white dashboard shell applied globally
   ========================================================= */

:root {
    --edsims-primary: #1e88e5;
    --edsims-primary-dark: #1565c0;
    --edsims-primary-light: #e3f2fd;
    --edsims-primary-soft: #bbdefb;
    --edsims-bg: #f0f4f8;
    --edsims-surface: #ffffff;
    --edsims-border: #e2e8f0;
    --edsims-text: #2c3e50;
    --edsims-text-muted: #6b7c93;
    --edsims-sidebar-width: 260px;
    --edsims-header-height: 56px;
    --edsims-radius: 8px;
    --edsims-shadow: 0 2px 12px rgba(30, 136, 229, 0.08);
    --edsims-success: #43a047;
    --edsims-success-bg: #e8f5e9;
    --edsims-danger: #e53935;
    --edsims-danger-bg: #ffebee;
    --edsims-warning: #fb8c00;
}

/* ---------- Base ---------- */
body {
    font-family: "Roboto", system-ui, -apple-system, sans-serif;
    background: var(--edsims-bg) !important;
    color: var(--edsims-text);
    font-size: 0.875rem;
}

a {
    color: var(--edsims-primary);
}

a:hover {
    color: var(--edsims-primary-dark);
}

/* ---------- Header (light bar with brand + title + profile) ---------- */
.header {
    height: var(--edsims-header-height);
    background-color: #f8fafc !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--edsims-border) !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

.header .header-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    gap: 0;
}

.header-brand {
    width: var(--edsims-sidebar-width);
    flex: 0 0 var(--edsims-sidebar-width);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1.1rem;
    border-right: 1px solid var(--edsims-border);
    text-decoration: none !important;
    background: #fff;
    transition: width 0.3s ease, flex-basis 0.3s ease, padding 0.3s ease, opacity 0.25s ease, border-width 0.3s ease;
}

.header-brand:hover {
    text-decoration: none !important;
}

.header-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--edsims-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.header-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--edsims-primary);
    letter-spacing: 0.03em;
    line-height: 1;
}

.header-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0 0.85rem;
    gap: 0.75rem;
    background: #f8fafc;
}

.header .header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}

.header .toggle-sidebar-btn {
    font-size: 1.55rem !important;
    padding: 0 !important;
    color: var(--edsims-primary) !important;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.header .toggle-sidebar-btn:hover {
    color: var(--edsims-primary-dark) !important;
}

.header .header-app-title {
    color: var(--edsims-primary);
    font-size: 1.58rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 290px;
}

.header .admin-nav,
.header .head-title {
    display: none !important;
}

.header-nav {
    flex-shrink: 0;
}

.header-nav .nav-icon {
    color: var(--edsims-primary) !important;
    font-size: 1.25rem;
    margin-right: 0.85rem;
    padding: 0.25rem;
    position: relative;
}

.header-nav .nav-icon:hover {
    color: var(--edsims-primary-dark) !important;
}

.header-nav .nav-profile {
    color: var(--edsims-text) !important;
    gap: 0.15rem;
}

.header-nav .nav-profile span {
    color: var(--edsims-text) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

.header-nav .nav-profile img {
    max-height: 34px;
    width: 34px;
    object-fit: cover;
    border: 1px solid var(--edsims-border);
}

.header-profile-caret {
    font-size: 0.75rem;
    color: var(--edsims-text-muted);
}

.header-nav .badge-number {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--edsims-danger) !important;
    color: #fff !important;
    font-size: 0.62rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1199.98px) {
    .header-brand {
        width: auto;
        flex: 0 0 auto;
        padding: 0 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .header-brand-text {
        display: none;
    }

    .header-brand {
        border-right: none;
        padding-right: 0.35rem;
    }
}

/* ---------- Sidebar ---------- */
.sidebar {
    top: var(--edsims-header-height) !important;
    width: var(--edsims-sidebar-width) !important;
    background-color: var(--edsims-surface) !important;
    box-shadow: 1px 0 0 var(--edsims-border) !important;
    padding: 0.5rem 0 0 !important;
}

.sidebar-brand {
    display: none !important;
}

.sidebar .sidebar-nav {
    padding: 0.75rem 0.75rem 1.5rem;
}

.sidebar-nav .nav-heading {
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    margin: 1rem 0 0.35rem 0.65rem !important;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px !important;
}

.sidebar-nav .nav-link {
    background: transparent !important;
    color: var(--edsims-text) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 6px !important;
    border-left: 3px solid transparent;
    line-height: 1.3 !important;
}

.sidebar-nav .nav-link i {
    color: var(--edsims-text-muted) !important;
    font-size: 1.05rem !important;
    margin-right: 0.65rem !important;
}

.sidebar-nav .nav-link .bi-chevron-down,
.sidebar-nav .nav-link .ri-arrow-right-s-line {
    margin-left: auto !important;
    margin-right: 0 !important;
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
}

.sidebar-nav .nav-link:hover {
    background: var(--edsims-primary-light) !important;
    color: var(--edsims-primary-dark) !important;
}

.sidebar-nav .nav-link:hover i {
    color: var(--edsims-primary) !important;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:not(.collapsed)[data-bs-toggle="collapse"].active,
.sidebar-nav .nav-link[aria-expanded="true"]:not(.collapsed) {
    background: var(--edsims-primary-light) !important;
    color: var(--edsims-primary-dark) !important;
    border-left-color: var(--edsims-primary);
}

.sidebar-nav .nav-link.active i,
.sidebar-nav .nav-link[aria-expanded="true"] i {
    color: var(--edsims-primary) !important;
}

.sidebar-nav .nav-link.collapsed {
    background: transparent !important;
    color: var(--edsims-text) !important;
}

.sidebar-nav .nav-link.collapsed i {
    color: var(--edsims-text-muted) !important;
}

.sidebar-nav .collapse,
.sidebar-nav .collapsing {
    padding-left: 0.25rem;
}

.sidebar-nav .collapse .nav-link,
.sidebar-nav ul.collapse > li > a.nav-link {
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    padding: 0.4rem 0.75rem 0.4rem 2.25rem !important;
    color: var(--edsims-text-muted) !important;
    border-left: 3px solid transparent;
}

.sidebar-nav .collapse .nav-link:hover,
.sidebar-nav .collapse .nav-link.active {
    background: var(--edsims-primary-light) !important;
    color: var(--edsims-primary-dark) !important;
    border-left-color: var(--edsims-primary);
}

@media (min-width: 1200px) {
    #main,
    #footer {
        margin-left: var(--edsims-sidebar-width) !important;
        transition: margin-left 0.3s ease;
    }

    /* Desktop: hamburger hides sidebar and releases reserved width */
    body.toggle-sidebar #sidebar.sidebar {
        left: calc(-1 * var(--edsims-sidebar-width)) !important;
        transform: none !important;
    }

    body.toggle-sidebar #main,
    body.toggle-sidebar #main.main,
    body.toggle-sidebar #footer,
    body.toggle-sidebar #footer.footer {
        margin-left: 0 !important;
    }

    body.toggle-sidebar .header-brand {
        width: 0 !important;
        flex-basis: 0 !important;
        flex: 0 0 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border-right-width: 0 !important;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 1199.98px) {
    .sidebar {
        left: calc(-1 * var(--edsims-sidebar-width)) !important;
        width: var(--edsims-sidebar-width) !important;
    }

    /* Mobile/tablet: hamburger opens the off-canvas sidebar */
    body.toggle-sidebar #sidebar.sidebar {
        left: 0 !important;
        transform: none !important;
    }

    #main,
    #main.main,
    #footer,
    #footer.footer {
        margin-left: 0 !important;
    }
}

#sidebar.sidebar {
    transition: left 0.3s ease, transform 0.3s ease !important;
}

#main,
#footer {
    transition: margin-left 0.3s ease;
}

/* ---------- Main content ---------- */
#main {
    margin-top: var(--edsims-header-height) !important;
    padding: 1.5rem !important;
    background: var(--edsims-bg);
    min-height: calc(100vh - var(--edsims-header-height) - 60px);
}

#main.main {
    padding: 1.5rem;
}

.main {
    background-color: var(--edsims-bg) !important;
    min-height: calc(100vh - 116px);
}

@media (max-width: 1199.98px) {
    #main.main {
        margin-left: 0;
        padding-top: 1.25rem;
    }
}

/* ---------- Page title ---------- */
.pagetitle {
    width: 100%;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

/* Nested Bootstrap flex wrappers must span full row (fixes button stuck next to title) */
.pagetitle > .d-flex {
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-between !important;
    align-items: flex-start;
    gap: 0.75rem 1rem;
}

/* Title block (wrapped) stays left */
.pagetitle > div:first-child:not(.d-flex):not(.edsims-page-actions) {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

/* Direct h1/nav (unwrapped pages) — title left, breadcrumbs under, button right */
.pagetitle > h1 {
    order: 1;
    flex: 1 1 auto;
    margin-bottom: 0.25rem;
}

.pagetitle > nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
}

.pagetitle > .btn,
.pagetitle > a.btn,
.pagetitle > .btn-group,
.pagetitle > .d-flex.gap-2,
.pagetitle > .edsims-page-actions,
.pagetitle > form.edsims-page-actions {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.pagetitle > .d-flex > .btn,
.pagetitle > .d-flex > a.btn,
.pagetitle > .d-flex > .btn-group,
.pagetitle > .d-flex > .d-flex.gap-2,
.pagetitle > .d-flex > .edsims-page-actions,
.pagetitle > .d-flex > form {
    margin-left: auto;
    flex-shrink: 0;
}

.pagetitle h1 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--edsims-text) !important;
    margin-bottom: 0.25rem;
}

.pagetitle .breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
    background: transparent;
    padding: 0;
}

.pagetitle .breadcrumb-item a {
    color: var(--edsims-primary);
    font-weight: 500;
}

.pagetitle .breadcrumb-item.active {
    color: var(--edsims-text-muted);
}

.pagetitle .breadcrumb-item + .breadcrumb-item::before {
    color: var(--edsims-text-muted);
}

@media (max-width: 767.98px) {
    .pagetitle h1 {
        font-size: 1.25rem !important;
    }

    .pagetitle > .btn,
    .pagetitle > a.btn,
    .pagetitle > .d-flex > .btn,
    .pagetitle > .d-flex > a.btn,
    .pagetitle > .edsims-page-actions,
    .pagetitle > form.edsims-page-actions {
        width: 100%;
        margin-left: 0;
        order: 4;
    }

    .pagetitle > .edsims-page-actions .btn,
    .pagetitle > form.edsims-page-actions .btn {
        width: 100%;
    }
}

/* ---------- Cards ---------- */
.card {
    border: none !important;
    border-radius: var(--edsims-radius) !important;
    box-shadow: var(--edsims-shadow) !important;
    background: var(--edsims-surface);
}

.card-header {
    background: var(--edsims-surface) !important;
    border-bottom: 1px solid var(--edsims-border) !important;
    font-weight: 600;
    color: var(--edsims-text);
    padding: 0.9rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.edsims-table-card {
    overflow: hidden;
}

.edsims-table-card > .card-body {
    padding: 1rem 1.25rem 1.25rem;
}

/* Auto-cardify bare DataTables on list pages */
.section > .row > .col-lg-12 > .table-responsive,
.section > .row > [class*="col-"] > .table-responsive {
    background: var(--edsims-surface);
    border-radius: var(--edsims-radius);
    box-shadow: var(--edsims-shadow);
    padding: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--edsims-primary);
    --bs-btn-border-color: var(--edsims-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--edsims-primary-dark);
    --bs-btn-hover-border-color: var(--edsims-primary-dark);
    --bs-btn-active-bg: var(--edsims-primary-dark);
    --bs-btn-active-border-color: var(--edsims-primary-dark);
    --bs-btn-disabled-bg: var(--edsims-primary-soft);
    --bs-btn-disabled-border-color: var(--edsims-primary-soft);
    border-radius: 6px;
    font-weight: 500;
    padding: 0.45rem 1rem;
}

.btn-outline-primary {
    --bs-btn-color: var(--edsims-primary);
    --bs-btn-border-color: var(--edsims-primary);
    --bs-btn-hover-bg: var(--edsims-primary);
    --bs-btn-hover-border-color: var(--edsims-primary);
    --bs-btn-hover-color: #fff;
    border-radius: 6px;
}

.btn-success {
    --bs-btn-bg: var(--edsims-success);
    --bs-btn-border-color: var(--edsims-success);
}

.btn-danger {
    --bs-btn-bg: var(--edsims-danger);
    --bs-btn-border-color: var(--edsims-danger);
}

.btn-add i {
    margin-right: 0.25rem;
}

/* Action icon buttons in tables */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 6px !important;
    border: none;
    font-size: 0.9rem;
    margin: 0 2px;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
}

.btn-action-edit {
    background: var(--edsims-primary-light) !important;
    color: var(--edsims-primary) !important;
}

.btn-action-edit:hover {
    background: var(--edsims-primary) !important;
    color: #fff !important;
}

.btn-action-view {
    background: var(--edsims-success-bg) !important;
    color: var(--edsims-success) !important;
}

.btn-action-view:hover {
    background: var(--edsims-success) !important;
    color: #fff !important;
}

.btn-action-delete,
.btn-action-deactivate {
    background: var(--edsims-danger-bg) !important;
    color: var(--edsims-danger) !important;
}

.btn-action-delete:hover,
.btn-action-deactivate:hover {
    background: var(--edsims-danger) !important;
    color: #fff !important;
}

.btn-action-activate {
    background: var(--edsims-success-bg) !important;
    color: var(--edsims-success) !important;
}

.btn-action-activate:hover {
    background: var(--edsims-success) !important;
    color: #fff !important;
}

.table-style .btn-action {
    padding: 0 !important;
    font-size: 0.9rem;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border: 1px solid var(--edsims-border) !important;
    border-radius: 6px !important;
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    color: var(--edsims-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--edsims-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.15) !important;
}

label {
    color: var(--edsims-text);
    font-weight: 500;
    font-size: 0.85rem;
}

/* ---------- Tables ---------- */
.table-style > thead > tr > th {
    background-color: transparent !important;
    color: var(--edsims-primary) !important;
    font-weight: 600 !important;
    font-size: 0.8rem;
    text-transform: none;
    border-bottom: 2px solid var(--edsims-border) !important;
    padding: 0.75rem 0.85rem !important;
    vertical-align: middle;
}

.table-style tbody > tr > td {
    background-color: transparent !important;
    color: var(--edsims-text) !important;
    border-color: var(--edsims-border) !important;
    padding: 0.7rem 0.85rem !important;
    vertical-align: middle;
}

.table-style tbody > tr:nth-child(even) > td {
    background-color: #f8fafc !important;
}

.table-style,
.table-style th,
.table-style td {
    border-color: var(--edsims-border) !important;
}

.table-style > thead > tr.filters > th {
    background-color: #fafbfc !important;
    padding: 0.4rem 0.5rem !important;
    border-bottom: 1px solid var(--edsims-border) !important;
}

.table-style .form-control {
    border: 1px solid var(--edsims-border) !important;
    border-radius: 5px !important;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.table-style .form-control::placeholder {
    color: #94a3b8;
}

table.dataTable.no-footer,
table.dataTable thead th,
table.dataTable thead td {
    border-bottom: 1px solid var(--edsims-border) !important;
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--edsims-border);
}

/* ---------- DataTables chrome ---------- */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info {
    color: var(--edsims-text-muted);
    font-size: 0.85rem;
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--edsims-border);
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    margin: 0 0.35rem;
    color: var(--edsims-text);
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--edsims-border) !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: var(--edsims-text) !important;
    padding: 0.3rem 0.65rem !important;
    margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--edsims-primary) !important;
    border-color: var(--edsims-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--edsims-primary-light) !important;
    border-color: var(--edsims-primary-soft) !important;
    color: var(--edsims-primary-dark) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #fff !important;
    color: #cbd5e1 !important;
    border-color: var(--edsims-border) !important;
}

/* Export buttons */
.dataTables_wrapper .dt-buttons {
    margin-bottom: 0.75rem;
}

.dataTables_wrapper .dt-button,
.dt-buttons .btn,
.dt-buttons .dt-button {
    background: #fff !important;
    border: 1px solid var(--edsims-border) !important;
    color: var(--edsims-text) !important;
    border-radius: 5px !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    margin-left: 0.35rem !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dt-button:hover,
.dt-buttons .btn:hover {
    background: var(--edsims-primary-light) !important;
    border-color: var(--edsims-primary-soft) !important;
    color: var(--edsims-primary-dark) !important;
}

.dataTables_wrapper .dataTables_filter {
    display: none;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 0.8rem;
}

.dataTables_wrapper .form-control {
    font-size: 0.8rem;
    line-height: 1;
}

.datatable-info {
    color: var(--edsims-text-muted);
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--edsims-surface) !important;
    border-top: 1px solid var(--edsims-border);
    padding: 0.85rem 1.5rem !important;
    font-size: 0.8rem;
}

.footer .credits {
    color: var(--edsims-text-muted) !important;
    padding-top: 0 !important;
}

.footer .credits a {
    color: var(--edsims-primary) !important;
    font-weight: 500;
}

/* ---------- Back to top ---------- */
.back-to-top {
    background: var(--edsims-primary) !important;
}

.back-to-top:hover {
    background: var(--edsims-primary-dark) !important;
}

/* ---------- Dashboard widgets ---------- */
.dash-widget {
    border-radius: var(--edsims-radius) !important;
    box-shadow: var(--edsims-shadow) !important;
}

.dash-widget.bg-primary {
    background: linear-gradient(135deg, var(--edsims-primary), var(--edsims-primary-dark)) !important;
}

/* ---------- Select2 ---------- */
.new-added-form .edsims-store-multi-wrap {
    width: 100%;
}

.new-added-form .edsims-store-multi-wrap .select2-container {
    width: 100% !important;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid var(--edsims-border);
    border-radius: 6px;
    padding: 2px 8px;
    background-color: #fff;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--edsims-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.15);
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    white-space: normal;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--edsims-primary);
    border-color: var(--edsims-primary-dark);
    color: #fff;
    border-radius: 0.25rem;
    padding: 2px 8px;
    margin: 4px 0 0;
    font-size: 0.875rem;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.85);
    margin-right: 4px;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 6px;
    min-width: 12rem;
    font-size: 0.95rem;
}

.new-added-form .edsims-store-multi-wrap .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #6c757d;
    margin-top: 6px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--edsims-primary) !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid var(--edsims-border) !important;
    border-radius: 6px !important;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    color: var(--edsims-text);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* ---------- Stock nav / toolbars ---------- */
.edsims-page-toolbar {
    gap: 0.5rem;
}

.edsims-stock-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.edsims-stock-nav .btn {
    margin-bottom: 0.25rem;
}

.table-responsive-edsims {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .dataTables_scroll {
    overflow-x: auto;
}

@media (max-width: 767.98px) {
    .edsims-page-toolbar .btn,
    .edsims-page-toolbar .form-select,
    .edsims-stock-nav .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .edsims-stock-nav {
        justify-content: stretch;
    }

    .header .header-app-title {
        font-size: 0.8rem;
    }
}

/* ---------- Flash ---------- */
.edsims-flash {
    position: sticky;
    top: var(--edsims-header-height);
    z-index: 100;
}

/* ---------- Login theme alignment ---------- */
body.login-body {
    background: linear-gradient(165deg, #eef5ff 0%, #f7faff 45%, #eaf2fc 100%) !important;
}

.login-footer {
    margin-left: 0 !important;
}

/* ---------- Misc polish ---------- */
.breadcrumb {
    background: transparent;
}

.modal-header {
    border-bottom: 1px solid var(--edsims-border);
}

.modal-footer {
    border-top: 1px solid var(--edsims-border);
}

.nav-tabs .nav-link.active {
    color: var(--edsims-primary);
    border-bottom-color: var(--edsims-primary);
}

.badge.bg-primary {
    background-color: var(--edsims-primary) !important;
}

/* Orphan Add buttons sitting above tables — push to the right */
.section > .row > .col-lg-12 > .col-12.text-end.mb-3,
.section .col-12.text-end.mb-3,
.section .text-end.mb-3:has(> .btn-primary),
.edsims-page-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
}
