html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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 var(--primary-color);
}

input.focusColor:focus,
button.focusColor:focus,
a.focusColor:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color); !important;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    /* margin-bottom: 60px; Removed to avoid space for absolute footer */
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--obs-header-height));
}

.footer {
    position: static !important;
    width: 100% !important;
    height: auto !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.pagination.ips li a{
    color: var(--primary-color);
}

.pagination.ips li a:focus{
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color); !important;

}

.pagination.ips li.active a{
    /*background-color: var(--primary-color);*/
    color: white;
}

.pagination.ips li.active>.page-link{
    background-color:var(--primary-color);
    border-color: var(--secondary-color);
}

.pagination.ips li.active>.page-link:focus{
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--secondary-color); !important;
}

/* --- App custom styles (sidebar layout + polish) --- */
/* Layout variables */
:root {
    --obs-sidebar-width: 250px;
    --obs-header-height: 80px;
    --obs-header-bg: #009697;
    --obs-sidebar-bg: #2DBDB6;
    --primary-color: #009697;
    --secondary-color: #2DBDB6;
    --bs-pagination-color: var(--primary-color) !important;
    --bs-pagination-active-bg: var(--primary-color) !important;
    --bs-pagination-active-border-color: var(--primary-color) !important;
    --bs-pagination-hover-color: var(--primary-color) !important;
    --bs-pagination-focus-color: var(--primary-color) !important;
}

/* Header styling */
header {
    background-color: var(--obs-header-bg) !important;
    height: var(--obs-header-height);
    color: white;
}

header .btn-outline-secondary {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

header .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.user-info {
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.2;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--obs-header-bg);
}

.primary-color{
    color: var(--primary-color);
}

/* Sidebar styling */
.obs-offcanvas {
    --bs-offcanvas-width: var(--obs-sidebar-width);
    width: var(--obs-sidebar-width);
    background-color: var(--obs-sidebar-bg) !important;
    border: none !important;
    color: white;
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: none;
    font-weight: bold;
}

.sidebar-section-title {
    font-weight: bold;
    font-size: 1.1rem;
    padding: 1rem 1.5rem 0.5rem;
    color: white;
}

.sidebar-sub-link {
    padding-left: 2.5rem !important;
    font-size: 0.9rem !important;
}

/* Persistent sidebar on lg+ and push content */
@media (min-width: 992px) {
    #sidebarMenu {
        visibility: visible !important;
        transform: none !important;
        position: fixed !important;
        left: 0;
        top: var(--obs-header-height);
        height: calc(100vh - var(--obs-header-height));
        box-shadow: none !important;
        z-index: 1;
    }

    .content-wrapper {
        margin-left: var(--obs-sidebar-width);
        padding-top: 2rem;
        max-width: none;
        padding-left: 2rem;
        padding-right: 2rem;
        transition: margin-left 0.3s ease-in-out;
        flex: 1; /* Ensure it grows to fill height */
    }

    body.sidebar-hidden-lg #sidebarMenu {
        display: none !important;
    }

    body.sidebar-hidden-lg .content-wrapper {
        margin-left: 0 !important;
    }
}

/* Filters sidebar styling */
#filterSidebar {
    width: 300px;
}

#filterSidebar .offcanvas-header {
    background-color: #f8f9fa;
}

#filterSidebar .btn-primary {
    background-color: var(--obs-header-bg);
    border-color: var(--obs-header-bg);
}

#filterSidebar .btn-primary:hover {
    background-color: #007d7e;
    border-color: #007d7e;
}

.content-wrapper .btn-outline-secondary {
    color: var(--obs-header-bg);
    border-color: var(--obs-header-bg);
}

.btn-obs-primary {
    background-color: var(--obs-header-bg);
    border-color: var(--obs-header-bg);
    color: white;
}

.btn-obs-primary:hover {
    background-color: #007d7e;
    border-color: #007d7e;
    color: white;
}

.btn-obs-primary:disabled {
    background-color: #007d7e;
    border-color: #007d7e;
    color: white;
}

.btn-outline-obs-primary {
    color: var(--obs-header-bg);
    border-color: var(--obs-header-bg);
}

.btn-outline-obs-primary:hover {
    background-color: var(--obs-header-bg);
    color: white;
}

.bg-obs-primary {
    background-color: var(--obs-header-bg) !important;
}

.text-obs-primary {
    color: var(--obs-header-bg) !important;
}

/* Brand styling */
.app-logo img {
    height: 60px;
}

.margin-top-79 {
    margin-top: calc(79px + 1rem);
}


/*HOMEPAGE*/
.bg-ips-primary{
    background-color: var(--primary-color);
}
.form-check-input.primary-color:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input.primary-color:focus
{
    box-shadow: none;
    border-color: var(--bs-border-color);
}

.form-check-input.primary-color:focus:not(:checked) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}
.form-check-input.primary-color:focus:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 1%29'/%3e%3c/svg%3e");
}

.bg-ips-secondary{
    background-color: var(--secondary-color);
}

.btn-primary-ips {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary-ips:hover {
    background-color: #007b7c;
    border-color: #007b7c;
    color: white;
}

.btn-outline-ips {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-ips:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-primary.btn-outline-ips {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: white;
    --bs-btn-hover-bg: var(--secondary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: white;
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-disabled-color: var(--primary-color);
}

.icon-card {
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.icon-card i {
    font-size: 4rem;
}

.illustration-container {
    position: relative;
    aspect-ratio: 1;
    max-width: 450px;
    margin: 0 auto;
}

.bg-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.1;
}

.icon-grid {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.decorative-blur {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    filter: blur(40px);
}

.decorative-blur-1 {
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background-color: var(--secondary-color);
}

.decorative-blur-2 {
    bottom: 0;
    left: 0;
    width: 96px;
    height: 96px;
    background-color: var(--primary-color);
}

.ips-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: var(--primary-color);
}

.ips-logo-badge img {
    width: 4rem;
}

/*register*/
.form-container {
    max-width: 800px;
    background-color: white;
    border-radius: 0.5rem;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-container-login {
    max-width: 500px;
    background-color: white;
    border-radius: 0.5rem;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-footer-link {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer-link:hover {
    text-decoration: underline;
}

.sidebar-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0.5rem 1rem;
}

#confirmModal,
#elevatorRangeModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#confirmModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}