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

:root {
    /* Agricultural Theme Colors - Premium */
    --primary-color: #16a34a; /* Vibrant Green */
    --primary-hover: #15803d; /* Darker Green for hover */
    --secondary-color: #f0fdf4; /* Very light green surface */
    --accent-color: #eab308; /* Warm yellow for alerts/accents */
    
    /* Backgrounds */
    --bg-body: #f8fafc; /* Slate 50 - Very clean off-white */
    --bg-card: #ffffff; /* Pure white for cards */
    --bg-nav: #ffffff; /* Pure white for navbar */
    
    /* Borders */
    --border-color: #e2e8f0; /* Soft Slate 200 */
    --border-strong: #cbd5e1; /* Slate 300 for clearer division */
    --border-focus: #86efac; /* Light green ring for focus */

    /* Text Colors */
    --text-primary: #0f172a; /* Slate 900 - Almost black for high contrast */
    --text-secondary: #475569; /* Slate 600 - Readable gray */
    --text-muted: #94a3b8; /* Slate 400 - Muted info */

    /* Utilities */
    --border-radius-lg: 16px; /* Rounder modern look */
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-green: 0 4px 14px 0 rgba(22, 163, 74, 0.39);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); line-height: 1.6; }
a { color: var(--text-primary); text-decoration: none; transition: all var(--transition-fast); }
a:hover { color: var(--primary-color); }

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* UI Elements */
.card-border {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

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

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--border-focus);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-green);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.3);
}

.btn-primary:disabled {
    background: var(--border-strong);
    box-shadow: none;
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* Responsive Grid utility */
.grid {
    display: grid;
    gap: 24px;
}

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

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(1, 1fr); }
}

/* Toast System Setup */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.error { border-left-color: #ef4444; }
.toast.success { border-left-color: var(--primary-color); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}
