.agendamento-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.agendamento-page.is-authenticated [data-login-card] {
    display: none !important;
}

.agendamento-page h1 {
    text-align: center;
    font-size: 2rem;
}

.agendamento-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agendamento-card h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #111827;
}

.agendamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.agendamento-session {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.agendamento-session h2 {
    margin: 0;
}

.agendamento-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eef2ff;
    padding: 0.35rem;
    border-radius: 999px;
}

.agendamento-tab {
    border: none;
    background: transparent;
    color: #4c1d95;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.agendamento-tab:hover,
.agendamento-tab:focus {
    outline: none;
    background: rgba(124, 58, 237, 0.12);
    transform: translateY(-1px);
}

.agendamento-tab.active {
    background: linear-gradient(120deg, #7c3aed, #4338ca);
    color: #fff;
    box-shadow: 0 8px 16px rgba(76, 29, 149, 0.25);
}

.agendamento-header h2 {
    margin: 0;
}

.agendamento-card p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.agendamento-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agendamento-form label {
    font-weight: 600;
    color: #1f2937;
}

.agendamento-form input {
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f8fafc;
}

.agendamento-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.agendamento-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
}

.agendamento-actions .agendamento-link-button {
    margin-right: auto;
}

.agendamento-link-button {
    border: none;
    background: none;
    color: #4338ca;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    align-self: flex-start;
}

.agendamento-link-button:hover,
.agendamento-link-button:focus {
    outline: none;
    text-decoration: underline;
}

.register-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1100;
}

.register-modal[hidden] {
    display: none !important;
}

.register-dialog {
    position: relative;
    max-width: 460px;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem 1.5rem;
    box-shadow: 0 25px 55px -20px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    color: var(--color-white);
}

.register-dialog h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--color-white);
}

.agendamento-modal-description {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.register-dialog .agendamento-form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.register-dialog .agendamento-form > div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.register-dialog label {
    color: var(--color-white);
}

.register-dialog input {
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.75);
    color: var(--color-white);
}

.register-dialog input::placeholder {
    color: rgba(226, 232, 240, 0.75);
}

.register-dialog input:focus {
    outline: none;
    border-color: rgba(145, 70, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.25);
    background: rgba(15, 23, 42, 0.9);
}

.register-dialog .agendamento-status {
    color: #34d399;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    align-items: center;
}

.modal-actions .primary-button {
    margin-left: auto;
}

.close-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
}

.agendamento-recover {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agendamento-recover p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.agendamento-recover.hidden {
    display: none;
}

.agendamento-status {
    margin: 0;
    font-size: 0.95rem;
    color: #047857;
    font-weight: 600;
}

.agendamento-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.agendamento-panel.hidden {
    display: none;
}

.agendamento-hint {
    margin: -0.5rem 0 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.75);
}

.agendamento-error {
    margin: 0;
    font-size: 0.95rem;
    color: #b91c1c;
    font-weight: 600;
}

.agendamento-list {
    display: grid;
    gap: 1.5rem;
}

.agendamento-item {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(14, 165, 233, 0.06));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agendamento-item h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1f2937;
}

.agendamento-item .info {
    color: #334155;
    font-size: 0.95rem;
}

.agendamento-item .schedule {
    font-weight: 600;
    color: #0f172a;
}

.agendamento-item button {
    align-self: flex-start;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #475569;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 1rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-button {
    background: linear-gradient(120deg, #7c3aed, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(124, 58, 237, 0.25);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.25);
}

.secondary-button {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.schedule-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1300;
}

.schedule-modal-overlay[hidden] {
    display: none;
}

.schedule-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1310;
}

.schedule-modal[hidden] {
    display: none;
}

.schedule-modal__dialog {
    position: relative;
    width: min(960px, 92vw);
    max-height: min(78vh, calc(100vh - 4rem));
    background: #0f172a;
    border-radius: 1rem;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.schedule-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.2));
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.schedule-modal__header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #e0f2fe;
}

.schedule-modal__context {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: rgba(224, 242, 254, 0.85);
}

.schedule-modal__close {
    background: transparent;
    border: none;
    color: #e0f2fe;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.schedule-modal__close:hover,
.schedule-modal__close:focus {
    background: rgba(14, 165, 233, 0.25);
    color: #ffffff;
    outline: none;
}

.schedule-modal__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem 0.5rem;
    color: #f8fafc;
}

.schedule-modal__controls .schedule-modal__range {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 600;
}

.schedule-modal__controls .secondary-button {
    background: rgba(30, 64, 175, 0.2);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.45);
}

.schedule-modal__controls .schedule-modal__picker {
    margin-left: auto;
}

.schedule-modal__controls .secondary-button:hover,
.schedule-modal__controls .secondary-button:focus {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
    outline: none;
}

.schedule-modal__body {
    padding: 0 1.5rem 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.schedule-modal__footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.schedule-modal__footer .primary-button {
    min-width: 12rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 18px 34px rgba(34, 197, 94, 0.25);
}

.schedule-modal__footer .primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.schedule-modal__footer .secondary-button {
    margin-left: auto;
    background: rgba(30, 64, 175, 0.25);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.45);
}

.schedule-modal__footer .secondary-button:hover,
.schedule-modal__footer .secondary-button:focus {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
    outline: none;
}

.schedule-calendar {
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.15);
    padding: 1rem;
    overflow-x: auto;
}

.schedule-calendar .table-schedule {
    width: 100%;
    border-collapse: collapse;
    color: #f8fafc;
}

.schedule-calendar .table-schedule thead th {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
    text-align: center;
}

.schedule-calendar .table-schedule td {
    min-height: 9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.2);
    padding: 0.75rem;
}

.schedule-slot {
    width: 100%;
    background: linear-gradient(160deg, rgba(129, 140, 248, 0.3), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.9rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.schedule-slot:hover,
.schedule-slot:focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 18px 34px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    outline: none;
}

.schedule-slot.selected {
    border-color: #22c55e;
    box-shadow: 0 18px 34px rgba(34, 197, 94, 0.25);
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.35));
    color: #f0fdf4;
}

.schedule-slot__time {
    font-size: 1.1rem;
    font-weight: 700;
}

.schedule-slot__title {
    font-weight: 600;
}

.schedule-slot__description {
    font-size: 0.85rem;
    opacity: 0.85;
}

.schedule-empty {
    color: #94a3b8;
    text-align: center;
    font-size: 0.95rem;
}

.schedule-empty--cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(15, 23, 42, 0.1);
    border-radius: 0.75rem;
}

.schedule-feedback {
    margin: 0 1.5rem 1.5rem;
    color: #bfdbfe;
    font-size: 0.95rem;
}

.schedule-feedback.error {
    color: #fca5a5;
}

@media (max-width: 768px) {
    .schedule-modal__dialog {
        width: min(100%, 94vw);
        max-height: min(90vh, calc(100vh - 2.5rem));
        border-radius: 0.85rem;
    }

    .schedule-modal__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .schedule-modal__controls .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .schedule-modal__footer {
        justify-content: stretch;
    }

    .schedule-modal__footer .primary-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .agendamento-actions {
        justify-content: center;
    }

    .agendamento-item button {
        width: 100%;
    }
}
