/* HydroHub Portal Styles */

/* Login & Registration Page Styles */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.login-header .logo {
    margin-bottom: 20px;
}

.login-header .logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
}

.login-header .domain {
    color: var(--light-green);
}

.login-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 0;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #c62828;
    transition: var(--transition);
}

.success-message {
    background: #e8f5e8;
    color: var(--primary-green-dark);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    display: block;
}

.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: var(--primary-green);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

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

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary-green);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: var(--transition);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--light-green);
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--light-green);
}

.login-visual {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9), rgba(76, 175, 80, 0.9)), 
                url('../assets/hydroponic-farm.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
}

.visual-content {
    text-align: center;
}

.visual-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: white;
}

.visual-content p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.feature-item i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

/* Dashboard Styles */
.dashboard-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-nav .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: #f5f5f5;
    color: var(--text-dark);
}

.dashboard-content {
    padding: 24px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-content {
    color: var(--text-light);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

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

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e8;
    color: var(--primary-green);
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-completed {
    background: #e3f2fd;
    color: var(--primary-blue);
}

.harvest-toggle {
    display: flex;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px;
    margin: 12px 0;
}

.toggle-option {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.toggle-option.active {
    background: var(--primary-green);
    color: white;
}

.toggle-option:not(.active) {
    color: var(--text-light);
}

.toggle-option:not(.active):hover {
    background: #e0e0e0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-dark);
}

.data-table td {
    color: var(--text-light);
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-visual {
        display: none;
    }
    
    .login-card {
        padding: 24px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .user-menu {
        gap: 8px;
    }
    
    .user-info span {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 12px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .dashboard-content {
        padding: 16px 0;
    }
    
    .dashboard-card {
        padding: 16px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Responsive Styles for Dashboard Navigation */
@media (max-width: 768px) {
    .dashboard-nav {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav-links {
        display: none !important;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 20px;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        font-size: 24px;
        cursor: pointer;
        color: var(--primary-green);
        order: 2;
    }
    
    .user-menu {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin-top: 16px;
    }
    
    .dashboard-nav .logo {
        order: 1;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 12px 0;
    }
    
    .dashboard-nav .logo {
        font-size: 20px;
    }
    
    .user-info span {
        font-size: 14px;
    }
    
    .nav-links {
        top: 70px;
        padding: 16px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .user-menu {
        gap: 12px;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .dashboard-nav .logo {
        font-size: 18px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .nav-links {
        padding: 12px;
    }
    
    .nav-links a {
        font-size: 13px;
        padding: 8px 0;
    }
}