/* CSS Design System for FloraMap Garden Planner */

:root {
    --bg-app: #090D16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(26, 36, 56, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-active: rgba(16, 185, 129, 0.5);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-inverse: #090D16;
    
    --primary: #10B981;       /* Emerald */
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.15);
    
    --secondary: #3B82F6;     /* Royal Blue */
    --secondary-hover: #2563EB;
    
    --warning: #F59E0B;       /* Warm Amber */
    --danger: #EF4444;        /* Crimson Red */
    --danger-hover: #DC2626;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --sidebar-width: 280px;
    --inspector-width: 380px;
    --transition-speed: 0.25s;
    
    /* Plant Categories Colors */
    --cat-veg: #EF4444;
    --cat-herb: #10B981;
    --cat-flow: #FBBF24;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* App Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar Navigation */
.sidebar-nav {
    width: var(--sidebar-width);
    background: rgba(10, 15, 28, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.brand-icon {
    background: var(--primary-glow);
    color: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.brand-icon i {
    width: 24px;
    height: 24px;
    animation: pulse 2.5s infinite ease-in-out;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: all var(--transition-speed) ease;
}

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

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-glow);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Storage controls */
.storage-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-storage {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
    width: 100%;
}

.btn-storage i {
    width: 15px;
    height: 15px;
}

.btn-storage:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-storage.btn-secondary {
    background: transparent;
    border-style: dashed;
}

.btn-storage.btn-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-storage.btn-danger {
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-storage.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.sidebar-footer {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    position: relative;
    background-image: radial-gradient(circle at 10% 20%, rgba(10, 15, 30, 0.8) 0%, rgba(9, 13, 22, 1) 90.2%);
}

.tab-panel {
    display: none;
    height: 100%;
    padding: 30px;
    flex-direction: column;
}

.tab-panel.active {
    display: flex;
}

/* View Header */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.header-titles h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.header-titles p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Stats Overview */
.stats-overview {
    display: flex;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 110px;
    backdrop-filter: blur(5px);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.15rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

/* Map Layout Container */
.map-view-container {
    display: flex;
    flex-grow: 1;
    gap: 24px;
    height: calc(100% - 90px);
    position: relative;
}

/* Map Wrapper */
.map-wrapper {
    flex-grow: 1;
    background: rgba(13, 20, 36, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Map Scrollbar styling */
.map-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.map-wrapper::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.map-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
}
.map-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.12);
}

/* SVG Bed Styles */
.svg-grid-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.02);
    stroke-width: 1px;
}

.svg-grid-major {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 1px;
}

.svg-bed-border {
    fill: #221c15; /* Earthy soil/wood */
    stroke: #5c432d; /* Wooden borders */
    stroke-width: 1.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.svg-bed-border:hover {
    stroke: var(--primary);
    fill: #2c2219;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

.svg-bed-border.selected {
    stroke: var(--primary);
    fill: #34281e;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6));
}

.svg-bed-label {
    font-family: var(--font-heading);
    font-weight: 700;
    fill: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: fill 0.2s ease;
}

.svg-bed-border:hover + .svg-bed-label,
.svg-bed-border.selected + .svg-bed-label {
    fill: var(--primary);
}

.svg-bed-dims {
    font-family: var(--font-body);
    fill: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    font-size: 8px;
}

.svg-plant-indicator {
    pointer-events: none;
    transition: transform 0.2s ease;
}

/* Bed Inspector */
.bed-inspector {
    width: var(--inspector-width);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    height: 100%;
}

.inspector-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

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

.inspector-empty-state p {
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0 10px;
}

.inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.inspector-header h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.bed-dimensions-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-speed);
}

.btn-close:hover {
    color: var(--text-main);
}

.inspector-section {
    margin-bottom: 24px;
}

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

.inspector-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.btn-action-small {
    background: var(--primary-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-speed) ease;
}

.btn-action-small i {
    width: 12px;
    height: 12px;
}

.btn-action-small:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

/* Companion Planting Score Widget */
.companion-score-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 24px;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.score-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-bar-bg {
    background: rgba(255,255,255,0.06);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.clash-warning-item, .benefit-success-item {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.clash-warning-item {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

.benefit-success-item {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #A7F3D0;
}

/* Collapsible Form */
.add-plant-form {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.form-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    background: rgba(10, 15, 28, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition-speed);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-control-small {
    background: rgba(10, 15, 28, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Planted Crops List */
.planted-crops-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.planted-crop-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color var(--transition-speed);
}

.planted-crop-item:hover {
    border-color: rgba(255,255,255,0.12);
}

.crop-badge-indicator {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.crop-details {
    flex-grow: 1;
}

.crop-details h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.crop-details p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.crop-harvest-badge {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.crop-harvest-badge.ready {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
    color: var(--secondary);
}

.btn-remove-crop {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.btn-remove-crop:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

/* Care Guidelines Grid */
.care-guidelines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.care-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
}

.care-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-bottom: 3px;
}

.care-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

/* Timeline Tab Styles */
.timeline-container {
    flex-grow: 1;
    overflow-y: auto;
}

.timeline-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70%;
    color: var(--text-muted);
    text-align: center;
}

.timeline-empty-state h3 {
    color: var(--text-main);
    margin-top: 16px;
    margin-bottom: 8px;
}

.timeline-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(5px);
}

.timeline-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.crop-badge-category {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
}

.bed-ref-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-card h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.timeline-dates {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.progress-container {
    margin-bottom: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.progress-bar-bg {
    background: rgba(255,255,255,0.05);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.3s ease;
}

.timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.days-left-badge {
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-card-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: color var(--transition-speed);
}

.btn-card-action:hover {
    color: var(--danger);
}

/* Plant Database Search and Grid */
.db-search-bar {
    position: relative;
    width: 300px;
}

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

.db-search-bar input {
    padding-left: 38px;
}

.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.db-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) ease;
}

.db-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.db-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.db-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-card-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.db-card-header h3 {
    font-size: 1.25rem;
}

.db-card-category {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.db-card-maturity {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.db-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.db-card-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.db-meta-item {
    font-size: 0.75rem;
}

.db-meta-item strong {
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.db-card-companions {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.db-card-companions h5 {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.companion-tags, .antagonist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.companion-tag {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.antagonist-tag {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.no-tags {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

/* Keyframe Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
        filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4));
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

/* Seasonality Gantt Calendar Styles */
.seasonality-container {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(15px);
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-top: 10px;
    flex-grow: 1;
}

.seasonality-header-row {
    display: grid;
    grid-template-columns: 240px repeat(7, 1fr);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    min-width: 850px;
    align-items: center;
}

.seasonality-header-cell {
    text-align: center;
    padding: 6px;
}

.seasonality-header-cell.crop-info-header {
    text-align: left;
    padding-left: 12px;
}

.seasonality-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 850px;
    overflow-y: auto;
}

.seasonality-row {
    display: grid;
    grid-template-columns: 240px repeat(7, 1fr);
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 0;
    transition: all 0.2s ease;
    min-height: 48px;
}

.seasonality-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.seasonality-row.planted-active {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.15);
}

.crop-info-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    overflow: hidden;
}

.crop-info-cell h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.crop-info-cell .planted-indicator {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.season-cell {
    position: relative;
    height: 32px;
    margin: 0 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.season-cell.active {
    background: var(--active-bg);
    border-top: 2px solid var(--active-color);
    border-bottom: 2px solid var(--active-color);
}

.season-cell.active.start-edge {
    border-left: 2px solid var(--active-color);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    margin-left: 4px;
}

.season-cell.active.end-edge {
    border-right: 2px solid var(--active-color);
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    margin-right: 4px;
}

.season-badge {
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.season-badge.sow {
    background: var(--active-color);
}

.season-badge.harvest {
    background: var(--warning);
}

/* AI Plant Lookup Tab Styles */
.ai-lookup-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100% - 90px);
    margin-top: 10px;
}

.ai-search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(15px);
}

.ai-search-bar-wrapper {
    display: flex;
    gap: 12px;
    position: relative;
    align-items: center;
    width: 100%;
}

.ai-search-bar-wrapper .search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.ai-search-bar-wrapper input {
    padding-left: 48px;
    font-size: 0.95rem;
    height: 48px;
    flex-grow: 1;
}

.ai-search-bar-wrapper button {
    height: 48px;
    padding: 0 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
    flex-shrink: 0;
}

.ai-suggestions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-suggestion {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-suggestion:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}

.ai-results-wrapper {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
}

.ai-assistant-card {
    flex: 1 1 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.optimizer-bed-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition-speed);
}
.optimizer-bed-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.reorg-move-row {
    padding: 12px;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-response-card {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    min-height: 250px;
}

.ai-welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    color: var(--text-muted);
    padding: 40px 0;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    color: rgba(16, 185, 129, 0.2);
    margin-bottom: 20px;
    animation: float 4s infinite ease-in-out;
}

.ai-welcome-state h3 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.ai-welcome-state p {
    font-size: 0.9rem;
    max-width: 500px;
    line-height: 1.6;
}

.ai-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 16px;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(16, 185, 129, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.ai-result-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
    padding: 8px;
}

.ai-result-content h1, .ai-result-content h2, .ai-result-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--primary);
    font-family: var(--font-heading);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.ai-result-content h3 {
    font-size: 1.2rem;
}

.ai-result-content p {
    margin-bottom: 14px;
}

.ai-result-content ul {
    margin-left: 24px;
    margin-bottom: 18px;
}

.ai-result-content li {
    margin-bottom: 8px;
}

.ai-result-content strong {
    color: #fff;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Mobile Responsive Styling */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .sidebar-nav {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }
    .brand {
        margin-bottom: 16px;
    }
    .nav-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }
    .nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .storage-controls {
        flex-direction: row;
        gap: 6px;
        padding-top: 16px;
        margin-bottom: 16px;
    }
    .btn-storage {
        padding: 8px;
        font-size: 0.75rem;
    }
    .main-content {
        height: auto;
        overflow-y: visible;
    }
    .tab-panel {
        padding: 16px;
    }
    .map-view-container {
        flex-direction: column;
        height: auto;
    }
    .map-wrapper {
        padding: 10px;
        box-shadow: none;
    }
    .bed-inspector {
        width: 100%;
        height: auto;
        margin-top: 16px;
    }
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .stats-overview {
        width: 100%;
        justify-content: space-between;
    }
    .stat-card {
        flex-grow: 1;
        text-align: center;
    }
    .seasonality-container {
        padding: 12px;
    }
    .ai-search-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .ai-search-bar-wrapper button {
        width: 100%;
    }
    .ai-results-wrapper {
        flex-direction: column;
    }
}

/* Central Plant List Styles */
.btn-sub-tab {
    color: var(--text-muted) !important;
    border: 1px solid transparent !important;
}
.btn-sub-tab:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.btn-sub-tab.active {
    color: var(--primary) !important;
    background: var(--primary-glow) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.plant-list-table {
    border-collapse: collapse;
}

.plant-list-table th {
    border-bottom: 2px solid var(--border-color);
}

.plant-list-table td {
    vertical-align: middle;
}

.plant-list-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.plant-list-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.plant-list-tab-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.central-form-card {
    animation: slideDown 0.25s ease-out;
}

.species-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth control and login styles */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.hidden-auth {
    display: none !important;
}

.ai-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 13, 22, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.ai-lock-overlay i {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.ai-lock-overlay h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.ai-lock-overlay p {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
    margin-bottom: 20px;
}

