/* Estilos personalizados para el sistema agrícola */

:root {
    --green-dark: #1b5e20;
    --green-medium: #2e7d32;
    --green-light: #4caf50;
    --green-accent: #c8e6c9;
    --green-pale: #e8f5e9;
    --accent-gold: #ffd54f;
    --accent-brown: #795548;
    --accent-brown-light: #a1887f;
    --text-dark: #263238;
    --light-gray: #f8f9fa;
    --border-radius: 8px;
}

/* Estilos generales */
body {
    font-family: 'Lato', sans-serif;
    background-color: #f5f8f5;
    background-image: linear-gradient(120deg, #f5f8f5, #e8f5e9);
}

.card {
    border-radius: var(--border-radius);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.1);
    border: none;
    margin-bottom: 20px;
    border-top: 3px solid var(--green-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.15);
}

.card-header {
    background: linear-gradient(to right, var(--green-medium), var(--green-light)) !important;
    color: white !important;
    font-weight: 600;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border-bottom: none;
    padding: 15px 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card-body {
    padding: 20px;
}

/* Botones */
.btn {
    border-radius: 30px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-medium), var(--green-light));
    border-color: var(--green-medium);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--green-dark), var(--green-medium));
    border-color: var(--green-dark);
    box-shadow: 0 6px 12px rgba(27, 94, 32, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-brown), var(--accent-brown-light));
    border-color: var(--accent-brown);
    box-shadow: 0 4px 10px rgba(121, 85, 72, 0.3);
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #5d4037, var(--accent-brown));
    border-color: #5d4037;
    box-shadow: 0 6px 12px rgba(93, 64, 55, 0.4);
    transform: translateY(-2px);
}

/* Tablas */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: linear-gradient(to right, var(--green-dark), var(--green-medium));
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 15px 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(200, 230, 201, 0.2);
}

.table tbody tr:hover {
    background-color: rgba(200, 230, 201, 0.5);
}

.table td {
    padding: 12px 20px;
    vertical-align: middle;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Formularios */
.form-control {
    border-radius: 5px;
    border: 1px solid #e1e8f0;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--blueberry-light);
    box-shadow: 0 0 0 0.2rem rgba(106, 158, 211, 0.25);
}

label {
    font-weight: 500;
    color: var(--blueberry-dark);
    margin-bottom: 8px;
}

/* Navegación */
.sidebar .nav-item {
    margin-bottom: 5px;
}

.sidebar .nav-item > a {
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    padding: 12px 15px;
    margin: 0 10px;
}

.sidebar .nav-item > a:hover {
    background-color: var(--green-accent) !important;
    transform: translateX(5px);
}

.sidebar .nav-item.active > a {
    background: linear-gradient(to right, var(--green-medium), var(--green-light)) !important;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.sidebar .nav-item.active > a p {
    color: white !important;
    font-weight: 600;
}

.sidebar .nav-item > a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar .nav-collapse li a {
    padding: 7px 15px;
    border-radius: var(--border-radius);
    margin-left: 5px;
}

.sidebar .nav-collapse li a:hover {
    background-color: rgba(199, 226, 252, 0.5);
}

.sidebar .nav-collapse li.active a {
    background-color: rgba(199, 226, 252, 0.7);
}

/* Encabezados de página */
.page-header {
    border-left: 5px solid var(--green-medium);
    padding-left: 15px;
    margin-bottom: 30px;
    position: relative;
}

.page-header:before {
    content: '';
    position: absolute;
    left: -5px;
    bottom: -5px;
    width: 50px;
    height: 5px;
    background-color: var(--accent-gold);
    border-radius: 10px;
}

.page-header h4 {
    color: var(--green-dark);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header p {
    color: var(--accent-brown);
    font-size: 1rem;
    margin-top: 5px;
}

/* Iconos y badges */
.badge-primary {
    background-color: var(--green-medium);
    padding: 5px 10px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success {
    background-color: var(--accent-brown);
    padding: 5px 10px;
    font-weight: 600;
    border-radius: 20px;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--green-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.icon-circle i {
    color: var(--green-dark);
    font-size: 1.2rem;
}

/* Elementos específicos agrícolas */
.agro-icon {
    color: var(--green-medium);
    margin-right: 5px;
}

.green-card {
    border-top: 3px solid var(--green-medium);
}

.nature-card {
    border-top: 3px solid var(--accent-brown);
}

.gold-card {
    border-top: 3px solid var(--accent-gold);
}

.leaf-bullet {
    list-style: none;
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.leaf-bullet:before {
    content: '🍃';
    position: absolute;
    left: 0;
    top: 0;
}

/* Estadísticas y dashboard */
.stats-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.1);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(46, 125, 50, 0.15);
}

.stats-card .icon-big {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 60px;
    opacity: 0.15;
    color: var(--green-medium);
}

.stats-card .stats-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(to right, var(--green-dark), var(--green-medium));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stats-card .stats-title {
    font-size: 16px;
    color: var(--accent-brown);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card.gold {
    border-left: 4px solid var(--accent-gold);
}

.stats-card.green {
    border-left: 4px solid var(--green-medium);
}

.stats-card.brown {
    border-left: 4px solid var(--accent-brown);
}

/* Animaciones y transiciones */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar .nav-item p {
        font-size: 14px;
    }
    
    .stats-card .stats-number {
        font-size: 22px;
    }
}

/* Estilos para la página de login */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--green-pale), var(--green-accent));
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(76, 175, 80, 0.1) 0%, rgba(200, 230, 201, 0.05) 90%);
    z-index: 0;
}

.login-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 40px auto;
    animation: fadeInUp 0.8s ease-out forwards;
}

.login-left-side {
    background: linear-gradient(135deg, var(--green-dark), var(--green-medium));
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left-side::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.login-left-side::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.login-logo {
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 50%;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.login-tagline {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--green-medium);
    margin-bottom: 15px;
    border-left: 3px solid var(--green-medium);
    padding-left: 10px;
    line-height: 1.4;
    font-weight: 500;
}

.login-subtitle {
    color: #444;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

.login-features {
    margin-top: 40px;
}

.login-feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.login-feature-item:hover {
    transform: translateX(5px);
}

.login-feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(27, 94, 32, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--green-dark);
    font-size: 1.3rem;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.15);
    transition: all 0.3s ease;
}

.login-feature-item:hover .login-feature-icon {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(27, 94, 32, 0.2));
    transform: scale(1.1);
}

.login-feature-text h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green-dark);
    margin: 0 0 8px 0;
    letter-spacing: 0.2px;
}

.login-feature-text p {
    font-size: 0.95rem;
    color: #444;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
    max-width: 90%;
    word-spacing: 0.05rem;
}

.login-right-side {
    padding: 40px;
}

.login-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -0.3px;
}

.login-form-subtitle {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

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

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.login-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #333;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.login-input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green-light), var(--green-dark));
    transition: width 0.3s ease;
}

.login-input:focus + .login-input-line,
.login-input:valid + .login-input-line {
    width: 100%;
}

.login-input:focus {
    outline: none;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    padding: 8px;
}

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

.login-input-icon {
    position: relative;
}

.login-input-icon input {
    padding-left: 45px;
}

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green-medium);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.login-input-group:focus-within .login-input-icon i {
    color: var(--green-dark);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--green-medium), var(--green-light));
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--green-dark), var(--green-medium));
    box-shadow: 0 7px 20px rgba(27, 94, 32, 0.4);
    transform: translateY(-2px);
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
    z-index: -1;
}

.login-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    animation: ripple-animation 0.6s;
    opacity: 0;
}

@keyframes ripple-animation {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

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

.login-remember {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    position: relative;
}

.login-remember input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.login-remember label {
    padding-left: 30px;
    position: relative;
    cursor: pointer;
}

.checkbox-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.login-remember input[type="checkbox"]:checked + label .checkbox-icon {
    background-color: var(--green-medium);
    border-color: var(--green-medium);
}

.login-remember input[type="checkbox"]:checked + label .checkbox-icon:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.login-forgot {
    color: var(--green-medium);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-forgot:hover {
    color: var(--green-dark);
    text-decoration: underline;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.login-divider span {
    flex: 1;
    height: 1px;
    background-color: #e8e8e8;
}

.login-divider-text {
    padding: 0 15px;
    color: #888;
    font-size: 14px;
}

/* Animaciones */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive para login */
@media (max-width: 992px) {
    .login-left-side {
        padding: 30px;
    }
    
    .login-right-side {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .login-container {
        margin: 20px;
    }
    
    .login-left-side {
        display: none;
    }
}
