/**
 * Cetak Sawah - Master Agricultural Stylesheet
 * Font: Poppins
 * Ultra-Modern, Clean, High Contrast, Distinctly Agricultural Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
    --primary: #0284c7;          /* Vibrant Sky / Cerulean Blue from logo loop */
    --primary-dark: #0369a1;    /* Deep Petrol Blue from logo stem */
    --primary-light: #f0f9ff;   /* Soft Ice Blue background */
    --primary-border: #7dd3fc;  /* Crisp Cyan Accent */
    --golden-harvest: #ea580c;   /* Warm Sprout Orange from logo leaf */
    --golden-dark: #c2410c;
    --water-blue: #0284c7;       /* Irrigation / Water Blue */
    --water-light: #e0f2fe;
    --soil-dark: #0c2637;        /* Deep Glossy Petrol Slate from logo 3D base */
    --soil-medium: #1e3a52;
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-main: #0c2637;
    --text-muted: #475569;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.65;
    letter-spacing: -0.15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main, .page-wrapper {
    flex: 1 0 auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* Navbars & Dropdowns */
.navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    padding: 0;
}

.brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0c2637 0%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    margin-right: 14px;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 50px;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    filter: drop-shadow(0 2px 4px rgba(12, 38, 55, 0.12));
    display: inline-block;
    margin-right: 16px !important;
}

.brand-kicker {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #ea580c;
    line-height: 1;
    margin-bottom: 2px;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #0c2637;
    line-height: 1.15;
}

.brand-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 9999px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.brand-subtitle {
    font-size: 9.5px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    margin-top: 2px;
    letter-spacing: -0.1px;
    display: block;
    text-transform: uppercase;
}

.navbar-light .nav-link {
    font-weight: 500;
    font-size: 0.92rem;
    color: #1e293b;
    padding: 0 0.9rem;
    height: 40px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}
.navbar-light .nav-link:hover, 
.navbar-light .nav-link.active {
    color: var(--primary) !important;
    background-color: #f0f9ff;
}

/* Pixel-Perfect Navigation Action Buttons */
.nav-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    height: 40px;
    padding: 0 18px;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 9999px; /* Seamless Pill */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn i {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.nav-btn-outline {
    background-color: transparent;
    color: #0284c7;
    border: 1.5px solid #0284c7;
}

.nav-btn-outline:hover,
.nav-btn-outline:focus {
    background-color: #f0f9ff;
    color: #0369a1;
    border-color: #0369a1;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.nav-btn-solid {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: 1.5px solid #0284c7;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}

.nav-btn-solid:hover,
.nav-btn-solid:focus {
    background: linear-gradient(135deg, #0369a1 0%, #0c2637 100%);
    border-color: #0369a1;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

/* Modern Dropdown Menu */
.dropdown-menu {
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 8px;
    font-size: 0.9rem;
    min-width: 240px;
}
.dropdown-item {
    padding: 8px 14px;
    border-radius: 8px;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.15s ease;
}
.dropdown-item:hover {
    background-color: #f0fdf4;
    color: var(--primary);
    transform: translateX(4px);
}
.dropdown-item i {
    color: var(--primary);
    width: 20px;
}

/* Page Header & Breadcrumbs Banner */
.page-header-banner {
    background: linear-gradient(135deg, #0c2637 0%, #113449 60%, #0369a1 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.page-header-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    opacity: 0.12;
}
.page-header-content {
    position: relative;
    z-index: 2;
}
.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
}
.breadcrumb-custom a {
    color: #7dd3fc;
    text-decoration: none;
    font-size: 0.85rem;
}
.breadcrumb-custom a:hover {
    color: #ffffff;
}
.breadcrumb-custom .active {
    color: #ffffff;
    font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0c2637 0%, #113449 45%, #0284c7 100%);
    color: #ffffff;
    padding: 95px 0 85px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    opacity: 0.16;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-pill-badge {
    background: rgba(12, 38, 55, 0.6);
    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.35);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

/* Glassmorphism Card */
.glass-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(12, 38, 55, 0.12);
    color: var(--text-main);
}

/* Agricultural Cards */
.agri-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 26px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
.agri-card:hover {
    border-color: #7dd3fc;
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(2, 132, 199, 0.12);
}
.agri-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 22px 20px;
    color: var(--text-main);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(2, 132, 199, 0.1);
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ==========================================================================
   GLOBAL BUTTON VERTICAL ALIGNMENT & PADDING FIX (Poppins Font & Icons)
   Ensures text and icons are perfectly centered vertically in all buttons,
   preventing cramped top spacing (mepet atas) on pill and standard buttons.
   ========================================================================== */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1.35 !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn i,
.btn .bi,
.btn [class*="bi-"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    font-size: 1.05em;
    margin-top: -1px; /* Optical balance for Poppins baseline */
}

/* Small Buttons (.btn-sm) */
.btn-sm,
.btn-group-sm > .btn {
    padding: 0.42rem 0.95rem !important;
    font-size: 0.84rem !important;
    line-height: 1.3 !important;
    min-height: 35px !important;
}

/* Pill Buttons (.rounded-pill) */
.btn.rounded-pill {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

.btn-sm.rounded-pill {
    padding: 0.42rem 1.15rem !important;
    min-height: 35px !important;
}

/* Override utility py-1/py-0 when applied to buttons so it does not collapse vertical padding */
.btn.py-1,
.btn.py-0 {
    padding-top: 0.42rem !important;
    padding-bottom: 0.42rem !important;
}

/* Medium / Default Buttons */
.btn:not(.btn-sm):not(.btn-lg):not(.share-circle-btn):not(.social-circle-btn):not(.btn-close) {
    padding: 0.55rem 1.25rem;
    min-height: 42px;
}

/* Large Buttons (.btn-lg) */
.btn-lg {
    padding: 0.75rem 1.75rem !important;
    font-size: 1.05rem !important;
    min-height: 48px !important;
}

/* Circular Buttons Exclusion to preserve perfect circle */
.share-circle-btn,
.social-circle-btn {
    padding: 0 !important;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid #0284c7;
    color: #ffffff !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, #0369a1, #0c2637);
    border-color: #0369a1;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.btn-secondary-custom {
    background: #ffffff;
    color: #0c2637 !important;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.btn-secondary-custom:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0c2637 !important;
}

.btn-outline-dark-custom {
    background: transparent;
    color: #0c2637 !important;
    border: 1px solid #0c2637;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.88rem;
}
.btn-outline-dark-custom:hover {
    background: #0c2637;
    color: #ffffff !important;
}

.btn-outline-light-custom {
    background: transparent;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.75);
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 0.9rem;
}
.btn-outline-light-custom:hover {
    background: #ffffff;
    color: #0c2637 !important;
}

/* Badges */
.badge-soft-success {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #86efac;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}
.badge-soft-warning {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fdba74;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}
.badge-soft-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}
.badge-soft-primary {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}
.badge-soft-dark {
    background-color: #f1f5f9 !important;
    color: #0c2637 !important;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}

/* Step Card */
.step-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 24px;
    height: 100%;
    position: relative;
    color: var(--text-main);
    transition: all 0.25s ease;
}
.step-card:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15);
}
.step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}
.d-flex > .step-number,
.d-flex.align-items-start > .step-number,
.d-flex.align-items-center > .step-number,
.step-number.me-3 {
    margin-bottom: 0 !important;
}

/* Form Controls */
.form-control, .form-select {
    color: #0c2637 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1;
    font-size: 0.92rem;
}
.form-control::placeholder {
    color: #94a3b8 !important;
}
.form-control:focus, .form-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.18);
    color: #0c2637 !important;
}

/* Tables */
.custom-table th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1 !important;
}
.custom-table td {
    vertical-align: middle;
    font-size: 0.9rem;
    color: #0c2637 !important;
    border-bottom: 1px solid #e2e8f0;
}

/* Leaflet Map & Popup */
#leaflet-map {
    height: 580px;
    width: 100%;
    border-radius: 16px;
    z-index: 1;
}
.leaflet-popup-content-wrapper {
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #ffffff;
}
.leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
    font-size: 12px;
    color: #0c2637;
}
.map-popup-header {
    background: #0c2637;
    color: #ffffff;
    padding: 12px 16px;
    border-bottom: 2px solid #0284c7;
}
.map-popup-header h6 {
    color: #ffffff !important;
    font-weight: 700;
}
.map-popup-body {
    padding: 14px 16px;
    background: #ffffff;
    color: #0c2637;
}
.map-popup-body table .label-cell {
    color: #475569 !important;
    font-weight: 600;
}
.map-legend {
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    font-size: 12px;
    color: #0c2637;
    border: 1px solid #cbd5e1;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1e293b;
}
.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

/* Footer */
footer {
    background: #081a26;
    color: #cbd5e1;
    padding: 70px 0 30px;
    margin-top: auto;
    position: relative;
    z-index: 10;
    clear: both;
}
footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: #38bdf8;
}

/* -------------------------------------------------------------
 * Brand Theme Color Bridge (Mapped to Official Logo Palette)
 * ------------------------------------------------------------- */
.text-success {
    color: #15803d !important;
}

.bg-success {
    background-color: #16a34a !important;
}

.bg-success.bg-opacity-10,
.bg-success-subtle {
    background-color: rgba(22, 163, 74, 0.12) !important;
    color: #15803d !important;
}

.bg-primary.bg-opacity-10,
.bg-primary-subtle {
    background-color: rgba(2, 132, 199, 0.12) !important;
    color: #0369a1 !important;
}

.border-success {
    border-color: #86efac !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #0369a1 !important;
    border-color: #0284c7 !important;
    border-width: 1.5px !important;
    font-weight: 550 !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

.btn-success {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: #15803d !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}

.btn-outline-success {
    color: #15803d !important;
    border-color: #16a34a !important;
    border-width: 1.5px !important;
    font-weight: 550 !important;
}

.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    border-width: 1.5px !important;
    font-weight: 500 !important;
}

.btn-outline-success .bi-whatsapp {
    color: #25d366 !important;
}

.badge.bg-success {
    background-color: #16a34a !important;
    color: #ffffff !important;
}

.badge.bg-success.bg-opacity-10 {
    background-color: rgba(22, 163, 74, 0.12) !important;
    color: #15803d !important;
}

.badge.bg-primary.bg-opacity-10 {
    background-color: rgba(2, 132, 199, 0.12) !important;
    color: #0369a1 !important;
}

.badge.bg-secondary.bg-opacity-10 {
    background-color: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}

.hover-success:hover {
    color: #16a34a !important;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.18);
}

/* -------------------------------------------------------------
 * Spacing Helper Utilities (Tailwind-like fractional units)
 * ------------------------------------------------------------- */
.p-1\.5 { padding: 0.375rem !important; }
.p-2\.5 { padding: 0.75rem !important; }
.p-3\.5 { padding: 1.25rem !important; }
.px-1\.5 { padding-left: 0.375rem !important; padding-right: 0.375rem !important; }
.px-2\.5 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-3\.5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2\.5 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-3\.5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.mt-0\.5 { margin-top: 0.125rem !important; }

/* Perfectly Centered Circular Social & Action Buttons */
.social-circle-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    background: transparent;
}

.social-circle-btn i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    text-align: center !important;
}

.social-circle-btn:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
}

.share-circle-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.share-circle-btn i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM (MOBILE & TABLET 100% OPTIMIZATIONS)
   * Guaranteed 100% responsive on mobile devices (< 1200px, < 992px, < 768px, < 576px)
   * Does NOT alter or affect the existing desktop layout (>= 1200px)
   ========================================================================== */

/* 1. Global Viewport & Horizontal Overflow Prevention */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    -webkit-text-size-adjust: 100%;
}

img, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

/* 2. Responsive Rules for Tablets & Below (< 1200px) */
@media (max-width: 1199.98px) {
    /* Mobile / Tablet Body Padding for Bottom Bar */
    body {
        padding-bottom: 68px !important;
    }

    /* Modern Mobile Navigation Drawer */
    .navbar-collapse {
        background: #ffffff;
        border-radius: 18px;
        padding: 16px 18px 20px;
        margin-top: 12px;
        box-shadow: 0 18px 45px rgba(12, 38, 55, 0.15);
        border: 1px solid #e2e8f0;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-light .navbar-nav .nav-link {
        height: 44px;
        padding: 0 14px !important;
        border-radius: 10px;
        font-size: 0.94rem;
        font-weight: 600;
        margin-bottom: 3px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #1e293b;
    }

    .navbar-light .navbar-nav .nav-link:hover,
    .navbar-light .navbar-nav .nav-link.active {
        background-color: #f0f9ff;
        color: var(--primary) !important;
    }

    .dropdown-menu {
        border: none !important;
        box-shadow: none !important;
        background-color: #f8fafc !important;
        border-radius: 12px;
        padding: 6px 8px !important;
        margin: 4px 0 10px !important;
        min-width: 100% !important;
    }

    .dropdown-item {
        padding: 9px 12px !important;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    /* Action buttons in mobile drawer */
    .nav-actions-group {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 10px !important;
        margin-top: 14px !important;
        padding-top: 14px !important;
        border-top: 1px solid #e2e8f0 !important;
    }

    .nav-actions-group .nav-btn {
        flex: 1 1 0 !important;
        height: 44px !important;
        font-size: 0.88rem !important;
    }
}

/* 3. Responsive Rules for Mobile Landscape & Small Tablets (< 992px) */
@media (max-width: 991.98px) {
    /* Hero Section */
    .hero-section {
        padding: 45px 0 35px !important;
        text-align: center !important;
    }

    .hero-content {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .hero-pill-badge {
        margin-left: auto !important;
        margin-right: auto !important;
        font-size: 11.5px !important;
        display: inline-flex !important;
    }

    .hero-section h1,
    .hero-section .display-4 {
        font-size: 2.1rem !important;
        line-height: 1.22 !important;
        letter-spacing: -0.5px !important;
    }

    .hero-section .lead {
        font-size: 0.98rem !important;
        line-height: 1.65 !important;
        padding-right: 0 !important;
    }

    .hero-section .d-flex.flex-wrap {
        justify-content: center !important;
    }

    /* Glass card on mobile */
    .glass-card {
        margin-top: 24px !important;
        padding: 20px !important;
        border-radius: 18px !important;
    }

    /* Page Header Banner on mobile */
    .page-header-banner {
        padding: 40px 0 30px !important;
        text-align: center !important;
    }

    .page-header-banner .breadcrumb-custom {
        justify-content: center !important;
    }

    .page-header-banner h1,
    .page-header-banner .display-5 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }

    .page-header-banner .lead {
        font-size: 0.92rem !important;
        line-height: 1.6 !important;
    }

    /* Footer Mobile Columns */
    footer {
        padding: 45px 0 25px !important;
    }

    footer .col-lg-3,
    footer .col-lg-2 {
        margin-bottom: 24px !important;
    }

    /* Tables Mobile Swipe */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
}

/* 4. Responsive Rules for Phones (< 768px) */
@media (max-width: 767.98px) {
    /* Headings */
    h1, .h1 { font-size: 1.75rem !important; }
    h2, .h2 { font-size: 1.45rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
    h4, .h4 { font-size: 1.1rem !important; }
    
    .display-4 { font-size: 1.85rem !important; line-height: 1.2 !important; }
    .display-5 { font-size: 1.65rem !important; line-height: 1.22 !important; }
    .display-6 { font-size: 1.42rem !important; line-height: 1.25 !important; }

    /* Button full-width stacks in hero */
    .hero-section .d-flex.flex-wrap {
        flex-direction: column !important;
        width: 100% !important;
    }

    .hero-section .btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }

    /* Dashboard Map on Mobile */
    #leaflet-map {
        height: 380px !important;
        border-radius: 14px !important;
    }

    #picker-map {
        height: 220px !important;
    }

    /* Leaflet popup mobile optimization */
    .leaflet-popup-content-wrapper {
        max-width: 280px !important;
    }

    .map-legend {
        max-width: 190px !important;
        padding: 8px 10px !important;
        font-size: 10.5px !important;
    }

    /* Stat Cards */
    .stat-card {
        padding: 16px 14px !important;
        border-radius: 14px !important;
    }

    .stat-card h3 {
        font-size: 1.4rem !important;
    }

    .stat-card small {
        font-size: 11px !important;
    }

    /* Forms on Mobile (Prevent iOS Safari auto-zoom) */
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 11px 14px !important;
        border-radius: 10px !important;
    }

    .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }

    /* Filter Bar on Dashboard */
    .card-body.p-3 {
        padding: 16px !important;
    }

    #btn-reset-filter {
        margin-top: 8px !important;
    }

    /* Step Cards & Timeline */
    .step-card {
        padding: 18px 14px !important;
        margin-bottom: 10px;
    }

    /* Agri Card on Mobile */
    .agri-card {
        border-radius: 16px !important;
    }

    /* Accordion */
    .accordion-button {
        padding: 14px 16px !important;
        font-size: 0.92rem !important;
    }

    .accordion-body {
        padding: 14px 16px !important;
    }
}

/* 5. Responsive Rules for Small Screen Phones (< 576px) */
@media (max-width: 575.98px) {
    /* Navbar Brand Scaling for Perfect Mobile Fit */
    .navbar {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .navbar-brand {
        max-width: calc(100% - 54px) !important;
        display: flex !important;
        align-items: center !important;
    }

    .brand-logo-img {
        height: 38px !important;
        max-width: 40px !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }

    .brand-kicker {
        font-size: 0.52rem !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 1px !important;
    }

    .brand-title {
        font-size: 0.88rem !important;
        letter-spacing: -0.2px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .brand-subtitle {
        display: none !important;
    }

    .navbar-toggler {
        padding: 6px 8px !important;
        font-size: 1.1rem !important;
        border-radius: 8px !important;
    }

    /* Top Notice Bar on Small Phones */
    .top-notice-bar {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }

    .top-notice-bar .container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 4px !important;
    }

    .top-notice-bar .text-truncate {
        max-width: 100% !important;
        white-space: normal !important;
    }

    /* Action button stack in nav drawer */
    .nav-actions-group {
        flex-direction: column !important;
    }

    .nav-actions-group .nav-btn {
        width: 100% !important;
    }

    /* Custom Tables */
    .custom-table th,
    .custom-table td {
        font-size: 0.8rem !important;
        padding: 8px 10px !important;
    }

    /* Metric Cards in 2 columns */
    .col-6 .p-3.rounded-3 {
        padding: 12px 10px !important;
    }

    .col-6 strong.fs-4 {
        font-size: 1.25rem !important;
    }

    /* Form Usulan Buttons on Small Phones */
    #form-usulan .d-flex.justify-content-between {
        flex-direction: column-reverse !important;
        gap: 12px !important;
    }

    #form-usulan .btn {
        width: 100% !important;
        padding: 12px 20px !important;
    }

    .card.agri-card.p-4.p-md-5 {
        padding: 20px 16px !important;
    }

    /* Tracking Step Badges */
    .tracking-step-box {
        font-size: 10px !important;
        padding: 8px 4px !important;
    }
}

/* 6. Mobile Bottom Quick Navigation Bar (Touch-Friendly Native App Feel) */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -4px 20px rgba(12, 38, 55, 0.08);
    z-index: 1040;
    padding: 6px 12px env(safe-area-inset-bottom, 8px);
}

.mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
    min-width: 52px;
}

.mobile-nav-item i {
    font-size: 19px;
    margin-bottom: 2px;
    line-height: 1;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary) !important;
}

.mobile-nav-item.active i {
    color: var(--primary) !important;
    transform: scale(1.12);
}

/* ==============================================================================
   Government Portal Hero Banner & Slider (ala karantinaindonesia.go.id)
   ============================================================================== */
.hero-gov-carousel {
    position: relative;
    background-color: #081a26;
    overflow: hidden;
}

.hero-slide-item {
    position: relative;
    padding: 85px 0 75px;
    background-size: cover;
    background-position: center;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero-slide-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(8, 26, 38, 0.95) 0%, rgba(8, 26, 38, 0.88) 55%, rgba(8, 26, 38, 0.65) 100%);
    z-index: 1;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
}

.hero-carousel-btn {
    width: 46px;
    height: 46px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(12, 38, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    margin: 0 16px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    opacity: 0.85;
}

.hero-carousel-btn:hover {
    background: rgba(2, 132, 199, 0.95);
    border-color: #7dd3fc;
    opacity: 1;
}

.hero-gov-carousel .carousel-indicators {
    bottom: 12px;
    margin-bottom: 0;
    z-index: 5;
}

.hero-gov-carousel .carousel-indicators [data-bs-target] {
    width: 32px;
    height: 6px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.hero-gov-carousel .carousel-indicators .active {
    width: 50px;
    background-color: #ea580c;
}
