/* ==========================================================================
   FLORACARE - PREMIUM DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

/* 1. CSS VARIABLES & SYSTEM DESIGN TOKENS */
:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Light Theme (Biophilic Calming Palette) */
    --bg-primary: #f6f8f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ebf0ea;
    --border-color: #e2e8f0;
    
    --text-primary: #1c2e24;
    --text-secondary: #4a5d51;
    --text-muted: #7d8f83;
    
    --primary-color: #2e6244;
    --primary-light: #e8f3ec;
    --primary-dark: #1b3d29;
    
    --accent-color: #d97706; /* Warm amber for water alerts */
    --accent-light: #fef3c7;
    
    --danger-color: #e11d48; /* Crimson for pests / rot */
    --danger-light: #ffe4e6;
    
    --success-color: #16a34a;
    --success-light: #dcfce7;
    
    /* Shadows & Glassmorphism */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 8px 24px rgba(27, 61, 41, 0.06);
    --shadow-lg: 0 16px 40px rgba(27, 61, 41, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(12px);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-speed: 0.3s;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Color Overrides */
body.dark-mode {
    --bg-primary: #0f1612;
    --bg-secondary: #17221b;
    --bg-tertiary: #1f2e24;
    --border-color: #273b2e;
    
    --text-primary: #e6ece8;
    --text-secondary: #a6b7ad;
    --text-muted: #6e8276;
    
    --primary-color: #4ade80;
    --primary-light: #1c3325;
    --primary-dark: #15803d;
    
    --accent-color: #fbbf24;
    --accent-light: #3a2e10;
    
    --danger-color: #fb7185;
    --danger-light: #3c1a1e;
    
    --success-color: #4ade80;
    --success-light: #163e23;
    
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --glass-bg: rgba(23, 34, 27, 0.75);
}

/* 2. GENERAL RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-style: border-box;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
}

p {
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* 3. BUTTONS & UI CONTROLS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-bounce);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 98, 68, 0.3);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background-color: #be123c;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    padding: 14px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-speed);
}
.btn-icon:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.custom-select, input[type="text"], input[type="number"], input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-speed);
}

.custom-select:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 98, 68, 0.15);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Radio Tiles for Questionnaires */
.radio-tile-group {
    display: flex;
    gap: 12px;
}

.radio-tile {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-tile input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-tile .tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-secondary);
    text-align: center;
    transition: all var(--transition-speed);
}

.radio-tile .tile-content i {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.radio-tile input:checked + .tile-content {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
}
.radio-tile input:checked + .tile-content i {
    color: var(--primary-color);
}

/* Floating Actions */
.top-nav-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

/* 4. MAIN APP LAYOUT */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar Navigation styles */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
    transition: width var(--transition-speed);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 10px;
}

.brand-logo {
    color: var(--primary-color);
    width: 32px;
    height: 32px;
}

.brand h1 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-bounce);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background-color: var(--bg-primary);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-footer {
    padding-left: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Main Content Workspace */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
}

/* Hero Header */
.hero-header {
    height: 300px;
    position: relative;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 40px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 6s ease-out;
}
.hero-header:hover .hero-bg {
    transform: scale(1.05);
}

.hero-text {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-text h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* Workspace container */
.tab-content-container {
    padding: 40px;
    flex-grow: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-pane.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Common Card style */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}

/* 5. MY GARDEN (DASHBOARD) SCREEN */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon i {
    width: 24px;
    height: 24px;
}

.water-need {
    background-color: var(--accent-light);
    color: var(--accent-color);
}
.total-plants {
    background-color: var(--primary-light);
    color: var(--primary-color);
}
.healthy-plants {
    background-color: var(--success-light);
    color: var(--success-color);
}

.summary-info h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.summary-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Garden Grid */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    min-height: 200px;
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
}

.empty-icon {
    width: 60px;
    height: 60px;
    color: var(--text-muted);
    margin-bottom: 16px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 1; }
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    max-width: 400px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Garden Plant Cards */
.garden-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-speed) var(--transition-bounce);
}

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

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-alert {
    background-color: var(--danger-light);
    color: var(--danger-color);
}
.badge-warning {
    background-color: var(--accent-light);
    color: var(--accent-color);
}
.badge-ok {
    background-color: var(--success-light);
    color: var(--success-color);
}

.garden-card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plant-meta h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}
.plant-meta .species {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.garden-card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.care-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.care-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.care-tag i {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* Water Status Meter */
.water-status-meter {
    margin-top: 8px;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.meter-bar-container {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.meter-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.meter-bar.critical { background-color: var(--danger-color); }
.meter-bar.warning { background-color: var(--accent-color); }
.meter-bar.safe { background-color: var(--success-color); }

.garden-card-footer {
    padding: 16px 24px;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.garden-card-footer button {
    flex: 1;
}

/* 6. PLANT CARE DIRECTORY SCREEN */
.filter-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    flex-grow: 1;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding-left: 48px;
}

.select-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.select-filters select {
    flex: 1;
    min-width: 150px;
}

/* Custom Checkbox */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-speed);
}

.checkbox-label i {
    width: 18px;
    height: 18px;
}

.checkbox-container input:checked + .checkbox-label {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Directory Grid & Cards */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.directory-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) var(--transition-bounce);
}

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

.dir-card-visual {
    height: 120px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dir-card-visual i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    opacity: 0.8;
    transition: transform var(--transition-speed);
}

.directory-card:hover .dir-card-visual i {
    transform: scale(1.15) rotate(5deg);
}

.dir-pet-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: var(--success-light);
    color: var(--success-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dir-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.dir-title h3 {
    font-size: 1.15rem;
    margin-bottom: 2px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.hindi-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.hindi-species {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
.dir-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.dir-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dir-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.dir-badge.level-easy { background-color: var(--success-light); color: var(--success-color); }
.dir-badge.level-medium { background-color: var(--accent-light); color: var(--accent-color); }
.dir-badge.level-hard { background-color: var(--danger-light); color: var(--danger-color); }

/* 7. PLANT DOCTOR (DIAGNOSIS) SCREEN */
.doctor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.symptom-form-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.form-instruction {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.symptom-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.symptom-checkbox {
    display: block;
    position: relative;
    cursor: pointer;
}

.symptom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.symptom-checkbox .symptom-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-primary);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-speed);
    height: 80px;
}

.symptom-checkbox input:checked + .symptom-label {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(46, 98, 68, 0.1);
}

/* Results Panel Container */
.doctor-result-panel {
    display: flex;
    flex-direction: column;
}

.doctor-empty-state {
    flex-grow: 1;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.doc-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.doctor-empty-state h3 {
    margin-bottom: 8px;
}

.doctor-empty-state p {
    max-width: 320px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Diagnosis Report Result Visual */
.diagnosis-report {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.4s ease-out forwards;
}

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

.report-header {
    background-color: var(--danger-light);
    color: var(--danger-color);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.report-header.healthy-alert {
    background-color: var(--success-light);
    color: var(--success-color);
}

.report-header i {
    width: 36px;
    height: 36px;
}

.report-header h3 {
    font-size: 1.35rem;
}

.report-header p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.report-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-section h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-section h4 i {
    width: 16px;
    height: 16px;
}

.report-section p, .report-section li {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.report-section ul {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 8. WATERING CALCULATOR SCREEN */
.calculator-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.calc-btn {
    padding: 16px;
}

.calc-result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.calc-result-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.calc-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.calc-result-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.calc-result-placeholder p {
    max-width: 250px;
    margin: 0 auto;
    font-size: 0.9rem;
}

.calc-outcome {
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.outcome-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 4px solid var(--bg-tertiary);
    box-shadow: 0 4px 16px rgba(46, 98, 68, 0.1);
}

.outcome-circle .days {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.outcome-circle .unit {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calc-outcome h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.calc-outcome .explanation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.calc-tips {
    text-align: left;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.calc-tips h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.calc-tips ul {
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 9. PESTS GUIDE SCREEN */
.pest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.pest-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
}

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

.pest-visual {
    height: 100px;
    background-color: var(--danger-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-color);
}

.pest-visual i {
    width: 40px;
    height: 40px;
}

.pest-body {
    padding: 20px;
}

.pest-body h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.pest-symptoms {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 12px;
}

.pest-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.pest-fix h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.pest-fix p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Recipes Card Styling */
.remedies-card {
    border-left: 4px solid var(--primary-color);
}

.remedies-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remedies-card h3 i {
    color: var(--primary-color);
}

.remedies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.remedy-item h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.remedy-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

.remedy-item ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remedy-item li {
    font-size: 0.9rem;
}

/* 10. MODALS SYSTEM */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 22, 18, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-speed) var(--transition-bounce);
    overflow: hidden;
}

.modal-large {
    max-width: 700px;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Plant Details View Styles */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.detail-visual {
    background-color: var(--primary-light);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.detail-visual i {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.detail-visual h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.detail-visual p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-info-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.detail-info-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.detail-care-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.care-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.care-block i {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    margin-top: 2px;
}

.care-block-content h5 {
    font-size: 0.85rem;
    font-weight: 700;
}
.care-block-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 11. RESPONSIVE MEDIA QUERIES */

@media (max-width: 1024px) {
    .doctor-layout, .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .remedies-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    /* Change sidebar to bottom navigation for mobile */
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0 10px;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        border-right: none;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
        align-items: center;
        justify-content: space-around;
        z-index: 100;
    }

    .brand {
        display: none; /* Hide brand logo/text on mobile bottom nav */
    }

    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
        margin: 0;
    }

    .nav-item {
        padding: 8px 12px;
        flex-direction: column;
        gap: 4px;
        font-size: 0.65rem;
        border-radius: 8px;
    }

    .nav-item:hover {
        transform: none;
    }

    .nav-item i {
        width: 18px;
        height: 18px;
    }

    .nav-item span {
        display: block; /* keep text, but smaller */
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding-bottom: 80px; /* Give room for mobile nav bar */
    }

    .top-nav-actions {
        top: max(env(safe-area-inset-top, 0px), 55px) !important;
    }

    .hero-header {
        height: 270px;
        padding: max(env(safe-area-inset-top, 0px), 50px) 20px 20px 20px !important;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }

    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .tab-content-container {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .section-header button {
        width: 100%;
    }

    .form-grid, .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .radio-tile-group {
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        padding: 12px;
    }

    .select-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .select-filters select, .checkbox-container {
        width: 100%;
    }
    
    .checkbox-label {
        width: 100%;
        justify-content: center;
    }
}
