
* {
    box-sizing: border-box;
}

/* BODY + PAGE LAYOUT */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    color: #0b3556;
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* IMPORTANT: prevent Bootstrap modal from adding padding-right and causing horizontal scroll */
html.modal-open,
body.modal-open {
    overflow-x: hidden !important;
    padding-right: 0 !important;
}

.modal {
    overflow-x: hidden;
}

.page-wrapper {
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px;
    background:
        radial-gradient(circle at center,
            #c4ddf7 0%,
            #9bbfe4 35%,
            #6e97cf 70%,
            #3d6ea9 100%);
}

/* iOS / dynamic viewport support */
@supports (min-height: 100dvh) {
    .page-wrapper {
        min-height: 100dvh;
    }
}

.content {
    width: 100%;
    max-width: 430px;
}

.top-image {
    width: 170px;
    display: block;
    margin: 0 auto 12px;
}

.brand-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 32px;
}

.login-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.input-box {
    width: 100%;
    border: none;
    padding: 14px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
}

/* MAIN LOGIN BUTTON (do NOT style global .btn) */
.login-main-btn {
    width: 100%;
    padding: 14px;
    border-radius: 26px;
    border: none;
    background: #0f4c75;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.login-main-btn:hover {
    background: #155f96;
}

.login-main-btn:active {
    transform: scale(0.97);
    background: #0e4467;
}

/* PREMIUM MODAL THEME */

.modal-backdrop.show {
    opacity: 0.35 !important;
    backdrop-filter: blur(3px);
}

.custom-modal .modal-dialog {
    margin: 0 auto;
    max-width: 480px;
    width: calc(100% - 32px);
}

@media (max-width: 576px) {
    .custom-modal .modal-dialog {
        max-width: 100%;
        width: calc(100% - 24px);
    }
}

.custom-modal .modal-content {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 16px 18px 20px;
    color: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: fadeUp 0.35s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.custom-modal .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffd15e;
}

.custom-modal .btn-close {
    filter: invert(1);
}

.custom-modal input.form-control {
    border-radius: 14px;
    border: none;
    padding: 12px 14px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.85);
}

.custom-modal input.form-control:focus {
    box-shadow: 0 0 0 2px #4fa3db;
}

.modal-btn-main {
    background: linear-gradient(to right, #0b4c74, #0e6aa5);
    border: none;
    padding: 12px 0;
    border-radius: 16px;
    font-size: 16px;
    color: #fff;
    margin-top: 10px;
}

.modal-btn-main:hover {
    opacity: 0.92;
}

/* compact “Select” button */
.modal-btn-small {
    padding: 4px 10px;
    border-radius: 999px !important;
    background: #0f4c75 !important;
    border: none !important;
    font-size: 12px;
    line-height: 1.2;
    color: #ffffff !important;
}

/* ===== Patient table styling ===== */
.patient-table-wrapper {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 10px;
}

.custom-modal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.custom-modal thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 600;
    color: #ffd15e;
}

.custom-modal tbody tr {
    background: rgba(0, 0, 0, 0.30);
}

.custom-modal tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.22);
}

.custom-modal td,
.custom-modal th {
    padding: 8px 6px;
    border-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* first column (Patient ID) – let it show fully */
.custom-modal td:first-child,
.custom-modal th:first-child {
    overflow: visible;
    text-overflow: unset;
}

/* ============================
    TOASTR POSITION: TOP CENTER
============================= */
#toast-container {
    pointer-events: none;
}

#toast-container>div {
    pointer-events: auto;
}

#toast-container.toast-top-center {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: auto;
    max-width: calc(100% - 32px);
}