html {
    font-size: 18px;
}

/* style.css - Custom styling for Fermerim mobile-first web app */

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

:root {
    --primary-color: #0b5d3b;
    --primary-light: #e1f1b7;
    --primary-hover: #073e26;
    --secondary-color: #2e8b57;
    --accent-color: #84cc16;
    --bg-light: #fafafa;
    --card-bg: #ffffff;
    --text-dark: #101010;
    --text-muted: #737373;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: #0c150e; /* dark organic background for desktop */
    color: var(--text-dark);
}

/* Simulated mobile viewport container on desktop */
.app-container {
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
        min-height: 100vh;
    }
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(11, 93, 59, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 93, 59, 0.4);
}

/* Active tab style */
.tab-active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Safe, warning, fail colors */
.badge-pass {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-fail {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom slider input and large touch thumb for farmers */
input[type=range] {
    accent-color: var(--primary-color);
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 9999px;
}
input[type=range]::-webkit-slider-thumb {
    height: 26px;
    width: 26px;
    border-radius: 9999px;
    background: var(--primary-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid #ffffff;
}
input[type=range]::-moz-range-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 9999px;
}
input[type=range]::-moz-range-thumb {
    height: 26px;
    width: 26px;
    border-radius: 9999px;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Tap active bounce scale effect for buttons */
.btn-tap-effect {
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-tap-effect:active {
    transform: scale(0.96);
}

/* Category button filter styling */
.category-btn {
    transition: all 0.2s ease;
}
.category-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}



/* Grow Stage progress timeline styling */
.stage-timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-top: 10px;
}
.stage-timeline-line {
    position: absolute;
    top: 28px;
    left: 20px;
    right: 20px;
    height: 3px;
    background-color: #e5e7eb;
    z-index: 1;
}
.stage-timeline-line-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}
.stage-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-1;
}
.stage-circle {
    width: 40px;
    height: 40px;
    border-radius: 55px;
    background-color: #ffffff;
    border: 3px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #9ca3af;
    transition: all 0.3s ease;
}
.stage-node.active .stage-circle {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: scale(1.1);
}
.stage-node.completed .stage-circle {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #ffffff;
}


/* Animated visual tank mixture */
.water-tank {
    position: relative;
    width: 130px;
    height: 160px;
    border: 3.5px solid #1f2937;
    border-radius: 14px;
    overflow: hidden;
    background-color: #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.tank-water {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 4px 6px rgba(255,255,255,0.3);
}

.tank-chemical {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: repeating-linear-gradient(
        45deg,
        #f59e0b,
        #f59e0b 6px,
        #d97706 6px,
        #d97706 12px
    );
    opacity: 0.85;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 4px 6px rgba(255,255,255,0.2);
}

.tank-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-weight: 800;
    font-size: 1rem;
    color: #111827;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
    text-align: center;
    pointer-events: none;
    line-height: 1.2;
}

/* Scanner overlay and laser scan line animation */
.scanner-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: rgba(12, 21, 14, 0.85);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(8px);
}

.scanner-container {
    position: relative;
    width: 260px;
    height: 260px;
    border: 4px solid var(--primary-color);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px rgba(11, 93, 59, 0.3);
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color), 0 0 25px var(--accent-color);
    animation: scanAnimation 2s ease-in-out infinite;
}

@keyframes scanAnimation {
    0% {
        top: 0%;
    }
    50% {
        top: 100%;
    }
    100% {
        top: 0%;
    }
}

/* Modal popup drawer styles for mobile devices */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 110;
    display: flex;
    align-items: flex-end; /* Drawer slide-up from bottom */
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 24px;
    max-height: 85%;
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

