/* assets/css/style.css - Premium Agricultural Theme Stylesheet v2.0 */
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* ========================================
   🎨 Design Tokens & CSS Variables
   ======================================== */
:root {
    /* Primary Palette — Emerald Forest */
    --primary: #059669;
    --primary-dark: #047857;
    --primary-darker: #065f46;
    --primary-light: #10b981;
    --primary-lighter: #34d399;
    --primary-subtle: #d1fae5;

    /* Secondary — Teal Ocean */
    --secondary: #0d9488;
    --secondary-light: #14b8a6;
    --secondary-subtle: #ccfbf1;

    /* Accent — Warm Gold */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    --accent-subtle: #fef3c7;

    /* Accent 2 — Indigo (for variety) */
    --indigo: #6366f1;
    --indigo-light: #818cf8;
    --indigo-subtle: #e0e7ff;

    /* Accent 3 — Rose (for warnings/danger) */
    --rose: #f43f5e;
    --rose-light: #fb7185;
    --rose-subtle: #ffe4e6;

    /* Neutrals */
    --bg-body: #f0fdf4;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(5, 150, 105, 0.25);

    /* Typography */
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Sarabun', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 16px rgba(5, 150, 105, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(5, 150, 105, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 60px rgba(5, 150, 105, 0.15), 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.15);

    /* Transitions */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* ========================================
   🌐 Global Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* Subtle animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(13, 148, 136, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: var(--font-heading);
}

h1, h2, h3 {
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    transition: color 0.2s var(--ease-smooth);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* Selection color */
::selection {
    background: var(--primary-subtle);
    color: var(--primary-darker);
}

/* ========================================
   🧭 Navigation Bar
   ======================================== */
.navbar-premium {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
    padding: 0.6rem 1.5rem;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    z-index: 100;
}

/* Gradient accent line under navbar */
.navbar-premium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--primary) 0%,
        var(--secondary-light) 25%,
        var(--accent) 50%,
        var(--indigo-light) 75%,
        var(--primary) 100%
    );
    background-size: 200% 100%;
    animation: gradientSlide 6s linear infinite;
    opacity: 0.7;
}

@keyframes gradientSlide {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.navbar-premium .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-dark) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s var(--ease-smooth);
}

.navbar-premium .navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transition: all 0.3s var(--ease-spring);
}

.navbar-brand:hover .brand-icon {
    transform: rotate(10deg) scale(1.05);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.navbar-premium .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-smooth);
    position: relative;
    white-space: nowrap;
}

.navbar-premium .nav-link:hover {
    color: var(--primary) !important;
    background: rgba(5, 150, 105, 0.06);
    transform: translateY(-1px);
}

.navbar-premium .nav-link.active {
    color: var(--primary) !important;
    background: rgba(5, 150, 105, 0.08);
    font-weight: 600;
}

/* Active indicator dot */
.navbar-premium .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

/* Dropdown menu premium */
.navbar-premium .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    animation: dropdownFadeIn 0.25s var(--ease-smooth);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.navbar-premium .dropdown-item {
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-smooth);
    font-size: 0.9rem;
}

.navbar-premium .dropdown-item:hover {
    background: var(--primary-subtle);
    transform: translateX(4px);
}

/* User badge in navbar */
.navbar-user-badge {
    background: linear-gradient(135deg, var(--primary-subtle), rgba(209, 250, 229, 0.5));
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.navbar-premium .btn {
    white-space: nowrap;
}

.navbar-premium .navbar-nav {
    gap: 0.2rem;
}

/* ========================================
   🔘 Premium Buttons
   ======================================== */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
    transition: all 0.3s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff !important;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:active {
    transform: translateY(-1px);
}

.btn-premium i {
    transition: transform 0.3s var(--ease-spring);
}

.btn-premium:hover i {
    transform: scale(1.15);
}

.btn-premium-outline {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s var(--ease-spring);
}

.btn-premium-outline:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.25);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-dark) 100%);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
    transition: all 0.3s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.4);
    color: #fff !important;
}

.btn-gold:hover::before {
    left: 100%;
}

/* ========================================
   🃏 Premium Cards
   ======================================== */
.card-premium {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-smooth);
    overflow: hidden;
    position: relative;
}

/* Gradient border effect on hover */
.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, rgba(16, 185, 129, 0.3) 60%, rgba(99, 102, 241, 0.15) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
    pointer-events: none;
}

.card-premium:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card-premium:hover::before {
    opacity: 1;
}

.card-premium .card-header {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.04) 0%, rgba(13, 148, 136, 0.02) 100%);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    padding: 1.1rem 1.4rem;
}

.card-premium .card-body {
    padding: 1.4rem;
}

/* ========================================
   🦸 Hero Section
   ======================================== */
.hero-section {
    background:
        linear-gradient(135deg, rgba(5, 150, 105, 0.92) 0%, rgba(4, 120, 87, 0.88) 40%, rgba(6, 95, 70, 0.95) 100%),
        url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?auto=format&fit=crop&q=80&w=1200') no-repeat center center/cover;
    color: white;
    padding: 5rem 2rem 6rem;
    border-radius: 0 0 40px 40px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(5, 150, 105, 0.2);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Decorative floating shapes */
.hero-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    top: -80px;
    right: -60px;
    animation: floatShape 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    bottom: -40px;
    left: -30px;
    animation: floatShape 10s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(15px, -20px) scale(1.05); }
    50% { transform: translate(-10px, 10px) scale(0.95); }
    75% { transform: translate(20px, 15px) scale(1.02); }
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.15rem;
    max-width: 750px;
    margin: 0 auto 2rem auto;
    opacity: 0.92;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.hero-section .btn {
    position: relative;
    z-index: 1;
}

/* ========================================
   📊 Stat Cards & Icon Containers
   ======================================== */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.35s var(--ease-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-spring);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon-emerald {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.stat-icon-teal {
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
    color: white;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}

.stat-icon-gold {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.stat-icon-indigo {
    background: linear-gradient(135deg, var(--indigo-light), var(--indigo));
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.stat-icon-rose {
    background: linear-gradient(135deg, var(--rose-light), var(--rose));
    color: white;
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
}

/* Inline icon circle for feature cards */
.icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: all 0.35s var(--ease-spring);
}

.card-premium:hover .icon-circle {
    transform: translateY(-4px) scale(1.08);
}

.icon-circle-emerald {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.15);
}

.icon-circle-teal {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: var(--secondary);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
}

.icon-circle-gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--accent-dark);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

.icon-circle-indigo {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: var(--indigo);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.icon-circle-rose {
    background: linear-gradient(135deg, #ffe4e6, #fecdd3);
    color: var(--rose);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.15);
}

/* Feature card colored top accent border */
.card-accent-emerald { border-top: 4px solid var(--primary-light); }
.card-accent-teal { border-top: 4px solid var(--secondary-light); }
.card-accent-gold { border-top: 4px solid var(--accent); }
.card-accent-indigo { border-top: 4px solid var(--indigo-light); }
.card-accent-rose { border-top: 4px solid var(--rose-light); }

/* ========================================
   ⏱ Timelines for Crop Rotation
   ======================================== */
.timeline-rotation {
    position: relative;
    padding: 1rem 0;
}

.timeline-rotation::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-light), var(--secondary), var(--accent));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    position: absolute;
    left: 8px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s var(--ease-spring);
}

.timeline-badge.active {
    background: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-item:hover .timeline-badge {
    transform: scale(1.2);
}

.timeline-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-smooth);
}

.timeline-panel:hover {
    box-shadow: var(--shadow-md);
}

/* ========================================
   📝 Form Styling
   ======================================== */
.form-control-premium {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-smooth);
    background: rgba(255, 255, 255, 0.8);
}

.form-control-premium:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    outline: none;
    background: #fff;
}

.form-control-premium:hover:not(:focus) {
    border-color: #d1d5db;
}

.form-label-premium {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-select-premium {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.3s var(--ease-smooth);
}

.form-select-premium:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    outline: none;
}

/* ========================================
   💬 Chatbot Floating Widget
   ======================================== */
.chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.35);
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    position: relative;
    border: none;
}

/* Pulsing ring animation */
.chatbot-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: chatPulse 2s ease-out infinite;
}

.chatbot-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: chatPulse 2s ease-out infinite 0.5s;
}

@keyframes chatPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.chatbot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(5, 150, 105, 0.45);
}

.chatbot-btn:hover::before,
.chatbot-btn:hover::after {
    animation: none;
}

.chatbot-container {
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(5, 150, 105, 0.1);
    display: none;
    flex-direction: column;
    margin-bottom: 15px;
    overflow: hidden;
    animation: slideUp 0.35s var(--ease-spring) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-darker) 100%);
    color: #fff;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: linear-gradient(180deg, #f0fdf4 0%, #f8fafb 100%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: bubbleIn 0.3s var(--ease-spring);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble-bot {
    background: #fff;
    color: var(--text-primary);
    align-self: flex-start;
    border-top-left-radius: 4px;
    border: 1px solid rgba(5, 150, 105, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-bubble-user {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    align-self: flex-end;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.chatbot-input-area {
    padding: 0.8rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    background: #fff;
}

.chatbot-input-area input {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-full);
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    transition: all 0.3s var(--ease-smooth);
    font-family: var(--font-body);
}

.chatbot-input-area input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chatbot-input-area button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s var(--ease-spring);
    flex-shrink: 0;
}

.chatbot-input-area button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: scale(1.08);
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.quick-q-btn {
    font-size: 0.78rem;
    font-family: var(--font-body);
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--primary-dark);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    font-weight: 500;
}

.quick-q-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

/* ========================================
   🦶 Footer Section
   ======================================== */
.footer-wave {
    position: relative;
    margin-top: auto;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

footer {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: #94a3b8;
    padding: 2.5rem 1.5rem 2rem;
    margin-top: 0;
    border-top: none;
    position: relative;
}

footer h5 {
    color: #f1f5f9 !important;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.25s var(--ease-smooth);
    font-weight: 500;
}

footer a:hover {
    color: var(--primary-light);
    transform: translateX(2px);
}

footer .footer-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-smooth);
}

footer .footer-link-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

footer hr {
    border-color: rgba(148, 163, 184, 0.15) !important;
}

footer .footer-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ========================================
   📏 Soil Gauge Meter
   ======================================== */
.soil-gauge-container {
    width: 100%;
    background: #e5e7eb;
    height: 12px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 1rem 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.soil-gauge-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    transition: width 1.2s var(--ease-smooth);
    border-radius: var(--radius-full);
}

/* ========================================
   📊 Premium Tables
   ======================================== */
.table-premium {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.table-premium th {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.06) 0%, rgba(13, 148, 136, 0.03) 100%);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    border-bottom: 2px solid var(--border) !important;
}

.table-premium tbody tr {
    transition: all 0.2s var(--ease-smooth);
}

.table-premium tbody tr:hover {
    background: rgba(5, 150, 105, 0.03);
}

/* ========================================
   🏷️ Badges
   ======================================== */
.badge-custom {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-soil-type {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.1);
}

.badge-soil-problem {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.badge-crop {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.1);
}

/* ========================================
   🖱 Clickable Crop Cards Hover Effects
   ======================================== */
.clickable-crop-card {
    transition: all 0.35s var(--ease-smooth) !important;
    cursor: pointer;
}

.clickable-crop-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-light) !important;
}

/* Timeline Panel Clickable state */
.timeline-panel.clickable-crop-card {
    border-left: 4px solid var(--border);
    transition: all 0.3s var(--ease-smooth);
}

.timeline-panel.clickable-crop-card:hover {
    border-left-color: var(--primary-light) !important;
    background-color: rgba(16, 185, 129, 0.02) !important;
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   🎭 CTA Section
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--secondary-subtle) 100%);
    border: 1px solid rgba(5, 150, 105, 0.12);
    border-radius: var(--radius-xl);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
    top: -60px;
    right: -40px;
}

/* ========================================
   🖼 Login Page Split Layout
   ======================================== */
.login-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    max-width: 480px;
    width: 100%;
    position: relative;
}

.login-card .card-premium {
    position: relative;
    z-index: 1;
}

/* Decorative shapes behind login card */
.login-decoration {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.login-decoration-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(13, 148, 136, 0.1));
    top: -30px;
    right: -30px;
    animation: floatShape 6s ease-in-out infinite;
}

.login-decoration-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(129, 140, 248, 0.08));
    bottom: -20px;
    left: -20px;
    animation: floatShape 8s ease-in-out infinite reverse;
}

.login-decoration-3 {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    top: 50%;
    left: -35px;
    animation: floatShape 7s ease-in-out infinite 1s;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
}

/* ========================================
   📊 Dashboard Specific
   ======================================== */
.dashboard-stat-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.35s var(--ease-smooth);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Plot card image overlay */
.plot-image-wrapper {
    position: relative;
    overflow: hidden;
}

.plot-image-wrapper img {
    transition: transform 0.5s var(--ease-smooth);
}

.plot-image-wrapper:hover img {
    transform: scale(1.08);
}

.plot-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
}

/* Empty state */
.empty-state-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ========================================
   🔄 Utility Animations
   ======================================== */
.fade-in-up {
    animation: fadeInUp 0.6s var(--ease-smooth) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up-delay-1 { animation-delay: 0.1s; }
.fade-in-up-delay-2 { animation-delay: 0.2s; }
.fade-in-up-delay-3 { animation-delay: 0.3s; }
.fade-in-up-delay-4 { animation-delay: 0.4s; }

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(90deg, transparent 33%, rgba(255,255,255,0.3) 50%, transparent 66%);
    background-size: 300% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ========================================
   📱 Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3.5rem 1.5rem 4rem;
        border-radius: 0 0 24px 24px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .chatbot-container {
        width: calc(100vw - 30px);
        height: 70vh;
        right: 0;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .navbar-premium .navbar-brand .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

/* ========================================
   🖨️ Print Stylesheet for clean A4 printing
   ======================================== */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }

    body::before {
        display: none !important;
    }

    .navbar-premium,
    .chatbot-widget,
    .btn,
    .btn-premium,
    .btn-premium-outline,
    .dropdown,
    .dropdown-menu,
    footer,
    .footer-wave,
    .btn-close,
    .alert {
        display: none !important;
    }

    .container, .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card-premium {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        background: #fff !important;
        backdrop-filter: none !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid;
    }

    .card-premium::before {
        display: none !important;
    }

    .bg-light, .bg-success, .bg-opacity-10, .bg-danger, .bg-opacity-5 {
        background-color: #f8f9fa !important;
        color: #000 !important;
        border-color: #ccc !important;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #047857 !important;
        page-break-after: avoid;
    }

    .timeline-rotation::before {
        background: #047857 !important;
    }

    .timeline-panel {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .badge-custom {
        border: 1px solid #ccc !important;
        background: #fff !important;
        color: #000 !important;
    }
}
