:root {
    --erp-bg: #f3f6fb;
    --erp-surface: #ffffff;
    --erp-border: #d9e1ec;
    --erp-text: #172033;
    --erp-muted: #64748b;
    --erp-primary: #0f766e;
    --erp-primary-dark: #115e59;
    --erp-blue: #2563eb;
    --erp-green: #16815f;
    --erp-red: #dc2626;
    --erp-orange: #c2410c;
    --erp-gold: #b7791f;
    --erp-purple: #6d28d9;
    --erp-shadow: 0 10px 24px rgba(23, 32, 51, .08);
    --erp-sidebar-width: 276px;
    --erp-sidebar-collapsed-width: 72px;
}

body {
    background: var(--erp-bg);
    color: var(--erp-text);
    font-size: 13px;
}

.content-body {
    background: var(--erp-bg);
    min-height: calc(100vh - 74px);
    margin-left: var(--erp-sidebar-width);
    overflow-x: hidden;
}

.header {
    margin-left: var(--erp-sidebar-width);
    width: calc(100% - var(--erp-sidebar-width));
}

.nav-header,
.quixnav {
    width: var(--erp-sidebar-width);
}

.nav-header {
    background: #1f2740;
    border-right: 1px solid rgba(255,255,255,.08);
}

.nav-header .brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    padding: 10px 16px;
    transition: opacity .16s ease;
}

.nav-header .brand-logo:hover {
    opacity: .86;
}

.nav-header .erp-brand-logo {
    background: rgba(255, 255, 255, .96);
    border-right: 1px solid rgba(255,255,255,.08);
}

.nav-header .erp-brand-logo .brand-title,
.nav-header .erp-brand-logo .logo-compact {
    display: block;
    width: 206px;
    max-width: 100%;
    height: 54px;
    object-fit: contain;
}

.nav-header .erp-brand-logo .logo-compact {
    display: none;
}

.nav-header .erp-brand-logo .logo-abbr {
    display: none;
}

.quixnav {
    background: linear-gradient(180deg, #202742 0%, #1a2238 100%);
    box-shadow: 12px 0 30px rgba(15, 23, 42, .10);
    z-index: 1100;
    overflow: visible !important;
}

.quixnav .slimScrollDiv {
    height: calc(100vh - var(--erp-header-height, 76px)) !important;
    overflow: visible !important;
}

.quixnav .quixnav-scroll {
    height: calc(100vh - var(--erp-header-height, 76px)) !important;
    max-height: calc(100vh - var(--erp-header-height, 76px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.quixnav .slimScrollBar,
.quixnav .slimScrollRail {
    display: none !important;
}

.quixnav .quixnav-scroll::-webkit-scrollbar {
    width: 8px;
}

.quixnav .quixnav-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .04);
}

.quixnav .quixnav-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
}

.quixnav .quixnav-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .34);
}

.quixnav .metismenu {
    padding: 8px 12px 18px;
}

.quixnav .metismenu > li {
    position: relative;
    margin: 3px 0;
}

.quixnav .metismenu > li > a,
.quixnav .metismenu ul a {
    display: grid !important;
    align-items: center;
    min-width: 0;
    color: rgba(255, 255, 255, .76);
    line-height: 1.25;
    letter-spacing: 0;
}

.quixnav .metismenu > li > a {
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    column-gap: 12px;
    min-height: 44px;
    padding: 11px 36px 11px 12px !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.quixnav .metismenu > li > a.erp-menu-parent {
    position: relative;
}

.quixnav .metismenu > li.erp-menu-group {
    position: relative;
}

.quixnav .metismenu > li > a:hover,
.quixnav .metismenu > li > a.mm-active,
.quixnav .metismenu > li.mm-active > a,
.quixnav .metismenu > li.erp-active-parent > a {
    background: rgba(255,255,255,.10);
    color: #fff;
}

.quixnav .metismenu > li.erp-open > a {
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
    box-shadow: 0 10px 22px rgba(15, 118, 110, .22);
}

.quixnav .metismenu > li > a::after {
    display: none !important;
}

.quixnav .metismenu a i {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px !important;
    min-width: 24px;
    height: 24px;
    margin: 0 !important;
    color: inherit;
    font-size: 17px;
    line-height: 1;
    text-align: center;
}

.quixnav .metismenu .nav-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-menu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .84);
    font-size: 11px;
    font-weight: 800;
    margin-right: 6px;
}

.erp-menu-parent::before {
    content: "";
    position: absolute;
    right: 18px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: .78;
    transform: rotate(-45deg);
    transition: transform .16s ease;
}

.erp-menu-parent[aria-expanded="true"]::before,
.erp-open > .erp-menu-parent::before {
    transform: rotate(45deg);
}

.quixnav .metismenu .erp-submenu {
    display: block !important;
    visibility: hidden;
    position: fixed;
    top: var(--erp-submenu-top, 86px);
    left: var(--erp-submenu-left, calc(var(--erp-sidebar-width) + 10px));
    z-index: 1200;
    width: max-content;
    min-width: 220px;
    max-width: min(420px, calc(100vw - var(--erp-sidebar-width) - 36px));
    max-height: min(560px, calc(100vh - 96px));
    margin: 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: #0b1220 !important;
    box-shadow: 18px 20px 42px rgba(2, 6, 23, .46);
    opacity: 0;
    pointer-events: none;
    transform: none;
    transform-origin: left top;
    transition: none;
}

.quixnav .metismenu .erp-submenu.erp-submenu-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
}

.quixnav .metismenu > li:not(.erp-open) > .erp-submenu,
.quixnav .metismenu > li:not(.erp-open) > .erp-submenu.mm-show,
.quixnav .metismenu > li:not(.erp-open) > .erp-submenu.show {
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.quixnav .metismenu > li.erp-open > .erp-submenu.erp-submenu-open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.quixnav .metismenu > li.erp-active-parent:not(.erp-open) > a {
    background: rgba(37, 99, 235, .20);
}

.quixnav .metismenu > li.erp-active-parent:not(.erp-open) > a::before {
    transform: rotate(-45deg);
}

.quixnav .metismenu .erp-submenu li {
    width: max-content;
    min-width: 100%;
    max-width: 100%;
}

.quixnav .metismenu ul a {
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 9px;
    width: 100%;
    min-height: 36px;
    padding: 9px 12px !important;
    border-radius: 7px;
    color: rgba(255, 255, 255, .88) !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.quixnav .metismenu ul a i {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    color: #5eead4 !important;
    font-size: 12px;
}

.quixnav .metismenu ul a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quixnav .metismenu ul a:hover,
.quixnav .metismenu ul li.mm-active > a {
    color: #fff !important;
    background: rgba(37, 99, 235, .38);
}

.quixnav .metismenu ul li.mm-active > a {
    background: rgba(15, 118, 110, .42);
    box-shadow: inset 3px 0 0 #5eead4;
}

.erp-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
}

.erp-topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.erp-topbar-title strong {
    color: var(--erp-text);
    font-size: 15px;
}

.erp-topbar-title span {
    color: var(--erp-muted);
    font-size: 12px;
}

.erp-global-search {
    position: relative;
    flex: 1 1 320px;
    width: min(460px, 38vw);
    min-width: 260px;
}

.erp-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.erp-global-search i,
.erp-search i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--erp-muted);
}

.erp-global-search input,
.erp-search input,
.erp-menu-search input {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px 7px 32px;
    border: 1px solid var(--erp-border);
    border-radius: 6px;
    background: #fff;
    color: var(--erp-text);
    font-size: 13px;
}

.erp-sidebar-head {
    padding: 16px 18px 6px;
    color: #fff;
}

.erp-sidebar-head strong,
.erp-sidebar-head span {
    display: block;
}

.erp-sidebar-head strong {
    font-size: 15px;
    line-height: 1.25;
}

.erp-sidebar-kicker {
    color: rgba(255,255,255,.58);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.erp-menu-search {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 14px 12px;
    background: #202742;
}

.erp-menu-search input {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
    color: #fff;
}

.erp-menu-search input::placeholder {
    color: rgba(255,255,255,.58);
}

.erp-nav-section {
    padding: 14px 18px 7px;
    color: rgba(255,255,255,.56);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.erp-sidebar-collapsed .quixnav {
    width: var(--erp-sidebar-collapsed-width);
}

.erp-sidebar-collapsed .nav-header {
    width: var(--erp-sidebar-collapsed-width);
}

.erp-sidebar-collapsed .nav-header .erp-brand-logo {
    padding: 8px;
}

.erp-sidebar-collapsed .nav-header .erp-brand-logo .brand-title,
.erp-sidebar-collapsed .nav-header .erp-brand-logo .logo-compact {
    display: none;
}

.erp-sidebar-collapsed .nav-header .erp-brand-logo .logo-abbr {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.erp-sidebar-collapsed .quixnav .nav-text,
.erp-sidebar-collapsed .quixnav .erp-nav-section,
.erp-sidebar-collapsed .quixnav ul ul,
.erp-sidebar-collapsed .erp-menu-search,
.erp-sidebar-collapsed .erp-sidebar-head,
.erp-sidebar-collapsed .erp-menu-count {
    display: none !important;
}

.erp-sidebar-collapsed .content-body,
.erp-sidebar-collapsed .header {
    margin-left: var(--erp-sidebar-collapsed-width);
}

.erp-sidebar-collapsed .header {
    width: calc(100% - var(--erp-sidebar-collapsed-width));
}

.erp-sidebar-collapsed .quixnav .metismenu > li > a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 13px 0 !important;
}

.erp-sidebar-collapsed .quixnav .metismenu > li > a::after,
.erp-sidebar-collapsed .erp-menu-parent::before {
    display: none;
}

.erp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid var(--erp-border);
    border-radius: 6px;
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow);
}

.erp-page-header h1 {
    margin: 4px 0 3px;
    color: var(--erp-text);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
}

.erp-page-header p,
.erp-breadcrumb {
    margin: 0;
    color: var(--erp-muted);
    font-size: 12px;
}

.erp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.erp-breadcrumb a {
    color: var(--erp-primary);
    font-weight: 700;
}

.erp-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.erp-table-card,
.erp-panel,
.erp-metric-card {
    border: 1px solid var(--erp-border);
    border-radius: 6px;
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow);
}

.erp-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--erp-border);
}

.erp-table-toolbar h2 {
    margin: 0;
    color: var(--erp-text);
    font-size: 16px;
    font-weight: 800;
}

.erp-record-count {
    display: block;
    margin-top: 3px;
    color: var(--erp-muted);
    font-size: 12px;
}

.erp-table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.erp-search {
    position: relative;
    width: 240px;
}

.erp-filter-panel {
    padding: 12px 14px;
    border-bottom: 1px solid var(--erp-border);
    background: #f8fafc;
}

.erp-bulk-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-bottom: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.erp-table-wrap {
    max-height: calc(100vh - 270px);
}

.erp-data-table {
    margin-bottom: 0;
    white-space: nowrap;
}

.erp-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #172033;
    background: #172033;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.erp-data-table th,
.erp-data-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.erp-data-table tbody tr:hover {
    background: #eff6ff;
}

.erp-data-table .erp-pinned,
.erp-data-table th:first-child,
.erp-data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: inherit;
}

.erp-column-menu {
    max-height: 320px;
    overflow: auto;
}

.erp-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.erp-status-success { background: #dcfce7; color: #166534; }
.erp-status-warning { background: #fef3c7; color: #92400e; }
.erp-status-danger { background: #fee2e2; color: #991b1b; }
.erp-status-primary { background: #dbeafe; color: #1d4ed8; }
.erp-status-info { background: #ccfbf1; color: #0f766e; }
.erp-status-secondary { background: #e5e7eb; color: #374151; }
.erp-status-dark { background: #334155; color: #fff; }
.erp-status-orange { background: #ffedd5; color: #9a3412; }

.erp-demo-flag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 7px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.erp-metric-card {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 14px;
}

.erp-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.erp-metric-card strong {
    display: block;
    color: var(--erp-text);
    font-size: 24px;
    line-height: 1;
}

.erp-metric-card span {
    display: block;
    margin-top: 5px;
    color: #334155;
    font-weight: 800;
}

.erp-metric-card small {
    display: block;
    margin-top: 2px;
    color: var(--erp-muted);
}

.tone-blue { background: var(--erp-blue); }
.tone-green { background: var(--erp-green); }
.tone-gold { background: var(--erp-gold); }
.tone-purple { background: var(--erp-purple); }
.tone-red { background: var(--erp-red); }
.tone-slate { background: #475569; }
.tone-teal { background: var(--erp-primary); }

.erp-drawer .modal-dialog {
    margin: 0 0 0 auto;
    max-width: min(760px, 96vw);
    min-height: 100vh;
}

.erp-drawer .modal-content {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

body.modal-open .quixnav {
    z-index: 900 !important;
}

body.modal-open .quixnav .metismenu .erp-submenu {
    z-index: 901 !important;
}

.modal-backdrop {
    z-index: 1900 !important;
}

.modal {
    z-index: 2000 !important;
}

.select2-container--open {
    z-index: 2050 !important;
}

.erp-detail-panel {
    border-left: 1px solid var(--erp-border);
    background: #fff;
}

.erp-empty-state {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 128px;
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: var(--erp-muted);
    text-align: center;
}

.erp-empty-state i {
    color: #94a3b8;
    font-size: 24px;
}

.erp-empty-state strong {
    color: #334155;
}

.erp-timeline {
    display: grid;
    gap: 12px;
}

.erp-timeline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 10px;
}

.erp-timeline-item > span {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--erp-primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}

.erp-timeline-item strong,
.erp-timeline-item small,
.erp-timeline-item p {
    display: block;
    margin: 0;
}

.erp-timeline-item small {
    color: var(--erp-muted);
}

.erp-footer-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-top: 1px solid var(--erp-border);
    background: #fff;
    color: var(--erp-muted);
    font-size: 12px;
}

@media (max-width: 991px) {
    :root {
        --erp-sidebar-width: 260px;
    }

    .header,
    .content-body {
        margin-left: 0;
        width: 100%;
    }

    .nav-header,
    .quixnav {
        width: var(--erp-sidebar-width);
    }

    .quixnav .quixnav-scroll {
        overflow-x: hidden;
    }

    .quixnav .metismenu .erp-submenu {
        display: none !important;
        visibility: visible;
        position: static;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: none;
        margin: 5px 0 8px 36px;
        padding: 6px 0 6px 10px;
        overflow: visible;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, .13);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        transition: none;
    }

    .quixnav .metismenu .erp-submenu.erp-submenu-open {
        display: block !important;
    }

    .quixnav .metismenu ul a {
        grid-template-columns: 18px minmax(0, 1fr);
        white-space: normal;
    }

    .erp-topbar {
        gap: 10px;
    }

    .erp-topbar-title {
        min-width: 0;
    }

    .erp-topbar-title strong,
    .erp-topbar-title span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-table-toolbar,
    .erp-page-header {
        display: block;
    }
    .erp-table-actions,
    .erp-page-actions {
        justify-content: flex-start;
        margin-top: 10px;
    }
    .erp-search,
    .erp-global-search {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    #main-wrapper {
        min-width: 0;
    }

    .nav-header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1302;
        width: 86px !important;
        min-height: 64px;
        background: #fff;
        border-right: 1px solid var(--erp-border);
    }

    .nav-header .brand-logo {
        min-height: 64px;
        padding: 8px;
    }

    .nav-header .erp-brand-logo .brand-title {
        display: none;
    }

    .nav-header .erp-brand-logo .logo-compact,
    .nav-header .erp-brand-logo .logo-abbr {
        display: block;
        width: 68px;
        height: 44px;
        object-fit: contain;
    }

    .nav-control {
        right: -54px;
        top: 12px;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 1200;
        min-height: 64px;
        margin-left: 0 !important;
        padding-left: 96px;
        width: 100% !important;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    }

    .erp-topbar {
        min-height: 64px;
        padding: 8px 10px;
    }

    .erp-topbar-title strong {
        font-size: 16px;
        line-height: 1.2;
    }

    .erp-topbar-title span,
    .erp-global-search {
        display: none !important;
    }

    .header-right,
    .erp-topbar-actions {
        margin-left: auto;
    }

    .quixnav {
        position: fixed !important;
        top: 64px !important;
        left: 0;
        z-index: 1301;
        width: min(86vw, 320px) !important;
        height: calc(100vh - 64px) !important;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 18px 0 40px rgba(15, 23, 42, .28);
    }

    #main-wrapper.menu-toggle .quixnav,
    body.erp-mobile-menu-open .quixnav {
        transform: translateX(0);
    }

    #main-wrapper.menu-toggle::after,
    body.erp-mobile-menu-open::after {
        content: "";
        position: fixed;
        inset: 64px 0 0 0;
        z-index: 1299;
        background: rgba(15, 23, 42, .42);
    }

    .quixnav .slimScrollDiv,
    .quixnav .quixnav-scroll {
        height: calc(100vh - 64px) !important;
        max-height: calc(100vh - 64px) !important;
    }

    .content-body {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 8px;
    }

    .content-body .container-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }

    .card,
    .erp-table-card,
    .erp-page-header,
    .tab-pane > .card,
    .schedule-day-card,
    .assign-match-card {
        border-radius: 8px !important;
    }

    .card-body,
    .card-header {
        padding: 12px;
    }

    .erp-page-header {
        padding: 14px;
    }

    .erp-page-title h1,
    .erp-page-header h1,
    .erp-page-header h2,
    .card-title {
        font-size: 18px !important;
        line-height: 1.25;
    }

    .erp-page-actions,
    .erp-table-actions,
    .tab-actions,
    .ops-toolbar-actions,
    .print-actions,
    .referee-head-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .erp-page-actions .btn,
    .erp-table-actions .btn,
    .tab-actions .btn,
    .ops-toolbar-actions .btn,
    .print-actions .btn,
    .referee-head-actions .btn {
        justify-content: center;
        width: 100%;
        min-height: 40px;
        white-space: normal;
    }

    .nav-tabs,
    .club-detail-tabs,
    .club-edit-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        border-bottom-width: 1px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .nav-tabs .nav-item,
    .club-detail-tabs .nav-item,
    .club-edit-tabs .nav-item {
        flex: 0 0 auto;
    }

    .nav-tabs .nav-link,
    .club-detail-tabs .nav-link,
    .club-edit-tabs .nav-link {
        min-height: 38px;
        padding: 9px 12px;
        white-space: nowrap;
        border-radius: 8px 8px 0 0;
        font-size: 13px;
    }

    .table-responsive,
    .erp-table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table,
    .erp-data-table,
    .print-match-table,
    .blog-table {
        min-width: 760px;
    }

    .table th,
    .table td {
        white-space: normal;
        vertical-align: middle;
    }

    .dataTables_wrapper .row,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        display: block;
        width: 100%;
        text-align: left;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper select {
        width: 100%;
        margin: 6px 0 10px;
    }

    .form-control,
    .custom-select,
    .select2-container,
    .select2-container .select2-selection--single {
        width: 100% !important;
        max-width: 100%;
    }

    .modal-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 8px auto;
    }

    .modal-content {
        max-height: calc(100vh - 16px);
        overflow: hidden;
        border-radius: 8px;
    }

    .modal-body {
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .erp-drawer .modal-dialog {
        width: 100vw;
        max-width: 100vw;
    }

    .schedule-board,
    .draw-summary,
    .schedule-filter,
    .draw-generate,
    .assign-quick-register,
    .assign-match-card,
    .athlete-edit-form,
    .athlete-readonly-grid,
    .bracket-status-summary,
    .match-status-columns,
    .print-filter-grid,
    .schedule-modal-summary,
    .schedule-edit-grid,
    .unscheduled-assign-form,
    .unscheduled-schedule-form,
    .setting-fields,
    .ring-setting-row,
    .manual-corner-grid,
    .approval-filter,
    .referee-filter,
    .referee-metrics,
    .referee-detail-grid,
    .referee-stat-grid {
        grid-template-columns: 1fr !important;
    }

    .schedule-board {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .ring-column,
    .unscheduled-column,
    .schedule-ring-column {
        min-width: 280px;
    }

    .erp-footer-status {
        display: grid;
        grid-template-columns: 1fr;
        margin-left: 0;
        padding: 10px 12px 14px;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 12px;
    }

    .header {
        padding-left: 82px;
    }

    .nav-header {
        width: 74px !important;
    }

    .nav-header .erp-brand-logo .logo-compact,
    .nav-header .erp-brand-logo .logo-abbr {
        width: 58px;
        height: 40px;
    }

    .nav-control {
        right: -48px;
    }

    .erp-topbar {
        padding-right: 6px;
    }

    .erp-topbar-title strong {
        max-width: 52vw;
        font-size: 14px;
    }

    .content-body .container-fluid {
        padding-right: 8px;
        padding-left: 8px;
    }

    .card-body,
    .card-header,
    .erp-page-header {
        padding: 10px;
    }

    .btn {
        min-height: 38px;
        white-space: normal;
    }

    .table,
    .erp-data-table,
    .print-match-table,
    .blog-table {
        min-width: 680px;
        font-size: 12px;
    }

    .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        min-height: 100vh;
        margin: 0;
    }

    .modal-content {
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        max-height: calc(100vh - 138px);
    }

    .erp-footer-status small {
        display: block;
        margin: 4px 0 0 !important;
    }
}
