html {
    min-height: 100%;
    height: 100%;
    background: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-text-size-adjust: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100%;
    margin: 0;
    background: #f8fafc;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

body.modal-open {
    overflow: hidden;
}

main {
    min-height: calc(100vh - 4.5rem);
    min-height: calc(-webkit-fill-available);
}

header {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 40;
}

.mobile-nav-bar {
    bottom: env(safe-area-inset-bottom, 0px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ef4444;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

button,
select,
input,
label.switch,
a {
    touch-action: manipulation;
}

@media (max-width: 640px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 640px) {
    button {
        min-height: 38px;
    }

    .mobile-nav-btn {
        min-height: 46px;
    }
}

.mobile-nav-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-safe-pad {
    padding-bottom: calc(var(--mobile-nav-h, 4.5rem) + env(safe-area-inset-bottom, 0px) + 0.75rem);
}

.mobile-safe-main {
    padding-bottom: calc(var(--mobile-nav-h, 4.5rem) + env(safe-area-inset-bottom, 0px) + 1.25rem);
}

@media (max-width: 767px) {
    .tab-content {
        padding-bottom: calc(var(--mobile-nav-h, 4.5rem) + env(safe-area-inset-bottom, 0px) + 1rem);
    }
}

@media (min-width: 768px) {
    .mobile-safe-main {
        padding-bottom: 0;
    }
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

.nav-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}
