/* ==============================================================
   UTILYX
   Design System Base
   ============================================================== */


/* ==============================================================
   VARIABLES
   ============================================================== */

:root {
    --utx-sidebar-width: 250px;
    --utx-topbar-height: 68px;
    --utx-primary: #1769aa;
    --utx-primary-dark: #125487;
    --utx-primary-light: #eaf3fb;
    --utx-sidebar: #17212b;
    --utx-sidebar-hover: #223140;
    --utx-sidebar-active: #25394c;
    --utx-bg: #f4f6f8;
    --utx-surface: #ffffff;
    --utx-border: #e1e6eb;
    --utx-text: #263238;
    --utx-text-secondary: #6c7884;
    --utx-text-muted: #8b96a1;
    --utx-success: #198754;
    --utx-danger: #dc3545;
    --utx-warning: #d99b00;
    --utx-radius: 8px;
    --utx-shadow: 0 2px 8px rgba(25, 39, 52, 0.06);
}


/* ==============================================================
   BASE
   ============================================================== */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--utx-bg);
    color: var(--utx-text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}


/* ==============================================================
   APP
   ============================================================== */

.utx-app {
    min-height: 100vh;
}


/* ==============================================================
   SIDEBAR
   ============================================================== */

.utx-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--utx-sidebar-width);
    background: var(--utx-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}


/* ==============================================================
   BRAND
   ============================================================== */

.utx-brand {
    min-height: var(--utx-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}


.utx-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}


.utx-brand-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--utx-primary);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}


.utx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}


.utx-brand-name {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .6px;
}


.utx-brand-subtitle {
    color: #91a0ad;
    font-size: .72rem;
    margin-top: 3px;
}


.utx-sidebar-close {
    border: 0;
    background: transparent;
    color: #aeb9c3;
    font-size: 1.2rem;
}


/* ==============================================================
   NAVIGATION
   ============================================================== */

.utx-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}


.utx-nav-section {
    padding: 18px 12px 7px;
    color: #6f8190;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08rem;
}


.utx-nav-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    gap: 12px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    color: #c4ced7;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}


    .utx-nav-link i {
        width: 21px;
        text-align: center;
        font-size: 1.05rem;
    }


    .utx-nav-link:hover {
        background: var(--utx-sidebar-hover);
        color: white;
    }


    .utx-nav-link.active {
        background: var(--utx-sidebar-active);
        color: white;
        box-shadow: inset 3px 0 0 var(--utx-primary);
    }


.utx-nav-disabled {
    opacity: .5;
}


/* ==============================================================
   SIDEBAR FOOTER
   ============================================================== */

.utx-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}


.utx-version {
    color: #768896;
    font-size: .72rem;
}


    .utx-version span {
        margin-left: 4px;
    }


/* ==============================================================
   MAIN
   ============================================================== */

.utx-main {
    min-height: 100vh;
    margin-left: var(--utx-sidebar-width);
    display: flex;
    flex-direction: column;
}


/* ==============================================================
   TOPBAR
   ============================================================== */

.utx-topbar {
    position: sticky;
    top: 0;
    height: var(--utx-topbar-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--utx-border);
    z-index: 1020;
}


.utx-topbar-left,
.utx-topbar-right {
    display: flex;
    align-items: center;
}


.utx-topbar-right {
    gap: 22px;
}


.utx-page-context {
    display: flex;
    align-items: center;
    gap: 8px;
}


.utx-system-name {
    color: var(--utx-primary);
    font-weight: 700;
}


.utx-system-separator {
    color: #c3cbd2;
}


.utx-page-name {
    color: var(--utx-text-secondary);
    font-weight: 500;
}


/* ==============================================================
   COMPANY
   ============================================================== */

.utx-company {
    align-items: center;
    gap: 9px;
    padding-right: 20px;
    border-right: 1px solid var(--utx-border);
}


.utx-company-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--utx-primary-light);
    color: var(--utx-primary);
    border-radius: 50%;
}


.utx-company-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}


.utx-company-label {
    color: var(--utx-text-muted);
    font-size: .68rem;
}


.utx-company-name {
    font-size: .82rem;
    font-weight: 600;
}


/* ==============================================================
   MOBILE MENU BUTTON
   ============================================================== */

.utx-menu-button {
    border: 0;
    background: transparent;
    color: var(--utx-text);
    font-size: 1.6rem;
    margin-right: 12px;
}


/* ==============================================================
   CONTENT
   ============================================================== */

.utx-content {
    flex: 1;
    width: 100%;
    padding: 24px 28px 36px;
}


/* ==============================================================
   CARDS
   ============================================================== */

.card {
    border: 1px solid var(--utx-border);
    border-radius: var(--utx-radius);
    box-shadow: var(--utx-shadow);
}


.card-header {
    padding: 13px 16px;
    background: #fafbfc;
    border-bottom: 1px solid var(--utx-border);
    font-weight: 600;
}


/* ==============================================================
   TABLES
   ============================================================== */

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}


    .table thead th {
        padding: 11px 12px;
        background: #f8f9fa;
        color: #596570;
        border-bottom: 1px solid #dce2e7;
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .025rem;
        white-space: nowrap;
    }


    .table tbody td {
        padding: 10px 12px;
        border-color: #e8ecef;
        vertical-align: middle;
    }


/* ==============================================================
   BUTTONS
   ============================================================== */

.btn {
    border-radius: 6px;
    font-weight: 500;
}


.btn-primary {
    background: var(--utx-primary);
    border-color: var(--utx-primary);
}


    .btn-primary:hover,
    .btn-primary:focus {
        background: var(--utx-primary-dark);
        border-color: var(--utx-primary-dark);
    }


/* ==============================================================
   FORMS
   ============================================================== */

.form-control,
.form-select {
    min-height: 40px;
    border-color: #d5dce2;
    border-radius: 6px;
}


    .form-control:focus,
    .form-select:focus {
        border-color: #6fa7d2;
        box-shadow: 0 0 0 .2rem rgba(23, 105, 170, .12);
    }


.form-label {
    color: #56616c;
    font-size: .82rem;
    font-weight: 600;
}


/* ==============================================================
   ALERTS
   ============================================================== */

.alert {
    border-radius: var(--utx-radius);
}


/* ==============================================================
   FOOTER
   ============================================================== */

.utx-footer {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 28px;
    background: white;
    color: var(--utx-text-muted);
    border-top: 1px solid var(--utx-border);
    font-size: .75rem;
}


/* ==============================================================
   OVERLAY
   ============================================================== */

.utx-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .38);
    z-index: 1030;
}


    .utx-sidebar-overlay.show {
        display: block;
    }


/* ==============================================================
   LOGIN PARTIAL
   ============================================================== */

.utx-login .navbar-nav {
    flex-direction: row;
    align-items: center;
}


.utx-login .nav-link {
    color: var(--utx-text-secondary);
    padding: .4rem .6rem;
}


/* ==============================================================
   RESPONSIVE
   ============================================================== */

@media (max-width: 991.98px) {

    .utx-sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, .15);
    }


        .utx-sidebar.show {
            transform: translateX(0);
        }


    .utx-main {
        margin-left: 0;
    }


    .utx-content {
        padding: 20px 16px 30px;
    }


    .utx-topbar {
        padding: 0 16px;
    }


    body.utx-sidebar-open {
        overflow: hidden;
    }
}


@media (max-width: 575.98px) {

    .utx-system-name,
    .utx-system-separator {
        display: none;
    }


    .utx-content {
        padding: 16px 10px 24px;
    }


    .utx-footer {
        padding: 12px 16px;
    }
}


/* ==============================================================
   ACCESSIBILITY / FOCUS
   ============================================================== */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
    outline: none;
}


/* ==============================================================
   BOOTSTRAP HELPERS
   ============================================================== */

.text-muted {
    color: var(--utx-text-secondary) !important;
}


.shadow-sm {
    box-shadow: var(--utx-shadow) !important;
}
