/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #9fc440;
    --secondary-color: #dca826;
    --accent-color: #f9e35a;
    --hover-color: #d0e413;
    --teal-color: #00616e;
    --text-color: #333333;
    --muted-color: #5f6368;
    --light-bg: #f6f6f6;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 6px 18px rgba(27, 57, 19, 0.08);
    --shadow-md: 0 18px 40px rgba(27, 57, 19, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333333;
    overflow-x: hidden;
}

/* Header */
.nav-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-gradient {
    background: linear-gradient(135deg, #00616e 0%, #57B246 100%);
    color: #ffffff;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo-image {
    height: 50px;
    width: auto;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-tagline {
    font-size: 0.875rem;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-burger span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s;
}

/* Buttons */
.button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 1rem;
}

.button-primary {
    background: #9fc440;
    color: #ffffff;
}

.button-primary:hover {
    background: #d0e413;
}

.button-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.button-secondary:hover {
    background: #ffffff;
    color: #00616e;
}

.button-accent {
    background: #f9e35a;
    color: #333333;
}

.button-accent:hover {
    background: #dca826;
    color: #ffffff;
}

/* Hero Section */
.hero-carousel {
    position: relative;
    width: 100%;
    height: clamp(600px, 85vh, 900px);
    background-color: #0f2328;
    overflow: hidden;
    margin-top: 80px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: grid;
    place-items: center;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%),
                radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 0 1.5rem;
    max-width: 1000px;
    margin-top: -2rem;
}

.hero-kicker {
    display: block;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #9fc440;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-nav-prev {
    left: 2rem;
}

.hero-nav-next {
    right: 2rem;
}

.hero-indicators {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.85rem;
    z-index: 10;
}

.hero-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hero-indicator.is-active {
    background: #9fc440;
    transform: scale(1.3);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: -5rem auto 5rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 5;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    text-align: center;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2.5rem;
    color: #9fc440;
    margin-bottom: 1.5rem;
}

.stat-card h3 {
    margin: 0 0 0.85rem 0;
    font-size: 1.35rem;
    color: #1a1a1a;
}

.stat-card p {
    margin: 0;
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sections */
.teal-section {
    background-color: #00616e;
    color: #ffffff;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.teal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004d57' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-section header,
.industries-section header {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    position: relative;
    z-index: 1;
}

.teal-section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 1rem 0;
}

.teal-section p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.service-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.service-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
    filter: brightness(0.95);
    transition: transform 0.5s ease, filter 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.service-content-wrapper {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card h3 {
    font-size: 1.4rem;
    margin: 0 0 0.75rem 0;
    color: #fff;
    font-weight: 600;
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.industry-card {
    text-align: center;
    padding: 2rem;
}

.industry-icon-figure {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 1.5rem auto;
    border: 4px solid rgba(159, 196, 64, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.industry-card:hover .industry-icon-figure {
    transform: translateY(-5px);
    border-color: #9fc440;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

.industry-icon-figure img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: none;
}

.industry-card h3 {
    font-size: 1.35rem;
    margin: 0 0 0.85rem 0;
}

.industry-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* About Section */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    gap: 4rem;
}

.about-media img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-content .section-kicker {
    color: #9fc440;
}

.about-content h2 {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin: 0;
    color: #1a1a1a;
    line-height: 1.2;
}

.about-content p {
    color: #5f6368;
    font-size: 1.05rem;
    margin: 0;
}

.about-highlight {
    background: rgba(159, 196, 64, 0.1);
    border-left: 4px solid #9fc440;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    color: #2a2a2a;
}

/* Location Section */
.location-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.location-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(27, 57, 19, 0.12);
    border: 1px solid #e0e0e0;
}

.location-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-content h2 {
    font-size: 2rem;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
}

.location-address {
    font-size: 1.15rem;
    color: #5f6368;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.location-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    gap: 0.85rem;
}

.location-contact li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #333333;
    font-size: 1rem;
}

.location-contact i {
    color: #9fc440;
    width: 20px;
    text-align: center;
}

.location-map {
    position: relative;
    min-height: 400px;
    background: #e5e5e5;
}

.location-map iframe {
    width: 100%;
    height: 100%;
}

.location-map a {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: #9fc440;
    font-weight: 600;
    text-decoration: none;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #00616e 0%, #004d57 100%);
    padding: 6rem 2rem;
    position: relative;
}

.contact-shell {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: #ffffff;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(27, 57, 19, 0.12);
    display: grid;
    gap: 1.5rem;
}

.contact-form h3 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    color: #1a1a1a;
    text-align: center;
}

.contact-form label {
    display: grid;
    gap: 0.5rem;
    font-weight: 500;
    color: #333333;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #9fc440;
}

.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
}

/* Quote Section */
.quote-section {
    padding: 6rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.quote-container header {
    text-align: center;
    margin-bottom: 3rem;
}

.quote-container h1 {
    font-size: 2.5rem;
    color: #9fc440;
    margin-bottom: 1rem;
}

.quote-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #9fc440;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #9fc440;
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.status-banner {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-banner.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Footer */
.footer-shell {
    background: #00616e;
    color: #ffffff;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand img {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-social div {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s;
}

.footer-social a:hover {
    background: rgba(255,255,255,0.3);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-burger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: #00616e;
        flex-direction: column;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .nav-links.is-open {
        transform: translateX(0);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-section,
    .location-card {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-nav {
        width: 40px;
        height: 40px;
    }

    .hero-nav-prev {
        left: 1rem;
    }

    .hero-nav-next {
        right: 1rem;
    }
}

/* ═══════════════════════════════════════════════
   PANEL DE ADMINISTRACIÓN / DASHBOARD
═══════════════════════════════════════════════ */

/* ── Auth: idéntico al de la app React ───────────────────────────────── */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left,  rgba(159,196,64,0.15), transparent 55%),
        radial-gradient(circle at bottom right, rgba(0,97,110,0.25), transparent 45%);
    padding: clamp(2rem, 5vw, 4rem);
}

.auth-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,97,110,0.15), rgba(159,196,64,0.08));
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    width: min(1080px, 100%);
    background: rgba(255,255,255,0.92);
    border-radius: 32px;
    border: 1px solid rgba(159,196,64,0.18);
    box-shadow: 0 26px 70px rgba(0,28,32,0.18);
    overflow: hidden;
}

/* Panel izquierdo (info) */
.auth-info-panel {
    background: linear-gradient(180deg, rgba(0,97,110,0.92), rgba(0,97,110,0.82));
    padding: clamp(2.5rem, 4vw, 3.5rem);
    display: grid;
    gap: 1.5rem;
    color: #ffffff;
}

.auth-logo-block {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.auth-logo-block img {
    width: min(160px, 100%);
    filter: drop-shadow(0 16px 32px rgba(0,0,0,0.22));
}

.auth-info-title {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.auth-info-text {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 0.98rem;
    line-height: 1.6;
}

.auth-highlight-box {
    background: rgba(249,227,90,0.16);
    border-radius: 20px;
    padding: 1.25rem;
    border: 1px solid rgba(249,227,90,0.35);
    display: grid;
    gap: 0.55rem;
    color: #fef9c3;
    font-size: 0.95rem;
}
.auth-highlight-box p { margin: 0; line-height: 1.6; }
.auth-highlight-box strong { color: #ffffff; }

.auth-highlight-label {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: rgba(249,227,90,0.95);
}

/* Panel derecho (formulario) */
.auth-form-panel {
    padding: clamp(2.5rem, 4vw, 3.5rem);
    display: grid;
    gap: 2.25rem;
    background: #fff;
}

.auth-form-header {
    display: grid;
    gap: 1rem;
}
.auth-form-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.4rem);
    color: #00616e;
    font-weight: 700;
}
.auth-form-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.98rem;
}

/* Botón volver (pill con borde) */
.auth-back-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.auth-back-btn:hover {
    border-color: #9fc440;
    color: #9fc440;
    background: rgba(159,196,64,0.10);
}

/* Formulario */
.auth-form { display: grid; gap: 1.25rem; }

.auth-field {
    display: grid;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: #64748b;
}
.auth-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.auth-field input {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 0.95rem 1.1rem;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
    outline: none;
    border-color: #9fc440;
    box-shadow: 0 0 0 3px rgba(159,196,64,0.18);
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.auth-alert.error {
    background: rgba(220,40,40,0.10);
    border: 1px solid rgba(220,40,40,0.22);
    color: #b02a2a;
}
.auth-alert.success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    color: #15803d;
}
.auth-alert i { margin-top: 0.15rem; flex-shrink: 0; }
.auth-alert ul { margin: 0.4rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; }

/* Botón submit */
.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Enlace "¿Olvidaste?" */
.auth-link-btn {
    background: none;
    border: none;
    color: #9fc440;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.15s;
}
.auth-link-btn:hover { color: #00616e; }

/* Soporte */
.auth-support {
    text-align: center;
    font-size: 0.9rem;
}
.auth-support a { color: #dca826; font-weight: 600; text-decoration: none; }
.auth-support a:hover { color: #9fc440; }

/* Hint de requisitos */
.auth-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 680px) {
    .auth-info-panel { display: none; }
    .auth-page { padding: 0; align-items: stretch; }
    .auth-container {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .auth-form-panel { padding: 2.5rem 1.5rem; }
}

/* Retrocompatibilidad */
.auth-footer { margin-top: 1.5rem; text-align: center; font-size: 0.9rem; color: #5f6368; }
.auth-footer a { color: #00616e; font-weight: 600; }

/* Dashboard shell */
.dashboard-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #1a1a1a;
    margin: 0;
}

.dashboard-header p {
    color: #5f6368;
    margin: 0.25rem 0 0 0;
}

/* Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease;
}

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

.metric-card i {
    font-size: 2rem;
    color: #9fc440;
    width: 40px;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 0.25rem;
}

.metric-card.loading {
    opacity: 0.6;
}

/* Secciones del dashboard */
.dashboard-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid #e0e0e0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: 1.2rem;
    color: #1a1a1a;
    margin: 0;
}

/* Tabla */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th {
    background: #f6f6f6;
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #5f6368;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #333333;
}

.data-table tr:last-child td {
    border-bottom: none;
}

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

.loading-row {
    text-align: center;
    color: #5f6368;
    padding: 2rem !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-warning  { background: #fff3cd; color: #856404; }
.badge-success  { background: #d4edda; color: #155724; }
.badge-danger   { background: #f8d7da; color: #721c24; }
.badge-info     { background: #cce5ff; color: #004085; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

/* Botones de acción en tabla */
.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: #f0f0f0;
    color: #333;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-icon:hover    { background: #e0e0e0; }
.btn-icon.btn-success { background: #d4edda; color: #155724; }
.btn-icon.btn-success:hover { background: #c3e6cb; }
.btn-icon.btn-danger  { background: #f8d7da; color: #721c24; }
.btn-icon.btn-danger:hover  { background: #f5c6cb; }
.btn-icon.btn-warning { background: #fff3cd; color: #856404; }
.btn-icon.btn-warning:hover { background: #ffeeba; }

/* Botón pequeño */
.btn-sm {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
}

/* Barra de filtros */
.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    background: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.filter-select,
.filter-input {
    padding: 0.6rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fafafa;
    flex: 1;
    min-width: 180px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #9fc440;
}

/* Formulario card */
.form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid #e0e0e0;
}

.form-card h3 {
    margin: 0 0 1.5rem 0;
    color: #1a1a1a;
}

.form-label {
    display: grid;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 1rem;
}

.form-label input,
.form-label select,
.form-label textarea {
    padding: 0.7rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-label input:focus,
.form-label select:focus,
.form-label textarea:focus {
    outline: none;
    border-color: #9fc440;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Nav usuario */
.nav-user-name {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

/* CTA box */
.cta-box {
    background: linear-gradient(135deg, #00616e, #004d57);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #ffffff;
    flex-wrap: wrap;
}

.cta-box i {
    font-size: 2.5rem;
    color: #9fc440;
}

.cta-box h3 { margin: 0 0 0.25rem 0; font-size: 1.2rem; }
.cta-box p  { margin: 0; color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.cta-box .button { margin-left: auto; }

/* Utilidades */
.w-full { width: 100%; }

/* ── Página de solicitud / formulario público ───────────────────────── */
.solicitud-shell {
    min-height: 100vh;
    padding: 7rem 1.5rem 4rem;
    background: #f6f6f6;
}
.solicitud-container {
    max-width: 900px;
    margin: 0 auto;
}
.solicitud-header {
    margin-bottom: 2rem;
}
.solicitud-header h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #1e293b;
    margin-bottom: 0.25rem;
}
.solicitud-header p {
    color: #5f6368;
    font-size: 0.95rem;
    margin: 0;
}

/* Contenedor del formulario */
.admin-form-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    overflow: hidden;
}
.admin-form {
    padding: 2rem 2.2rem;
}

/* Título de sección dentro del form */
.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Switch Empresa / Particular */
.quote-type-switch {
    display: flex;
    gap: 0;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    max-width: 360px;
    margin-bottom: 1.5rem;
}
.quote-type-switch label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    user-select: none;
}
.quote-type-switch label:has(input:checked) {
    background: #ffffff;
    color: #00616e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.quote-type-switch input { display: none; }

/* Urgencia radios */
.urgencia-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.urgencia-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    padding: 0.4rem 0.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}
.urgencia-radio-group label:has(input:checked) {
    border-color: #00616e;
    background: #f0f9f8;
    color: #00616e;
}
.urgencia-radio-group input { display: none; }

/* Pantalla de éxito */
.success-screen {
    display: none;
    text-align: center;
    padding: 3.5rem 2rem;
}
.success-screen i.success-icon {
    font-size: 4rem;
    color: #9fc440;
    margin-bottom: 1rem;
}
.success-screen h2 { color: #00616e; margin-bottom: 0.5rem; }
.success-screen p  { color: #5f6368; margin-bottom: 1.5rem; }
.numero-badge {
    display: inline-block;
    background: #f0f9f8;
    border: 2px solid #00616e;
    border-radius: 10px;
    padding: 0.9rem 2.5rem;
    margin: 0.8rem 0 2rem;
}
.numero-badge small {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.numero-badge strong {
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: #00616e;
    font-weight: 800;
}

/* Alert mejorado */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-error   { background: #f8d7da; color: #721c24; }

@media (max-width: 768px) {
    .dashboard-shell {
        padding: 6rem 1rem 3rem;
    }

    .cta-box { flex-direction: column; }
    .cta-box .button { margin-left: 0; width: 100%; }

    .actions-cell { flex-wrap: wrap; }
}

/* ── Dashboard Navbar (igual al de la app React) ─────────────────────── */

/* Items de navegación con indicador activo */
.nav-item {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: color 0.2s;
    position: relative;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.nav-item:hover { color: #ffffff; }
.nav-item.active { color: #ffffff; }

/* Línea indicadora debajo del item activo */
.nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
}
.nav-item.active .nav-indicator,
.nav-item:hover .nav-indicator {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.7;
}
.nav-item.active .nav-indicator { opacity: 1; }

/* Nav links del dashboard (zona central) */
.admin-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Zona derecha del navbar */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Pill de usuario */
.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
}
.nav-user-pill i { color: rgba(255,255,255,0.9); font-size: 1rem; }

/* Botón cerrar sesión */
.nav-logout-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
    font-family: inherit;
}
.nav-logout-btn:hover { background: rgba(255,255,255,0.25); }

/* Campana de notificaciones */
.nav-bell-btn {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    color: #ffffff;
    font-size: 1.2rem;
}
.nav-bell-btn:hover { background: rgba(255,255,255,0.15); }
.nav-bell-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    border: 2px solid rgba(0,97,110,0.8);
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

/* Info de usuario en menú móvil */
.nav-mobile-user {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-mobile-user-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    margin-bottom: 0.75rem;
}
.nav-mobile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Botón salir en móvil */
.nav-mobile-logout {
    background: rgba(220,38,38,0.2);
    color: #ffcaca;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

/* Helpers responsive */
@media (min-width: 769px) { .hide-desktop { display: none !important; } }
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .admin-nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #00616e, #004d57);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.25rem;
        overflow-y: auto;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .admin-nav-links.is-open {
        transform: translateX(0);
    }
    .nav-item { width: 100%; padding: 0.85rem 1rem; font-size: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL — estilos que replican el diseño del frontend React
   ═══════════════════════════════════════════════════════════════ */

/* Variables adicionales */
:root {
    --color-heading:  #0f2328;
    --info-color:     #0284c7;
    --danger-color:   #dc2626;
    --color-primary:  #9fc440;
    --color-muted:    #5f6368;
    --color-text-dark:#333333;
    --color-border:   #e0e0e0;
}

/* ── Layout del shell ── */
.admin-dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.admin-dashboard-content {
    position: relative;
    overflow-x: hidden;
    padding-bottom: 4rem;
}

.admin-dashboard-background {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-logo-background {
    width: 70vw;
    max-width: 900px;
    opacity: 0.07;
    object-fit: contain;
}

.admin-dashboard-overlay {
    position: relative;
    z-index: 1;
}

/* ── Content wrapper ── */
.admin-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ── Admin Header ── */
.admin-header {
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.admin-header h2 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    color: var(--color-heading);
    font-weight: 700;
}

/* ── Botones para páginas admin (pill-shape) ── */
.admin-pg .button {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
    border: none;
    transition: transform 0.18s, box-shadow 0.18s, background-color 0.18s;
}

.admin-pg .button-primary {
    background-color: var(--primary-color, #9fc440);
    color: #333333;
    box-shadow: 0 8px 16px rgba(159,196,64,0.25);
}

.admin-pg .button-primary:hover {
    background-color: var(--hover-color, #d0e413);
    transform: translateY(-1px);
}

.admin-pg .button-secondary {
    background-color: transparent;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
}

.admin-pg .button-secondary:hover {
    border-color: var(--primary-color, #9fc440);
    color: var(--primary-color, #9fc440);
    background: transparent;
    transform: translateY(-1px);
}

.admin-pg .button-accent {
    background-color: #f9e35a;
    color: #333333;
    box-shadow: 0 8px 14px rgba(249,227,90,0.28);
    border: none;
}

.admin-pg .button-accent:hover {
    background-color: #ffe250;
    transform: translateY(-1px);
}

/* ── Status banners para admin ── */
.admin-pg .status-banner {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(159,196,64,0.14);
    color: #155724;
    border: 1px solid rgba(159,196,64,0.25);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-pg .status-banner.error {
    background: rgba(220,40,40,0.1);
    border-color: rgba(220,40,40,0.25);
    color: #b02a2a;
}

/* ── Form styles para admin ── */
.admin-pg .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-pg .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    /* Reset: remove inherited grid display */
    grid: unset;
}

.admin-pg .form-label input,
.admin-pg .form-label select,
.admin-pg .form-label textarea {
    all: unset;
}

.admin-pg .required-marker {
    color: #dc2626;
    font-weight: 600;
}

/* ── Input / Select field ── */
.admin-input {
    width: 100%;
    border-radius: 10px;
    border: 2px solid rgba(159,196,64,0.35);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #1a1a1a;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary-color, #9fc440);
    box-shadow: 0 0 0 3px rgba(159,196,64,0.18);
}

.admin-input::placeholder {
    color: rgba(0,0,0,0.4);
}

/* Input with icon wrapper */
.admin-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-wrap > i {
    position: absolute;
    left: 0.85rem;
    color: var(--primary-color, #9fc440);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0.7;
}

.admin-input-wrap > .admin-input {
    padding-left: 2.5rem;
}

/* ── Admin Card ── */
.admin-card {
    background: rgba(255,255,255,0.97);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    border: 1px solid rgba(159,196,64,0.12);
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card-title i { color: var(--primary-color, #9fc440); }

/* ── Helper text ── */
.admin-pg .helper-text {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-top: 0.4rem;
}

/* ── Form grid 2 columnas ── */
.form-grid-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* ── Loading dots ── */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--color-muted);
    padding: 1.5rem 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color, #9fc440);
    animation: ldot 1.2s infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ldot {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40%           { transform: scale(1); opacity: 1; }
}

/* ── Filter bar ── */
.admin-filter-bar {
    padding: 1.25rem 1.5rem;
    background: rgba(159,196,64,0.05);
    border: 1px solid rgba(159,196,64,0.15);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-muted);
}

/* ── Tabla ── */
.table-section {
    background: rgba(255,255,255,0.92);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,35,40,0.1);
    border: 1px solid rgba(159,196,64,0.15);
    overflow: hidden;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom thead th {
    background-color: rgba(159,196,64,0.08);
    padding: 0.9rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(159,196,64,0.2);
}

.table-custom tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(159,196,64,0.08);
    color: var(--color-text-dark);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: rgba(159,196,64,0.04);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.th-sort {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.th-sort:hover { color: var(--primary-color, #9fc440); }

/* ── Action buttons in table ── */
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    transition: opacity 0.2s;
}

.btn-action:hover { opacity: 0.8; }

/* ── Estado badges ── */
.eb {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.eb-pendiente { background: rgba(251,191,36,.15); color: #d97706; border: 1px solid rgba(251,191,36,.3); }
.eb-aprobada  { background: rgba(34,197,94,.15);  color: #16a34a; border: 1px solid rgba(34,197,94,.2); }
.eb-rechazada { background: rgba(239,68,68,.15);  color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.eb-admin     { background: rgba(124,58,237,.12); color: #7c3aed; border: 1px solid rgba(124,58,237,.2); }
.eb-user      { background: rgba(59,130,246,.12); color: #2563eb; border: 1px solid rgba(59,130,246,.2); }

/* ── Empty state ── */
.admin-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.admin-empty-state i {
    font-size: 3rem;
    color: var(--primary-color, #9fc440);
    margin-bottom: 1rem;
    display: block;
}

.admin-empty-state h2 {
    margin: 0 0 0.5rem 0;
    color: var(--color-heading);
    font-size: 1.25rem;
}

.admin-empty-state p {
    margin: 0;
    color: var(--color-muted);
}

/* ── Modal admin ── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    overflow-y: auto;
}

.admin-modal {
    background: rgba(255,255,255,0.99);
    border: 1px solid rgba(159,196,64,0.25);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(159,196,64,0.2);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.admin-modal-header h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--color-heading);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
}

.admin-modal-close:hover {
    color: var(--primary-color, #9fc440);
    background: rgba(159,196,64,0.1);
}

.admin-modal-content {
    padding: 1.75rem;
    flex: 1;
}

.admin-modal-detail p {
    margin: 0.6rem 0;
    color: var(--color-heading);
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-modal-detail strong {
    font-weight: 600;
    margin-right: 0.4rem;
}

.admin-modal-detail ul {
    margin: 0.4rem 0 0.8rem 1.4rem;
    color: var(--color-heading);
}

.admin-modal-detail li { margin: 0.4rem 0; }

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(159,196,64,0.15);
    flex-wrap: wrap;
}

/* ── User list in modal/form ── */
.user-list-box {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    margin-bottom: 0.5rem;
}

.user-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}

.user-list-item:last-child { border-bottom: none; }
.user-list-item:hover { background: #fafafa; }

.user-list-item .info { display: flex; flex-direction: column; flex: 1; }
.user-list-item .info .name { font-weight: 500; font-size: 0.9rem; color: #374151; }
.user-list-item .info .email-sm { font-size: 0.78rem; color: #6b7280; }
.user-list-item input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--primary-color, #9fc440); }

/* User assigned card (inside modal edit) */
.assigned-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.assigned-user-row .info .name  { font-weight: 600; font-size: 0.88rem; }
.assigned-user-row .info .email { font-size: 0.76rem; color: #6b7280; display: block; }

.btn-remove-user {
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s, border-color 0.15s;
}

.btn-remove-user:hover { background: #fef2f2; border-color: #ef4444; }
.btn-remove-user:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Badges pendientes (header button) ── */
.pending-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
    display: none;
}

/* ── Sección separadora ── */
.form-section-sep {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(159,196,64,0.2);
    margin-bottom: 1rem;
}

.form-section-sep-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-section-sep-title i { color: var(--primary-color, #9fc440); }

/* ── Edit Modal Items (Modern Grid) ── */
.edit-items-container {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.edit-items-header {
    display: grid;
    grid-template-columns: 2.5fr .8fr 1.2fr 1fr auto;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: rgba(159,196,64,0.1);
    border-bottom: 1px solid rgba(159,196,64,0.2);
    font-size: 0.85rem;
    font-weight: 700;
    color: #00616e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.edit-items-list {
    background: #fff;
    max-height: 400px;
    overflow-y: auto;
}
.edit-item-row {
    display: grid;
    grid-template-columns: 2.5fr .8fr 1.2fr 1fr auto;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    transition: background 0.2s;
}
.edit-item-row:hover { background: #fafafa; }
.edit-item-row:last-child { border-bottom: none; }

.edit-item-field { display: flex; flex-direction: column; gap: 0.35rem; }
.edit-item-field label { display: none; font-size: 0.75rem; color: #888; margin-bottom: 0.2rem; }

/* Inputs inside row */
.edit-item-row input, 
.edit-item-row select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.edit-item-row input:focus, 
.edit-item-row select:focus {
    border-color: #9fc440;
    box-shadow: 0 0 0 3px rgba(159,196,64,0.1);
    outline: none;
}

.edit-subtotal {
    font-weight: 700;
    color: #333;
    text-align: right;
    padding-top: 0.6rem;
}

.edit-items-footer {
    background: rgba(159,196,64,0.05);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(159,196,64,0.2);
}
.edit-totals-row {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.edit-totals-row.final {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00616e;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
}
.edit-totals-label { color: #5f6368; }
.edit-totals-value { min-width: 100px; text-align: right; }

@media (max-width: 768px) {
    .edit-items-header { display: none; }
    .edit-item-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 1.25rem;
        border-bottom: 4px solid #f0f0f0;
    }
    .edit-item-field:first-child { grid-column: 1 / -1; } /* Descripcion full width */
    .edit-item-field label { display: block; }
    .edit-subtotal { text-align: left; margin-top: 0.5rem; color: #9fc440; font-size: 1.1rem; }
    .btn-remove-row { position: absolute; top: 1rem; right: 1rem; }
    .edit-item-row { position: relative; }
}
