* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --accent: #66BB6A;
    --bg: #F1F8E9;
    --card-bg: #FFFFFF;
    --text: #212121;
    --text-light: #757575;
    --border: #E0E0E0;
    --error: #F44336;
    --warning: #FF9800;
    --success: #4CAF50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #388E3C;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

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

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.header {
    background: var(--card-bg);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: var(--primary);
    font-size: 1.8rem;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab:hover {
    color: var(--primary);
}

.tab-content {
    display: none;
}

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

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.plant-list {
    display: grid;
    gap: 16px;
}

.plant-item {
    background: var(--bg);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plant-item.overdue {
    border-left-color: var(--error);
    background: #FFEBEE;
}

.plant-info h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.plant-details {
    color: var(--text-light);
    font-size: 0.9rem;
}

.plant-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-card .number {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: bold;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #4CAF50;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #F44336;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    color: var(--primary);
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.close:hover {
    color: var(--error);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.badge-error {
    background: #FFEBEE;
    color: #C62828;
}

.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-spin 0.6s linear infinite;
}

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

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
    animation: celebration-fade 2s ease-out forwards;
}

.celebration__content {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.4);
    text-align: center;
    animation: celebration-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.celebration__icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: celebration-icon-spin 0.6s ease-out;
}

.celebration__text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.celebration__subtext {
    font-size: 1rem;
    opacity: 0.9;
}

.celebration--water .celebration__content {
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.4);
}

.celebration--repot .celebration__content {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    box-shadow: 0 10px 40px rgba(255, 152, 0, 0.4);
}

@keyframes celebration-fade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes celebration-bounce {
    0% {
        transform: scale(0.3) translateY(50px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes celebration-icon-spin {
    0% {
        transform: rotate(0deg) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alert-slide-in 0.3s ease-out;
}

@keyframes alert-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .plant-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .plant-actions {
        margin-top: 12px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .celebration__content {
        padding: 30px 40px;
        margin: 20px;
    }
    
    .celebration__icon {
        font-size: 3rem;
    }
    
    .celebration__text {
        font-size: 1.2rem;
    }
}
