/* CSS Variables */
:root {
    --primary-green: #059669;
    --light-green: #ecfdf5;
    --success-green: #10b981;
    --danger-red: #dc2626;
    --warning-yellow: #f59e0b;
    --info-blue: #2563eb;
    --white: #ffffff;
    --light-gray: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #f9fafb;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #059669, #10b981);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
    color: white;
}

.farm-loader {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: grow 2s infinite;
}

.loading-text {
    font-size: 1.2rem;
    animation: fadeInOut 1.5s infinite;
}

@keyframes grow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #059669;
}

.nav-logo {
    font-size: 1.5rem;
}

.nav-title {
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-dropdown {
    position: relative;
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu li {
    margin: 0;
}

.nav-submenu .nav-link {
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 0;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: #f3f4f6;
    color: #059669;
}

.dropdown-toggle::after {
    content: '';
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-notification {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-notification:hover {
    background: #f3f4f6;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.profile-name {
    font-weight: 500;
    color: #374151;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: #374151;
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.section.active {
    display: block;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-small {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #059669;
    color: white;
}

.btn-primary:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    background: #f3f4f6;
    color: #374151;
}

.btn-small:hover {
    background: #e5e7eb;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #059669;
}

.stat-change.negative {
    color: #dc2626;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h2 {
    color: #111827;
    margin-bottom: 1rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.action-btn:hover {
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Activity Feed */
.recent-activity {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-activity h2 {
    color: #111827;
    margin-bottom: 1.5rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-avatar {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
}

.activity-content p {
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Project Management Styles */
.project-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.project-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.board-column {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
    min-height: 500px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.column-header h3 {
    color: #374151;
    font-size: 1.1rem;
}

.task-count {
    background: #059669;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: grab;
}

.task-card:hover {
    transform: translateY(-1px);
}

.task-card.completed {
    opacity: 0.7;
    background: #f0fdf4;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-header h4 {
    color: #111827;
    font-size: 0.95rem;
}

.priority {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority.high {
    background: #fee2e2;
    color: #dc2626;
}

.priority.medium {
    background: #fef3c7;
    color: #d97706;
}

.priority.low {
    background: #dbeafe;
    color: #2563eb;
}

.task-progress {
    margin: 0.75rem 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #059669;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #059669;
    font-weight: 600;
    margin-left: 0.5rem;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.task-team {
    display: flex;
    gap: -0.5rem;
}

.task-team img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -0.5rem;
}

.due-date {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Inventory Management */
.inventory-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inv-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.inv-info h3 {
    font-size: 1.2rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.inv-info p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.low-stock {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
}

.maintenance-due {
    color: #d97706;
    font-size: 0.875rem;
    font-weight: 600;
}

.ready-to-sell {
    color: #059669;
    font-size: 0.875rem;
    font-weight: 600;
}

.expired-soon {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
}

.inventory-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-select,
.search-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

/* Tables */
.inventory-table-container,
.farms-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inventory-table,
.farms-table,
.yield-table,
.pricing-table,
.profitability-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th,
.farms-table th,
.yield-table th,
.pricing-table th,
.profitability-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.inventory-table td,
.farms-table td,
.yield-table td,
.pricing-table td,
.profitability-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.inventory-table tbody tr:hover,
.farms-table tbody tr:hover,
.yield-table tbody tr:hover,
.pricing-table tbody tr:hover,
.profitability-table tbody tr:hover {
    background: #f9fafb;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.status.maintenance-due {
    background: #fef3c7;
    color: #92400e;
}

.status.ready-to-sell {
    background: #dbeafe;
    color: #1e40af;
}

.status.harvested {
    background: #d1fae5;
    color: #065f46;
}

.status.harvesting {
    background: #fef3c7;
    color: #92400e;
}

.status.growing {
    background: #e0f2fe;
    color: #0369a1;
}

/* Sales Dashboard */
.sales-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sales-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-card h3 {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #059669;
}

.metric-change.negative {
    color: #dc2626;
}

.forecast-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.forecast-chart {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-container {
    margin-top: 1rem;
}

.market-insights {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.insight-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.insight-icon {
    font-size: 1.5rem;
}

.insight-content h4 {
    color: #111827;
    margin-bottom: 0.25rem;
}

.insight-content p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Weather Dashboard */
.weather-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-weather {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.weather-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.weather-location h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.weather-icon {
    font-size: 4rem;
}

.weather-temp {
    font-size: 3.5rem;
    font-weight: 700;
}

.weather-desc p {
    font-size: 1.1rem;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.weather-forecast {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.forecast-day {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f9fafb;
}

.day-name {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.day-icon {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.day-temps {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.day-rain {
    font-size: 0.875rem;
    color: #6b7280;
}

.climate-alerts {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.climate-alert {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.climate-alert.high-priority {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.climate-alert.medium-priority {
    background: #fffbeb;
    border-left-color: #d97706;
}

.climate-alert.low-priority {
    background: #eff6ff;
    border-left-color: #2563eb;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content h4 {
    color: #111827;
    margin-bottom: 0.25rem;
}

.alert-time {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

/* Yield Analytics */
.yield-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.yield-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.yield-summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.yield-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0.5rem 0;
}

.yield-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.yield-change.positive {
    color: #059669;
    font-weight: 600;
}

.yield-charts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.chart-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.performance {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.performance.excellent {
    background: #d1fae5;
    color: #065f46;
}

.performance.good {
    background: #dbeafe;
    color: #1e40af;
}

.performance.fair {
    background: #fef3c7;
    color: #92400e;
}

.grade {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade.a {
    background: #d1fae5;
    color: #065f46;
}

.grade.b {
    background: #dbeafe;
    color: #1e40af;
}

/* Pricing Management */
.pricing-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.price-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.price-type-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-type-card h3 {
    color: #6b7280;
    margin-bottom: 1rem;
}

.price-stats .avg-price {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.price-change {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.price-change.neutral {
    color: #6b7280;
}

.trend {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.trend.up {
    background: #d1fae5;
    color: #065f46;
}

.trend.stable {
    background: #f3f4f6;
    color: #374151;
}

.trend.down {
    background: #fee2e2;
    color: #dc2626;
}

/* Cost Analysis */
.costs-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cost-overview-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.cost-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0.5rem 0;
}

.cost-period {
    color: #6b7280;
    font-size: 0.95rem;
}

.cost-breakdown {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.cost-categories {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.cost-details {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cost-category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cost-category-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
}

.category-header .category-icon {
    font-size: 1.5rem;
}

.category-info {
    flex: 1;
    margin: 0 1rem;
    text-align: left;
}

.category-info h4 {
    color: #111827;
    margin-bottom: 0.25rem;
}

.category-info p {
    color: #6b7280;
    font-size: 0.95rem;
}

.category-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.category-subcosts {
    padding: 1rem;
    background: white;
}

.subcost-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.subcost-item:last-child {
    border-bottom: none;
}

.profitability-analysis {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profitability-table tbody tr.high-profit {
    background: #f0fdf4;
}

.profitability-table tbody tr.medium-profit {
    background: #fefce8;
}

.profitability-table tbody tr.low-profit {
    background: #fef2f2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-section {
        grid-template-columns: 1fr;
    }
    
    .weather-main {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .cost-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .profile-name {
        display: none;
    }
    
    .project-board {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .inventory-filters {
        flex-direction: column;
    }
    
    .section-header {
        text-align: center;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
}

/* Financial Management Styles */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.finance-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.finance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.finance-card.total-expenses {
    border-left-color: #dc2626;
}

.finance-card.total-salaries {
    border-left-color: #2563eb;
}

.finance-card.total-bonuses {
    border-left-color: #059669;
}

.finance-card.total-sponsorships {
    border-left-color: #7c3aed;
}

.finance-card h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.finance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.finance-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.finance-change.positive {
    color: var(--success-green);
}

.finance-change.negative {
    color: var(--danger-red);
}

.finance-change.neutral {
    color: var(--text-secondary);
}

/* Finance Tabs */
.finance-tabs {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--light-green);
}

.tab-btn.active {
    background: var(--primary-green);
    color: var(--white);
}

.finance-tab-content {
    display: none;
}

.finance-tab-content.active {
    display: block;
}

.finance-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.finance-section-header h3 {
    color: var(--text-primary);
    margin: 0;
}

/* Financial Tables */
.finance-table {
    width: 100%;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.finance-table th,
.finance-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.finance-table th {
    background: var(--light-green);
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Cost Categories */
.costs-categories {
    display: grid;
    gap: 2rem;
}

.cost-category {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cost-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Salary Management */
.salary-overview {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payroll-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.payroll-stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.employee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.salary-table th:first-child {
    width: 180px;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.paid {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-green);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.approved {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.status-badge.active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-green);
}

/* Bonus Management */
.bonus-types {
    display: grid;
    gap: 2rem;
}

.bonus-category {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bonus-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Sponsorship Management */
.sponsorship-overview {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sponsor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.sponsor-stat {
    text-align: center;
}

.sponsor-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sponsor-logo {
    width: 32px;
    height: 32px;
    background: var(--light-green);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Enhanced Responsive Design for Financial Section */
@media (max-width: 1024px) {
    .financial-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .payroll-summary,
    .sponsor-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .financial-summary {
        grid-template-columns: 1fr;
    }

    .finance-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
    }

    .payroll-summary,
    .sponsor-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .finance-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .finance-table th,
    .finance-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .employee-info,
    .sponsor-info {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .finance-amount {
        font-size: 1.5rem;
    }
}

/* Brand Logo Styling */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo svg {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2));
}

.brand-logo:hover svg {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1;
}

.nav-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AI Advisor Section */
.ai-status-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ai-status-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.ai-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.status-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    background: var(--light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-content h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.learning-progress {
    margin: 0.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--success-green));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
}

.quality-score {
    font-size: 2rem;
    font-weight: 800;
    color: var(--success-green);
    line-height: 1;
}

.quality-score.excellent {
    color: var(--success-green);
}

.recommendation-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1;
}

/* AI Chat Interface */
.ai-chat-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-green), var(--success-green));
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.ai-status.online {
    font-size: 0.9rem;
    opacity: 0.9;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    background: var(--light-green);
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.message-content p, .message-content ul {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.message-content ul {
    padding-left: 1rem;
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.5rem;
}

.chat-input-container {
    border-top: 1px solid var(--light-gray);
    padding: 1rem;
}

.quick-questions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    background: var(--light-green);
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input-wrapper input:focus {
    border-color: var(--primary-green);
}

/* Farm Insights */
.farm-insights {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.farm-insights h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.insight-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--primary-green);
}

.insight-card h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.insight-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.insight-score.excellent {
    color: var(--success-green);
}

.insight-score.good {
    color: #059669;
}

.insight-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Data Sharing Section */
.data-sharing-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.sharing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sharing-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.data-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.data-category {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    transition: all 0.2s ease;
    position: relative;
}

.data-category.active {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.05);
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.data-category h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.data-category p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.data-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success-green);
    text-transform: uppercase;
}

.connect-btn {
    background: var(--primary-green);
    color: var(--white);
    margin-top: 0.5rem;
}

/* Subscription Section */
.trial-status-banner {
    background: linear-gradient(135deg, var(--success-green), var(--primary-green));
    color: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trial-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.trial-icon {
    font-size: 3rem;
}

.trial-details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.trial-progress {
    margin-top: 1rem;
}

.trial-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.trial-fill {
    height: 100%;
    background: var(--white);
    transition: width 0.3s ease;
}

.trial-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.trial-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

/* Subscription Plans */
.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.plan-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.plan-card.current {
    border-color: var(--primary-green);
}

.plan-card.premium {
    border-color: var(--info-blue);
    transform: scale(1.05);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-green);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-badge.popular {
    background: var(--info-blue);
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-header h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.plan-usd {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.plan-features {
    margin-bottom: 2rem;
}

.feature {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.plan-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Payment Setup */
.payment-setup {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.payment-setup h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.payment-info h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.payment-info ul {
    list-style: none;
    padding: 0;
}

.payment-info li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.payment-setup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btc-address label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btc-address input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: monospace;
}

.btc-address small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}

.auto-pay-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Global Stats */
.global-stats {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Referral Program */
.referral-program {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--info-blue);
}

.referral-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.referral-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.referral-stats span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.referral-code {
    margin-bottom: 1rem;
}

.code-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.code-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: monospace;
    background: var(--white);
}

/* Payment History */
.payment-history {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.payment-table th,
.payment-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.payment-table th {
    background: var(--light-green);
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive Design for New Sections */
@media (max-width: 1024px) {
    .trial-status-banner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .trial-actions {
        flex-direction: row;
        justify-content: center;
    }

    .payment-grid,
    .referral-container {
        grid-template-columns: 1fr;
    }

    .trial-bar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .ai-status-panel {
        grid-template-columns: 1fr;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .data-categories {
        grid-template-columns: 1fr;
    }

    .subscription-plans {
        grid-template-columns: 1fr;
    }

    .plan-card.premium {
        transform: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-questions {
        flex-direction: column;
    }

    .chat-input-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .brand-text {
        display: none;
    }

    .trial-details h3 {
        font-size: 1.2rem;
    }

    .plan-price {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo Mode Styling */
.demo-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-green);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.demo-banner {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.demo-banner.hidden {
    display: none;
}

.demo-content {
    text-align: center;
}

.demo-content h3 {
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.demo-content p {
    color: #78350f;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.demo-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.platform-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--primary-green);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Onboarding Wizard Styles */
.onboarding-wizard {
    max-width: 800px;
    margin: 0 auto;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--light-gray);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--primary-green);
    color: var(--white);
}

.step-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-green);
    font-weight: 600;
}

.wizard-content {
    display: none;
}

.wizard-content.active {
    display: block;
}

.onboarding-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--light-gray);
}

.onboarding-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Crop Selection */
.crop-selection {
    margin-bottom: 2rem;
}

.crop-category {
    margin-bottom: 2rem;
}

.crop-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.crop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.crop-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-item:hover {
    border-color: var(--primary-green);
    background: rgba(5, 150, 105, 0.05);
}

.crop-item input:checked + span {
    font-weight: 600;
    color: var(--primary-green);
}

.crop-item input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-green);
}

/* Goals Selection */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.goal-item {
    cursor: pointer;
}

.goal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
}

.goal-item:hover .goal-content {
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.goal-item input:checked + .goal-content {
    border-color: var(--primary-green);
    background: rgba(5, 150, 105, 0.05);
}

.goal-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.goal-content span {
    font-weight: 600;
    color: var(--text-primary);
}

.goal-item input {
    display: none;
}

/* AI Consent */
.ai-consent {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ai-consent h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.consent-box ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.consent-box li {
    padding: 0.25rem 0;
    color: var(--text-primary);
}

.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    cursor: pointer;
}

.consent-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
}

.consent-checkbox span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.next-step, .prev-step {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Responsive Design for Onboarding */
@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .wizard-steps::before {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .crop-grid {
        grid-template-columns: 1fr;
    }

    .goals-grid {
        grid-template-columns: 1fr;
    }

    .step-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .demo-actions {
        flex-direction: column;
        align-items: center;
    }

    .platform-stats {
        justify-content: center;
    }
}

/* Help Tooltips */
.help-tooltip {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: help;
    z-index: 10;
    transition: all 0.2s ease;
}

.help-tooltip:hover {
    transform: scale(1.1);
    background: var(--success-green);
}

/* Training Modal */
.training-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.training-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.training-section {
    background: var(--light-green);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.training-section h4 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.training-section ul {
    list-style: none;
    padding: 0;
}

.training-section li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
}

.training-section li:last-child {
    border-bottom: none;
}

.training-section li:before {
    content: "📚 ";
    margin-right: 0.5rem;
}

/* Enhanced Project Management Styles */
.project-boards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.project-column {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-green);
    min-height: 400px;
    position: relative;
}

.project-column h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-count {
    background: var(--light-green);
    color: var(--primary-green);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tasks {
    min-height: 200px;
    padding: 0.5rem 0;
}

.task-card {
    background: #f8fafc;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: move;
    transition: all 0.2s ease;
    position: relative;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-green);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.task-card h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.task-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.high {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.priority-badge.low {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.delete-task {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.delete-task:hover {
    background: rgba(220, 38, 38, 0.1);
}

.add-task-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--light-green);
    border: 2px dashed var(--primary-green);
    color: var(--primary-green);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    margin-top: 0.5rem;
}

.add-task-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    border-style: solid;
}

.drag-over {
    background: rgba(5, 150, 105, 0.05);
    border-color: var(--primary-green);
}

/* Task Card Priority Colors */
.task-card.priority-high {
    border-left: 4px solid #dc2626;
}

.task-card.priority-medium {
    border-left: 4px solid #f59e0b;
}

.task-card.priority-low {
    border-left: 4px solid #22c55e;
}

/* Project Progress */
.project-progress {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.progress-stat {
    text-align: center;
    padding: 1rem;
    background: var(--light-green);
    border-radius: 8px;
}

.progress-stat .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
}

.progress-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .project-boards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-column {
        margin-bottom: 1rem;
    }
    
    .task-card {
        padding: 0.75rem;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}