/* ==========================================================================
   TVO - Catálogo de Plantas
   CSS Principal (sin preprocesadores)
   ========================================================================== */

:root {
    /* Paleta Inspirada en Naturaleza & UX1.jpg */
    --tvo-dark: #1E1F22;
    --tvo-darker: #17181A;
    --tvo-light: #F4F5F0;
    --tvo-white: #FFFFFF;
    
    /* Colores primarios */
    --nature-primary: #C5E1A5; /* Verde lima suave */
    --nature-primary-dark: #A5D6A7;
    --nature-accent: #DCE775; /* Acento vibrante */
    
    /* Variantes */
    --text-main: #2C3033;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;

    /* Badges IUCN / Conservación */
    --c-success: #81C784;
    --c-info: #64B5F6;
    --c-warning: #FFB74D;
    --c-danger: #E57373;

    /* Typografía */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--tvo-light);
    -webkit-font-smoothing: antialiased;
}

/* Helpers */
.text-nature { color: #558B2F !important; }
.bg-nature-light { background-color: #F1F8E9 !important; }
.text-nature-dark { color: #33691E !important; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-body {
    background-color: var(--tvo-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}
.login-card {
    background: var(--tvo-white);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.login-logo {
    width: 64px;
    height: 64px;
    background: var(--tvo-dark);
    color: var(--nature-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}
.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}
.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.login-form .form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: #F9FAFB;
}
.login-form .form-control:focus {
    background-color: var(--tvo-white);
    border-color: var(--tvo-dark);
    box-shadow: 0 0 0 4px rgba(30, 31, 34, 0.1);
}
.login-form .btn-primary {
    background-color: var(--tvo-dark);
    border-color: var(--tvo-dark);
    color: var(--nature-primary);
    border-radius: 12px;
    font-weight: 600;
    padding: 0.8rem;
    transition: all 0.2s;
}
.login-form .btn-primary:hover {
    background-color: #2D2E32;
    transform: translateY(-1px);
}
.login-footer {
    text-align: center;
    margin-top: 2rem;
}
.login-footer a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   ADMIN PANEL (Basado en UX1.jpg)
   ========================================================================== */
.admin-body {
    background-color: var(--tvo-light);
    margin: 0;
    overflow-x: hidden;
}
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background-color: var(--tvo-dark);
    color: var(--tvo-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1040;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.sidebar-logo i {
    color: var(--nature-primary);
    font-size: 1.6rem;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--tvo-white);
    font-size: 1.5rem;
}
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #A1A1AA;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link i {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}
.sidebar-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--tvo-white);
}
.sidebar-link.active {
    background-color: var(--tvo-white);
    color: var(--tvo-dark);
}
.sidebar-link.active i {
    color: var(--tvo-dark);
}
.sidebar-badge {
    margin-left: auto;
    background-color: var(--nature-accent);
    color: var(--tvo-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.sidebar-user i {
    font-size: 2rem;
    color: var(--nature-primary);
}
.sidebar-user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}
.sidebar-user-role {
    display: block;
    font-size: 0.8rem;
    color: #A1A1AA;
}
.sidebar-logout {
    color: #EF4444;
}
.sidebar-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--tvo-light);
}
.admin-topbar {
    height: 80px;
    background-color: transparent;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar-search {
    width: 100%;
    max-width: 400px;
    margin-left: 2rem;
}
.topbar-search .form-control {
    border-radius: 20px;
    border: none;
    padding-left: 1rem;
    background-color: var(--tvo-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.topbar-search .input-group-text {
    background-color: var(--tvo-white);
    border: none;
    border-radius: 20px 0 0 20px;
    padding-left: 1.5rem;
}
.topbar-search .form-control {
    border-radius: 0 20px 20px 0;
}
.admin-content {
    padding: 0 2rem 2rem;
    flex: 1;
}
.dashboard-header {
    margin-bottom: 2rem;
}
.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.25rem;
}

/* Stat Cards */
.stat-card {
    background: var(--tvo-white);
    border-radius: 24px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-card-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card-primary .stat-icon { background: rgba(197, 225, 165, 0.2); color: #558B2F; }
.stat-card-success .stat-icon { background: rgba(129, 199, 132, 0.2); color: #2E7D32; }
.stat-card-warning .stat-icon { background: rgba(255, 183, 77, 0.2); color: #E65100; }
.stat-card-info .stat-icon { background: rgba(100, 181, 246, 0.2); color: #1565C0; }

.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.stat-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.stat-card-footer a {
    color: var(--tvo-dark);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Admin Cards Generales */
.admin-card {
    background: var(--tvo-white);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: none;
    margin-bottom: 1.5rem;
}
.admin-card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}
.admin-card-body {
    padding: 1.5rem;
}

/* Tables */
.table-admin {
    margin-bottom: 0;
}
.table-admin th {
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.5rem;
}
.table-admin td {
    vertical-align: middle;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.table-thumb {
    width: 60px;
    height: 90px;
    border-radius: 8px;
    object-fit: contain;
    background-color: var(--tvo-light);
}
.table-thumb-placeholder {
    width: 60px;
    height: 90px;
    border-radius: 8px;
    background: var(--tvo-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* UI Elements admin */
.btn-admin-primary {
    background-color: var(--tvo-dark);
    color: var(--nature-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}
.btn-admin-primary:hover {
    background-color: #2D2E32;
    color: var(--nature-primary);
}
.nav-tabs-admin {
    border-bottom: 2px solid var(--tvo-light);
    gap: 0.5rem;
}
.nav-tabs-admin .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1.25rem;
}
.nav-tabs-admin .nav-link.active {
    background-color: var(--tvo-white);
    color: var(--tvo-dark);
    border-bottom: 2px solid var(--tvo-dark);
    font-weight: 600;
}
.upload-preview {
    width: 100%;
    aspect-ratio: 1;
    background: var(--tvo-light);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.upload-preview i { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}
.qr-item {
    text-align: center;
    background: var(--tvo-white);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.qr-item img {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin-bottom: 0.5rem;
}
.qr-item strong { display: block; font-size: 0.9rem; }
.qr-item small { display: block; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mobile Admin adjustments */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); width: 260px; }
    .admin-sidebar.show { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
    .admin-main { margin-left: 0; }
    .topbar-search { margin-left: 0; max-width: 200px; }
    .admin-content { padding: 0 1rem 1rem; }
}

/* Print Styles */
@media print {
    .admin-sidebar, .admin-topbar, .btn { display: none !important; }
    .admin-main { margin: 0; padding: 0; background: white; }
    .print-area { display: block; }
    .qr-grid { grid-template-columns: repeat(4, 1fr); gap: 1cm; }
    .qr-item { border: 1px dashed #ccc; page-break-inside: avoid; }
    /* Spec: 3x3 cm min */
    .qr-item img { width: 3.5cm; height: 3.5cm; }
}

/* ==========================================================================
   PUBLIC PAGES
   ========================================================================== */
.public-body {
    background-color: #0b0c0e !important;
    color: #e2e8f0 !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.public-header {
    background-color: #0b0c0e !important;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.public-header .navbar-brand {
    color: var(--tvo-white);
    font-weight: 700;
    font-size: 1.5rem;
}
.public-header .navbar-brand i { color: var(--nature-primary); }
.public-hero {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(135deg, #0b0c0e 0%, #161e19 100%);
    color: var(--tvo-white);
    padding: 2.5rem 0 3rem; /* Altura reducida */
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    margin-bottom: -2rem;
}
.public-hero::before,
.public-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.06;
    pointer-events: none;
    z-index: -1;
    transition: all 0.3s ease;
}
.public-hero::before {
    top: -20px;
    left: -30px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23C5E1A5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10,90 Q40,80 50,20 M25,75 Q10,55 25,45 Q32,60 25,75 M33,63 Q50,45 42,30 Q33,45 33,63 M41,50 Q25,30 38,20 Q45,35 41,50 M46,37 Q60,20 50,10 Q42,22 46,37 M50,20 Q53,5 57,0 Q47,5 50,20'/></svg>");
    transform: rotate(-15deg);
}
.public-hero::after {
    bottom: -30px;
    right: -30px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23C5E1A5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M90,90 Q60,80 50,20 M75,75 Q90,55 75,45 Q68,60 75,75 M67,63 Q50,45 58,30 Q67,45 67,63 M59,50 Q75,30 62,20 Q55,35 59,50 M54,37 Q40,20 50,10 Q58,22 54,37 M50,20 Q47,5 43,0 Q53,5 50,20'/></svg>");
    transform: rotate(165deg);
}
@media (min-width: 768px) {
    .public-hero::before {
        width: 380px;
        height: 380px;
        top: -40px;
        left: -60px;
    }
    .public-hero::after {
        width: 380px;
        height: 380px;
        bottom: -60px;
        right: -60px;
    }
}
.hero-logo {
    width: 100%;
    max-width: 190px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}
@media (min-width: 768px) {
    .hero-logo {
        max-width: 220px;
    }
}
.hero-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 1rem 3rem rgba(197, 225, 165, 0.1) !important;
}
.hero-logo-huitzi {
    width: 100%;
    max-width: 190px;
    height: auto;
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
}
@media (min-width: 768px) {
    .hero-logo-huitzi {
        max-width: 220px;
    }
}
.hero-logo-huitzi:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 1rem 3rem rgba(197, 225, 165, 0.15)) brightness(1.05);
}
.hero-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}
.hero-subtitle {
    color: var(--nature-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}
.hero-desc {
    color: #a0aec0;
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
}
.hero-search-wrapper {
    max-width: 750px;
    margin: 0 auto;
}
.hero-search-bar {
    background: #ffffff;
    border-radius: 50px !important;
    overflow: hidden;
    border: 1px solid rgba(197, 225, 165, 0.2);
    box-shadow: 0 0 15px rgba(197, 225, 165, 0.15) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hero-search-bar:focus-within {
    box-shadow: 0 0 25px rgba(197, 225, 165, 0.3) !important;
    border-color: var(--nature-primary);
}
.hero-search-bar .input-group-text {
    background: transparent !important;
    border: none !important;
    padding-left: 1.5rem !important;
    color: #4b5563 !important;
}
.hero-search-bar .form-control {
    background: transparent !important;
    border: none !important;
    color: #121418 !important;
    font-size: 1rem !important;
    padding: 0.8rem 1rem !important;
    box-shadow: none !important;
}
.hero-search-bar .form-control::placeholder {
    color: #9ca3af !important;
}
.btn-search-submit {
    background: #14352b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    margin: 4px !important;
    padding: 0.6rem 2rem !important;
    transition: background-color 0.2s ease;
}
.btn-search-submit:hover {
    background: #0d231c !important;
}
.btn-secondary-explorar {
    background: rgba(197, 225, 165, 0.1) !important;
    color: var(--nature-primary) !important;
    border: 1px solid rgba(197, 225, 165, 0.3) !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-secondary-explorar:hover {
    background: var(--nature-primary) !important;
    color: #121418 !important;
    border-color: var(--nature-primary) !important;
}
.hero-indicators {
    font-size: 0.9rem;
    color: #b2c0bc;
}
.hero-indicator-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 1.25rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.bg-filter {
    background: #171b22;
    color: #ffffff;
    border: 1px solid rgba(197, 225, 165, 0.25);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    margin: 0.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.bg-filter:hover {
    border-color: var(--nature-primary);
    color: var(--nature-primary);
    background: rgba(197, 225, 165, 0.05);
}
.bg-filter.active {
    background: var(--nature-primary) !important;
    color: #121418 !important;
    border-color: var(--nature-primary) !important;
    font-weight: 600;
}
.public-main {
    flex: 1;
    padding: 3rem 0;
    background-color: #0b0c0e !important;
}

/* Plant Card */
.plant-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.plant-card {
    background: #171b22;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
.plant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(197, 225, 165, 0.15);
    border-color: rgba(197, 225, 165, 0.4);
}
.plant-card-img {
    position: relative;
    padding-top: 130%;
    background: #1a1e26;
}
.plant-card-img img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.plant-card-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #4b5563;
}
.plant-badge.bg-lc {
    position: absolute;
    top: 1rem; right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    background-color: #2e7d32 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.plant-card-body {
    padding: 1.5rem;
    background: #171b22;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}
.plant-card-decor-leaf {
    position: absolute;
    bottom: 0.85rem;
    right: 0.85rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(197, 225, 165, 0.1);
    color: var(--nature-primary);
    opacity: 0.2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: none;
}
.plant-card:hover .plant-card-decor-leaf {
    opacity: 0.85;
    background: rgba(197, 225, 165, 0.15);
    border-color: var(--nature-primary);
    transform: scale(1.15) rotate(15deg);
}
.plant-card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}
.plant-card-common {
    color: #b2c0bc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.plant-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}
.plant-card-family-badge {
    background: rgba(197, 225, 165, 0.1);
    color: var(--nature-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.plant-card-code {
    font-family: monospace;
    font-weight: 700;
    color: #4b5563;
    font-size: 0.85rem;
}

/* Pagination Overrides */
.public-body .pagination .page-link {
    background-color: #171b22 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}
.public-body .pagination .page-item.active .page-link {
    background-color: var(--nature-primary) !important;
    border-color: var(--nature-primary) !important;
    color: #121418 !important;
}
.public-body .pagination .page-item.disabled .page-link {
    background-color: #0b0c0e !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #4a5568 !important;
}

/* Footer Dark Overrides */
.public-body .footer-card {
    background: #171b22 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}
.public-body .footer-body {
    background: #171b22 !important;
}
.public-body .footer-body .text-dark,
.public-body .footer-body p {
    color: #b2c0bc !important;
}
.public-body .footer-body strong {
    color: #ffffff !important;
}
.public-body .footer-authors-box {
    background: #0b0c0e !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}
.public-body .author-name {
    color: #ffffff !important;
}
.public-body .footer-bottom {
    background: #0b0c0e !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #718096 !important;
}
.public-body .footer-bottom a {
    color: var(--nature-primary) !important;
}

/* ==========================================================================
   FICHA PÚBLICA (mobile-first)
   ========================================================================== */
.plant-detail-body {
    background-color: #F8F9FA;
}
.plant-detail-main {
    margin-bottom: 3rem;
}
.plant-detail-card {
    background: var(--tvo-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
@media (min-width: 768px) {
    .plant-detail-card { border-radius: 24px; margin-top: 2rem; }
}

/* Carousel */
.plant-carousel {
    background: var(--tvo-dark);
}
.plant-carousel .carousel-item {
    height: 60vh;
    min-height: 300px;
    max-height: 500px;
}
.plant-carousel img {
    height: 100%;
    object-fit: cover;
}
.plant-carousel-placeholder {
    height: 40vh;
    min-height: 300px;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #9CA3AF;
}

/* Header Ficha */
.plant-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--tvo-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.plant-author {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-style: normal;
    color: var(--text-muted);
    font-weight: normal;
}
.plant-common-names {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
}
.plant-common-en {
    font-size: 0.95rem;
    font-style: italic;
}

/* Accordion personalizado */
.public-accordion {
    --bs-accordion-border-width: 0;
    --bs-accordion-border-radius: 16px;
    --bs-accordion-inner-border-radius: 16px;
    --bs-accordion-btn-focus-box-shadow: none;
    gap: 1rem;
    display: flex;
    flex-direction: column;
}
.public-accordion .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 16px !important;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.public-accordion .accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--tvo-white);
    color: var(--tvo-dark);
}
.public-accordion .accordion-button:not(.collapsed) {
    background-color: var(--bg-nature-light);
    color: var(--text-nature-dark);
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--border-color);
}
.public-accordion .accordion-body {
    padding: 1.5rem;
    background-color: var(--tvo-white);
}

/* Tablas en ficha */
.taxonomia-table th {
    width: 35%;
    color: var(--text-muted);
    font-weight: 500;
}

/* Condiciones */
.section-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--tvo-dark);
    position: relative;
    padding-left: 1rem;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0; top: 10%; height: 80%; width: 4px;
    background: var(--nature-primary);
    border-radius: 2px;
}
.condition-card {
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.condition-card:hover { transform: translateY(-3px); }

/* Footer público (Nuevo Diseño Institucional TecNM/ITVO - Light Theme Card) */
.public-footer {
    margin-top: 4rem;
    margin-bottom: 3rem;
    background-color: transparent !important;
}

.footer-card {
    background-color: var(--tvo-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.footer-inst-header {
    background-color: var(--tvo-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inst-logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--nature-primary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.footer-inst-sub {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.2;
}

.footer-inst-title {
    font-size: 1.05rem;
    line-height: 1.3;
}

.footer-body {
    background-color: var(--tvo-white);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-main) !important;
}

.footer-body strong {
    color: var(--tvo-dark);
}

.footer-authors-box {
    background-color: var(--tvo-light) !important; /* Fondo crema/beige claro de la app */
    border: 1px solid var(--border-color) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.footer-authors-box:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.footer-authors-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted) !important;
}

.author-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #E8F5E9; /* Verde muy claro */
    color: #2E7D32; /* Verde bosque oscuro */
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.footer-authors-box .col-md-6:hover .author-badge {
    transform: scale(1.1);
    background-color: var(--nature-primary); /* Verde limón del logo */
    color: var(--tvo-dark);
}

.author-name {
    font-size: 0.92rem;
    color: var(--tvo-dark);
    font-weight: 600;
}

.author-role {
    font-size: 0.8rem;
    color: #4B5563 !important; /* Gris oscuro para máxima legibilidad */
    font-weight: 500;
}

.footer-bottom {
    background-color: #F9FAFB !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
}

/* Distribución (Mapa) */
.map-container {
    max-width: 450px;
    margin: 0 auto;
    background-color: var(--tvo-light);
}

#preview_img_distribucion {
    aspect-ratio: 2 / 3;
}
#preview_img_distribucion img {
    object-fit: contain;
    background-color: var(--tvo-light);
}
