/* =========================================
   BOVICARE — Global Stylesheet
   ========================================= */
:root {
    --primary: #0D8ABC;
    --primary-dark: #096a92;
    --primary-light: rgba(13, 138, 188, 0.1);
    --secondary: #10b981;
    --secondary-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-700: #374151;
    --gray-900: #111827;
    --font-family: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); color: var(--gray-900); line-height: 1.6; background: #fff; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Utilities ─────────────────────────── */
.text-green { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-gray { color: var(--gray-700); }
.text-dark { color: var(--gray-900); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.bg-light { background-color: var(--gray-50); }
.font-bold { font-weight: 700; }
.w-100 { width: 100%; }
.ml-auto { margin-left: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--gray-900);
}
.grad-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
section .section-label { display: block; text-align: center; }

/* ── Navbar ─────────────────────────────── */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; position: fixed; top: 0; width: 100%;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    z-index: 900; box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.logo {
    font-size: 1.5rem; font-weight: 800; color: var(--primary);
    display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.5px;
}
.nav-links { list-style: none; display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-weight: 500; transition: color 0.2s; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--primary); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active-nav::after { width: 100%; }
.nav-links a:hover, .nav-links a.active-nav { color: var(--primary); }
.btn-login {
    background: var(--primary); color: white; border: none;
    padding: 0.55rem 1.3rem; border-radius: 999px; font-weight: 600;
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 0.4rem;
    font-family: inherit; font-size: 0.9rem;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.25rem; color: var(--gray-900); cursor: pointer; }

/* ── Hero ───────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    position: relative; padding: 7rem 0 4rem;
    background:
        url('https://images.unsplash.com/photo-1548550023-2bdb3c5beed7?w=1600&q=80')
        center 60% / cover no-repeat;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        110deg,
        rgba(5, 40, 60, 0.88) 0%,
        rgba(13, 138, 188, 0.78) 45%,
        rgba(16, 185, 129, 0.45) 100%
    );
}

/* ── Hero flex wrap (text left | diagram right) ── */
.hero-flex-wrap {
    position: relative; z-index: 2;
    max-width: 1280px; width: 100%; margin: 0 auto;
    padding: 0 3rem;
    display: flex; align-items: center;
    gap: 3.5rem;
}

/* ── Hero Text (left) ── */
.hero-content {
    flex: 1; color: white; min-width: 0;
    animation: fadeInUp 0.9s ease both;
}
.hero-content .badge {
    background: rgba(255,255,255,0.18); padding: 0.5rem 1.1rem;
    border-radius: 999px; font-size: 0.82rem; font-weight: 600;
    margin-bottom: 1.75rem; display: inline-flex; align-items: center; gap: 0.5rem;
    backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.3);
}
.hero-content h1 {
    font-size: 3.8rem; margin-bottom: 1.25rem;
    line-height: 1.07; font-weight: 800;
}
.hero-content .highlight { color: #bbf7d0; }
.hero-content p {
    font-size: 1.05rem; margin-bottom: 2.25rem; opacity: 0.92; line-height: 1.8;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll-hint {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    color: white; opacity: 0.65; font-size: 1.2rem; z-index: 2;
    animation: bounce 2s infinite;
}
.btn-ghost {
    background: rgba(255,255,255,0.14); color: white;
    border: 1.5px solid rgba(255,255,255,0.55);
    padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: inherit; font-size: 1rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); }

/* ════════════════════════════════════════
   IoT Diagram Panel (right side of hero)
   ════════════════════════════════════════ */
.hero-iot-panel {
    flex: 0 0 380px; width: 380px;
    animation: fadeInUp 1.1s ease 0.25s both;
}

.iot-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 24px 48px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    color: white;
}

/* Card header bar */
.iot-card-header {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; opacity: 0.85;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.iot-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.7);
    animation: live-pulse 1.5s infinite;
    flex-shrink: 0;
}
.iot-time { margin-left: auto; font-family: monospace; font-size: 0.72rem; }

/* ── Cows Row ── */
.iot-field-row {
    display: flex; justify-content: space-around;
    gap: 0.25rem; margin-bottom: 0.25rem;
}
.iot-cow {
    display: flex; flex-direction: column; align-items: center; gap: 0; position: relative;
}
.iot-cow-body { position: relative; }
.cow-svg { width: 72px; height: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4)); }

/* Signal rings above each cow */
.iot-signal-wrap {
    position: absolute; top: -4px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    pointer-events: none;
}
.iot-signal-ring {
    position: absolute; border-radius: 50%; border: 1.5px solid;
    animation: signal-expand 2s ease-out infinite;
    pointer-events: none;
}
.iot-signal-ring.r1 { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
.iot-signal-ring.r2 { width: 32px; height: 32px; margin: -16px 0 0 -16px; animation-delay: .4s; }
.iot-signal-ring.r3 { width: 46px; height: 46px; margin: -23px 0 0 -23px; animation-delay: .8s; }
.normal-ring  { border-color: rgba(16, 185, 129, 0.7); }
.heat-ring    { border-color: rgba(245, 158, 11, 0.7); }
.urgent-ring  { border-color: rgba(239, 68, 68, 0.7); }

/* Status label under each cow */
.iot-status-label {
    font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; margin-top: 4px; padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.normal-lbl { background: rgba(16,185,129,0.25); color: #6ee7b7; }
.heat-lbl   { background: rgba(245,158,11,0.25); color: #fcd34d; }
.urgent-lbl { background: rgba(239,68,68,0.3); color: #fca5a5; animation: urgent-flash 0.9s infinite; }

/* ── Converging SVG lines ── */
.iot-flow-row { display: flex; flex-direction: column; align-items: center; }
.converge-svg { width: 100%; height: 40px; margin-bottom: -2px; }

/* ── Node boxes (Base Station / Cloud) ── */
.iot-node-box {
    display: flex; align-items: center; gap: 0.75rem;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px; padding: 0.6rem 1rem;
    width: 100%; position: relative;
    backdrop-filter: blur(4px);
}
.station-box { margin-bottom: 0; }
.cloud-box   { margin: 0; }
.iot-node-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.station-icon { background: rgba(16,185,129,0.25); color: #6ee7b7; }
.cloud-icon   { background: rgba(96,165,250,0.25); color: #93c5fd; }
.iot-node-label { display: flex; flex-direction: column; gap: 0.1rem; }
.iot-node-label strong { font-size: 0.82rem; font-weight: 700; }
.iot-node-label span   { font-size: 0.68rem; opacity: 0.7; }
.iot-node-dot { position: absolute; right: 1rem; width: 10px; height: 10px; border-radius: 50%; }
.green-dot { background: #10b981; box-shadow: 0 0 8px #10b981; }
.blue-dot  { background: #60a5fa; }
.pulse-dot { animation: live-pulse 1.5s infinite; }

/* ── Vertical flow SVG ── */
.iot-vertical-flow {
    display: flex; justify-content: center; padding: 0.15rem 0;
}
.vert-svg { width: 20px; height: 36px; }

/* ── Branch SVG ── */
.iot-branch-flow {
    display: flex; justify-content: center; padding: 0.1rem 0;
}
.branch-svg { width: 260px; height: 32px; }

/* ── Devices Row ── */
.iot-devices-row {
    display: flex; justify-content: space-around; gap: 0.5rem;
    margin-top: 0;
}
.iot-device-box {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px; padding: 0.65rem 0.85rem;
    flex: 1; position: relative;
}
.iot-device-icon { position: relative; display: flex; align-items: center; justify-content: center; }
.device-alert-badge {
    position: absolute; top: -6px; right: -8px;
    width: 18px; height: 18px; border-radius: 50%;
    font-size: 0.65rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid rgba(255,255,255,0.3);
}
.urgent-badge { background: #ef4444; color: white; animation: notif-pop 1s infinite; }
.info-badge   { background: #0D8ABC; color: white; }
.device-label { text-align: center; }
.device-label strong { font-size: 0.78rem; font-weight: 700; display: block; }
.device-label span   { font-size: 0.65rem; opacity: 0.7; }

/* ════════════════════════════════════════
   Hero-specific @keyframes
   ════════════════════════════════════════ */
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
@keyframes signal-expand {
    0%   { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(2.8); opacity: 0; }
}
@keyframes urgent-flash {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}
@keyframes notif-pop {
    0%, 100% { transform: scale(1); }
    40%      { transform: scale(1.3); }
}

/* ── Hero Responsive ── */
@media (max-width: 1080px) {
    .hero-flex-wrap { padding: 0 2rem; gap: 2.5rem; }
    .hero-iot-panel { flex: 0 0 340px; width: 340px; }
    .hero-content h1 { font-size: 3.2rem; }
    .cow-svg { width: 60px; }
}
@media (max-width: 860px) {
    .hero { padding: 6rem 0 3rem; }
    .hero-flex-wrap { flex-direction: column; align-items: center; text-align: center; padding: 0 1.5rem; }
    .hero-content { order: 1; }
    .hero-cta { justify-content: center; }
    .hero-iot-panel { flex: none; width: 100%; max-width: 420px; order: 2; }
    .hero-content h1 { font-size: 2.6rem; }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .cow-svg { width: 52px; }
    .hero-iot-panel { max-width: 100%; }
}

/* ── Buttons ────────────────────────────── */
.btn-primary {
    background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem;
    border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 0.5rem; font-family: inherit; font-size: 1rem;
}
.btn-primary.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline {
    background: transparent; color: var(--gray-700); border: 1px solid var(--gray-200);
    padding: 0.5rem 1rem; border-radius: 6px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: inherit; font-size: 0.9rem;
}
.btn-outline:hover, .btn-outline.active { background: var(--gray-100); border-color: var(--gray-700); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* ── Stats Ticker ───────────────────────── */
.stats-ticker { background: var(--primary); padding: 3rem 0; }
.ticker-inner {
    max-width: 900px; margin: 0 auto; display: flex;
    justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 2rem;
    padding: 0 2rem;
}
.ticker-item { text-align: center; color: white; }
.ticker-item h2 { font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 0.25rem; }
.ticker-item p { font-size: 0.9rem; opacity: 0.85; font-weight: 500; letter-spacing: 0.05em; }
.ticker-divider { width: 1px; height: 60px; background: rgba(255,255,255,0.3); }

/* ── Two-Col Layout ─────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.image-content { height: 420px; border-radius: 24px; box-shadow: var(--shadow-xl); position: relative; overflow: hidden; }
.bg-placeholder1 { background: url('https://images.unsplash.com/photo-1516467508483-a7212febe31a?w=800&q=80') center/cover; }
.bg-placeholder2 { background: url('https://images.unsplash.com/photo-1500595046743-cd271d694d30?w=800&q=80') center/cover; }
.image-badge-overlay { position: absolute; bottom: 1.5rem; left: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.img-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white; color: var(--primary); padding: 0.5rem 1rem;
    border-radius: 999px; font-weight: 700; font-size: 0.85rem;
    box-shadow: var(--shadow-md);
}
.img-badge.secondary { color: var(--secondary); }
.text-content h3 { font-size: 2.2rem; margin-bottom: 1.5rem; line-height: 1.2; }
.text-content p { font-size: 1.05rem; color: var(--gray-700); margin-bottom: 1.25rem; }
.feature-list { list-style: none; margin-top: 1.5rem; }
.feature-list li { margin-bottom: 0.85rem; font-size: 1rem; display: flex; align-items: center; gap: 0.75rem; }

/* ── Product Cards ──────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.card {
    background: white; padding: 2.5rem 2rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--gray-100); position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.card.featured { border: 2px solid var(--primary); }
.card-icon-wrapper {
    width: 64px; height: 64px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
}
.product-1 { background: rgba(13,138,188,0.12); }
.product-2 { background: rgba(16,185,129,0.12); }
.product-3 { background: rgba(139,92,246,0.12); }
.product-1 .card-icon { font-size: 1.75rem; color: var(--primary); }
.product-2 .card-icon { font-size: 1.75rem; color: var(--secondary); }
.product-3 .card-icon { font-size: 1.75rem; color: #7c3aed; }
.product-tag {
    display: inline-block; background: var(--primary-light); color: var(--primary);
    font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem;
    border-radius: 999px; letter-spacing: 0.05em; margin-bottom: 0.75rem;
    text-transform: uppercase;
}
.product-tag.new { background: rgba(16,185,129,0.1); color: var(--secondary); }
.product-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.product-card p { color: var(--gray-700); font-size: 0.95rem; margin-bottom: 1.25rem; }
.card-feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.card-feature-list li { font-size: 0.875rem; color: var(--gray-700); display: flex; align-items: center; gap: 0.5rem; }
.card-feature-list i { color: var(--primary); width: 14px; }

/* ── How It Works ───────────────────────── */
.how-it-works { background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%); }
.how-it-works .section-title { text-align: center; }
.steps-grid {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; flex-wrap: wrap;
}
.step-item {
    text-align: center; padding: 2rem 1.5rem; flex: 1; min-width: 180px; max-width: 220px;
}
.step-num { font-size: 3rem; font-weight: 800; color: var(--primary); opacity: 0.15; line-height: 1; }
.step-icon {
    width: 64px; height: 64px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    color: white; margin: -1rem auto 1rem;
}
.step-item h4 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.step-item p { font-size: 0.9rem; color: var(--gray-700); }
.step-arrow { font-size: 1.5rem; color: var(--gray-200); align-self: center; margin-top: -1rem; }

/* ── Support ────────────────────────────── */
.support-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.support-item { text-align: center; padding: 2rem 1.5rem; }
.support-icon-wrap {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(16,185,129,0.1); display: flex; align-items: center;
    justify-content: center; margin: 0 auto 1.25rem;
}
.support-icon { font-size: 2rem; color: var(--secondary); }
.support-item h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.support-item p { color: var(--gray-700); font-size: 0.95rem; }

/* ── ESG ────────────────────────────────── */
.esg-item { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; align-items: flex-start; }
.esg-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.esg-e { background: rgba(16,185,129,0.1); color: var(--secondary); }
.esg-s { background: rgba(239,68,68,0.1); color: var(--danger); }
.esg-g { background: rgba(13,138,188,0.1); color: var(--primary); }
.esg-item strong { display: block; font-size: 1rem; margin-bottom: 0.35rem; }
.esg-item p { margin: 0; font-size: 0.95rem; color: var(--gray-700); }

/* ── Testimonials ───────────────────────── */
.testimonials-section { background: var(--gray-50); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.testimonial-card {
    background: white; border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow-md); border: 1px solid var(--gray-100);
}
.stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: 1rem; letter-spacing: 2px; }
.testimonial-card p { font-size: 1rem; color: var(--gray-700); font-style: italic; margin-bottom: 1.5rem; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 0.95rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--gray-400); }

/* ── Partners ───────────────────────────── */
.partners-section { padding: 3rem 0; border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); background: white; }
.partners-label { text-align: center; color: var(--gray-400); font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem; letter-spacing: 0.05em; text-transform: uppercase; }
.partners-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2.5rem; }
.partner-logo {
    font-weight: 700; color: var(--gray-400); font-size: 0.95rem;
    letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.2s;
    white-space: nowrap;
}
.partner-logo:hover { color: var(--primary); }

/* ── Modal ──────────────────────────────── */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
    z-index: 1000; align-items: center; justify-content: center; padding: 1rem;
}
.modal.show { display: flex; animation: fadeIn 0.25s; }
.modal-content {
    background: white; padding: 2.5rem; border-radius: var(--radius-lg);
    width: 100%; max-width: 460px; box-shadow: var(--shadow-xl);
    position: relative; animation: slideUp 0.3s;
}
.modal-content.modal-lg { max-width: 620px; }
.close-btn { position: absolute; top: 1.25rem; right: 1.25rem; font-size: 1.5rem; cursor: pointer; color: var(--gray-400); line-height: 1; transition: color 0.2s; }
.close-btn:hover { color: var(--gray-900); }
.modal-logo {
    width: 64px; height: 64px; background: var(--primary-light); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; color: var(--primary); margin: 0 auto 1rem;
}
.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-header h2 { font-size: 1.6rem; color: var(--gray-900); }
.modal-header p { color: var(--gray-700); margin-top: 0.3rem; font-size: 0.95rem; }
.demo-hint {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 0.75rem 1rem; font-size: 0.875rem; color: #1e40af;
    display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem;
}
.input-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.input-group label { font-weight: 600; font-size: 0.85rem; color: var(--gray-700); display: flex; align-items: center; gap: 0.4rem; }
.input-icon-wrap { position: relative; }
.flag-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.9rem; }
.input-icon-wrap input {
    width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1.5px solid var(--gray-200); border-radius: 8px;
    font-family: inherit; font-size: 0.95rem; transition: 0.2s;
}
.input-icon-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,138,188,0.12); }
.toggle-pw {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 0.9rem;
}
.toggle-pw:hover { color: var(--gray-700); }
.btn-login-submit { justify-content: center; font-size: 1rem; margin-top: 0.5rem; padding: 0.85rem; }
.login-error {
    background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c;
    border-radius: 8px; padding: 0.65rem 1rem; font-size: 0.875rem;
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}
.modal-footer-note { text-align: center; font-size: 0.875rem; color: var(--gray-400); margin-top: 1rem; }
.modal-footer-note a { color: var(--primary); font-weight: 600; }

/* ── Footer ─────────────────────────────── */
.site-footer { background: var(--gray-900); color: #d1d5db; padding: 4rem 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-logo { font-size: 1.5rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: #9ca3af; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center; color: #9ca3af;
    transition: all 0.2s; font-size: 0.9rem;
}
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.footer-col h5 { color: white; font-weight: 700; font-size: 1rem; margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { color: #9ca3af; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08); padding: 1.5rem 0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.85rem; color: #6b7280; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: #6b7280; transition: color 0.2s; }
.footer-links a:hover { color: white; }

/* ──────────────────────────────────────────
   DASHBOARD STYLES
   ────────────────────────────────────────── */
.dashboard-body { background: var(--gray-50); display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 260px; background: white; border-right: 1px solid var(--gray-100);
    display: flex; flex-direction: column; flex-shrink: 0; z-index: 50; overflow-y: auto;
}
.sidebar-logo {
    padding: 1.5rem; font-size: 1.4rem; font-weight: 800; color: var(--primary);
    border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; gap: 0.5rem;
    letter-spacing: -0.5px;
}
.sidebar-section-label {
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--gray-400);
}
.sidebar-menu { list-style: none; padding: 0.25rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 0.875rem;
    border-radius: 8px; color: var(--gray-700); font-weight: 500; font-size: 0.9rem; transition: all 0.2s;
}
.sidebar-menu a:hover, .sidebar-menu li.active a {
    background: var(--primary-light); color: var(--primary); font-weight: 600;
}
.sidebar-menu a i { width: 18px; text-align: center; }
.sidebar-bottom { padding: 1.5rem; border-top: 1px solid var(--gray-100); margin-top: auto; }
.logout-btn { display: flex; align-items: center; gap: 0.75rem; color: var(--danger); font-weight: 600; font-size: 0.9rem; transition: opacity 0.2s; }
.logout-btn:hover { opacity: 0.7; }

/* Main Content */
.main-content { flex: 1; padding: 2rem 2.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; }

/* Dash Header */
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.dash-header h1 { font-size: 1.6rem; }
.subtitle { font-size: 0.875rem; margin-top: 0.2rem; }
.header-right { display: flex; align-items: center; gap: 1.25rem; }
.search-bar {
    position: relative; background: white; border: 1.5px solid var(--gray-200);
    border-radius: 999px; padding: 0.5rem 1rem 0.5rem 2.5rem;
    display: flex; align-items: center; width: 260px; transition: 0.2s;
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-bar i { position: absolute; left: 1rem; color: var(--gray-400); font-size: 0.9rem; }
.search-bar input { border: none; outline: none; background: transparent; width: 100%; font-family: inherit; font-size: 0.9rem; }
.notification-icon { position: relative; font-size: 1.2rem; color: var(--gray-700); cursor: pointer; }
.badge-dot { position: absolute; top: -2px; right: -4px; width: 10px; height: 10px; background: var(--danger); border-radius: 50%; border: 2px solid var(--gray-50); }
.user-profile { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.avatar img { width: 36px; height: 36px; border-radius: 50%; }

/* Alert Banner */
.alert-banner {
    background: #fee2e2; border: 1px solid #fca5a5; border-radius: 10px;
    padding: 0.875rem 1.25rem; display: flex; align-items: center; gap: 0.75rem;
    color: #991b1b; font-weight: 500; font-size: 0.9rem;
}
.alert-banner i { font-size: 1.1rem; color: var(--danger); flex-shrink: 0; }
.alert-close { margin-left: auto; background: none; border: none; color: #991b1b; font-size: 1.25rem; cursor: pointer; line-height: 1; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.stat-card {
    background: white; border-radius: var(--radius); padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1.25rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.stat-urgent { border-left: 4px solid var(--danger); }
.stat-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-icon.bulls { background: #e0f2fe; color: #0284c7; }
.stat-icon.cows { background: #fce7f3; color: #db2777; }
.stat-icon.calves { background: #fef3c7; color: #d97706; }
.stat-icon.steers { background: #e0e7ff; color: #4f46e5; }
.stat-icon.urgent-icon { background: #fee2e2; color: var(--danger); }
.stat-info h3 { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 0.2rem; font-weight: 600; }
.stat-number-wrap { display: flex; align-items: baseline; gap: 0.2rem; }
.stat-number-wrap h2 { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
.stat-unit { font-size: 0.8rem; color: var(--gray-400); font-weight: 600; }

/* Panels */
.panel { background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); overflow: hidden; }
.panel-header { padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.panel-header h2 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.map-controls, .table-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* Map */
.map-container { height: 420px; width: 100%; }
.geofence-status-bar {
    background: #eff6ff; border-bottom: 1px solid #bfdbfe;
    padding: 0.65rem 1.5rem; font-size: 0.875rem; color: #1e40af;
    display: flex; align-items: center; gap: 0.5rem;
}
.map-legend {
    padding: 0.875rem 1.5rem; display: flex; gap: 1.5rem; align-items: center;
    background: var(--gray-50); border-top: 1px solid var(--gray-100);
    font-size: 0.8rem; font-weight: 500; flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot.normal { background: var(--secondary); }
.dot.heat { background: var(--warning); }
.dot.urgent { background: var(--danger); animation: pulse 1.5s infinite; }
.geofence-box { width: 12px; height: 12px; border: 2px dashed var(--primary); background: rgba(13,138,188,0.08); flex-shrink: 0; }

/* Filter Bar */
.filter-bar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-100); background: var(--gray-50);
}
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-group label { font-size: 0.7rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group select {
    border: 1.5px solid var(--gray-200); border-radius: 6px; padding: 0.35rem 0.65rem;
    font-family: inherit; font-size: 0.85rem; color: var(--gray-900); background: white;
    cursor: pointer; outline: none; transition: 0.2s;
}
.filter-group select:focus { border-color: var(--primary); }
.filter-result-count { margin-left: auto; }

/* Table */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.data-table th { background: var(--gray-50); font-weight: 700; font-size: 0.78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tbody tr:hover { background: rgba(243,244,246,0.6); cursor: pointer; }
.badge-status { padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.3rem; }
.badge-urgent { background: #fee2e2; color: #b91c1c; }
.badge-heat { background: #fef3c7; color: #b45309; }
.badge-normal { background: #d1fae5; color: #047857; }
.breed-badge {
    display: inline-block; background: var(--primary-light); color: var(--primary);
    font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.breed-badge.foreign { background: rgba(139,92,246,0.1); color: #7c3aed; }
.temp-cell { font-weight: 700; }
.temp-high { color: var(--danger); }
.temp-normal { color: var(--secondary); }

/* Detail Modal Content */
.detail-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-100); }
.detail-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail-row { display: flex; flex-direction: column; gap: 0.25rem; }
.detail-label { font-size: 0.78rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { font-weight: 600; font-size: 1rem; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* Leaflet overrides */
.leaflet-container { font-family: var(--font-family); }
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; }
.leaflet-popup-content { font-family: var(--font-family) !important; font-size: 0.9rem !important; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .support-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; gap: 2rem; }
    .two-col.reverse { direction: ltr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .testimonials-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { flex-wrap: wrap; }
    .step-arrow { display: none; }
    .ticker-divider { display: none; }
    .hero-content h1 { font-size: 3rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0; background: white; flex-direction: column; align-items: center; padding: 2rem; gap: 1.5rem; box-shadow: var(--shadow-md); z-index: 899; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .grid-3 { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .support-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 1rem; }
    .sidebar { width: 220px; }
    .section-title { font-size: 2rem; }
    .hero-content h1 { font-size: 2.5rem; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .ticker-inner { gap: 1.5rem; }
    .hero-cta { flex-direction: column; }
}
