.content-wrapper {
    min-height: calc(100vh - 56px - 56px);
}

.content {
    padding-bottom: 2rem;
}

.navbar .nav-link {
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.navbar-user-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.navbar-center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 1.05rem;
    color: #dc3545;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-header img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid #fff;
}

.status-online {
    background: #28a745;
}

.status-away {
    background: #ffc107;
}

.status-offline {
    background: #6c757d;
}

.status-online-pulse {
    animation: pulse 1.3s infinite;
}

.brand-link {
    min-height: 50px;
    display: flex;
    align-items: center;
}

.main-sidebar .sidebar {
    padding-top: 0.5rem;
}

.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1050;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1 !important;
}

.welcome-box {
    position: relative;
    width: 90%;
    max-width: 900px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    animation: slideUp 0.35s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.welcome-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 1.4rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
}

.welcome-img {
    width: 100%;
    height: auto;
    display: block;
}

.welcome-footer {
    padding: 1rem 1.25rem;
    background: #f7f7f7;
    border-top: 1px solid #eee;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.blinking-text {
    animation: blink 6s infinite;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.5rem;
}

thead.thead-small th {
    font-size: 0.8rem;
    padding: 0.7rem 0.5rem;
    line-height: 1.2;
    vertical-align: middle;
}

.card .card-header .card-tools > .btn-tool {
    width: 26px;
    height: 26px;
    border-radius: 100px !important;
    padding: 2px 4px !important;
    background: rgba(0, 0, 0, 0.05);
    margin-left: 4px;
    transition: 0.15s;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 28px;
}

.input-with-icon .clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 12px;
    transition: color 0.2s;
}

.input-with-icon .clear-btn:hover {
    color: #333;
}

@keyframes blink {
    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.leaflet-container img {
    max-width: none !important;
}

.map-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1000;
}

.map-spinner.hidden {
    display: none;
}

@media (max-width: 768px) {
    thead.thead-small th {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.select2-container--default.select2-container--focus
    .select2-selection--single.is-invalid,
.select2-container--default .select2-selection--single.is-invalid {
    border-color: #dc3545;
}

.nav-tabs .nav-link {
    cursor: pointer;
}

.dropzone-custom {
    border: 2px dashed #ced4da;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
}

.dropzone-custom p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}

.img-thumbnail {
    border-radius: 0.25rem;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 4px 0;
}
.detail-label {
    font-weight: 600;
}

#preload {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
}

#preload .bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    will-change: transform, width;
    transform-origin: left center;
    background: linear-gradient(90deg, #1c7ab0, #2299dd, #4ac0ff);
}

.bar--primary {
    width: 30%;
    transform: translateX(-120%);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 6px rgba(34, 153, 221, 0.25);
}

.bar--secondary {
    width: 55%;
    transform: translateX(-200%);
    transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: linear-gradient(90deg, #1c7ab0, #2299dd, #4ac0ff);
    opacity: 0.85;
}

#preload.is-active {
    opacity: 1;
}

#preload.is-active .bar--primary {
    transform: translateX(120%);
}

#preload.is-active .bar--secondary {
    transform: translateX(120%);
}

#preload.is-active .bar--secondary {
    transition-delay: 0.12s;
}
