/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 999;
    overflow-x: auto;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-btn.active:hover {
    background: var(--primary-dark);
}

.g-main.recepcao-main {
    padding-top: 146px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filters row */
.filters-row {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filters-row .g-form-group {
    margin-bottom: 0;
    min-width: 180px;
}

/* Status badges */
.status-agendado { background: var(--primary-50); color: var(--primary); }
.status-confirmado { background: var(--success-50); color: var(--success); }
.status-cancelado { background: var(--danger-50); color: var(--danger); }
.status-falta { background: var(--warning-50); color: var(--warning); }
.status-atendido { background: var(--gray-100); color: var(--gray-500); }
.status-reagendado { background: #f5f3ff; color: var(--accent); }

/* Buffer status badges */
.status-AGENDADO_BOT { background: #fef3c7; color: #d97706; font-weight: 700; }
.status-INSERIDO_PEC { background: #d1fae5; color: #059669; font-weight: 700; }
.status-CANCELADO_PACIENTE { background: #fee2e2; color: #dc2626; font-weight: 700; }
.status-REMARCADO_UBS { background: #e0e7ff; color: #4338ca; font-weight: 700; }

/* Buffer card */
.buffer-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.buffer-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--gray-200);
    background: white;
}
.buffer-stat .count {
    font-size: 1.1rem;
    font-weight: 800;
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ops-metric {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ops-metric small {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    font-weight: 700;
}

.ops-metric strong {
    font-size: 1.6rem;
    color: var(--gray-800);
    line-height: 1;
}

.ops-metric span {
    font-size: 0.82rem;
    color: var(--gray-500);
}

.ops-board {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 16px;
    margin-bottom: 16px;
}

.ops-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.ops-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ops-panel-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-800);
}

.ops-panel-head p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.ops-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ops-item {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fafc;
}

.ops-item strong {
    display: block;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.ops-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 8px;
}

.ops-empty {
    padding: 20px;
    border: 1px dashed var(--gray-300);
    border-radius: 14px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.ops-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 14px;
}

.ops-toolbar .g-form-group {
    margin-bottom: 0;
    min-width: 150px;
}

.ops-table-wrap {
    overflow-x: auto;
}

.sla-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sla-ok { background: #dcfce7; color: #166534; }
.sla-atencao { background: #fef3c7; color: #92400e; }
.sla-estourado { background: #fee2e2; color: #991b1b; }

.buffer-actions-cell {
    white-space: nowrap;
    text-align: right;
}
.buffer-actions-cell .g-btn {
    margin-left: 4px;
    margin-bottom: 4px;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--danger);
    color: white;
}

/* Actions cell */
.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.actions-cell .g-btn {
    margin-left: 4px;
    margin-bottom: 4px;
}

/* Slots grid */
.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.slot-chip {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

.slot-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.slot-chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.slot-chip.unavailable {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
    border-color: var(--gray-100);
}

.slots-empty {
    padding: 20px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 2px;
}
.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}
.autocomplete-item:hover, .autocomplete-item.active {
    background: var(--primary-50, #e8f0fe);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-nome {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}
.autocomplete-info {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.autocomplete-loading {
    padding: 12px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Week grid for config */
.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.day-config-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
}

.day-config-card.active-day {
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.day-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.day-config-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
}

.day-config-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.day-config-fields label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    display: block;
    margin-bottom: 4px;
}

.day-config-fields input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition);
}

.day-config-fields input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Blocks list */
.block-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.block-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.block-item-time {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.block-item-motivo {
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* Warning box */
.warning-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--warning-50);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: #92400e;
    margin-bottom: 16px;
}

.warning-box i {
    font-size: 1.1rem;
    color: var(--warning);
}

/* Form layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* Header user info */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
}

.header-unit-name {
    font-size: 0.72rem;
    color: var(--gray-500);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

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

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Checkbox styled */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ========================================
   AGENDA VISUAL - Calendar + Timeline
   ======================================== */
.agenda-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    margin-bottom: 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: calc(100vh - 220px);
}

/* === SIDEBAR (estilo PEC) === */
.agenda-sidebar {
    background: #f8fafc;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

/* Mini Calendar */
.mini-calendar {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mini-cal-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    text-transform: capitalize;
}

.mini-cal-nav {
    display: flex;
    gap: 2px;
}

.mini-cal-nav button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--gray-500);
    transition: var(--transition);
}

.mini-cal-nav button:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    text-align: center;
}

.mini-cal-grid .cal-weekday {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    padding: 4px 0;
    letter-spacing: 0.5px;
}

.mini-cal-grid .cal-day {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
    margin: 0 auto;
}

.mini-cal-grid .cal-day:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.mini-cal-grid .cal-day.today {
    border: 2px solid #1976d2;
    font-weight: 700;
    color: #1976d2;
}

.mini-cal-grid .cal-day.selected {
    background: #1976d2;
    color: white;
    font-weight: 700;
}

.mini-cal-grid .cal-day.selected.today {
    border-color: #1976d2;
}

.mini-cal-grid .cal-day.other-month {
    color: var(--gray-300);
}

.mini-cal-grid .cal-day.has-appointments {
    position: relative;
}

.mini-cal-grid .cal-day.has-appointments::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1976d2;
}

.mini-cal-grid .cal-day.selected.has-appointments::after {
    background: white;
}

/* Professional filter under calendar */
.cal-prof-filter {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.cal-prof-filter label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.cal-prof-filter .g-select {
    font-size: 0.8rem;
    padding: 6px 8px;
}

/* Sidebar legend */
.agenda-stats {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agenda-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--gray-600);
}

.agenda-stat-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.agenda-stat-count {
    margin-left: auto;
    font-weight: 700;
    color: var(--gray-700);
    min-width: 18px;
    text-align: right;
}

/* === TIMELINE PANEL (estilo PEC) === */
.timeline-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.timeline-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-header-left h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.timeline-header-badges {
    display: flex;
    gap: 8px;
}

.tl-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tl-header-badge.badge-total {
    background: #e3f2fd;
    color: #1565c0;
}

.tl-header-badge.badge-disponivel {
    background: #e8f5e9;
    color: #2e7d32;
}

.timeline-header-actions {
    display: flex;
    gap: 6px;
}

.timeline-header-actions button {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: white;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.timeline-header-actions button:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.timeline-body {
    flex: 1;
    overflow-y: auto;
    background: white;
}

/* Timeline slot row (estilo PEC) */
.timeline-slot {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    min-height: 44px;
    transition: background 0.1s;
}

.timeline-slot:hover {
    background: #fafbfc;
}

.timeline-time {
    width: 60px;
    flex-shrink: 0;
    padding: 10px 8px 10px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    border-right: 2px solid #e0e0e0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    user-select: none;
}

.timeline-content {
    flex: 1;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

/* Appointment card (estilo PEC) */
.timeline-appointment {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 0;
    transition: all 0.15s;
    border: 1px solid transparent;
    gap: 8px;
}

.timeline-appointment:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Status icon circle */
.tl-status-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: white;
}

.timeline-appointment.status-agendado {
    background: #e3f2fd;
    border-color: #bbdefb;
}
.timeline-appointment.status-agendado .tl-status-icon { background: #1976d2; }

.timeline-appointment.status-confirmado {
    background: #e8f5e9;
    border-color: #c8e6c9;
}
.timeline-appointment.status-confirmado .tl-status-icon { background: #388e3c; }

.timeline-appointment.status-cancelado {
    background: #ffebee;
    border-color: #ffcdd2;
    opacity: 0.7;
}
.timeline-appointment.status-cancelado .tl-status-icon { background: #d32f2f; }

.timeline-appointment.status-falta {
    background: #fff3e0;
    border-color: #ffe0b2;
    opacity: 0.7;
}
.timeline-appointment.status-falta .tl-status-icon { background: #f57c00; }

.timeline-appointment.status-atendido {
    background: #f5f5f5;
    border-color: #e0e0e0;
    opacity: 0.6;
}
.timeline-appointment.status-atendido .tl-status-icon { background: #757575; }

.timeline-appointment.status-reagendado {
    background: #f3e5f5;
    border-color: #e1bee7;
    opacity: 0.7;
}
.timeline-appointment.status-reagendado .tl-status-icon { background: #7b1fa2; }

.tl-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    gap: 1px;
}

.tl-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tl-info .tl-nome {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-info .tl-tipo {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.tl-tipo.tipo-consulta { background: #e3f2fd; color: #1565c0; }
.tl-tipo.tipo-retorno { background: #e8f5e9; color: #2e7d32; }
.tl-tipo.tipo-reserva { background: #fff3e0; color: #e65100; }

.tl-info .tl-detail {
    font-size: 0.72rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-info .tl-whatsapp {
    color: #25D366;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Action buttons (estilo PEC - icones compactos) */
.tl-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s;
}

.timeline-appointment:hover .tl-actions {
    opacity: 1;
}

.tl-actions .tl-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--gray-500);
    transition: all 0.15s;
    position: relative;
}

.tl-actions .tl-btn:hover {
    background: rgba(0,0,0,0.06);
}

.tl-actions .tl-btn.btn-lista { color: #388e3c; }
.tl-actions .tl-btn.btn-lista:hover { background: #e8f5e9; }
.tl-actions .tl-btn.btn-reagendar { color: #1976d2; }
.tl-actions .tl-btn.btn-reagendar:hover { background: #e3f2fd; }
.tl-actions .tl-btn.btn-whatsapp { color: #25D366; }
.tl-actions .tl-btn.btn-whatsapp:hover { background: #e8f5e9; }
.tl-actions .tl-btn.btn-falta { color: #f57c00; }
.tl-actions .tl-btn.btn-falta:hover { background: #fff3e0; }
.tl-actions .tl-btn.btn-cancelar { color: #d32f2f; }
.tl-actions .tl-btn.btn-cancelar:hover { background: #ffebee; }

/* Tooltip for action buttons */
.tl-actions .tl-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 6px;
    background: var(--gray-800);
    color: white;
    font-size: 0.62rem;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Empty slot (estilo PEC - "Horario disponivel") */
.timeline-empty-slot {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    color: var(--gray-300);
    font-size: 0.78rem;
    font-style: italic;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.timeline-empty-slot::before {
    content: 'Horario disponivel';
}

.timeline-empty-slot:hover {
    background: #e3f2fd;
    color: #1976d2;
    font-style: normal;
}

.timeline-empty-slot:hover::before {
    content: '+ Adicionar agendamento';
    font-weight: 600;
}

/* Blocked slot (reserva) */
.timeline-slot.blocked {
    background: #fafafa;
}

.timeline-slot.blocked .timeline-content {
    align-items: center;
}

.timeline-reservation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: repeating-linear-gradient(
        -45deg,
        #fff3e0,
        #fff3e0 4px,
        #ffe0b2 4px,
        #ffe0b2 8px
    );
    border: 1px solid #ffe0b2;
    font-size: 0.78rem;
    color: #e65100;
    font-weight: 500;
    flex: 1;
}

.timeline-reservation i {
    font-size: 0.85rem;
}

/* Modal Agendar no Slot */
.modal-agendar-slot .modal-box {
    max-width: 560px;
}

.modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-200);
}

.modal-tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    background: white;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.modal-tab-btn.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background: white;
}

.modal-tab-btn:hover:not(.active) {
    color: var(--gray-700);
    background: var(--gray-50);
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-form-grid .full-width {
    grid-column: 1 / -1;
}

.motivo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.motivo-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.motivo-grid label:hover {
    background: #e3f2fd;
    border-color: #1976d2;
}

.motivo-grid input[type="radio"] {
    accent-color: #1976d2;
}

/* Responsive */
@media (max-width: 768px) {
    .agenda-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .agenda-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    .tl-actions { opacity: 1; }
    .tab-nav {
        padding: 12px 16px;
        top: 60px;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .g-main.recepcao-main {
        padding-top: 126px;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-row .g-form-group {
        min-width: auto;
    }

    .ops-grid,
    .ops-board {
        grid-template-columns: 1fr;
    }

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

    .day-config-fields {
        grid-template-columns: 1fr;
    }

    .actions-cell .g-btn {
        font-size: 0.72rem;
        padding: 5px 8px;
    }

    .block-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
