/* Atestado do colaborador (portal → Atestado). O calendário usa .rh-cal (rh-esteira.css) e .dpf-no-periodo (dp-ferias.css). */
.atest-sub { margin: 0 0 16px; font-size: 13px; color: #6b7280; }
.atest-grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.atest-lateral { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.atest-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 20px; }
.atest-card-titulo { display: block; font-size: 13px; color: #0f172a; margin-bottom: 12px; }
.atest-form { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.atest-campo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.atest-linha { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.atest-rotulo { font-size: 12px; font-weight: 700; color: #374151; }
.atest-obrig { color: #b91c1c; }
.atest-opc { font-weight: 500; color: #6b7280; }
.atest-ajuda { font-size: 12px; color: #6b7280; }
.atest-erro { font-size: 12px; font-weight: 500; color: #b91c1c; }

.atest-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1.5px solid #e2e6ea; border-radius: 8px;
    font-family: inherit; font-size: 14px; color: #111827; background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
.atest-input:hover { border-color: #c9d6e6; }
.atest-input:focus { border-color: #245A91; box-shadow: 0 0 0 3px rgba(36,90,145,.14); }
textarea.atest-input { resize: none; line-height: 1.5; }

/* Arquivo: o input fica escondido; a área tracejada é o <label> dele */
.atest-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.atest-soltar { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; text-align: center;
    border: 2px dashed #c9d6e6; border-radius: 12px; background: #fafcfe; cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.4,0,.2,1); }
.atest-soltar:hover { border-color: #245A91; background: #f2f7fc; }
.atest-file:focus-visible + .atest-soltar { outline: 2px solid #245A91; outline-offset: 2px; }
.atest-soltar.erro { border-color: #dc2626; background: #fef2f2; }
.atest-soltar-icone { width: 48px; height: 48px; border-radius: 12px; background: #eef4fb; color: #245A91; display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s ease, color .2s ease, transform .25s cubic-bezier(.4,0,.2,1); }
.atest-soltar-texto { font-size: 14px; font-weight: 600; color: #111827; }
.atest-soltar-texto u { color: #245A91; }
.atest-soltar-solte, .atest-soltar-invalido { display: none; font-size: 14px; font-weight: 700; }
/* Arrastando: (1) arquivo em algum lugar da página → mostra onde soltar; (2) em cima da área → pronto para soltar; (3) tipo não aceito */
.atest-soltar.alvo { border-color: #7fa3c9; background: #f5f9fd; }
.atest-soltar.arrastando { border-style: solid; border-color: #245A91; background: #eef4fb; transform: scale(1.01); box-shadow: 0 0 0 4px rgba(36,90,145,.12); }
.atest-soltar.arrastando * { pointer-events: none; }   /* sem isso, passar sobre o texto dispara dragleave e a área pisca */
.atest-soltar.arrastando .atest-soltar-icone { background: #245A91; color: #fff; transform: translateY(-3px); }
.atest-soltar.arrastando .atest-soltar-icone svg { animation: atestSobe 1s ease-in-out infinite; }
.atest-soltar.arrastando .atest-soltar-texto, .atest-soltar.arrastando .atest-ajuda { display: none; }
.atest-soltar.arrastando .atest-soltar-solte { display: inline; color: #245A91; }
.atest-soltar.arrastando.invalido { border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 4px rgba(220,38,38,.1); transform: none; }
.atest-soltar.arrastando.invalido .atest-soltar-icone { background: #fee2e2; color: #b91c1c; transform: none; }
.atest-soltar.arrastando.invalido .atest-soltar-icone svg { animation: none; }
.atest-soltar.arrastando.invalido .atest-soltar-solte { display: none; }
.atest-soltar.arrastando.invalido .atest-soltar-invalido { display: inline; color: #b91c1c; }
@keyframes atestSobe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.atest-arquivo { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1.5px solid #c7ece6; border-radius: 12px; background: #f6fcfb; }
.atest-arquivo[hidden], .atest-soltar[hidden] { display: none; }
.atest-arquivo-tipo { flex-shrink: 0; font-size: 10px; font-weight: 800; color: #fff; background: #b91c1c; padding: 3px 6px; border-radius: 4px; }
.atest-arquivo-tipo.img { background: #0f766e; }
.atest-arquivo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #0f766e; }
.atest-arquivo-info strong { font-size: 13.5px; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Período */
.atest-periodo { position: relative; }
.atest-data { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 10px;
    border: 1.5px solid #e2e6ea; border-radius: 8px; background: #fff; font-family: inherit; font-size: 14px; color: #9ca3af; cursor: pointer;
    text-align: left; transition: border-color .18s, box-shadow .18s; }
.atest-data:hover { border-color: #c9d6e6; }
.atest-data.aberto { border-color: #245A91; box-shadow: 0 0 0 3px rgba(36,90,145,.14); }
.atest-data.preenchido { color: #111827; }
.atest-data.erro, .atest-input.erro { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.atest-data-texto { flex: 1; min-width: 0; }
.atest-chip-dias { flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: #245A91; background: #eef4fb; border: 1px solid #d3e2f2; padding: 2px 8px; border-radius: 99px; }
.atest-cal { position: absolute; top: 78px; left: 0; z-index: 20; width: 320px; box-sizing: border-box; padding: 12px; background: #fff;
    border: 1px solid #e8e8e8; border-radius: 12px; box-shadow: 0 14px 36px rgba(15,23,42,.18); animation: atestEntra .26s cubic-bezier(.4,0,.2,1); }
.atest-cal .rh-cal { border: none; padding: 0; margin: 0; }
.atest-cal-rodape { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.atest-cal-rodape .atest-ajuda { flex: 1; }
@keyframes atestEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Botões */
.atest-btn { min-height: 46px; padding: 0 24px; border: none; border-radius: 8px; background: #245A91; color: #fff; font-family: inherit; font-size: 14px;
    font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .18s, transform .18s, box-shadow .18s; }
.atest-btn:hover { background: #1a4570; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(36,90,145,.25); }
.atest-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.atest-btn-sec { min-height: 36px; padding: 0 12px; border: 1.5px solid #e2e6ea; border-radius: 8px; background: #fff; font-family: inherit; font-size: 12.5px;
    font-weight: 600; color: #374151; cursor: pointer; display: inline-flex; align-items: center; transition: all .18s; }
.atest-btn-sec:hover { border-color: #245A91; color: #245A91; }
.atest-btn-peq { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.atest-btn-x { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px;
    background: transparent; color: #6b7280; cursor: pointer; transition: all .18s; }
.atest-btn-x:hover { background: #fef2f2; color: #b91c1c; }
.atest-rodape { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid #f0f0f0; }

/* Dicas e lista */
.atest-dicas { display: flex; flex-direction: column; gap: 16px; }
.atest-dicas .atest-card-titulo { margin-bottom: 0; }
.atest-dica { display: flex; gap: 12px; align-items: flex-start; font-size: 12px; color: #6b7280; line-height: 1.45; }
.atest-dica strong { display: block; font-size: 13px; font-weight: 600; color: #111827; }
.atest-dica-icone { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: #eef4fb; color: #245A91; display: inline-flex; align-items: center; justify-content: center; }
.atest-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.atest-item:last-child { border-bottom: none; padding-bottom: 0; }
.atest-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #6b7280; }
.atest-item-info strong { font-size: 13px; font-weight: 600; color: #111827; }
.atest-item-resposta { margin-top: 4px; color: #374151; }
.atest-status { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.atest-status.pendente { background: #fef3c7; color: #92400e; }
.atest-status.aprovado { background: #dcfce7; color: #166534; }
.atest-status.rejeitado { background: #fee2e2; color: #991b1b; }

.so-cel { display: none; }
@media (max-width: 900px) {
    .atest-grade { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .so-pc { display: none; }
    .so-cel { display: inline; }
    .atest-form { padding: 16px; gap: 18px; }
    .atest-linha { grid-template-columns: minmax(0, 1fr); }
    .atest-cal { position: static; width: auto; margin-top: 2px; box-shadow: none; }
    .atest-rodape .atest-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .atest-cal { animation: none; }
    .atest-soltar, .atest-soltar.arrastando, .atest-soltar.arrastando .atest-soltar-icone { transform: none; }
    .atest-soltar.arrastando .atest-soltar-icone svg { animation: none; }
}
