@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    min-height: 100vh;
    height: 100vh;
    z-index: 1000;
}
.empresa-content {
    background: rgba(114, 143, 188, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
@media (max-width: 576px) {
    .empresa-content {
        width: 100%;
        margin: 1rem;
        padding: 1.5rem;
    }
}
.menu-bg {
    background-color: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 4px 0 14px rgba(0,0,0,0.08);
}
.app-title {
    color: #93b52f;
}

.login-bg {
    min-height: 100vh;
    background-image: url('/images/entrada.jpg'); /* tua imagem */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-page {
    min-height: 100vh;
    background-image: url('/images/bg-login.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background-color: rgba(146, 171, 215, 0.75);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.clinic-login-card {
    background: linear-gradient(180deg, rgba(227, 236, 252, 0.92), rgba(169, 190, 227, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.68);
    color: #172033;
}

.clinic-login-title h3 {
    display: inline-block;
    position: relative;
    margin: 0;
    color: #172033;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0;
}

.clinic-login-title h3::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.65rem;
    width: 5.5rem;
    height: 0.22rem;
    border-radius: 999px;
    background: #93b52f;
    transform: translateX(-50%);
    box-shadow: 0 0.4rem 1rem rgba(147, 181, 47, 0.28);
}

.clinic-login-logo {
    width: 80px;
    height: 80px;
    padding: 0.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.14);
}

.admin-badge {
    display: inline-block;
    background-color: #93b52f;
    color: #f5f5f5;
    padding: 7px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(147, 181, 47, 0.26);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xp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jU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.clinic-boot-loading,
.clinic-loading {
    --clinic-blue: #2867b2;
    --clinic-green: #9ac442;
    --clinic-muted: #64748b;
    --clinic-surface: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.clinic-boot-loading {
    min-height: 100vh;
    padding: 2rem;
    background:
        radial-gradient(circle at 50% 38%, rgba(154, 196, 66, 0.16), transparent 18rem),
        linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
    color: #1f2937;
}

.clinic-boot-loading__mark,
.clinic-loading__mark {
    position: relative;
    display: grid;
    place-items: center;
}

.clinic-boot-loading__mark {
    width: 8.5rem;
    height: 8.5rem;
}

.clinic-loading__mark {
    width: 5.75rem;
    height: 5.75rem;
}

.clinic-boot-loading__ring,
.clinic-loading__ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 3px solid rgba(40, 103, 178, 0.16);
    border-top-color: var(--clinic-green);
    border-right-color: rgba(40, 103, 178, 0.75);
    animation: clinic-loading-spin 1.05s linear infinite;
    box-shadow: 0 0 0 0.45rem rgba(255, 255, 255, 0.7);
}

.clinic-boot-loading__logo,
.clinic-loading__logo {
    position: relative;
    width: 68%;
    height: 68%;
    object-fit: contain;
    padding: 0.55rem;
    border-radius: 1.25rem;
    background: var(--clinic-surface);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.12);
}

.clinic-boot-loading__title {
    margin-top: 1.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clinic-blue);
}

.clinic-boot-loading__text,
.clinic-loading__message {
    margin-top: 0.45rem;
    color: var(--clinic-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.clinic-boot-loading__text::after {
    content: var(--blazor-load-percentage-text, "A carregar...");
}

.clinic-boot-loading__bar {
    width: min(18rem, 72vw);
    height: 0.35rem;
    margin-top: 1.1rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(40, 103, 178, 0.13);
}

.clinic-boot-loading__bar span {
    display: block;
    width: var(--blazor-load-percentage, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--clinic-blue), var(--clinic-green));
    transition: width 0.12s ease-out;
}

.clinic-loading {
    min-height: 14rem;
    padding: 2rem 1rem;
}

.access-denied-shell {
    --clinic-blue: #2867b2;
    --clinic-green: #9ac442;
    --clinic-muted: #64748b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.access-denied {
    width: min(34rem, calc(100vw - 2rem));
    padding: 2rem;
    border: 1px solid rgba(114, 143, 188, 0.22);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(31, 41, 55, 0.16);
    text-align: center;
}

.access-denied__brand {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.75rem;
    height: 5.75rem;
    margin: 0 auto 1rem;
}

.access-denied__ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 3px solid rgba(40, 103, 178, 0.16);
    border-top-color: var(--clinic-green);
    border-right-color: rgba(40, 103, 178, 0.75);
    animation: clinic-loading-spin 1.05s linear infinite;
    box-shadow: 0 0 0 0.45rem rgba(255, 255, 255, 0.7);
}

.access-denied--expired .access-denied__ring {
    border-color: rgba(220, 53, 69, 0.22);
    border-top-color: #dc3545;
    border-right-color: rgba(220, 53, 69, 0.82);
    box-shadow:
        0 0 0 0.45rem rgba(255, 255, 255, 0.7),
        0 0 0 0.65rem rgba(220, 53, 69, 0.08);
}

.access-denied__brand img {
    position: relative;
    z-index: 1;
    width: 68%;
    height: 68%;
    object-fit: contain;
    padding: 0.55rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.12);
}

.access-denied__eyebrow {
    display: inline-flex;
    margin-bottom: 0.45rem;
    color: #5f7398;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.access-denied h1 {
    margin: 0;
    color: #1f2937;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.access-denied p {
    max-width: 28rem;
    margin: 0.75rem auto 0;
    color: var(--clinic-muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.access-denied__actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.session-expiry-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.session-expiry-card {
    width: min(31rem, calc(100vw - 2rem));
    padding: 1.75rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.session-expiry-card__eyebrow {
    display: block;
    margin-bottom: 0.4rem;
    color: #9f2936;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.session-expiry-card h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.55rem;
    font-weight: 700;
}

.session-expiry-card p {
    margin: 0.75rem auto 1rem;
    color: #64748b;
    line-height: 1.5;
}

.session-expiry-card p strong {
    display: inline-block;
    min-width: 3.1rem;
    color: #b42333;
    font-variant-numeric: tabular-nums;
}

.session-expiry-card__actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.session-expiry-card__actions .btn {
    min-width: 9.5rem;
}

.clinic-date-pt {
    position: relative;
    width: 100%;
}

.clinic-date-pt__field {
    position: relative;
}

.clinic-date-pt__field .form-control {
    padding-right: 2.75rem;
}

.clinic-date-pt__trigger {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #334155;
}

.clinic-date-pt__trigger:hover:not(:disabled),
.clinic-date-pt__trigger:focus-visible {
    background: #edf3fb;
    color: #2867b2;
}

.clinic-date-pt__trigger:disabled {
    color: #94a3b8;
}

.clinic-date-pt__calendar {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 1080;
    width: 19rem;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
}

.clinic-date-pt__header {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.clinic-date-pt__header strong {
    overflow: hidden;
    color: #1f2937;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clinic-date-pt__header button,
.clinic-date-pt__footer button {
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    color: #2867b2;
}

.clinic-date-pt__header button {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.clinic-date-pt__header button:hover,
.clinic-date-pt__footer button:hover {
    border-color: #bfd0e6;
    background: #edf3fb;
}

.clinic-date-pt__weekdays,
.clinic-date-pt__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
}

.clinic-date-pt__weekdays {
    margin-bottom: 0.25rem;
}

.clinic-date-pt__weekdays span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.clinic-date-pt__day {
    aspect-ratio: 1;
    min-width: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.clinic-date-pt__day:hover,
.clinic-date-pt__day:focus-visible {
    border-color: #9bb9dc;
    background: #edf3fb;
}

.clinic-date-pt__day--outside {
    color: #a0a9b8;
}

.clinic-date-pt__day--today {
    border-color: #9ac442;
    font-weight: 700;
}

.clinic-date-pt__day--selected,
.clinic-date-pt__day--selected:hover {
    border-color: #2867b2;
    background: #2867b2;
    color: #fff;
    font-weight: 700;
}

.clinic-date-pt__footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e2e8f0;
}

.clinic-date-pt__footer button {
    min-height: 2rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
}

.clinic-loading--compact {
    min-height: 7rem;
    padding: 1rem;
}

.clinic-loading--compact .clinic-loading__mark {
    width: 4.25rem;
    height: 4.25rem;
}

.clinic-loading--compact .clinic-loading__message {
    font-size: 0.875rem;
}

@keyframes clinic-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .clinic-boot-loading__ring,
    .clinic-loading__ring,
    .access-denied__ring {
        animation-duration: 2.5s;
    }
}

@media (max-width: 420px) {
    .access-denied {
        padding: 1.5rem;
    }

    .session-expiry-card {
        padding: 1.35rem;
    }

    .session-expiry-card__actions {
        flex-direction: column-reverse;
    }

    .session-expiry-card__actions .btn {
        width: 100%;
    }

    .clinic-date-pt__calendar {
        width: min(19rem, calc(100vw - 3rem));
    }

    .access-denied__actions {
        flex-direction: column;
    }
}
