:root {
    --primary-color: #4B6562;
    --secondary-color: #b7c7a3;
    --accent-color: #d0dbb8;
    --text-dark: #2d4d44;
    --text-light: #6b7c6a;
    --background-light: #f8fafc;
    --card-shadow: 0 4px 18px rgba(60, 60, 60, 0.10);
    --card-hover-shadow: 0 8px 28px rgba(60, 60, 60, 0.16);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* Header Styles */
.admin-header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.admin-header .logo img {
    height: 60px;
    width: auto;
}

.btn-logout {
    background: #ffffff;
    color: var(--primary-color);
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    margin-top: 50px;
    padding: 2rem 0 0 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Action Cards */
.action-cards {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.action-card {
    background: white;
    border-radius: 30px;
    padding: 2.5rem 3rem;
    min-width: 240px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(75, 101, 98, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
    color: var(--text-dark);
}

.action-card:hover::before {
    opacity: 1;
}

.action-card .icon-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: transparent;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-dark);
    border: 3px solid var(--text-dark);
    position: relative;
    transition: all 0.3s ease;
}

.action-card:hover .icon-box {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.action-card:hover h3 {
    color: var(--primary-color);
}

/* Download Apps Section */
.download-apps-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}

.download-app-card {
    color: white !important;
    border: 2px solid;
    max-height: 200px;
    min-width: 150px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.download-app-card.android {
    background: linear-gradient(135deg, #3DDC84 0%, #2E7D32 100%);
    border-color: #2E7D32;
}

.download-app-card.ios {
    background: linear-gradient(135deg, rgb(168, 179, 188) 0%, rgb(83, 88, 92) 100%);
    border-color: #798188ff;
}

.download-app-card::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.download-app-card:hover {
    transform: translateY(-8px);
    color: white !important;
}

.download-app-card.android:hover {
    box-shadow: 0 12px 40px rgba(61, 220, 132, 0.3);
    border-color: #3DDC84;
}

.download-app-card.ios:hover {
    box-shadow: 0 12px 40px rgb(88, 94, 99);
    border-color: #798188ff;
}

.download-app-card .icon-box {
    border: 3px solid white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.download-app-card:hover .icon-box {
    border-color: rgba(255, 255, 255, 0.9);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.download-app-card h3 {
    color: white !important;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.download-app-card:hover h3 {
    color: rgba(255, 255, 255, 0.95) !important;
}

.download-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8) !important;
}

.download-app-card:hover .download-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(180deg, #b7c7a3 0%, #d0dbb8 100%);
    padding: 4rem 0;
    margin: 0 -12px;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.stats-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.stats-cards {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 2.5rem 3rem;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    color: white;
    transform: rotate(5deg);
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-content p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section h1 {
        font-size: 2rem;
    }

    .action-cards {
        gap: 1.5rem;
    }

    .download-apps-section {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .download-app-card {
        min-width: 200px;
        max-width: 280px;
    }

    .action-card {
        min-width: 180px;
        padding: 2rem 2.5rem;
    }

    .action-card .icon-box {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .stats-cards {
        gap: 1.5rem;
    }

    .stat-card {
        min-width: 100%;
        padding: 2rem;
    }

    .stats-section {
        padding: 3rem 2rem;
        margin: 0;
        border-radius: 30px;
    }
}

@media (max-width: 576px) {
    .admin-header .logo img {
        height: 45px;
    }

    .btn-logout {
        padding: 6px 18px;
        font-size: 13px;
    }

    .welcome-section h1 {
        font-size: 1.75rem;
    }

    .action-card {
        min-width: 150px;
        padding: 1.5rem 2rem;
    }

    .action-card .icon-box {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        border-width: 2.5px;
    }

    .action-card h3 {
        font-size: 1.1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .stat-content h3 {
        font-size: 2rem;
    }

    .stat-content p {
        font-size: 0.9rem;
    }

    .btn-logout-red {
        font-size: 12px !important;
        padding: 8px 8px !important;
    }
}

/* Mapa */
.map-section {
    padding: 2rem;
    margin: 0 auto;
    max-width: 200vh;
    max-height: 100vh;
}

.map-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.custom-map {
    width: 70vw;
    max-width: 1400px;
    height: 400px;
    margin: 0 auto 3rem auto;
    border-radius: 25px;
    border: 7px solid #26473c;
    box-shadow: 0 8px 32px rgba(60, 60, 60, 0.10);
    overflow: hidden;
}

@media (max-width: 900px) {
    .custom-map {
        height: 300px;
    }
}

@media (max-width: 600px) {
    .custom-map {
        height: 200px;
    }
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid #272727;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-bottom-color: #17663a;
    animation: rotation 1s linear infinite;
}

.loader img {
    position: absolute;
    left: 50%;
    top: 55%;
    width: 55px;
    height: 55px;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    object-fit: contain;
}

@keyframes rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Botón hamburguesa solo en móviles */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #Fff;
    cursor: pointer;
    margin-left: 1rem;
}

@media (max-width: 767.98px) {
    .hamburger-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .social-icons-nav {
        display: none !important;
    }
}

/* Menú móvil */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100vw;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    transition: right 0.3s cubic-bezier(.4, 0, .2, 1);
}

.mobile-nav.open {
    right: 0;
}

.close-mobile-nav {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    align-self: flex-end;
    margin-bottom: 2rem;
    cursor: pointer;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s, color 0.2s;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    background: var(--secondary-color);
    color: #fff;
}

@media (min-width: 768px) {

    .mobile-nav,
    .hamburger-menu {
        display: none !important;
    }
}

@media (max-width: 600px) {

    .modal-content-modal-arbol,
    .modal-arbol-body,
    .modal-arbol-col,
    .modal-arbol-col p,
    .modal-arbol-col strong {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
    }

    .modal-arbol-header h2 {
        font-size: 1rem !important;
    }

    .modal-arbol-img {
        width: 100% !important;
        max-width: 95vw !important;
        height: auto !important;
        max-height: 40vh !important;
        display: block;
        margin: 0 auto;
        object-fit: contain;
        border-radius: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        background: #f4f4f4;
    }

    .modal-arbol-body {
        flex-direction: column !important;
        gap: 0.7rem !important;
    }

    .modal-arbol-col {
        width: 100% !important;
    }

    .modal-arbol {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        overflow: auto !important;
    }

    .modal-content-modal-arbol {
        max-height: 90vh;
        overflow-y: auto !important;
        width: 95vw;
        margin: 2vh auto;
    }

    body,
    html {
        overflow-x: hidden !important;
    }
}

.color-species-section {
    background: #fff;
    box-shadow: 0 8px 32px 0 rgba(34,49,63,0.10);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    margin: 2rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.color-species-section h2 {
    text-align: center;
    font-size: 2rem;
}
.color-species-section .color-species-desc {
    color: #4B6562;
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    max-width: 90%;
}
.color-species-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 2.5rem;
    width: 100%;
    margin-bottom: 2rem;
}
.color-species-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    font-size: 1.08rem;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.5rem 1rem 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(60,60,60,0.04);
    border: 1px solid #e5e7eb;
}
.color-species-item span {
    flex: 1 1 auto;
    text-align: left;
    color: #2d4d44;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.color-species-item input[type="color"] {
    width: 38px;
    height: 38px;
    border: 2px solid #b7c7a3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border 0.2s;
    box-shadow: 0 1px 4px rgba(60,60,60,0.08);
}
.color-species-item input[type="color"]:hover,
.color-species-item input[type="color"]:focus {
    border: 2px solid #4B6562;
}
.btn-reset-colors {
    margin-top: 0.5rem;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: background 0.2s;
    margin-bottom: 0.7rem;
}
.btn-reset-colors:hover {
    background: #c0392b;
}
.btn-update-colors {
    margin-top: 0.2rem;
    background: #4B6562;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: background 0.2s;
}
.btn-update-colors:hover {
    background: #2d4d44;
}
@media (max-width: 900px) {
    .color-species-section {
        padding: 1.2rem 0.5rem 1rem 0.5rem;
        max-width: 98vw;
    }
    .color-species-list {
        grid-template-columns: 1fr;
        gap: 0.7rem 0;
    }
}
@media (max-width: 600px) {
    .color-species-section {
        padding: 1rem 0.2rem 0.5rem 0.2rem;
    }
    .color-species-list {
        grid-template-columns: 1fr;
        gap: 0.5rem 0;
    }
    .color-species-item {
        font-size: 1rem;
        padding: 0.4rem 0.7rem 0.4rem 0.7rem;
    }
}
.btn-toggle-color-panel {
    background: #4B6562;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto 1.2rem auto;
    display: block;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
}
.btn-toggle-color-panel:hover {
    background: #2d4d44;
}
.color-species-section-wrapper {
    background: none;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0;
}
#color-species-panel {
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    display: block !important;
}
#color-species-panel.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 0.5rem;
}
@media (max-width: 900px) {
    .color-species-section-wrapper {
        max-width: 98vw;
    }
}