/* Custom CSS for Farms App */

:root {
    --primary-color: #1e5631; 
    --primary-light: #2d7a47;
    --primary-dark: #0f2a16;
    --secondary-color: #20c997;
    --accent-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --equipment-primary: #2c5aa0;
    --equipment-secondary: #4a90e2;
    --equipment-success: #28a745;
    --equipment-warning: #ffc107;
    --equipment-danger: #dc3545;
    --equipment-info: #17a2b8;
    --equipment-light: #f8f9fa;
    --equipment-dark: #343a40;
    --equipment-border: #dee2e6;
    --equipment-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --equipment-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-image {
    position: relative;
    z-index: 2;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Stats Cards */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .min-vh-75 {
        min-height: 60vh;
    }
    
    /* Mobile navbar improvements */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        top: 100%;
        left: auto;
        right: 0;
        z-index: 1060;
        min-width: 160px;
        background-color: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
        margin-top: 0.5rem;
        display: none;
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block !important;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.75rem 1rem;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.2s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        text-decoration: none;
        user-select: none;
    }
    
    .navbar-nav .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .dropdown-item:hover {
        color: var(--accent-color);
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .dropdown-toggle::after {
        margin-left: 0.5rem;
    }
    
    /* Ensure dropdown is visible on mobile */
    .navbar-nav .dropdown.show .dropdown-menu {
        display: block !important;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Extra small mobile improvements */
    .navbar-nav .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px; /* Minimum touch target size */
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .dropdown-toggle {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Ensure dropdown works on very small screens */
    .navbar-nav .dropdown-menu {
        min-width: 140px;
        right: 0;
        left: auto;
    }
    
    .navbar-nav .dropdown-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Mobile footer improvements */
    footer .row > div {
        margin-bottom: 2rem;
    }
    
    footer .newsletter-form .input-group {
        flex-direction: column;
    }
    
    footer .newsletter-form .btn {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    footer .d-flex.gap-3 {
        justify-content: center;
    }
    
    footer .text-md-end {
        text-align: center !important;
    }
    
    footer .d-flex.flex-wrap {
        justify-content: center !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #05200b 0%, #0a3d15 50%, #05200b 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.footer-top {
    position: relative;
    z-index: 2;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

/* Trust Badges */
.trust-badges .badge {
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.trust-badges .badge:hover {
    background-color: rgba(40, 167, 69, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

/* Social Links */
.social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-links .social-link:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Footer Links */
.footer-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-link:hover {
    color: var(--accent-color) !important;
    transform: translateX(5px);
}

.footer-legal-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.footer-legal-link:hover {
    color: var(--accent-color) !important;
}

/* Newsletter Form */
.newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 25px 0 0 25px;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    color: white;
}

.newsletter-form .btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0 25px 25px 0;
    padding: 0.375rem 1rem;
}

.newsletter-form .btn-success:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Contact Info */
.contact-info .d-flex {
    transition: all 0.2s ease;
}

.contact-info .d-flex:hover {
    transform: translateX(5px);
}

.contact-info .d-flex i {
    width: 16px;
    text-align: center;
}

/* Footer Sections */
footer .text-success {
    color: var(--primary-color) !important;
}

footer .fas.fa-chevron-right {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

footer .list-unstyled li {
    transition: all 0.2s ease;
}

footer .list-unstyled li:hover .fas.fa-chevron-right {
    opacity: 1;
    transform: translateX(3px);
}

footer .border-secondary {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Footer Brand */
.footer-brand h5 {
    position: relative;
}

.footer-brand h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

/* Hover Effects */
footer .list-unstyled li {
    transition: all 0.2s ease;
}

footer .list-unstyled li:hover {
    transform: translateX(5px);
}

/* Login Form */
.login-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.login-form .form-control.is-invalid {
    border-color: #dc3545;
}

.login-form .form-control.is-valid {
    border-color: var(--primary-color);
}

.login-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.login-form .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.login-form .btn-success {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-form .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.login-form .card {
    border-radius: 15px;
    overflow: hidden;
}

.login-form .card-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.login-form .input-group-text {
    background-color: rgba(40, 167, 69, 0.1);
    border: 2px solid #e9ecef;
    border-right: none;
}

.login-form .input-group .form-control {
    border-left: none;
}

.login-form .input-group .form-control:focus {
    border-left: none;
    box-shadow: none;
}

.login-form .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
}

.login-form .text-danger {
    color: #dc3545 !important;
}

.login-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.login-form .was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.login-form .btn-outline-primary,
.login-form .btn-outline-info {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-form .btn-outline-primary:hover,
.login-form .btn-outline-info:hover {
    transform: translateY(-1px);
}

/* Registration Form */
.registration-form .form-control,
.registration-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.registration-form .form-control:focus,
.registration-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.registration-form .form-control.is-invalid,
.registration-form .form-select.is-invalid {
    border-color: #dc3545;
}

.registration-form .form-control.is-valid,
.registration-form .form-select.is-valid {
    border-color: var(--primary-color);
}

.registration-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.registration-form .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.registration-form .btn-success {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.registration-form .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.registration-form .card {
    border-radius: 15px;
    overflow: hidden;
}

.registration-form .card-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.registration-form h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.registration-form .text-danger {
    color: #dc3545 !important;
}

.registration-form .form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.registration-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.registration-form .was-validated .form-control:invalid ~ .invalid-feedback,
.registration-form .was-validated .form-select:invalid ~ .invalid-feedback {
    display: block;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .trust-badges .d-flex {
        justify-content: center;
    }
    
    .social-links .d-flex {
        justify-content: center;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .footer-bottom .d-flex {
        justify-content: center !important;
    }
    
    .footer-bottom .text-md-end {
        text-align: center !important;
    }
    
    .registration-form .card-body {
        padding: 2rem !important;
    }
    
    .registration-form h1 {
        font-size: 2rem;
    }
    
    .login-form .card-body {
        padding: 2rem !important;
    }
    
    .login-form h1 {
        font-size: 2rem;
    }
}

/* ========================================
   EQUIPMENT MANAGEMENT STYLES
   ======================================== */

/* Equipment Dashboard Header */
.equipment-header {
    background: linear-gradient(135deg, var(--equipment-primary) 0%, var(--equipment-secondary) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--equipment-shadow-lg);
}

.equipment-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.equipment-header .subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Statistics Cards */
.equipment-stats {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--equipment-shadow);
    border: 1px solid var(--equipment-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--equipment-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--equipment-shadow-lg);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.primary .stat-icon {
    background: rgba(44, 90, 160, 0.1);
    color: var(--equipment-primary);
}

.stat-card.success .stat-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--equipment-success);
}

.stat-card.warning .stat-icon {
    background: rgba(255, 193, 7, 0.1);
    color: var(--equipment-warning);
}

.stat-card.danger .stat-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--equipment-danger);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--equipment-dark);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    font-weight: 600;
}

/* Equipment Table */
.equipment-table-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--equipment-shadow);
    overflow: hidden;
    border: 1px solid var(--equipment-border);
}

.equipment-table-container .table-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--equipment-border);
}

.equipment-table-container .table-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--equipment-dark);
}

.equipment-table {
    margin: 0;
}

.equipment-table thead th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: var(--equipment-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.equipment-table tbody td {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem;
    vertical-align: middle;
}

.equipment-table tbody tr:hover {
    background: rgba(44, 90, 160, 0.05);
}

.equipment-table tbody tr:last-child td {
    border-bottom: none;
}

/* Equipment Name Styling */
.equipment-name {
    font-weight: 600;
    color: var(--equipment-dark);
    margin-bottom: 0.25rem;
}

.equipment-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--equipment-success);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-badge.maintenance {
    background: rgba(255, 193, 7, 0.1);
    color: var(--equipment-warning);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-badge.repair {
    background: rgba(220, 53, 69, 0.1);
    color: var(--equipment-danger);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-badge.retired {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--equipment-shadow);
}

.action-btn.view {
    background: rgba(23, 162, 184, 0.1);
    color: var(--equipment-info);
}

.action-btn.view:hover {
    background: var(--equipment-info);
    color: white;
}

.action-btn.edit {
    background: rgba(255, 193, 7, 0.1);
    color: var(--equipment-warning);
}

.action-btn.edit:hover {
    background: var(--equipment-warning);
    color: white;
}

.action-btn.delete {
    background: rgba(220, 53, 69, 0.1);
    color: var(--equipment-danger);
}

.action-btn.delete:hover {
    background: var(--equipment-danger);
    color: white;
}

/* Filters Section */
.equipment-filters {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--equipment-shadow);
    border: 1px solid var(--equipment-border);
    margin-bottom: 2rem;
}

.equipment-filters .filter-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--equipment-border);
    border-radius: 1rem 1rem 0 0;
}

.equipment-filters .filter-body {
    padding: 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--equipment-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Buttons */
.btn-equipment {
    background: var(--equipment-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-equipment:hover {
    background: var(--equipment-secondary);
    transform: translateY(-2px);
    box-shadow: var(--equipment-shadow-lg);
    color: white;
}

.btn-equipment-outline {
    background: transparent;
    border: 2px solid var(--equipment-primary);
    color: var(--equipment-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-equipment-outline:hover {
    background: var(--equipment-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--equipment-shadow-lg);
}

/* Empty State */
.equipment-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.equipment-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.equipment-empty h5 {
    margin-bottom: 1rem;
    color: var(--equipment-dark);
}

.equipment-empty p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Equipment Details */
.equipment-details {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--equipment-shadow);
    border: 1px solid var(--equipment-border);
    overflow: hidden;
}

.equipment-details .details-header {
    background: linear-gradient(135deg, var(--equipment-primary) 0%, var(--equipment-secondary) 100%);
    color: white;
    padding: 2rem;
}

.equipment-details .details-body {
    padding: 2rem;
}

.detail-row {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--equipment-dark);
    min-width: 150px;
    margin-right: 1rem;
}

.detail-value {
    color: #6c757d;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .equipment-header {
        padding: 1.5rem 0;
        text-align: center;
    }
    
    .equipment-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .equipment-table-container {
        overflow-x: auto;
    }
    
    .equipment-table {
        min-width: 600px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .equipment-filters .filter-body {
        padding: 1rem;
    }
    
    .equipment-details .details-body {
        padding: 1rem;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        min-width: auto;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========================================
   TASK MANAGEMENT STYLES
   ======================================== */

/* Task Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 86, 49, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(30, 86, 49, 0.3);
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-card .stats-content {
    text-align: center;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Task Cards */
.task-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.task-card.overdue {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.task-card.due-today {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.task-card.completed {
    opacity: 0.8;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Task Status Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-pending {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white;
}

.badge.bg-in_progress {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white;
}

.badge.bg-in_review {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white;
}

.badge.bg-completed {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    color: white;
}

.badge.bg-cancelled {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white;
}

/* Priority Badges */
.badge.bg-high {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white;
}

.badge.bg-medium {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529;
}

.badge.bg-low {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white;
}

/* Task Detail Rows */
.detail-row {
    display: flex;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.detail-value {
    flex: 1;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Task Form Styles */
.task-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.task-form .form-control,
.task-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.task-form .form-control:focus,
.task-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 86, 49, 0.25);
}

.task-form .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
}

.task-form .form-check-label {
    font-weight: 500;
    color: var(--text-primary);
}

/* Task Table Styles */
.table-task {
    background: var(--background-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.table-task thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 1rem;
    border: none;
}

.table-task tbody tr {
    transition: all 0.3s ease;
}

.table-task tbody tr:hover {
    background: linear-gradient(135deg, rgba(30, 86, 49, 0.05) 0%, rgba(30, 86, 49, 0.02) 100%);
    transform: scale(1.01);
}

.table-task tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-task .task-title {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-task .task-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.table-task .task-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Action Buttons */
.btn-task-action {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    margin: 0 0.125rem;
}

.btn-task-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-task-complete {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.btn-task-complete:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    color: white;
}

.btn-task-reopen {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.btn-task-reopen:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    color: #212529;
}

.btn-task-edit {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-task-edit:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
}

.btn-task-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-task-delete:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
}

/* Filter Card */
.filter-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.filter-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

.filter-card .card-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 2rem;
}

/* Quick Actions Sidebar */
.quick-actions {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-actions .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

.quick-actions .card-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.quick-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Task Info Card */
.task-info {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
}

.task-info .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

.task-info .card-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .stats-card .stats-number {
        font-size: 2rem;
    }
    
    .stats-card .stats-icon {
        font-size: 2rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-label {
        min-width: auto;
        margin-bottom: 0.25rem;
        margin-right: 0;
    }
    
    .table-task {
        font-size: 0.85rem;
    }
    
    .table-task thead th {
        padding: 0.75rem 0.5rem;
    }
    
    .table-task tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn-task-action {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        margin: 0.125rem;
    }
}

/* Animation for task cards */
@keyframes taskSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card {
    animation: taskSlideIn 0.3s ease-out;
}

/* Priority indicators */
.priority-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.priority-indicator.high {
    background: var(--danger-color);
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.4);
}

.priority-indicator.medium {
    background: var(--warning-color);
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.4);
}

.priority-indicator.low {
    background: var(--info-color);
    box-shadow: 0 0 6px rgba(23, 162, 184, 0.4);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.pending {
    background: #6c757d;
}

.status-indicator.in_progress {
    background: #007bff;
    animation: pulse 2s infinite;
}

.status-indicator.in_review {
    background: #17a2b8;
}

.status-indicator.completed {
    background: #28a745;
}

.status-indicator.cancelled {
    background: #dc3545;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* ========================================
   LIVESTOCK EDIT PAGE STYLES
   ======================================== */

/* Page Header */
.page-header-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(30, 86, 49, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    backdrop-filter: blur(10px);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.livestock-info-badges .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    margin-right: 0.5rem;
    backdrop-filter: blur(10px);
}

.header-actions .btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(30, 86, 49, 0.1);
}

.form-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border: none;
}

.form-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    backdrop-filter: blur(10px);
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.form-card-body {
    padding: 2rem;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(30, 86, 49, 0.1);
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Enhanced Form Groups */
.form-group-enhanced {
    margin-bottom: 1.5rem;
}

.form-group-enhanced .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group-enhanced .form-control,
.form-group-enhanced .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group-enhanced .form-control:focus,
.form-group-enhanced .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 86, 49, 0.15);
    background: white;
}

.form-group-enhanced .form-control::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Dynamic Item Cards */
.dynamic-item-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dynamic-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.dynamic-item-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.item-title h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.item-title small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dynamic-item-body {
    padding: 1.5rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-title {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.empty-state-description {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Actions */
.form-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

.form-actions-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-actions-buttons .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.form-actions-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(30, 86, 49, 0.3);
}

.form-actions-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 86, 49, 0.4);
}

.form-actions-buttons .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.form-actions-buttons .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .header-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .form-card-header {
        padding: 1.5rem;
    }
    
    .form-card-body {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .dynamic-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dynamic-item-body {
        padding: 1rem;
    }
    
    .form-actions {
        padding: 1.5rem;
    }
    
    .form-actions .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions-buttons {
        width: 100%;
    }
    
    .form-actions-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .page-header-card {
        padding: 1rem;
    }
    
    .form-card-header {
        padding: 1rem;
    }
    
    .form-card-body {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .dynamic-item-header {
        padding: 1rem;
    }
    
    .dynamic-item-body {
        padding: 0.75rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
}

/* Animation for form sections */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideInUp 0.5s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* ========================================
   MOBILE LAYOUT FIXES
   ======================================== */

/* Fix for crops page and other farm management pages */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .farm-management {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ensure cards don't overflow */
    .card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Fix for statistics cards */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 15px;
    }
}

/* ========================================
   CROP NEW PAGE STYLES
   ======================================== */

/* Crop-specific page styling */
.crop-new-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* ========================================
   REGISTRATION PAGE STYLES
   ======================================== */

/* Registration section background */
.registration-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.registration-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Registration card */
.registration-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.registration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8, #6f42c1);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Registration header */
.registration-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    animation: float 3s ease-in-out infinite;
}

.registration-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.registration-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.registration-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.6;
}

/* Form sections */
.form-sections {
    margin-top: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-section:hover {
    background: rgba(248, 249, 250, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(40, 167, 69, 0.1);
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.section-icon i {
    color: white;
    font-size: 1.1rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* Form controls */
.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-floating > .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-floating > .form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.06 1.06L6.73 5.3l.94.94L4.3 9.3z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-floating > .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 2px solid transparent;
    transform-origin: 0 0;
    transition: all 0.1s ease-in-out;
    color: #6c757d;
    font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating.focused > label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #28a745;
    font-weight: 600;
}

/* Custom checkboxes */
.custom-checkbox {
    position: relative;
    padding-left: 2rem;
}

.custom-checkbox .form-check-input {
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.custom-checkbox .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.custom-checkbox .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.custom-checkbox .form-check-label {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.5;
    cursor: pointer;
}

.custom-checkbox .form-check-label a {
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.custom-checkbox .form-check-label a:hover {
    color: #20c997;
    text-decoration: underline;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.75rem;
}

.password-strength-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 3px;
    position: relative;
}

.password-strength-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.password-strength-weak .password-strength-fill {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
    width: 25%;
}

.password-strength-fair .password-strength-fill {
    background: linear-gradient(90deg, #ffc107, #f39c12);
    width: 50%;
}

.password-strength-good .password-strength-fill {
    background: linear-gradient(90deg, #17a2b8, #3498db);
    width: 75%;
}

.password-strength-strong .password-strength-fill {
    background: linear-gradient(90deg, #28a745, #2ecc71);
    width: 100%;
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
}

.password-match-text {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
    transition: all 0.3s ease;
}

/* Form validation - Global styles for all forms */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #dc3545 !important;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 500;
}

/* Global invalid input styles - red color for all form controls */
.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.is-invalid:focus,
.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-tooltip {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* Radio button and checkbox invalid states */
input[type="radio"].is-invalid,
input[type="radio"]:invalid,
input[type="checkbox"].is-invalid,
input[type="checkbox"]:invalid {
    border-color: #dc3545 !important;
}

input[type="radio"].is-invalid:checked,
input[type="radio"]:invalid:checked,
input[type="checkbox"].is-invalid:checked,
input[type="checkbox"]:invalid:checked {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Form error messages - red color for all error types */
.form-error,
.error-message,
.text-danger,
.form-error ul li,
.error ul li,
.form-group .error,
.form-group .form-error {
    color: #dc3545 !important;
}

/* Error lists (Symfony form errors often use ul/li) */
ul li,
.form-error ul li,
.error ul li,
.invalid-feedback ul li {
    color: #dc3545 !important;
}

/* Form group errors - target errors near form fields */
.form-group:has(.is-invalid) .invalid-feedback,
.form-group:has(input:invalid) .invalid-feedback,
.form-group:has(select:invalid) .invalid-feedback,
.form-group:has(textarea:invalid) .invalid-feedback,
.form-group:has(.is-invalid) .form-error,
.form-group:has(.is-invalid) .error,
.mb-3:has(.is-invalid) .invalid-feedback,
.mb-3:has(.is-invalid) ul li,
div:has(.is-invalid) + .invalid-feedback,
div:has(.is-invalid) + ul li {
    color: #dc3545 !important;
}

/* Form check (radio/checkbox) validation errors */
.form-check:has(.is-invalid) .invalid-feedback,
.form-check:has(input:invalid) .invalid-feedback,
.form-check-input.is-invalid ~ .invalid-feedback,
.form-check-input:invalid ~ .invalid-feedback {
    color: #dc3545 !important;
    display: block !important;
}

input[type="checkbox"].is-invalid:checked,
input[type="checkbox"]:invalid:checked {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Form group validation messages */
.form-group:has(.is-invalid) .invalid-feedback,
.form-group:has(input:invalid) .invalid-feedback,
.form-group:has(select:invalid) .invalid-feedback,
.form-group:has(textarea:invalid) .invalid-feedback,
.mb-3:has(.is-invalid) .invalid-feedback,
.mb-3:has(input:invalid) .invalid-feedback {
    color: #dc3545 !important;
    display: block !important;
}

/* Radio button and checkbox group validation */
.form-check-input.is-invalid ~ .invalid-feedback,
.form-check-input:invalid ~ .invalid-feedback,
.form-check:has(.is-invalid) .invalid-feedback,
.form-check:has(input:invalid) .invalid-feedback {
    color: #dc3545 !important;
    display: block !important;
}

/* General form validation - ensure all error messages are red */
form .invalid-feedback,
form .form-error,
form .error,
form ul li,
.needs-validation .invalid-feedback,
.needs-validation .form-error,
.needs-validation .error,
.needs-validation ul li {
    color: #dc3545 !important;
}

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    display: block;
}

/* Form actions */
.form-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.btn-register {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 16px;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997, #28a745);
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:active {
    transform: translateY(-1px);
}

.btn-register:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login link section */
.login-link-section {
    margin-top: 2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.divider-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.login-text {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

.login-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

.login-link:hover {
    color: #20c997;
    text-decoration: none;
    transform: translateX(2px);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Responsive design */
@media (max-width: 768px) {
    .registration-title {
        font-size: 2rem;
    }
    
    .registration-subtitle {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .btn-register {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Animation for form sections */
.form-section {
    animation: slideInUp 0.6s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Crop info badges */
.crop-info-badges .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    margin-right: 0.5rem;
    backdrop-filter: blur(10px);
}

/* Crop form specific styling */
.crop-form .form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crop-form .form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.crop-form .form-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(30, 86, 49, 0.1);
    transform: translateY(-2px);
}

/* Section icons with crop theme */
.crop-form .section-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Planting section specific styling */
.crop-form .form-section:nth-child(2) {
    border-left: 4px solid #28a745;
}

.crop-form .form-section:nth-child(2)::before {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

/* Harvest section specific styling */
.crop-form .form-section:nth-child(3) {
    border-left: 4px solid #ffc107;
}

.crop-form .form-section:nth-child(3)::before {
    background: linear-gradient(90deg, #ffc107 0%, #ff8c00 100%);
}

/* Additional info section specific styling */
.crop-form .form-section:nth-child(4) {
    border-left: 4px solid #17a2b8;
}

.crop-form .form-section:nth-child(4)::before {
    background: linear-gradient(90deg, #17a2b8 0%, #20c997 100%);
}

/* Enhanced form controls for crop form */
.crop-form .form-group-enhanced .form-control,
.crop-form .form-group-enhanced .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.crop-form .form-group-enhanced .form-control:focus,
.crop-form .form-group-enhanced .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 86, 49, 0.15);
    background: white;
    transform: translateY(-1px);
}

.crop-form .form-group-enhanced .form-control::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Date input styling */
.crop-form input[type="date"] {
    position: relative;
}

.crop-form input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Number input styling */
.crop-form input[type="number"] {
    text-align: right;
}

.crop-form input[type="number"]::-webkit-outer-spin-button,
.crop-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Textarea styling */
.crop-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form validation states for crop form */
.crop-form .is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15) !important;
}

.crop-form .is-valid {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.15) !important;
}

/* Crop form animations */
@keyframes cropFormSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crop-form .form-section {
    animation: cropFormSlideIn 0.6s ease-out;
}

.crop-form .form-section:nth-child(1) { animation-delay: 0.1s; }
.crop-form .form-section:nth-child(2) { animation-delay: 0.2s; }
.crop-form .form-section:nth-child(3) { animation-delay: 0.3s; }
.crop-form .form-section:nth-child(4) { animation-delay: 0.4s; }

/* Crop form loading state */
.crop-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.crop-form.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

/* Responsive design for crop form */
@media (max-width: 768px) {
    .crop-form .form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .crop-form .section-title {
        font-size: 1.1rem;
    }
    
    .crop-form .section-description {
        font-size: 0.9rem;
    }
    
    .crop-form .form-group-enhanced {
        margin-bottom: 1rem;
    }
    
    .crop-form .form-actions {
        padding: 1.5rem;
    }
    
    .crop-form .form-actions .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .crop-form .form-actions-buttons {
        width: 100%;
    }
    
    .crop-form .form-actions-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .crop-form .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .crop-form .section-header {
        margin-bottom: 1.5rem;
    }
    
    .crop-form .form-group-enhanced .form-control,
    .crop-form .form-group-enhanced .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Crop form success state */
.crop-form.success .form-section {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, #ffffff 100%);
}

.crop-form.success .form-section::before {
    background: linear-gradient(90deg, var(--success-color) 0%, #20c997 100%);
}

/* Crop form error state */
.crop-form.error .form-section {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, #ffffff 100%);
}

.crop-form.error .form-section::before {
    background: linear-gradient(90deg, var(--danger-color) 0%, #ff6b6b 100%);
}

/* ========================================
   ENHANCED TASK FORM STYLES
   ======================================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Form Card Enhancements */
.card.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border-radius: 15px;
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.card-header.bg-gradient-primary {
    border: none;
    padding: 1.5rem 2rem;
}

.form-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-header .card-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.card-header small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Form Sections */
.form-section {
    position: relative;
    padding: 1.5rem;
    background: var(--background-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(30, 86, 49, 0.1);
}

.section-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-light);
}

/* Enhanced Form Groups */
.form-group-enhanced {
    margin-bottom: 1.5rem;
}

.form-group-enhanced .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group-enhanced .form-control,
.form-group-enhanced .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background-primary);
}

.form-group-enhanced .form-control:focus,
.form-group-enhanced .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 86, 49, 0.15);
    background: white;
}

.form-group-enhanced .form-control::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Radio Button Styling */
.form-group-enhanced .form-check {
    margin-bottom: 1rem;
}

.form-group-enhanced .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-group-enhanced .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-group-enhanced .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 86, 49, 0.15);
}

.form-group-enhanced .form-check-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-group-enhanced .form-check-label:hover {
    color: var(--primary-color);
}

/* Recurrence Field */
.recurrence-field {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.recurrence-field.active {
    opacity: 1;
}

/* Form Actions */
.form-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.form-actions .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(30, 86, 49, 0.3);
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 86, 49, 0.4);
}

.form-actions .btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.form-actions .btn-outline-secondary:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
}

/* Help Card */
.help-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.help-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.help-item i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.help-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Enhanced Input Focus States */
.task-form .form-control:focus,
.task-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 86, 49, 0.15);
    background: white;
}

/* Form Validation States */
.task-form .is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15) !important;
}

.task-form .is-valid {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.15) !important;
}

/* Responsive Design for Task Form */
@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-actions {
        padding: 1.5rem;
    }
    
    .form-actions .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .help-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .card-header {
        padding: 1rem 1.5rem;
    }
    
    .form-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Animation for form sections */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideInUp 0.5s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Form Loading State */
.task-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.task-form.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   NAVBAR USER MENU STYLES
   ======================================== */

/* User avatar in navbar */
.navbar .user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
}

.navbar .user-avatar:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* User dropdown menu */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.3s ease;
    border-radius: 0;
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    transform: translateX(4px);
}

.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.navbar .dropdown-item:hover i {
    color: #2c3e50;
}

.navbar .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* User name in navbar */
.navbar .nav-link span {
    font-weight: 500;
    color: white;
}

.navbar .nav-link:hover span {
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .navbar .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .navbar .nav-link span {
        display: none;
    }
    
    .navbar .dropdown-menu {
        margin-top: 0.25rem;
    }
}

/* Notification Badge - Make it visible and on top */
#notificationDropdown .badge {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 0.35em 0.65em !important;
    min-width: 1.6em !important;
    height: 1.6em !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
    position: absolute !important;
    top: -0.4em !important;
    left: 100% !important;
    transform: translate(-50%, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    border-radius: 0.5rem !important;
}

/* Ensure notification dropdown and parent elements allow badge visibility */
#notificationDropdown {
    overflow: visible !important;
    position: relative !important;
    z-index: 100 !important;
}

.nav-item.dropdown {
    overflow: visible !important;
    position: relative !important;
    z-index: 100 !important;
}

.navbar-nav {
    overflow: visible !important;
}

/* Ensure badge stays on top in all states */
#notificationDropdown:hover .badge,
#notificationDropdown:focus .badge,
#notificationDropdown:active .badge,
#notificationDropdown[aria-expanded="true"] .badge,
#notificationDropdown[aria-expanded="false"] .badge {
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
    position: absolute !important;
    top: -0.4em !important;
    left: 100% !important;
}