/* Botões padronizados: login e adquirir assinatura */
.btn-login,
.btn-assinatura {
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    width: 237px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Login padrão */
.btn-login {
    background-color: var(--hemotec-red);
    border-color: var(--hemotec-red);
    color: white;
}

.btn-login:hover,
.btn-login:focus {
    background-color: var(--hemotec-dark-red);
    border-color: var(--hemotec-dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.18);
}

/* Adquirir assinatura padrão */
.btn-assinatura {
    background-color: white;
    color: var(--hemotec-red);
    border: 2px solid var(--hemotec-bg-light);
}

.btn-assinatura:hover,
.btn-assinatura:focus {
    background-color: #f0f0f0;
    border-color: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.10);
}

:root {
    --hemotec-red: #e02020;
    --hemotec-dark-red: #c01010;
    --hemotec-light-red: #ff4040;
    --hemotec-bg-light: #f8f9fa;
    --hemotec-text-dark: #333333;
    --hemotec-accent: #0066cc;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1615461066841-6116e61058f4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 9rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.section-title {
    color: var(--hemotec-red);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--hemotec-red);
}

.card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    color: var(--hemotec-red);
    font-weight: 600;
}

.card-text {
    color: var(--hemotec-text-dark);
}

.card-footer {
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem;
}

.card-footer .btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.quote-section {
    background-color: var(--hemotec-red);
    color: white;
    padding: 4rem 0;
    margin: 4rem 0;
    border-radius: 20px;
}

.quote-text {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 3rem;
}

.quote-text::before,
.quote-text::after {
    content: '"';
    font-size: 4rem;
    position: absolute;
    opacity: 0.3;
}

.quote-text::before {
    left: 0;
    top: -20px;
}

.quote-text::after {
    right: 0;
    bottom: -40px;
}

.quote-author {
    font-weight: 500;
    font-size: 1.2rem;
}

.stats-item {
    text-align: center;
    margin-bottom: 2rem;
}

.stats-icon {
    font-size: 2.5rem;
    color: var(--hemotec-red);
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hemotec-text-dark);
    margin-bottom: 0.5rem;
}

.stats-text {
    font-size: 1.1rem;
    color: #666;
}

.map-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hemotec-red), var(--hemotec-light-red));
}

.map-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2rem;
    border: 2px dashed #dee2e6;
}

#mapa {
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Estilo para o botão "Rota" */
.unidade-list li button {
    background: rgb(243, 30, 30);
    padding: 5px 10px;
    font-size: 0.72rem;
    border-radius: 5px;
    transition: all 0.2s ease;
    color: #fff;
    border: none;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.unidade-list li button:hover {
    background: #a81208;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.unidade-list li button:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .quote-text {
        font-size: 1.4rem;
        padding: 0 2rem;
    }

    .stats-number {
        font-size: 2rem;
    }
}

#mapa {
    height: 500px;
    width: 100%;
    border-radius: 8px;
}

.info-box {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    font-size: .95rem;
    border-left: 4px solid var(--hemotec-red);
    min-height: 0;
    transition: all 0.3s ease;
}

.info-box:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.map-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.map-tools button {
    border: 0;
    background: #dc3545;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: .85rem;
    cursor: pointer;
}

.map-tools button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.unidade-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 6px;
}

.unidade-list li {
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
}

.unidade-list li button {
    background: #0d6efd;
    padding: 4px 8px;
    font-size: .7rem;
}

.geo-status {
    font-size: .75rem;
    color: #555;
    margin-top: 4px;
}

@media (max-width: 576px) {
    #mapa {
        height: 380px;
    }
}

#mapa {
    height: 500px;
    width: 100%;
    border-radius: 12px;
    border: 25px solid #ffffff;
    /* borda branca */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaflet-container {
    font-family: "Segoe UI", Roboto, sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.leaflet-popup-content {
    font-size: .85rem;
}

.leaflet-control-zoom a {
    background: #fff !important;
    color: #dc3545 !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    transition: all .2s ease;
}

.leaflet-control-zoom a:hover {
    background: #dc3545 !important;
    color: #fff !important;
}

.info-box {
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
    font-size: .9rem;
    border-left: 4px solid #dc3545;
}

.map-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.map-tools button {
    border: 0;
    background: #dc3545;
    color: #fff;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: .85rem;
    cursor: pointer;
    font-weight: 500;
    transition: all .2s ease;
}

.map-tools button:hover:not(:disabled) {
    background: #b02a37;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
}

.map-tools button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.unidade-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 8px;
}

.unidade-list li {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    transition: background .2s ease;
}

.unidade-list li:hover {
    background: #fdf2f2;
}

.unidade-list li button {
    background: rgb(243, 30, 30);
    padding: 5px 10px;
    font-size: .72rem;
    border-radius: 5px;
    transition: all .2s ease;
}

.unidade-list li button:hover {
    background: #a81208;
}

.geo-status {
    font-size: .8rem;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 576px) {
    #mapa {
        height: 380px;
    }
}

/* BLOOD STOCK MODERN */
.blood-stock-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
}

/* JS injeta os cards dentro de #estoque-atual; torne-o grid também */
#estoque-atual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
}

/* Em telas maiores queremos apenas 2 colunas */
@media (min-width: 768px) {

    .blood-stock-modern,
    #estoque-atual {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {

    .blood-stock-modern,
    #estoque-atual {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}



.blood-stock-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.blood-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--hemotec-text-dark);
    min-width: 80px;
    flex-shrink: 0;
}

.blood-info i {
    color: var(--hemotec-red);
    font-size: 1.2rem;
}

.blood-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blood-progress .progress {
    height: 12px;
    border-radius: 8px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar.adequate {
    background: #28a745;
}

.progress-bar.moderate {
    background: #ffc107;
}

.progress-bar.low {
    background: #fd7e14;
}

.progress-bar.critical {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

.units {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.status {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: right;
    min-width: 100px;
    flex-shrink: 0;
    white-space: nowrap;
}

.blood-stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.adequate .status {
    color: #28a745;
}

.moderate .status {
    color: #ff9800;
}

.low .status {
    color: #ff5722;
}

.critical .status {
    color: #dc3545;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Lista de unidades para seleção de estoque - Design Simplificado */
.unidade-selector {
    width: 100%;
}

.unidade-buttons-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.unidade-estoque-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.unidade-estoque-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 32, 32, 0.1), transparent);
    transition: left 0.5s ease;
}

.unidade-estoque-item:hover::before {
    left: 100%;
}

.unidade-estoque-item:hover {
    border-color: var(--hemotec-red);
    box-shadow: 0 8px 20px rgba(224, 32, 32, 0.2);
    transform: translateY(-3px);
}

.unidade-estoque-item.active {
    border-color: #dc3545;
    background: linear-gradient(135deg, #dc3545 0%, #dc3545 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.25);
    transform: translateY(-3px);
}

.unidade-estoque-nome {
    font-weight: 600;
    color: var(--hemotec-text-dark);
    font-size: 1rem;
    margin: 0;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.unidade-estoque-item.active .unidade-estoque-nome {
    color: white;
}

.unidade-estoque-item:hover .unidade-estoque-nome {
    color: var(--hemotec-red);
}

.unidade-estoque-item.active:hover .unidade-estoque-nome {
    color: white;
}

/* Responsividade */
@media (max-width: 768px) {
    .unidade-buttons-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .unidade-estoque-item {
        min-width: 100%;
    }
}