/* ===== GLOBAL FONT SCALE (80% equivalent) ===== */
html {
    font-size: 97.75% !important;
}

:root {
    --font-2xxl: 1.625rem;
    --font-2xl:  1.5rem;
    --font-xxl:  1.25rem;
    --font-xl:   1.1rem;
    --font-lg:   1rem;
    --font-md:   0.875rem;
    --font-sm:   0.8125rem;
    --font-xs:   0.6875rem;
    --font-xxs:  0.5625rem;

    --h1: clamp(1.5rem,   1rem + 3vw,    3.5rem);
    --h2: clamp(1.375rem, 0.9rem + 2.4vw, 3rem);
    --h3: clamp(1.25rem,  0.85rem + 1.8vw, 2.5rem);
    --h4: clamp(1.125rem, 0.9rem + 1vw,   1.875rem);
    --h5: clamp(1rem,     0.85rem + 0.75vw, 1.5rem);
    --h6: clamp(0.9rem,   0.8rem + 0.45vw, 1.2rem);

    --size-2:   0.1rem;
    --size-4:   0.2rem;
    --size-6:   0.3rem;
    --size-8:   0.4rem;
    --size-10:  0.5rem;
    --size-12:  0.6rem;
    --size-13:  0.65rem;
    --size-16:  0.8rem;
    --size-20:  1rem;
    --size-24:  1.2rem;
    --size-28:  1.4rem;
    --size-32:  1.6rem;
    --size-36:  1.8rem;
    --size-40:  2rem;
    --size-44:  2.2rem;
    --size-48:  2.4rem;
    --size-50:  2.5rem;
    --size-56:  2.8rem;
    --size-60:  3rem;
    --size-64:  3.2rem;
    --size-72:  3.6rem;
    --size-80:  4rem;
    --size-90:  4.5rem;
    --size-110: 5.5rem;
    --size-120: 6rem;
    --size-160: 8rem;
    --size-200: 10rem;
    --size-240: 12rem;
}

/* Body */
body {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
}

/* Headings */
h1, .h1 { font-size: var(--h1) !important; }
h2, .h2 { font-size: var(--h2) !important; }
h3, .h3 { font-size: var(--h3) !important; }
h4, .h4 { font-size: var(--h4) !important; }
h5, .h5 { font-size: var(--h5) !important; }
h6, .h6 { font-size: var(--h6) !important; }

/* Text utilities */
.text-2xxl { font-size: var(--font-2xxl) !important; }
.text-2xl  { font-size: var(--font-2xl)  !important; }
.text-xxl  { font-size: var(--font-xxl)  !important; }
.text-xl   { font-size: var(--font-xl)   !important; }
.text-lg   { font-size: var(--font-lg)   !important; }
.text-md   { font-size: var(--font-md)   !important; }
.text-sm   { font-size: var(--font-sm)   !important; }
.text-xs   { font-size: var(--font-xs)   !important; }
.text-xxs  { font-size: var(--font-xxs)  !important; }

/* Navbar */
.navbar-header               { height: 3.8rem !important; padding: 0.6rem 1.2rem !important; }
.navbar-search input         { font-size: 0.8125rem !important; height: 2.1rem !important; }

/* Sidebar */
.sidebar                     { width: 14rem !important; }
@media (min-width: 1400px)  { .sidebar { width: 15rem !important; } }
@media (min-width: 1650px)  { .sidebar { width: 16.5rem !important; } }
.sidebar-logo                { height: 3.8rem !important; padding: 0.6rem 0.8rem !important; }
.sidebar-logo img            { max-height: 2.8rem !important; }
.sidebar-menu-area           { height: calc(100vh - 61px) !important; padding: 0.5rem 0.75rem !important; }
.sidebar-menu li a           { font-size: 0.8125rem !important; padding: 0.5rem 0.6rem !important; }
.sidebar-menu li a i         { font-size: 1.1rem !important; margin-inline-end: 0.5rem !important; }
.sidebar-menu li a .menu-icon{ font-size: 1rem !important; }
.sidebar-menu .sidebar-menu-group-title { font-size: 0.75rem !important; }
.sidebar-menu .sidebar-submenu { padding-inline-start: 1.2rem !important; }
.sidebar-menu .sidebar-submenu li a { padding: 0.35rem 0.6rem !important; font-size: 0.75rem !important; }

/* Dashboard main margin adjustments */
@media (min-width: 1200px) { .dashboard-main { margin-inline-start: 14rem !important; } }
@media (min-width: 1400px) { .dashboard-main { margin-inline-start: 15rem !important; } }
@media (min-width: 1650px) { .dashboard-main { margin-inline-start: 16.5rem !important; } }
.dashboard-main-body         { padding: 0.75rem 1rem !important; }

/* Cards */
.card                        { border-radius: 6px !important; }
.card .card-header           { padding: 0.6rem 1.1rem !important; }
.card .card-title            { font-size: 0.9375rem !important; }
.card .card-body             { padding: 0.75rem 1.1rem !important; }

/* Buttons */
.btn                         { padding: 0.4rem 0.65rem !important; font-size: 0.8125rem !important; }
.btn.btn-lg                  { padding: 0.7rem 0.8rem !important; font-size: 0.9375rem !important; }
.btn.btn-sm                  { padding: 0.35rem 0.65rem !important; font-size: 0.75rem !important; }

/* Forms */
.form-control,
.form-select,
textarea                     { font-size: 0.8125rem !important; padding: 0.4rem 0.9rem !important; }
.form-select,
.form-control:not(textarea)  { height: 2.3rem !important; }
.form-control.form-control-lg{ height: 2.8rem !important; font-size: 0.9375rem !important; }
.form-control.form-control-sm{ height: 2rem !important; font-size: 0.75rem !important; }
.form-select.form-select-lg  { height: 2.8rem !important; font-size: 0.9375rem !important; }
.form-select.form-select-sm  { height: 2rem !important; font-size: 0.75rem !important; }
.form-label                  { font-size: 0.75rem !important; }

/* Tables */
.bordered-table thead tr th  { font-size: 0.8125rem !important; padding: 10px 12px !important; }
.bordered-table tbody tr td  { font-size: 0.8125rem !important; padding: 10px 12px !important; }
.basic-table thead th        { padding: 0.6rem 1.1rem !important; font-size: 0.8125rem !important; }
.basic-table tbody td        { padding: 0.6rem 1.1rem !important; font-size: 0.8125rem !important; }
.basic-border-table thead tr th { padding: 0.6rem 1.1rem !important; font-size: 0.8125rem !important; }
.basic-border-table tbody tr td { padding: 0.6rem 1.1rem !important; font-size: 0.8125rem !important; }
.striped-table thead tr th   { padding: 0.6rem 0.8rem !important; font-size: 0.8125rem !important; }
.striped-table tbody tr td   { padding: 0.6rem 0.8rem !important; font-size: 0.8125rem !important; }

/* Dropdowns */
.dropdown-menu               { padding: 10px !important; border-radius: 10px !important; font-size: 0.8125rem !important; }
.dropdown-item               { font-size: 0.8125rem !important; padding: 0.4rem 0.9rem !important; }

/* Badges / Pills */
.badge                       { font-size: 0.7rem !important; padding: 0.3em 0.55em !important; }

/* Modals */
.modal-title                 { font-size: 0.9375rem !important; }
.modal-body                  { font-size: 0.8125rem !important; }
.modal-footer                { padding: 0.6rem 1rem !important; }
.modal-header                { padding: 0.6rem 1rem !important; }

/* Breadcrumb */
.d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.mb-24 h6 {
    font-size: 0.9375rem !important;
}

/* Pagination */
div.dt-container .dt-paging .dt-paging-button {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.75rem !important;
}

/* Accordion */
.accordion .accordion-item   { padding: 14px !important; }

/* Tabs */
.bordered-tab .nav-link      { padding: 10px 16px !important; font-size: 0.8125rem !important; }

/* Alerts */
.alert                       { font-size: 0.8125rem !important; padding: 0.6rem 1rem !important; }

/* Icons global scale */
.icon.text-xl                { font-size: 1.1rem !important; }
.icon.text-lg                { font-size: 1rem !important; }
.icon.text-md                { font-size: 0.9rem !important; }
iconify-icon                 { font-size: 1rem !important; }

/* Height utilities scale */
.h-40-px  { height: 2.1rem !important; }
.h-32-px  { height: 1.75rem !important; }
.h-44-px  { height: 2.3rem !important; }
.h-48-px  { height: 2.5rem !important; }
.w-32-px  { width: 1.75rem !important; }
.w-40-px  { width: 2.1rem !important; }
.w-44-px  { width: 2.3rem !important; }

/* Footer */
.d-footer                    { padding: 0.9rem 1.2rem !important; font-size: 0.8125rem !important; }