/* =============================================
   FarmOps Control System — Global Style Sheet
   Premium Design System v2
   ============================================= */

/* ─── Design Tokens ───────────────────────── */
:root {
    --primary:       #3db560;
    --primary-dark:  #277a40;
    --primary-light: #e8f5ee;
    --accent:        #f0a500;
    --danger:        #e53935;
    --text-dark:     #1a1f2e;
    --text-mid:      #4a5568;
    --text-light:    #8a95a3;
    --bg-light:      #f4f7f5;
    --bg-white:      #ffffff;
    --glass:         rgba(255,255,255,0.92);
    --shadow-sm:     0 2px 12px rgba(0,0,0,0.06);
    --shadow-md:     0 8px 32px rgba(0,0,0,0.10);
    --shadow-lg:     0 20px 60px rgba(0,0,0,0.14);
    --radius:        12px;
    --radius-lg:     20px;
}

/* ─── Reset ───────────────────────────────── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Buttons ─────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.97rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(61,181,96,0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(61,181,96,0.45);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-light {
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
}
.btn-outline-light:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}

/* ─── Navbar ──────────────────────────────── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    height: 72px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.logo i {
    color: var(--primary);
    font-size: 1.3rem;
    background: var(--primary-light);
    padding: 8px;
    border-radius: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 36px;
}
.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-mid);
    transition: color 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--primary-dark); }
.nav-links a:hover::after { width: 100%; }

.nav-buttons { display: flex; gap: 12px; }
.nav-buttons .btn { padding: 10px 22px; font-size: 0.9rem; }

/* ─── Hero Section ────────────────────────── */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(160deg, rgba(10,40,20,0.75) 0%, rgba(0,0,0,0.5) 100%),
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80')
        center/cover no-repeat fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 100px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 50%, rgba(61,181,96,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
    animation: fadeUp 0.8s ease-out both;
}
.hero-badge i { color: var(--accent); }

.hero-content {
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    animation: fadeUp 0.9s 0.1s ease-out both;
}

.hero h1 span {
    background: linear-gradient(135deg, #6ee08e, #a2f0b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    margin-bottom: 44px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 1s 0.2s ease-out both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 1s 0.3s ease-out both;
}

.hero-cta .btn { padding: 15px 32px; font-size: 1rem; }

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.15);
    animation: fadeUp 1s 0.5s ease-out both;
}

.hero-stat h3 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0;
}
.hero-stat p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin: 4px 0 0;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}
.scroll-indicator i { font-size: 1.2rem; }

/* ─── Features Section ────────────────────── */
.features {
    padding: 110px 60px;
    background: white;
    text-align: center;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.section-sub {
    color: var(--text-mid);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 60px;
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    max-width: 1160px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-light);
    padding: 38px 30px;
    border-radius: var(--radius-lg);
    text-align: left;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    background: white;
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 58px;
    height: 58px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.feature-icon i {
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-mid);
    font-size: 0.93rem;
    line-height: 1.65;
}

/* ─── How It Works Section ────────────────── */
.how-it-works {
    padding: 110px 60px;
    background: linear-gradient(160deg, #f8fdf9 0%, #eaf7ee 100%);
    text-align: center;
}

.steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 32px; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
}

.step {
    flex: 1;
    min-width: 200px;
    padding: 0 24px;
    position: relative;
}

.step .circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 20px rgba(61,181,96,0.35);
    border: 4px solid white;
    position: relative;
    z-index: 1;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.step p {
    color: var(--text-mid);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* ─── Roles Section ───────────────────────── */
.roles-section {
    padding: 110px 60px;
    background: white;
    text-align: center;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.role-card {
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.role-card.owner   { background: linear-gradient(135deg, #e8f5e9, #f1fdf4); border-color: #c8e6c9; }
.role-card.manager { background: linear-gradient(135deg, #fff8e1, #fffde7); border-color: #ffe082; }
.role-card.worker  { background: linear-gradient(135deg, #e3f2fd, #e8f4ff); border-color: #bbdefb; }

.role-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.role-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.role-card.owner   .role-icon { background: #c8e6c9; color: #2e7d32; }
.role-card.manager .role-icon { background: #ffe082; color: #f57f17; }
.role-card.worker  .role-icon { background: #bbdefb; color: #1565c0; }

.role-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.role-card p  { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }

.role-perms {
    margin-top: 16px;
    list-style: none;
    text-align: left;
}
.role-perms li {
    font-size: 0.85rem;
    color: var(--text-mid);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.role-perms li i { color: var(--primary); font-size: 0.75rem; }

/* ─── CTA Banner ──────────────────────────── */
.cta-section {
    padding: 100px 60px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1b5e20 100%);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.cta-section h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.cta-section p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 40px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .btn-primary {
    background: white;
    color: var(--primary-dark);
    border-color: white;
    font-size: 1rem;
    padding: 15px 36px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.cta-section .btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* ─── Footer ──────────────────────────────── */
footer {
    background: #0f1a12;
    color: rgba(255,255,255,0.7);
    padding: 50px 60px 30px;
}

.footer-content {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.footer-logo i { color: var(--primary); }

.footer-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    max-width: 260px;
}

.footer-links-col h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.footer-links-col a {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.88rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-links-col a:hover { color: var(--primary); }

.footer-bottom {
    max-width: 1160px;
    margin: 0 auto;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.3);
    flex-wrap: wrap;
    gap: 10px;
}

/* ─── Login / Auth Pages ──────────────────── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-left {
    background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 40%, #3db560 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.auth-left .brand {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-left h2 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.auth-left p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 360px;
}

.auth-features {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.85);
}
.auth-feature-item i {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: #f8fdf9;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card .auth-header {
    margin-bottom: 36px;
}

.auth-card .auth-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.auth-card .auth-header p {
    color: var(--text-light);
    font-size: 0.93rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 0.87rem;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #dde3e0;
    border-radius: 10px;
    font-size: 0.97rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61,181,96,0.12);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    margin-top: 8px;
    justify-content: center;
}

.alert {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert.error   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

.auth-links {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-mid);
    text-align: center;
}
.auth-links a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.demo-accounts {
    margin-top: 32px;
    padding: 18px;
    background: white;
    border-radius: 12px;
    border: 1.5px solid #e8f5e9;
}
.demo-accounts h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 700;
}
.demo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.87rem;
}
.demo-item:last-child { border: none; }
.demo-item span:first-child { color: var(--text-mid); }
.demo-item span:last-child {
    font-family: monospace;
    background: #f8fdf9;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--primary-dark);
}
.demo-item .demo-role {
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
}
.role-owner   { background: #e8f5e9; color: #2e7d32; }
.role-manager { background: #fff8e1; color: #f57f17; }
.role-worker  { background: #e3f2fd; color: #1565c0; }

/* ─── Animations ──────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

/* On-scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right { min-height: 100vh; padding: 40px 24px; background: white; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-buttons .btn-outline { display: none; }
    .features, .how-it-works, .roles-section, .cta-section { padding: 70px 24px; }
    .hero-stats { flex-direction: column; gap: 24px; }
    .steps::before { display: none; }
    .footer-content { flex-direction: column; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
