/**
 * Custom Styles - Modern Admin Dashboard Template (Sistem JAGAKI)
 */

:root {
    /* Color Palette */
    --app-bg: #f8fafc;
    --app-surface: #ffffff;
    --app-border: #e2e8f0;
    --app-border-subtle: #f1f5f9;
    --app-text: #0f172a;
    --app-muted: #64748b;
    
    /* Brand Emerald & Teal Theme */
    --app-emerald: #059669;
    --app-emerald-dark: #047857;
    --app-emerald-light: #10b981;
    --app-emerald-subtle: #ecfdf5;
    
    --app-teal: #0d9488;
    --app-teal-subtle: #ccfbf1;
    
    --app-primary: #059669;
    --app-secondary: #0284c7;
    --app-accent: #0f766e;
    --app-success: #16a34a;
    --app-warning: #d97706;
    --app-danger: #dc2626;

    /* Sidebar Variables */
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    --topbar-height: 76px;
    
    /* Shadows & Border Radius */
    --app-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --app-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --app-shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.1);
    --app-radius-sm: 8px;
    --app-radius: 16px;
    --app-radius-lg: 20px;
    --app-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Typography & Base ===== */
body.app-layout {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--app-bg);
    color: var(--app-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--app-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-emerald { color: var(--app-emerald) !important; }
.bg-emerald-subtle { background-color: var(--app-emerald-subtle) !important; }

/* ===== Sidebar Navigation ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: var(--app-transition);
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--app-transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}
.sidebar-brand .brand-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 12px rgba(5, 150, 105, 0.45));
    transition: transform 0.25s ease;
}
.sidebar-brand:hover .brand-logo {
    transform: scale(1.05);
}
.sidebar-brand .brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    display: block;
    line-height: 1.1;
}
.sidebar-brand .brand-subtitle {
    font-size: 0.72rem;
    color: var(--sidebar-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-close-sidebar {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.25rem;
    padding: 0.25rem;
    cursor: pointer;
}

.badge-role-pill {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}
.badge-kecamatan {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(13, 148, 136, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.badge-kelurahan {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}
.badge-masyarakat {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}
.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.menu-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 1px;
    padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-item {
    margin-bottom: 0.35rem;
}
.menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--app-transition);
}
.menu-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}
.menu-link.active {
    color: #ffffff;
    background: var(--sidebar-active-bg);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.35);
    font-weight: 700;
}
.menu-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}
.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    overflow: hidden;
}
.nav-profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar-large {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    overflow: hidden;
}
.profile-avatar-large.profile-photo {
    object-fit: cover;
}
.profile-photo-editor {
    position: relative;
    display: inline-flex;
}
.profile-photo-form {
    position: absolute;
    right: -5px;
    bottom: -3px;
    margin: 0;
}
.profile-photo-edit {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.profile-photo-edit:hover,
.profile-photo-edit:focus-visible {
    background: #047857;
    color: #fff;
}
.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.user-name {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
}
.user-sub {
    color: #64748b;
    font-size: 0.72rem;
}

/* ===== Main Area Wrap & Topbar ===== */
.app-main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: var(--app-transition);
}

.app-topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 2vw, 1.75rem);
}

.topbar-left {
    display: flex;
    align-items: center;
}
.btn-toggle-sidebar {
    background: #f1f5f9;
    border: 1px solid var(--app-border);
    color: var(--app-text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--app-transition);
}
.btn-toggle-sidebar:hover {
    background: #e2e8f0;
    color: var(--app-emerald);
}

.topbar-page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--app-text);
    line-height: 1.2;
}
.topbar-breadcrumb {
    font-size: 0.75rem;
    color: var(--app-muted);
    font-weight: 500;
}

.topbar-clock {
    background: #f1f5f9;
    border: 1px solid var(--app-border);
    color: var(--app-text);
}

.topbar-institution-logos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}
.topbar-institution-logos img {
    display: block;
    width: auto;
    object-fit: contain;
}
.topbar-logo-jagaki { height: 34px; max-width: 38px; }
.topbar-logo-pemkot { height: 31px; max-width: 25px; }
.topbar-logo-kecamatan { height: 31px; max-width: 31px; }
.topbar-logo-divider {
    width: 1px;
    height: 28px;
    background: var(--app-border);
    margin: 0 0.05rem;
}

@media (max-width: 575.98px) {
    .topbar-institution-logos { gap: 0.25rem; padding: 0.2rem 0.35rem; border-radius: 10px; }
    .topbar-logo-jagaki { height: 28px; max-width: 31px; }
    .topbar-logo-pemkot { height: 25px; max-width: 20px; }
    .topbar-logo-kecamatan { height: 25px; max-width: 25px; }
    .topbar-logo-divider { height: 22px; }
    .app-topbar { gap: 0.5rem; }
    .topbar-right { gap: 0.45rem !important; }
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--app-emerald) 0%, var(--app-teal) 100%);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* ===== Content Area ===== */
.app-content {
    flex: 1;
    padding: 0;
}

/* ===== Cards & Containers ===== */
.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-sm);
    background: var(--app-surface);
    overflow: hidden;
    transition: var(--app-transition);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--app-border-subtle);
    padding: 1.1rem 1.4rem;
}
.card-header h5, .card-header h6 {
    color: var(--app-text);
    font-weight: 700;
}

/* ===== Stat Cards Widget ===== */
.stat-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--app-shadow);
}
.stat-card .card-body {
    padding: 1.35rem;
}
.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--app-text);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--app-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.2rem;
}

.stat-primary::before { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.stat-primary .stat-icon { background: rgba(37, 99, 235, 0.1); color: #2563eb; }

.stat-success::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-success .stat-icon { background: rgba(16, 185, 129, 0.12); color: #059669; }

.stat-warning::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-warning .stat-icon { background: rgba(245, 158, 11, 0.12); color: #d97706; }

.stat-danger::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stat-danger .stat-icon { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.stat-info::before { background: linear-gradient(90deg, #0d9488, #0f766e); }
.stat-info .stat-icon { background: rgba(13, 148, 136, 0.12); color: #0d9488; }

/* ===== Badges ===== */
.badge-tingkat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4em 0.8em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.badge-tingkat-1 { background-color: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-tingkat-2 { background-color: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-tingkat-3 { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ===== Table Styling ===== */
.table {
    margin-bottom: 0;
    --bs-table-hover-bg: #f8fafc;
}
.table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--app-border);
}
.table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--app-border-subtle);
    font-size: 0.875rem;
    color: #334155;
}
.table-action-link {
    color: var(--app-emerald);
    font-weight: 700;
    text-decoration: none;
    transition: var(--app-transition);
}
.table-action-link:hover {
    color: var(--app-emerald-dark);
    text-decoration: underline;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    transition: var(--app-transition);
}
.btn-gradient-primary {
    background: linear-gradient(135deg, var(--app-emerald) 0%, var(--app-teal) 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.btn-gradient-primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.btn-gradient-danger:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--app-border);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: var(--app-text);
    transition: var(--app-transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--app-emerald);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.form-label {
    font-weight: 700;
    font-size: 0.82rem;
    color: #334155;
    margin-bottom: 0.4rem;
}

/* ===== Status Dots ===== */
.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== Leaflet Map Container ===== */
#map, #mapWilayah, .location-map {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--app-border);
    width: 100%;
}
#mapWilayah {
    height: 520px;
}
#map {
    height: 440px;
}

/* ===== Responsive & Collapse Rules ===== */
@media (min-width: 992px) {
    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-collapsed .app-main-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.active {
        transform: translateX(0);
    }
    .app-main-wrapper {
        margin-left: 0;
    }
}

/* ===== User Card & Profile Styles ===== */
.sidebar-footer .user-card {
    transition: var(--app-transition);
}
.sidebar-footer .user-card:hover .user-name {
    color: #34d399;
}

/* ===== Enhanced Table & Action Styles ===== */
.table-custom {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table-custom th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--app-border);
    border-top: none;
    white-space: nowrap;
}
.table-custom td {
    padding: 1rem 1.1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--app-border-subtle);
    font-size: 0.875rem;
    color: #334155;
}
.table-custom tbody tr {
    transition: var(--app-transition);
}
.table-custom tbody tr:hover {
    background-color: rgba(5, 150, 105, 0.03) !important;
}

.pkl-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.btn-action-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: var(--app-transition);
    border: 1px solid transparent;
}
.btn-action-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-action-map {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
.btn-action-map:hover {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-action-view {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}
.btn-action-view:hover {
    background-color: #059669;
    color: #ffffff;
}

.btn-action-edit {
    background-color: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.btn-action-edit:hover {
    background-color: #d97706;
    color: #ffffff;
}

/* Subtle Badges */
.badge-subtle-success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}
.badge-subtle-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 700;
}
.badge-subtle-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-weight: 700;
}
.badge-subtle-secondary {
    background-color: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.search-box-wrap {
    position: relative;
    width: 260px;
}
.search-box-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.9rem;
}
.search-box-wrap .form-control {
    padding-left: 36px;
    border-radius: 10px;
}

/* ===== Responsive Overhauls for Mobile & Tablet (Android & iOS) ===== */
@media (max-width: 991.98px) {
    .app-main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {
    :root {
        --topbar-height: 64px;
    }

    .app-topbar {
        height: 64px;
        padding: 0 0.85rem;
    }
    
    .topbar-page-title {
        font-size: 1.05rem;
        max-width: calc(100vw - 160px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar-breadcrumb {
        display: none !important;
    }
    
    .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
        max-width: calc(100vw - 2rem);
    }
    
    .search-box-wrap {
        width: 100% !important;
    }

    /* Form controls font-size 16px to prevent auto-zoom in Android Chrome */
    .form-control, .form-select, .form-control-sm, .form-select-sm, textarea {
        font-size: 16px !important;
    }
    
    .stat-card .card-body {
        padding: 0.9rem 0.8rem;
    }
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
        border-radius: 10px;
        margin-right: 0.5rem !important;
    }
    .stat-card .stat-value {
        font-size: 1.45rem;
    }
    .stat-card .stat-label {
        font-size: 0.72rem;
    }

    #map, .location-map {
        height: clamp(300px, 45vh, 400px) !important;
        border-radius: 12px;
    }
    #mapWilayah {
        height: clamp(320px, 48vh, 440px) !important;
        border-radius: 0 !important;
    }

    .dbscan-controls {
        width: 100% !important;
    }
    .dbscan-controls .input-group {
        width: 100% !important;
        flex: 1 1 120px;
    }
    .dbscan-controls .btn {
        width: 100% !important;
        margin-top: 0.25rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .table-responsive::-webkit-scrollbar {
        height: 5px;
    }
    .table-responsive::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }
    
    .table-custom th, .table-custom td {
        padding: 0.75rem 0.85rem;
    }
    
    .pkl-avatar-sm {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .btn-action-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .card-header {
        padding: 0.85rem 0.95rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .stat-card .card-body {
        padding: 0.75rem 0.65rem;
    }
    .stat-card .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 8px;
        margin-right: 0.35rem !important;
    }
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    .stat-card .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.2px;
    }

    .filter-controls-wrap {
        flex-direction: column;
        width: 100%;
    }
    .filter-controls-wrap select, 
    .filter-controls-wrap input,
    .filter-controls-wrap .btn {
        width: 100% !important;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-content {
        border-radius: 16px;
    }
}

#locationMap.location-map {
    height: clamp(360px, 52vh, 560px) !important;
    min-height: 360px;
}

/* Profile Page Responsive Enhancements */
.card-header-pills .nav-link {
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    color: #64748b;
    transition: all 0.2s ease;
}
.card-header-pills .nav-link.active {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}
@media (max-width: 576px) {
    .card-header-pills {
        display: flex !important;
        width: 100%;
        gap: 0.5rem;
    }
    .card-header-pills .nav-item {
        flex: 1;
        text-align: center;
    }
    .card-header-pills .nav-link {
        width: 100%;
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
        justify-content: center;
        display: flex;
        align-items: center;
    }
}




