/* ============================================================
   Pedido de Nutrição — Estilos do Formulário
   v20260305_1
   ============================================================ */

/* ── Container principal ── */
.pedido-nutricao-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    color: var(--text-main, #f8fafc);
}

/* ── Header da view ── */
.pedido-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.pedido-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pedido-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

.pedido-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin: 0;
}

.pedido-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    margin: 0.15rem 0 0;
}

/* Botão voltar */
.btn-back-nutricao {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-muted, #94a3b8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-back-nutricao:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main, #f8fafc);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Card do formulário ── */
.pedido-card {
    background: rgba(22, 33, 58, 0.85);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 18px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ── Layout do form ── */
.pedido-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.pedido-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pedido-form-full {
    margin-bottom: 1.25rem;
}

/* ── Labels ── */
.pedido-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pedido-label .ph {
    font-size: 0.95rem;
    color: #38bdf8;
}

.required {
    color: #f87171;
    font-size: 0.85em;
}

.pedido-char-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    letter-spacing: 0;
    text-transform: none;
}

.pedido-char-count.near-limit {
    color: #f59e0b;
}

.pedido-char-count.at-limit {
    color: #f87171;
}

/* ── Inputs e Selects ── */
.pedido-input,
.pedido-select,
.pedido-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    color: var(--text-main, #f8fafc);
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.pedido-input:focus,
.pedido-select:focus,
.pedido-textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.pedido-input::placeholder,
.pedido-textarea::placeholder {
    color: var(--text-muted, #475569);
    font-size: 0.85rem;
}

.pedido-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 256 256'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 01-11.32 0l-80-80A8 8 0 0154.34 90.34L128 164l73.66-73.66a8 8 0 0111.32 11.32z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-color: rgba(255, 255, 255, 0.05);
    padding-right: 2.25rem;
    cursor: pointer;
}

.pedido-select:disabled {
    opacity: 0.45;
    cursor: default;
}

/* Ramal auto-preenchido */
.pedido-input-icon-wrapper {
    position: relative;
}

.pedido-input-auto {
    padding-right: 2.2rem;
    background: rgba(255, 255, 255, 0.03);
    color: #38bdf8;
    font-weight: 600;
    cursor: default;
}

.pedido-input-lock-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
    pointer-events: none;
}

.pedido-textarea {
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

/* ── Status de envio ── */
.pedido-status {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pedido-status.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.pedido-status.error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

/* ── Botões de ação ── */
.pedido-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.btn-pedido-cancel {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    background: transparent;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    color: var(--text-muted, #94a3b8);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pedido-cancel:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

.btn-pedido-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.75rem;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.btn-pedido-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-pedido-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Info footer ── */
.pedido-info-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(56, 189, 248, 0.07);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
}

.pedido-info-footer .ph {
    color: #38bdf8;
}

/* ── Botão "Novo Pedido" na view Nutrição ── */
.btn-novo-pedido-dieta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
    white-space: nowrap;
}

.btn-novo-pedido-dieta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.45);
}

/* ── Responsivo ── */
@media (max-width: 640px) {
    .pedido-form-row {
        grid-template-columns: 1fr;
    }

    .pedido-card {
        padding: 1.25rem;
    }

    .pedido-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pedido-form-actions {
        flex-direction: column-reverse;
    }

    .btn-pedido-cancel,
    .btn-pedido-submit {
        width: 100%;
        justify-content: center;
    }
}

/* ── Light mode (:root.light-mode coincide com o padrão do projeto) ── */
:root.light-mode .pedido-nutricao-container {
    color: #1e293b;
}

:root.light-mode .pedido-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

:root.light-mode .pedido-input,
:root.light-mode .pedido-select,
:root.light-mode .pedido-textarea {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

:root.light-mode .pedido-input:focus,
:root.light-mode .pedido-select:focus,
:root.light-mode .pedido-textarea:focus {
    background: #ffffff;
}

:root.light-mode .pedido-select {
    background-color: #f8fafc;
}

:root.light-mode .pedido-input::placeholder,
:root.light-mode .pedido-textarea::placeholder {
    color: #94a3b8;
}

:root.light-mode .pedido-input-auto {
    background: #eff9ff;
}

:root.light-mode .pedido-title {
    color: #1e293b;
}

:root.light-mode .pedido-subtitle {
    color: #64748b;
}

:root.light-mode .pedido-label {
    color: #64748b;
}

:root.light-mode .btn-back-nutricao {
    border-color: rgba(0, 0, 0, 0.12);
    color: #64748b;
}

:root.light-mode .btn-back-nutricao:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1e293b;
}

:root.light-mode .btn-pedido-cancel {
    border-color: rgba(0, 0, 0, 0.12);
    color: #64748b;
}

:root.light-mode .pedido-form-actions {
    border-top-color: rgba(0, 0, 0, 0.08);
}

:root.light-mode .pedido-info-footer {
    color: #64748b;
}

/* ========================================
   MENSAGENS SALVAS — Dropdown inteligente
   ======================================== */

.saved-msg-wrapper {
    position: relative;
}

.saved-msg-save-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.saved-msg-save-btn:hover {
    background: rgba(56, 189, 248, 0.3);
    transform: scale(1.08);
}

.saved-msg-save-btn.saved {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.saved-msg-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
    animation: savedMsgSlideIn 0.2s ease;
}

@keyframes savedMsgSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saved-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.saved-msg-header .ph {
    font-size: 1rem;
}

.saved-msg-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px;
    transition: color 0.2s;
}

.saved-msg-close:hover {
    color: #f87171;
}

.saved-msg-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}

.saved-msg-list::-webkit-scrollbar {
    width: 4px;
}

.saved-msg-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.saved-msg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: #e2e8f0;
    font-size: 0.85rem;
}

.saved-msg-item:hover {
    background: rgba(56, 189, 248, 0.1);
}

.saved-msg-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-msg-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.saved-msg-item:hover .saved-msg-item-actions {
    opacity: 1;
}

.saved-msg-item-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 5px;
    transition: all 0.15s;
}

.saved-msg-item-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.saved-msg-item-btn.delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}

.saved-msg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
    color: #475569;
    font-size: 0.82rem;
}

.saved-msg-empty .ph {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Light Mode */
:root.light-mode .saved-msg-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: #e2e8f0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

:root.light-mode .saved-msg-header {
    border-bottom-color: #e2e8f0;
}

:root.light-mode .saved-msg-item {
    color: #334155;
}

:root.light-mode .saved-msg-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

:root.light-mode .saved-msg-save-btn {
    background: rgba(56, 189, 248, 0.1);
}

/* ══════════════════════════════════════════════════════ */
/* PEDIDO EM LOTE - TABS                                  */
/* ══════════════════════════════════════════════════════ */
.pedido-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.06);
}

.pedido-tab {
    flex: 1;
    padding: 0.7rem 1.2rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pedido-tab:hover {
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
}

.pedido-tab.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pedido-tab i {
    font-size: 1.1rem;
}

/* ══════════════════════════════════════════════════════ */
/* PEDIDO EM LOTE - PAINEL DE CONTEÚDO                    */
/* ══════════════════════════════════════════════════════ */
.pedido-tab-content {
    display: none;
}

.pedido-tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Seletores de setor no modo lote */
.batch-sector-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.batch-sector-row .pedido-form-group {
    flex: 1;
}

/* Botão Carregar Leitos */
.btn-load-beds {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
    color: #60a5fa;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.btn-load-beds:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-load-beds:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ══════════════════════════════════════════════════════ */
/* PEDIDO EM LOTE - GRID DE LEITOS                        */
/* ══════════════════════════════════════════════════════ */
.batch-grid-container {
    margin-bottom: 1.5rem;
}

.batch-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.batch-grid-toolbar .batch-count {
    font-size: 0.8rem;
    color: #94a3b8;
}

.batch-grid-toolbar .batch-count strong {
    color: #e2e8f0;
}

.btn-select-all {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-select-all:hover {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.batch-grid {
    display: grid;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar do grid */
.batch-grid::-webkit-scrollbar {
    width: 5px;
}

.batch-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.batch-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

/* Card individual do leito no grid */
.batch-bed-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.batch-bed-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.batch-bed-item.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.batch-bed-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.batch-bed-item.fasting {
    border-left: 3px solid #f59e0b;
}

.batch-bed-item.has-active {
    border-left: 3px solid #ef4444;
}

/* Checkbox */
.batch-bed-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: transparent;
}

.batch-bed-item.selected .batch-bed-check {
    background: #3b82f6;
    border-color: #3b82f6;
}

.batch-bed-check i {
    font-size: 0.75rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.batch-bed-item.selected .batch-bed-check i {
    opacity: 1;
}

/* Info do leito */
.batch-bed-info {
    flex: 1;
    min-width: 0;
}

.batch-bed-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.batch-bed-patient {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-bed-patient .mat {
    color: #64748b;
    font-size: 0.7rem;
}

/* Badges */
.batch-bed-badges {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.batch-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batch-badge.fasting {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.batch-badge.active-diet {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.batch-badge.empty {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Placeholder quando nenhum leito carregado */
.batch-grid-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #475569;
}

.batch-grid-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.batch-grid-placeholder p {
    font-size: 0.85rem;
    margin: 0;
}

/* Campos comuns do lote (Dieta, OBS, Solicitante) */
.batch-common-fields {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

/* Resultado do envio em lote */
.batch-results {
    margin-top: 1rem;
}

.batch-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.batch-result-item.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.batch-result-item.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.batch-result-item i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════ */
/* MODAL DE CONFIRMAÇÃO DE JEJUM                          */
/* ══════════════════════════════════════════════════════ */
.batch-fasting-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.batch-fasting-modal.active {
    display: flex;
}

.batch-fasting-modal-content {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.batch-fasting-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.batch-fasting-title i {
    font-size: 1.5rem;
}

.batch-fasting-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.batch-fasting-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.batch-fasting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
}

.batch-fasting-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.batch-fasting-item-bed {
    font-weight: 700;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.batch-fasting-item-patient {
    font-size: 0.75rem;
    color: #94a3b8;
}

.batch-fasting-item-diet {
    font-size: 0.7rem;
    color: #f59e0b;
    font-weight: 600;
}

/* Toggle switch para o modal de jejum */
.batch-fasting-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.batch-fasting-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.batch-fasting-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 24px;
    transition: 0.3s;
}

.batch-fasting-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ef4444;
    border-radius: 50%;
    transition: 0.3s;
}

.batch-fasting-toggle input:checked + .toggle-slider {
    background: rgba(34, 197, 94, 0.3);
}

.batch-fasting-toggle input:checked + .toggle-slider::before {
    background: #22c55e;
    transform: translateX(20px);
}

.batch-fasting-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.batch-fasting-actions button {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-fasting-cancel {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
}

.btn-fasting-cancel:hover {
    background: rgba(255,255,255,0.12);
}

.btn-fasting-confirm {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

.btn-fasting-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Alerta de jejum no formulário individual */
.pn-fasting-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    animation: fadeInTab 0.3s ease;
}

.pn-fasting-alert i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Barra de progresso do envio em lote */
.batch-progress {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.batch-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.batch-progress-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════ */
/* DROPDOWN CUSTOMIZADO DE ANDARES (MÚLTIPLO)              */
/* ══════════════════════════════════════════════════════ */
.batch-dropdown-container {
    position: relative;
    width: 100%;
}
.batch-dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.92rem;
    user-select: none;
    transition: all 0.2s ease;
}
.batch-dropdown-trigger:hover {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.08);
}
.batch-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeInTab 0.2s ease;
}
.batch-dropdown-options.active {
    display: block;
}
.batch-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: #e2e8f0;
    font-size: 0.85rem;
    user-select: none;
}
.batch-dropdown-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #fff;
}
.batch-dropdown-option input[type="checkbox"] {
    cursor: pointer;
    accent-color: #38bdf8;
    width: 16px;
    height: 16px;
}

/* Ajustes no Light Mode */
:root.light-mode .batch-dropdown-trigger {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}
:root.light-mode .batch-dropdown-trigger:hover {
    background: #ffffff;
    border-color: #38bdf8;
}
:root.light-mode .batch-dropdown-options {
    background: rgba(255, 255, 255, 0.98);
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
:root.light-mode .batch-dropdown-option {
    color: #334155;
}
:root.light-mode .batch-dropdown-option:hover {
    background: rgba(56, 189, 248, 0.08);
    color: #0284c7;
}