/**
 * 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: #15803d;          /* Deep Emerald Paddy Green */
    --primary-dark: #0f5125;
    --primary-light: #f0fdf4;
    --primary-border: #86efac;
    --golden-harvest: #eab308;   /* Ripe Golden Rice Accent */
    --golden-dark: #854d0e;
    --water-blue: #0284c7;       /* Irrigation Canal Blue */
    --water-light: #e0f2fe;
    --soil-dark: #0f172a;        /* Deep Fertile Soil / Dark Slate */
    --soil-medium: #334155;
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-main: #0f172a;
    --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;
}

/* 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, #15803d 0%, #166534 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    margin-right: 14px;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.22);
}

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

.brand-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #15803d, #166534);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 9999px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.brand-subtitle {
    font-size: 10.5px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.25;
    margin-top: 3px;
    letter-spacing: -0.15px;
    display: block;
}

.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: #f0fdf4;
}

/* 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: #15803d;
    border: 1.5px solid #15803d;
}

.nav-btn-outline:hover,
.nav-btn-outline:focus {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #166534;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.15);
}

.nav-btn-solid {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #ffffff !important;
    border: 1.5px solid #15803d;
    box-shadow: 0 3px 10px rgba(21, 128, 61, 0.25);
}

.nav-btn-solid:hover,
.nav-btn-solid:focus {
    background: linear-gradient(135deg, #14532d 0%, #0f5125 100%);
    border-color: #14532d;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(21, 128, 61, 0.38);
    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, #064e3b 0%, #065f46 60%, #047857 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: #bbf7d0;
    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, #064e3b 0%, #065f46 50%, #047857 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(0, 0, 0, 0.45);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 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(0, 0, 0, 0.15);
    color: var(--text-main);
}

/* Agricultural Cards */
.agri-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 26px;
    height: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
.agri-card:hover {
    border-color: #86efac;
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(21, 128, 61, 0.08);
}
.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(0, 0, 0, 0.08);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #15803d, #166534);
    border: 1px solid #15803d;
    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, #14532d, #0f5125);
    border-color: #14532d;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(21, 128, 61, 0.35);
}

.btn-secondary-custom {
    background: #ffffff;
    color: #0f172a !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: #0f172a !important;
}

.btn-outline-dark-custom {
    background: transparent;
    color: #0f172a !important;
    border: 1px solid #0f172a;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.88rem;
}
.btn-outline-dark-custom:hover {
    background: #0f172a;
    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: #0f172a !important;
}

/* Badges */
.badge-soft-success {
    background-color: #dcfce7 !important;
    color: #14532d !important;
    border: 1px solid #86efac;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}
.badge-soft-warning {
    background-color: #fef3c7 !important;
    color: #78350f !important;
    border: 1px solid #fcd34d;
    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: #0f172a !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: #15803d;
    box-shadow: 0 8px 20px rgba(21, 128, 61, 0.1);
}
.step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #15803d;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

/* Form Controls */
.form-control, .form-select {
    color: #0f172a !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: #15803d;
    box-shadow: 0 0 0 0.25rem rgba(21, 128, 61, 0.18);
    color: #0f172a !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: #0f172a !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: #0f172a;
}
.map-popup-header {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    border-bottom: 2px solid #15803d;
}
.map-popup-header h6 {
    color: #ffffff !important;
    font-weight: 700;
}
.map-popup-body {
    padding: 14px 16px;
    background: #ffffff;
    color: #0f172a;
}
.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: #0f172a;
    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: #0a1120;
    color: #cbd5e1;
    padding: 70px 0 30px;
}
footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: #4ade80;
}
