:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #10b981;
    --primary-hover: #059669;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Background Gradients */
.login-bg, .dashboard-bg {
    background: radial-gradient(circle at 10% 20%, rgb(4, 21, 26) 0%, rgb(20, 31, 46) 90%);
    background-attachment: fixed;
    position: relative;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- LOGIN PAGE --- */
.login-bg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.plant-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.logo-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 1rem;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    height: 1.2rem;
    text-align: center;
}

/* --- DASHBOARD PAGE --- */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#userGreeting {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.total-card {
    min-width: 250px;
    text-align: right;
    border-left: 4px solid var(--primary);
}

.total-card h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stage-card {
    border-top: 3px solid var(--accent-color);
    transition: transform 0.2s ease;
}

.stage-card:hover {
    transform: translateY(-5px);
}

.stage-card h3 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.updates-section {
    padding: 1.5rem;
}

.updates-section h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.updates-list {
    list-style: none;
}

.updates-list li {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 2px solid var(--text-muted);
    transition: background 0.2s;
}

.updates-list li:hover {
    background: rgba(255, 255, 255, 0.06);
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}