/* ============================================
   Reserva de Espaços — complementos ao template Glass Admin
   (o CSS original do template não é editado)
============================================ */

/* A área de conteúdo é item flex: sem min-width: 0 ela "estica" até caber a tabela mais larga
   e o excesso some (body tem overflow-x: hidden). Com isso, tabelas largas rolam dentro de
   .table-wrapper, que já tem barra de rolagem horizontal. */
.main-content {
    min-width: 0;
}

a.sidebar-header {
    text-decoration: none;
    color: inherit;
}

/* Botões compactos e sem largura total (o template usa width:100% em .btn-primary) */
.btn-sm {
    padding: 9px 18px;
    font-size: 14px;
}

.btn-auto {
    width: auto;
}

a.btn {
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.25);
}

/* Alertas / mensagens flash */
.alert-banner {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-banner.sucesso {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--success);
}

.alert-banner.erro {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
    color: #f87171;
}

.alert-banner.info {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--info);
}

[data-theme="light"] .alert-banner.erro {
    color: var(--danger);
}

/* Formulários */
.form-input.invalido {
    border-color: #f87171;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

select.form-input {
    appearance: none;
    cursor: pointer;
}

select.form-input option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Status de reserva (complementa .status-badge do template) */
.status-badge.rejected,
.status-badge.cancelled {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

.status-badge.rejected::before,
.status-badge.cancelled::before {
    background: #f87171;
    box-shadow: 0 0 8px #f87171;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

/* Hero da página inicial */
.hero-card {
    padding: 32px;
    margin-bottom: 24px;
}

.hero-card h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-card p {
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ============================================
   MODAL
============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    z-index: 2000;
}

.modal-overlay.aberto {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 640px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    padding: 28px;
}

.modal-box.modal-sm {
    max-width: 440px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-fechar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.modal-fechar:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.modal-box .form-group {
    margin-bottom: 18px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-grid-2 .span-2 {
    grid-column: span 2;
}

textarea.form-input {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* Prévia da foto no formulário */
.foto-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.foto-preview img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

/* ============================================
   TOAST
============================================ */
.toast-area {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    max-width: 360px;
}

.toast.erro {
    border-color: rgba(220, 38, 38, 0.5);
    color: #f87171;
}

.toast.sucesso {
    border-color: rgba(34, 197, 94, 0.5);
    color: var(--success);
}

/* ============================================
   TABELAS ADMIN
============================================ */
.thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    display: block;
}

.thumb-vazio {
    width: 56px;
    height: 40px;
    border-radius: 8px;
    border: 1px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.thumb-vazio svg {
    width: 18px;
    height: 18px;
}

.acoes {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-icone {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icone svg {
    width: 16px;
    height: 16px;
}

.btn-icone:hover {
    color: var(--emerald-light);
    border-color: var(--emerald-light);
}

.btn-icone.destaque {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-color: transparent;
    color: #fff;
}

.btn-icone.destaque:hover {
    color: #fff;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-icone.perigo:hover {
    color: #f87171;
    border-color: #f87171;
}

.texto-muted {
    color: var(--text-muted);
    font-size: 13px;
}

.filtros {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filtros .form-group {
    margin-bottom: 0;
    min-width: 180px;
    flex: 1;
}

.filtros .form-input {
    padding: 10px 14px;
    font-size: 14px;
}

/* Lista de tipos de espaço */
.tipo-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tipo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.tipo-item.inativo .tipo-nome {
    color: var(--text-muted);
    text-decoration: line-through;
}

.tipo-item .tipo-nome {
    flex: 1;
}

.tipo-novo {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tipo-novo .form-input {
    padding: 10px 14px;
}

/* ============================================
   CARTÕES PÚBLICOS (prédios / espaços)
============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.item-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.item-card:hover {
    transform: translateY(-4px);
    border-color: var(--emerald-light);
}

.item-card-foto {
    height: 160px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.25), rgba(212, 165, 116, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.item-card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-card-foto svg {
    width: 44px;
    height: 44px;
    opacity: 0.6;
}

.item-card-corpo {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.item-card-corpo h3 {
    font-size: 17px;
    font-weight: 600;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.item-meta svg {
    width: 14px;
    height: 14px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: rgba(52, 211, 153, 0.12);
    color: var(--emerald-light);
    align-self: flex-start;
}

/* Detalhe de prédio / espaço */
.detalhe-topo {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.detalhe-foto {
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 240px;
    padding: 0;
}

.detalhe-foto img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

.detalhe-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 8px 0 12px;
}

.detalhe-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.detalhe-lista {
    list-style: none;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detalhe-lista li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.detalhe-lista svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--emerald-light);
}

.texto-livre {
    white-space: pre-line;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-breadcrumb {
    margin-bottom: 16px;
}

.page-breadcrumb a {
    text-decoration: none;
}

/* ============================================
   AGENDA (FullCalendar 6)
============================================ */
.legenda-agenda {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.legenda-agenda span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legenda-agenda i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.legenda-agenda .checkbox-label {
    font-size: 13px;
    margin-left: auto;
}

.leg-aprovada { background: var(--emerald); }
.leg-pendente { background: repeating-linear-gradient(45deg, var(--warning), var(--warning) 3px, rgba(234, 179, 8, 0.45) 3px, rgba(234, 179, 8, 0.45) 6px); }

#calendario {
    --fc-border-color: var(--glass-border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--glass-bg);
    --fc-list-event-hover-bg-color: var(--glass-hover);
    --fc-today-bg-color: rgba(52, 211, 153, 0.08);
    --fc-now-indicator-color: var(--coral);
    --fc-button-bg-color: var(--glass-bg);
    --fc-button-border-color: var(--glass-border);
    --fc-button-text-color: var(--text-primary);
    --fc-button-hover-bg-color: var(--glass-hover);
    --fc-button-hover-border-color: var(--emerald-light);
    --fc-button-active-bg-color: var(--emerald);
    --fc-button-active-border-color: var(--emerald);
    font-size: 14px;
}

#calendario .fc-toolbar-title {
    font-size: 20px;
    font-weight: 600;
    text-transform: capitalize;
}

#calendario .fc-button {
    border-radius: 10px;
    text-transform: capitalize;
    box-shadow: none;
}

#calendario .fc-button-primary:not(:disabled).fc-button-active {
    color: #fff;
}

#calendario .fc-col-header-cell-cushion,
#calendario .fc-daygrid-day-number,
#calendario .fc-list-day-text,
#calendario .fc-list-day-side-text {
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: capitalize;
}

#calendario .fc-daygrid-day[data-date],
#calendario .fc-timegrid-slot-lane {
    cursor: pointer;
}

#calendario .fc-event {
    cursor: pointer;
    border-radius: 6px;
    padding: 1px 4px;
}

#calendario .evento-aprovada,
#calendario .evento-aprovada.fc-daygrid-dot-event:hover {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
}

#calendario .evento-pendente {
    background: repeating-linear-gradient(45deg, rgba(234, 179, 8, 0.85), rgba(234, 179, 8, 0.85) 6px, rgba(234, 179, 8, 0.6) 6px, rgba(234, 179, 8, 0.6) 12px);
    border-color: var(--warning);
    color: #1a1a1a;
}

#calendario .fc-event .fc-event-main,
#calendario .fc-daygrid-event .fc-event-title,
#calendario .fc-daygrid-event .fc-event-time {
    color: inherit;
}

#calendario .fc-daygrid-event-dot {
    display: none;
}

#calendario .fc-list-event.evento-aprovada,
#calendario .fc-list-event.evento-pendente {
    background: transparent;
    color: var(--text-primary);
}

#calendario .fc-list-event.evento-aprovada .fc-list-event-dot { border-color: var(--emerald); }
#calendario .fc-list-event.evento-pendente .fc-list-event-dot { border-color: var(--warning); }

.leg-externo { background: var(--slate); }

/* Balão de pré-visualização ao passar o mouse num evento */
.balao-evento {
    position: fixed;
    z-index: 2500;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    font-size: 13px;
    color: var(--text-secondary);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.balao-titulo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.balao-evento .status-badge {
    align-self: flex-start;
    padding: 3px 10px;
    font-size: 11px;
}

.balao-rotulo {
    color: var(--text-muted);
    margin-right: 6px;
}

.balao-rotulo::after {
    content: ':';
}

.balao-descricao {
    white-space: pre-line;
    padding-top: 6px;
    border-top: 1px solid var(--glass-border);
    line-height: 1.5;
}

.balao-dica {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.status-badge.externo {
    background: rgba(71, 85, 105, 0.25);
    color: var(--text-secondary);
}

.status-badge.externo::before {
    display: none;
}

.status-badge.externo svg {
    width: 14px;
    height: 14px;
}

#calendario .evento-externo,
#calendario .evento-externo.fc-daygrid-dot-event:hover {
    background: var(--slate);
    border-color: var(--slate);
    color: #f5f5f4;
    opacity: 0.9;
}

#calendario .fc-list-event.evento-externo {
    background: transparent;
    color: var(--text-secondary);
}

#calendario .fc-list-event.evento-externo .fc-list-event-dot { border-color: var(--slate); }

#calendario.ocultar-pendentes .evento-pendente {
    display: none;
}

#calendario .fc-popover {
    background: var(--bg-dark);
    border-color: var(--glass-border);
}

#calendario .fc-popover-header {
    background: var(--glass-bg);
    color: var(--text-primary);
}

/* ============================================
   DETALHE DO PEDIDO / APROVAÇÕES
============================================ */
.modal-box.modal-lg {
    max-width: 860px;
}

.modal-header .status-badge {
    margin-top: 6px;
}

.detalhe-grade {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin-bottom: 16px;
    font-size: 14px;
}

.detalhe-grade > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.rotulo {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.detalhe-grade a,
.bloco-texto a {
    color: var(--emerald-light);
}

.bloco-texto {
    margin-bottom: 14px;
    font-size: 14px;
}

.bloco-texto p {
    margin-top: 4px;
}

.dr-ocorrencias-topo {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin: 12px 0 8px;
}

.dr-selecao {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
}

.dr-selecao a {
    color: var(--emerald-light);
}

.dr-tabela {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.dr-tabela .data-table th,
.dr-tabela .data-table td {
    padding: 8px 12px;
    font-size: 13px;
}

.dr-tabela input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--emerald);
}

.dr-passado {
    opacity: 0.55;
}

.dr-aviso {
    margin-top: 4px;
    font-size: 12px;
    color: var(--warning);
}

.dr-acoes {
    flex-wrap: wrap;
}

#dr-btn-editar {
    margin-right: auto;
}

/* Abas (aprovações) */
.abas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.aba {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.aba:hover {
    background: var(--glass-hover);
}

.aba.ativa {
    background: rgba(52, 211, 153, 0.15);
    color: var(--emerald-light);
}

.aba-contador {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

/* Painel inicial */
.lista-proximas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.proxima-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: inherit;
    text-decoration: none;
}

.proxima-item:hover {
    border-color: var(--emerald-light);
}

.proxima-data {
    min-width: 54px;
    text-align: center;
    font-family: 'Space Mono', monospace;
    line-height: 1.1;
}

.proxima-data strong {
    display: block;
    font-size: 20px;
}

.proxima-data span {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.proxima-info {
    flex: 1;
    min-width: 0;
}

.proxima-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.stat-card {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 600px) {
    .detalhe-grade {
        grid-template-columns: 1fr;
    }

    .dr-selecao {
        margin-left: 0;
    }
}

/* Datas e horários com ícone (formulário, detalhes, tabelas) */
.form-label svg,
.rotulo svg,
.icone-th {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 5px;
    color: var(--emerald-light);
}

.caixa-dia-inteiro {
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    line-height: 1.5;
}

.caixa-dia-inteiro input {
    margin-top: 2px;
    flex-shrink: 0;
}

.caixa-dia-inteiro:has(input:checked) {
    border-color: var(--emerald-light);
    background: rgba(52, 211, 153, 0.1);
}

.opcional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-secao {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
    margin: 4px 0 12px;
}

.data-linha {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Células um pouco mais justas que o padrão do template (16px), para as tabelas caberem sem rolar. */
.data-table th,
.data-table td {
    padding: 14px 12px;
}

/* Textos longos (ex.: "Manhã (…), Tarde (…), Noite (…)") quebram linha em vez de alargar a tabela. */
.data-linha.quebra {
    white-space: normal;
    align-items: flex-start;
    min-width: 160px;
}

.data-linha.quebra svg {
    margin-top: 3px;
}

.data-linha svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--emerald-light);
}

/* Honeypot anti-robô: fora da tela e transparente, mas presente no fluxo do DOM
   (não usa display:none, que robôs mais espertos sabem ignorar). */
.campo-armadilha {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

/* Card "Esqueci minha senha" */
.card-recuperar-titulo {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.rec-captcha {
    margin-bottom: 18px;
    min-height: 65px;
}

.rec-captcha[hidden] {
    display: none;
}

#rec-sucesso .btn {
    margin-top: 4px;
}

/* Senha temporária mostrada uma única vez */
.senha-unica {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 14px 0;
}

.senha-unica code {
    flex: 1;
    font-family: 'Space Mono', monospace;
    font-size: 20px;
    letter-spacing: 1px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px dashed var(--emerald-light);
    color: var(--text-primary);
    user-select: all;
    overflow-wrap: anywhere;
}

/* Configurações */
.config-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.config-subtitulo {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.config-ajuda {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.config-ajuda ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.config-ajuda li {
    margin-bottom: 8px;
}

.config-ajuda a {
    color: var(--emerald-light);
}

.campo-copiar {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.campo-copiar code,
.data-table code {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow-wrap: anywhere;
    user-select: all;
}

@media (max-width: 900px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

/* Chips (dias da semana / turnos) e alternador */
.dias-semana {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip input,
.alternador input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip span,
.alternador span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}

.chip-inativo span {
    opacity: 0.35;
    cursor: not-allowed;
}

.resumo-dias {
    display: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: var(--emerald-light);
}

.resumo-dias.vazio {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.4);
    color: var(--warning);
}

.chip small {
    color: var(--text-muted);
    font-size: 12px;
}

.chip input:checked + span,
.alternador input:checked + span {
    background: rgba(52, 211, 153, 0.15);
    border-color: var(--emerald-light);
    color: var(--emerald-light);
}

.chip input:checked + span small {
    color: inherit;
}

.chip input:focus-visible + span,
.alternador input:focus-visible + span {
    outline: 2px solid var(--emerald-light);
    outline-offset: 2px;
}

.alternador {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

#res-verificacao {
    margin: 4px 0 12px;
}

@media (max-width: 700px) {
    #calendario .fc-toolbar-title {
        font-size: 16px;
    }

    #calendario .fc-header-toolbar {
        gap: 8px;
    }

    .legenda-agenda .checkbox-label {
        margin-left: 0;
    }
}

@media (max-width: 900px) {
    .detalhe-topo {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-grid-2 .span-2 {
        grid-column: auto;
    }

    .modal-box {
        padding: 20px;
    }

    .hero-card {
        padding: 22px;
    }

    .navbar-right .btn-sm {
        padding: 8px 14px;
    }
}
