body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(120deg, #eef4ff, #f8fbff);
    color: #132238;
}

.container {
    max-width: 760px;
    margin: 4rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #dce8ff;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(18, 57, 110, 0.08);
}

.notice-success {
    background: #e9f8ef;
    color: #0f5132;
    border: 1px solid #b7ebc6;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
}

.notice-error {
    background: #fcebea;
    color: #7f1d1d;
    border: 1px solid #f5c2c7;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
}

h1 {
    margin-top: 0;
}

section {
    margin-top: 1.2rem;
}

.toolbar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-link {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    border: 1px solid #b9d1ff;
    border-radius: 8px;
    text-decoration: none;
    color: #123463;
    background: #f7fbff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
}

.form-inline {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: end;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.95rem;
}

input,
select,
textarea,
button {
    padding: 0.5rem;
    border: 1px solid #c6d7fa;
    border-radius: 8px;
    font-size: 0.95rem;
}

button {
    cursor: pointer;
    background: #eaf2ff;
}

.result-box {
    margin-top: 0.6rem;
    min-height: 40px;
    max-height: 320px;
    overflow: auto;
    background: #f0f4ff;
    color: #1a2b4a;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #c6d7fa;
    line-height: 1.6;
}

.result-box.result-success {
    background: #e9f8ef;
    color: #0a4a28;
    border-color: #6fcf97;
    font-weight: 700;
}

.result-box.result-error {
    background: #fff0f0;
    color: #7f1d1d;
    border-color: #f5c2c7;
    font-weight: 700;
}

.patient-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #dce8ff;
    font-size: 0.95rem;
    color: #1a2b4a;
    font-weight: 500;
}

.patient-result-item:last-child {
    border-bottom: none;
}

.patient-result-item button {
    margin-left: auto;
    padding: 0.3rem 0.75rem;
    background: #1a4d6d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    cursor: pointer;
}

.patient-result-item button:hover {
    background: #14395a;
}

/* Responsive layout primitives shared across OPD templates. */
.responsive-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.responsive-card {
    min-width: 0;
    border: 1px solid #d7e6f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 63, 92, 0.08);
    box-sizing: border-box;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.mobile-card-list {
    display: none;
}

.portrait-required-message {
    display: none;
}

.pediatric-vax-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.pediatric-vax-table th,
.pediatric-vax-table td {
    border: 1px solid #dbeafe;
    padding: 0.65rem;
    text-align: left;
    vertical-align: top;
}

.pediatric-vax-table th {
    background: #eff6ff;
    color: #0f172a;
    font-weight: 800;
}

.pediatric-vax-card-list {
    display: none;
}

.mobile-only,
.tablet-only {
    display: none !important;
}

.desktop-only {
    display: revert !important;
}

@media (max-width: 767px) {
    .mobile-only {
        display: revert !important;
    }

    .tablet-only,
    .desktop-only {
        display: none !important;
    }

    .pediatric-vax-table-shell {
        display: none !important;
    }

    .pediatric-vax-card-list {
        display: grid !important;
        gap: 0.7rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .tablet-only {
        display: revert !important;
    }

    .mobile-only,
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .desktop-only {
        display: revert !important;
    }

    .mobile-only,
    .tablet-only {
        display: none !important;
    }
}
