/* Garden Plant Tracker - Main Stylesheet */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 500;
}

.user-info span {
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.export-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.export-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Year Filter Section */
.year-filter-section {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.year-filter-info h3 {
    margin: 0;
    color: #2E7D32;
    font-size: 1.3em;
}

.year-filter-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.year-filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.year-filter-controls label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.year-filter-controls select {
    min-width: 120px;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.year-filter-controls select:focus {
    border-color: #4CAF50;
    outline: none;
}

.year-context {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.year-context-message {
    color: #2E7D32;
    font-weight: 500;
    font-size: 14px;
}

.view-all-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #2E7D32;
    text-decoration: underline;
}

/* Add Plant Toggle Button */
.add-plant-toggle {
    text-align: center;
    margin-bottom: 30px;
}

.btn-large {
    font-size: 18px;
    padding: 15px 30px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Form Header */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.form-header h2 {
    margin-bottom: 0;
}

.btn-close {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-close:hover {
    background: #c82333;
    transform: rotate(90deg);
}

/* Form Sections */
.form-section, .stats-section, .controls-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.stats-section h2 {
    margin-bottom: 25px;
    color: #2E7D32;
    font-size: 1.8em;
    font-weight: 600;
}

/* Form Styling */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 1 1 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Plant Icon Selection */
.icon-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #fafbfc;
}

.icon-option {
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-option input[type="radio"] {
    display: none;
}

.icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.icon-preview:hover {
    border-color: #4CAF50;
    background: #f8fff8;
    transform: translateY(-2px);
}

.icon-option input[type="radio"]:checked + .icon-preview {
    border-color: #4CAF50;
    background: #e8f5e8;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.icon-preview img {
    width: 36px;
    height: 36px;
    margin-bottom: 5px;
}

.icon-name {
    font-size: 10px;
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* File Input Styling */
.file-input {
    border: 2px dashed #e1e5e9 !important;
    background: #fafbfc !important;
    padding: 20px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #4CAF50 !important;
    background: #f8fff8 !important;
}

.file-input:focus {
    border-color: #4CAF50 !important;
    background: white !important;
}

/* Current Image Display */
.current-image {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-image-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Button Styles */
button, .btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary, button[name="create"], button[name="update"] {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-right: 10px;
}

.btn-primary:hover, button[name="create"]:hover, button[name="update"]:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 25px;
}

/* Analytics Dashboard */
.analytics-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.analytics-title h2 {
    margin: 0;
    color: #2E7D32;
    font-size: 1.8em;
    font-weight: 600;
}

.analytics-year-badge {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.analytics-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.analytics-controls .filter-select {
    min-width: 120px;
    max-width: 150px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.analytic-card {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid #6c757d;
    transition: transform 0.3s ease;
}

.analytic-card.highlight {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-left-color: #4CAF50;
}

.analytic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.analytic-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 5px;
}

.analytic-card.highlight .analytic-number {
    color: #2E7D32;
}

.analytic-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.analytic-sublabel {
    font-size: 12px;
    color: #666;
}

.analytics-details {
    border-top: 2px solid #e1e5e9;
    padding-top: 25px;
    margin-top: 20px;
}

.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.analytics-panel {
    background: #fafbfc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.analytics-panel.full-width {
    grid-column: 1 / -1;
}

.analytics-panel h3 {
    margin-bottom: 15px;
    color: #2E7D32;
    font-size: 1.2em;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    min-width: 80px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.bar-container {
    flex: 1;
    height: 25px;
    background: #e9ecef;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.bar-fill.planting {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.bar-fill.harvest {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #333;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
}

/* Timeline Summary Styling */
.timeline-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.timeline-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.timeline-value {
    font-size: 13px;
    font-weight: 700;
    color: #4CAF50;
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.family-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.family-name {
    font-size: 13px;
    font-weight: 500;
}

.family-count {
    font-size: 13px;
    font-weight: 700;
    color: #4CAF50;
    background: #e8f5e8;
    padding: 2px 8px;
    border-radius: 10px;
}

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

.performer-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    text-align: center;
    position: relative;
}

.performer-card.rank-1 {
    border-color: #FFD700;
    background: linear-gradient(135deg, #fff9e6, #fffbf0);
}

.performer-card.rank-2 {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.performer-card.rank-3 {
    border-color: #CD7F32;
    background: linear-gradient(135deg, #fdf6f0, #ffffff);
}

.performer-rank {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #4CAF50;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.performer-card.rank-1 .performer-rank {
    background: #FFD700;
    color: #333;
}

.performer-card.rank-2 .performer-rank {
    background: #C0C0C0;
    color: #333;
}

.performer-card.rank-3 .performer-rank {
    background: #CD7F32;
    color: white;
}

.performer-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.performer-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.yield {
    font-weight: 700;
    color: #4CAF50;
    font-size: 16px;
}

.efficiency {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.2em;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Search and Filter Controls */
.controls-section {
    padding: 20px 30px;
}

.search-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input, .filter-select {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

#sortToggle {
    white-space: nowrap;
}

/* Plant Cards Grid */
.plants-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px !important;
    align-items: start !important; /* This ensures cards align to top */
}

.plant-card {
    background: white !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08) !important;
    border-left: 5px solid #4CAF50 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    max-height: none !important;
    height: auto !important;
    align-self: start !important; /* Prevents stretching */
}

/* Better expansion animation */
.plant-details {
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.plant-details[style*="block"] {
    max-height: 1000px;
    opacity: 1;
}

.plant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #2E7D32);
}

.plant-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Plant Card Images - CRITICAL SIZING */
.plant-card .plant-icon-container {
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.plant-card .plant-image,
.plant-card .plant-icon-container img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.plant-card .plant-image.custom {
    border: 2px solid #e1e5e9 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    box-sizing: border-box !important;
}

.plant-card .plant-image.icon {
    background: #f8f9fa !important;
    padding: 6px !important;
    border: 1px solid #e1e5e9 !important;
    box-sizing: border-box !important;
}

/* Override ANY image styles in plant cards */
.plant-card img {
    max-width: 50px !important;
    max-height: 50px !important;
    width: 50px !important;
    height: 50px !important;
    object-fit: cover !important;
}

/* Plant Summary (Always Visible) */
.plant-summary {
    /* Always visible content */
}

.plant-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 15px !important;
}

.plant-title {
    flex: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    min-width: 0 !important;
}

.plant-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.plant-name {
    font-size: 1.2em !important;
    font-weight: 700 !important;
    color: #2E7D32 !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.3 !important;
}

.plant-name.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.plant-name.clickable:hover {
    color: #4CAF50;
}

.expand-icon {
    font-size: 0.7em;
    color: #666;
    transition: transform 0.3s ease;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.plant-variety {
    color: #666 !important;
    font-style: italic !important;
    font-size: 0.85em !important;
    line-height: 1.2 !important;
}

.plant-status {
    text-align: right;
}

.plant-id {
    background: #e8f5e8;
    color: #2E7D32;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.planted {
    background: #fff3cd;
    color: #856404;
}

.status-badge.germinated {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.harvested {
    background: #d4edda;
    color: #155724;
}

/* Plant Summary Info */
.plant-summary-info {
    margin-top: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 0;
    font-size: 14px;
}

.summary-label {
    font-weight: 600;
    color: #555;
}

.summary-value {
    color: #333;
    text-align: right;
}

.summary-value.highlight {
    color: #4CAF50;
    font-weight: 600;
}

.more-tags {
    background: #f8f9fa;
    color: #666;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-style: italic;
}

/* Plant Details (Expandable) */
.plant-details {
    overflow: hidden;
    transition: all 0.3s ease;
}

.details-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e1e5e9, transparent);
    margin: 15px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 0;
    font-size: 13px;
}

.detail-row:last-of-type {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

.days-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

/* Plant Actions */
.plant-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 15px;
}

.delete-form {
    display: inline;
}

/* Tags Styling */
.plant-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 3px;
}

.plant-tag.small {
    padding: 2px 6px;
    font-size: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: flex-end;
}

/* Tag Input and Suggestions */
.help-text {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

.tag-suggestions {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.suggestions-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.tag-suggestion {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-suggestion:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-1px);
}

/* Pagination */
.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover:not(.disabled):not(.active) {
    background: #f8f9fa;
    border-color: #4CAF50;
    color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.page-number.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.page-number.disabled {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e9ecef;
}

.page-number.disabled:hover {
    transform: none;
    box-shadow: none;
}

#paginationText {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Messages */
.message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
    border-left: 4px solid;
}

.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* No Plants State */
.no-plants {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.no-plants h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #2E7D32;
}

.no-plants p {
    font-size: 1.1em;
}

/* Hidden class for filtering and pagination */
.hidden, .paginated-hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 25px 20px;
        text-align: left;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .export-btn {
        position: static;
        display: inline-block;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    
    .year-filter-section {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .year-filter-controls {
        justify-content: center;
    }
    
    .btn-large {
        font-size: 16px;
        padding: 12px 25px;
        width: 100%;
    }
    
    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-close {
        align-self: flex-end;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-section, .stats-section, .controls-section {
        padding: 20px;
    }
    
    .plants-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .plant-card {
        padding: 15px !important;
        min-height: auto !important;
    }
    
    .plant-icon-container {
        width: 40px !important;
        height: 40px !important;
    }
    
    .plant-card .plant-image,
    .plant-card .plant-icon-container img,
    .plant-card img {
        width: 40px !important;
        height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .current-image {
        flex-direction: column;
        text-align: center;
    }
    
    .current-image-preview {
        width: 40px !important;
        height: 40px !important;
    }
    
    .icon-selection {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .icon-preview img {
        width: 28px;
        height: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input, .filter-select {
        max-width: none;
    }
    
    .plant-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .plant-status {
        text-align: left;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-value {
        text-align: left;
        margin-left: 0;
    }
    
    .plant-actions {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions button,
    .form-actions a {
        text-align: center;
    }
    
    .pagination-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .analytics-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .analytics-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .plants-grid {
        grid-template-columns: 1fr;
    }
    
    .plant-card {
        padding: 20px;
    }
}