html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Focus styles for accessibility */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
}

/* Table styling */
.ttable {
    border: solid 1px gray;
}

/* Color utilities */
.checked {
    color: greenyellow;
}

.red-color {
    color: red;
}

.yellow-color {
    color: yellow;
}

.purple-color {
    color: purple;
}

/* ============ Desktop submenu view ============ */
@media all and (min-width: 992px) {
    .dropdown-menu li {
        position: relative;
    }

    .nav-item .submenu {
        display: none;
        position: absolute;
        left: 100%;
        top: 0;
        min-width: 180px;
        z-index: 1000;
    }

    .nav-item .submenu-left {
        right: 100%;
        left: auto;
    }

    .dropdown-menu > li:hover {
        background-color: #f1f1f1;
    }

    .dropdown-menu > li:hover > .submenu {
        display: block;
    }
}

/* ============ Mobile/Tablet devices ============ */
@media (max-width: 991.98px) {
    .dropdown-menu .dropdown-menu {
        margin-left: 0.7rem;
        margin-right: 0.7rem;
        margin-bottom: 0.5rem;
    }
    
    /* Prevent horizontal scroll on mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Better touch targets */
    .nav-link,
    .dropdown-item {
        padding: 0.625rem 1rem;
    }
}

/* Scrollable dropdown menus for long lists */
.dropdown-menu-scrollable {
    max-height: 60vh;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .dropdown-menu-scrollable {
        max-height: 40vh;
    }
}

/* Smooth scrolling for browsers that support it */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Text truncation utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
