:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --bg-light: #f8f9fa;
    --sidebar-bg: #212529;
    --sidebar-text: #adb5bd;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin .25s ease-out;
    background-color: var(--sidebar-bg);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

.sidebar-nav-item {
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav-item:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.sidebar-nav-item i {
    width: 20px;
    margin-right: 10px;
}

.sidebar-nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* Page Content Wrapper */
#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* Custom UI Elements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.navbar {
    background: white;
    border-bottom: 1px solid #dee2e6;
}

.btn-primary {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.nav-user-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Auth Pages Style */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0d6efd 0%, #003d99 100%);
}

.auth-card {
    max-width: 400px;
    width: 100%;
}

.provider-coverage-map {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    overflow: hidden;
}

.provider-map-popup {
    min-width: 220px;
}

.provider-map-popup .btn.btn-primary,
.provider-map-popup .btn.btn-primary:hover,
.provider-map-popup .btn.btn-primary:focus,
.provider-map-popup .btn.btn-primary:active,
.provider-map-popup .btn.btn-primary:visited {
    color: #fff !important;
}

.provider-map-provider-icon-wrap,
.provider-map-category-icon-wrap {
    background: transparent;
    border: none;
}

.provider-map-provider-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    border: 3px solid #1d4ed8;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.provider-map-provider-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.provider-map-category-icon {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    border: 2px solid #fff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.provider-map-category-icon.compact {
    width: 44px;
    height: 44px;
}

.provider-map-category-icon.inside {
    background: #16a34a;
}

.provider-map-category-icon.outside {
    background: #d97706;
}

.provider-map-category-icon.category-miss {
    background: #64748b;
}

.provider-map-category-icon i {
    font-size: 24px;
}

.provider-map-category-icon.compact i {
    font-size: 18px;
}

.provider-map-time-tooltip {
    background: #0f172a;
    border: none;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
    white-space: nowrap;
    pointer-events: none;
}

.provider-map-time-tooltip::before {
    display: none;
}

.provider-map-time-tooltip.leaflet-tooltip-bottom {
    margin-top: 1px;
}

/* Provider Gallery */
.provider-album-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 0;
    text-align: left;
    cursor: pointer;
    border: 1px solid #3b82f6;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: all 0.2s ease;
}

.provider-album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.provider-album-card.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.provider-album-cover {
    position: relative;
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.provider-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-album-cover-placeholder {
    color: #94a3b8;
}

.provider-album-content {
    padding: 12px;
}

.provider-albums-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.provider-album-action {
    border: 2px dashed #556070;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.provider-album-action:hover {
    border-color: #394150;
}

.provider-album-action-cover {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

.provider-album-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 2px solid #556070;
    color: #334155;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.provider-gallery-item {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #4b5563;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.provider-gallery-item:hover {
    transform: scale(1.02);
    border-color: #2f3640;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.provider-gallery-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    background: #f1f5f9;
    cursor: pointer;
    overflow: hidden;
}

.provider-gallery-thumb img,
.provider-gallery-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.provider-gallery-thumb-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#galleryLightboxContent img,
#galleryLightboxContent video {
    max-height: 78vh;
}

.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.gallery-media-grid .provider-gallery-thumb {
    height: 150px;
}

.provider-gallery-add-tile {
    width: 100%;
    height: 100%;
    min-height: 278px;
    border-radius: 14px;
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    color: #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.provider-gallery-add-tile:hover {
    border-color: #2563eb;
    color: #1e40af;
    background: #eff6ff;
}

.provider-gallery-add-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #dbeafe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.provider-gallery-add-text {
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 1399.98px) {
    .provider-albums-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .provider-albums-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .provider-coverage-map {
        width: 100%;
    }

    .provider-albums-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .provider-albums-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (max-width: 1399.98px) {
    .gallery-media-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .gallery-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .gallery-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .gallery-media-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
