:root {
    --pub-primary: #0877be;
    --pub-primary-dark: #07578b;
    --pub-cyan: #16a7c7;
    --pub-success: #128b57;
    --pub-warning: #c27b12;
    --pub-danger: #ce3e50;
    --pub-text: #17283a;
    --pub-muted: #607389;
    --pub-line: #dce7f1;
    --pub-soft: #f4f8fc;
    --pub-shadow: 0 28px 80px rgba(14, 58, 93, 0.16);
}

* {
    box-sizing: border-box;
}

body.public-search-page,
body.login-page,
body.not-found-page,
body.pending-page,
body.access-denied-page,
body.error-page,
body.delete-page,
body.batch-scan-page {
    margin: 0;
    min-height: 100vh;
    color: var(--pub-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(22, 167, 199, 0.13), transparent 26rem),
        radial-gradient(circle at 92% 90%, rgba(8, 119, 190, 0.11), transparent 34rem),
        linear-gradient(135deg, #edf5fc 0%, #f8fbfe 48%, #eef6fb 100%);
    -webkit-font-smoothing: antialiased;
}

body.public-search-page button,
body.login-page button,
body.batch-scan-page button,
body.public-search-page input,
body.login-page input,
body.batch-scan-page input {
    font: inherit;
}

/* Patient search */
.public-search-page .page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    width: 100%;
    padding: clamp(18px, 4vw, 50px);
}

.public-search-page .card {
    position: relative;
    width: min(1180px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(410px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(190, 212, 230, 0.88);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--pub-shadow);
}

.public-search-page .left {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 5vw, 66px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 85% 14%, rgba(108, 221, 239, 0.24), transparent 18rem),
        radial-gradient(circle at 5% 100%, rgba(255, 255, 255, 0.11), transparent 24rem),
        linear-gradient(145deg, #07588f 0%, #0877be 52%, #0f91ba 100%);
}

.public-search-page .left::before,
.public-search-page .left::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.public-search-page .left::before {
    width: 320px;
    height: 320px;
    right: -170px;
    top: -120px;
}

.public-search-page .left::after {
    width: 240px;
    height: 240px;
    left: -140px;
    bottom: -120px;
}

.public-search-page .brand {
    position: absolute;
    top: clamp(28px, 4vw, 48px);
    left: clamp(34px, 5vw, 66px);
    right: 30px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
}

.public-search-page .brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    padding: 4px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.public-search-page .brand-text h1 {
    margin: 0 0 3px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.public-search-page .brand-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11.5px;
}

.public-search-page .hero-title {
    position: relative;
    z-index: 1;
    max-width: 590px;
    margin: 58px 0 15px;
    color: #fff;
    font-size: clamp(30px, 4.3vw, 48px);
    font-weight: bold;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.public-search-page .hero-desc {
    position: relative;
    z-index: 1;
    max-width: 590px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.75;
}

.public-search-page .feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.public-search-page .feature-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(4px);
}

.public-search-page .feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #076da9;
    font-size: 13px;
    font-weight: bold;
    background: #fff;
}

.public-search-page .feature-item strong,
.public-search-page .feature-item span {
    display: block;
}

.public-search-page .feature-item strong {
    margin-bottom: 2px;
    color: #fff;
    font-size: 12.5px;
}

.public-search-page .feature-item span {
    color: rgba(255, 255, 255, 0.64);
    font-size: 10.5px;
    line-height: 1.45;
}

.public-search-page .right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 4.5vw, 58px);
    background: #fff;
}

.public-search-page .search-box {
    width: 100%;
    max-width: 450px;
    margin: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.public-search-page .search-box::before {
    content: "Tra cứu trực tuyến";
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    margin-bottom: 13px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--pub-primary);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #e7f5ff;
}

.public-search-page .search-box h2 {
    margin: 0 0 8px;
    color: var(--pub-text);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: bold;
    letter-spacing: -0.025em;
}

.public-search-page .search-box > p {
    margin: 0 0 23px;
    color: var(--pub-muted);
    font-size: 13px;
    line-height: 1.65;
}

.public-search-page .patient-search-form {
    display: grid;
    gap: 15px;
}

.public-search-page .patient-form-group {
    display: grid;
    gap: 7px;
}

.public-search-page .patient-form-group label {
    color: #40566b;
    font-size: 12px;
    font-weight: bold;
}

.public-search-page .patient-input {
    width: 100%;
    min-height: 51px;
    padding: 0 14px;
    border: 1px solid #cddce8;
    border-radius: 13px;
    outline: none;
    color: var(--pub-text);
    font-size: 14px;
    background: #fbfdff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.public-search-page .patient-input:focus {
    border-color: var(--pub-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 119, 190, 0.11);
}

.public-search-page .patient-search-btn {
    min-height: 52px;
    margin-top: 2px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-cyan));
    box-shadow: 0 12px 26px rgba(8, 119, 190, 0.23);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.public-search-page .patient-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(8, 119, 190, 0.29);
}

.public-search-page .help-text {
    position: relative;
    margin-top: 17px;
    padding: 12px 13px 12px 38px;
    border: 1px solid #d8e8f3;
    border-radius: 12px;
    color: #567086;
    font-size: 11.5px;
    line-height: 1.55;
    background: #f4faff;
}

.public-search-page .help-text::before {
    content: "i";
    position: absolute;
    left: 14px;
    top: 13px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    background: var(--pub-primary);
}

.public-search-page .message {
    margin: 0 0 15px;
    padding: 11px 13px;
    border: 1px solid #f2c2ca;
    border-radius: 12px;
    color: #a92c3f;
    font-size: 12px;
    line-height: 1.5;
    background: #fff1f3;
}

.public-search-page .footer-note {
    max-width: 450px;
    margin: 24px auto 0;
    color: #91a0af;
    font-size: 10.5px;
    text-align: center;
}

/* Login */
.login-page {
    display: grid !important;
    place-items: center;
    padding: clamp(18px, 4vw, 50px) !important;
}

.login-page .login-shell {
    width: min(1130px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(190, 212, 230, 0.88);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--pub-shadow);
}

.login-page .login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 62px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(93, 218, 235, 0.24), transparent 19rem),
        linear-gradient(150deg, #063d67 0%, #086fae 58%, #0b94ae 100%);
}

.login-page .login-hero::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -150px;
    width: 390px;
    height: 390px;
    border: 52px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.login-page .brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.login-page .brand-logo {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.17);
}

.login-page .brand-logo img {
    width: 100% !important;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.login-page .brand small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10.5px;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: none;
}

.login-page .hero-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 50px 0;
}

.login-page .hero-content h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(32px, 4.2vw, 49px);
    font-weight: bold;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.login-page .hero-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.75;
}

.login-page .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

.login-page .hero-badges span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
}

.login-page .hero-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10.5px;
}

.login-page .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.13);
}

.login-page .login-panel {
    display: grid;
    place-items: center;
    padding: clamp(30px, 5vw, 62px);
    background: #fff;
}

.login-page .login-card {
    width: 100%;
    max-width: 410px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-page .mobile-brand {
    display: none;
}

.login-page .login-card h2 {
    margin: 0 0 8px;
    color: var(--pub-text);
    font-size: 29px;
    font-weight: bold;
    letter-spacing: -0.025em;
}

.login-page .subtitle {
    margin: 0 0 25px;
    color: var(--pub-muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.login-page .field-group {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
}

.login-page .field-group label {
    color: #40566b;
    font-size: 12px;
    font-weight: bold;
}

.login-page .input-wrap {
    position: relative;
}

.login-page .input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: #88a0b4;
    font-size: 14px;
}

.login-page .input-wrap input {
    width: 100%;
    min-height: 51px;
    padding: 0 14px 0 41px;
    border: 1px solid #cddce8;
    border-radius: 13px;
    outline: none;
    color: var(--pub-text);
    font-size: 13.5px;
    background: #fbfdff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-page .input-wrap input:focus {
    border-color: var(--pub-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 119, 190, 0.11);
}

.login-page .primary-btn {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    color: #fff;
    font-size: 13.5px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-cyan));
    box-shadow: 0 12px 26px rgba(8, 119, 190, 0.23);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.login-page .primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 31px rgba(8, 119, 190, 0.28);
}

.login-page .primary-btn:disabled {
    cursor: not-allowed;
    background: #9aaabb;
    box-shadow: none;
}

.login-page .login-note {
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--pub-line);
    color: #8b9baa;
    font-size: 10.5px;
    line-height: 1.6;
    text-align: center;
}

.login-page .locked-alert,
.login-page .msg {
    margin-bottom: 16px;
    border: 1px solid #f0bdc5;
    border-radius: 13px;
    color: #a6283a;
    background: #fff0f2;
}

.login-page .locked-alert {
    display: flex;
    gap: 11px;
    padding: 12px;
}

.login-page .locked-alert-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--pub-danger);
    background: #fff;
}

.login-page .locked-alert strong,
.login-page .locked-alert span {
    display: block;
    color: #a6283a !important;
}

.login-page .locked-alert strong {
    margin-bottom: 2px;
    font-size: 12px;
}

.login-page .locked-alert span {
    font-size: 10.5px;
    line-height: 1.45;
}

.login-page .msg {
    padding: 11px 12px;
    font-size: 11.5px;
    line-height: 1.5;
}

/* Error / pending states */
.not-found-page,
.pending-page,
.access-denied-page,
.error-page,
.delete-page {
    display: grid !important;
    place-items: center !important;
    padding: 24px !important;
}

.not-found-page .not-found-card,
.error-page .error-card,
.access-denied-page .card,
.delete-page .card,
.pending-page .card {
    width: min(100%, 720px) !important;
    overflow: hidden;
    border: 1px solid rgba(192, 213, 230, 0.92) !important;
    border-radius: 26px !important;
    background: #fff !important;
    box-shadow: var(--pub-shadow) !important;
}

.not-found-page .not-found-card,
.error-page .error-card,
.access-denied-page .card,
.delete-page .card {
    padding: clamp(28px, 5vw, 48px) !important;
    text-align: center !important;
}

.not-found-page .logo,
.error-page .logo,
.access-denied-page .logo {
    width: 78px !important;
    height: 78px !important;
    object-fit: contain;
    padding: 5px;
    border: 1px solid var(--pub-line);
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 12px 27px rgba(16, 71, 107, 0.12);
}

.not-found-page .hospital-name,
.pending-page .hospital-name {
    color: var(--pub-primary) !important;
    font-size: clamp(20px, 3.5vw, 27px) !important;
    font-weight: bold !important;
    letter-spacing: -0.02em;
}

.not-found-page .sub-title,
.pending-page .hospital-sub {
    color: var(--pub-muted) !important;
    font-size: 11.5px !important;
}

.not-found-page .error-icon {
    width: 68px !important;
    height: 68px !important;
    display: grid !important;
    place-items: center !important;
    margin: 24px auto 14px !important;
    border-radius: 22px !important;
    color: var(--pub-danger) !important;
    font-size: 31px !important;
    font-weight: bold !important;
    background: #fff0f2 !important;
}

.not-found-page h1,
.access-denied-page h1,
.delete-page h1,
.error-page h1 {
    margin: 12px 0 10px !important;
    color: var(--pub-text) !important;
    font-size: clamp(23px, 4vw, 32px) !important;
    font-weight: bold !important;
    letter-spacing: -0.025em;
}

.error-page .error-code {
    color: var(--pub-danger) !important;
    font-size: clamp(64px, 12vw, 96px) !important;
    font-weight: bold !important;
    letter-spacing: -0.06em;
}

.not-found-page .message,
.not-found-page .note,
.access-denied-page p,
.delete-page p,
.error-page p {
    color: var(--pub-muted) !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
}

.not-found-page .actions,
.delete-page .actions {
    display: flex !important;
    justify-content: center !important;
    gap: 9px !important;
    margin-top: 22px !important;
}

.not-found-page .btn,
.error-page .home-button,
.delete-page .actions a,
.delete-page .actions button,
.pending-page .actions a {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    cursor: pointer;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-cyan)) !important;
    box-shadow: 0 10px 23px rgba(8, 119, 190, 0.20);
}

.delete-page .actions button {
    background: linear-gradient(135deg, var(--pub-danger), #e45e6d) !important;
}

.delete-page .actions a {
    color: #41576b !important;
    border-color: var(--pub-line) !important;
    background: #f3f7fa !important;
    box-shadow: none;
}

.access-denied-page .ip-box {
    margin-top: 20px !important;
    padding: 13px !important;
    border: 1px solid var(--pub-line) !important;
    border-radius: 12px !important;
    color: #72869a !important;
    font-size: 12px !important;
    background: #f7fafc !important;
}

.pending-page .wrapper {
    width: 100%;
    min-height: 0 !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
}

.pending-page .header {
    padding: 29px 24px 21px !important;
    border-bottom: 1px solid var(--pub-line) !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(22, 167, 199, 0.09), transparent 15rem),
        #fbfdff !important;
}

.pending-page .header img {
    width: 73px !important;
    height: 73px;
    object-fit: contain;
    padding: 5px;
    border: 1px solid var(--pub-line);
    border-radius: 20px;
    background: #fff;
}

.pending-page .body {
    padding: clamp(22px, 4vw, 36px) !important;
}

.pending-page .status-title {
    margin-bottom: 14px !important;
    color: var(--pub-text) !important;
    font-size: clamp(21px, 3.5vw, 28px) !important;
    font-weight: bold !important;
    text-align: center;
}

.pending-page .status-box {
    margin-bottom: 20px !important;
    padding: 14px 16px !important;
    border: 1px solid #f1d39d !important;
    border-radius: 14px !important;
    color: #8c5d15 !important;
    background: #fff6e3 !important;
}

.pending-page .status-box p {
    margin: 3px 0 !important;
    font-size: 12.5px !important;
    line-height: 1.5;
}

.pending-page .info-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    border: 1px solid var(--pub-line) !important;
    border-radius: 14px;
    font-size: 12.5px !important;
}

.pending-page .info-table td {
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #e9eff5 !important;
}

.pending-page .info-table tr:last-child td {
    border-bottom: 0 !important;
}

.pending-page .info-table .label {
    width: 35%;
    color: #52687d !important;
    font-weight: bold !important;
    background: #f7fafc !important;
}

.pending-page .actions {
    margin-top: 19px !important;
    text-align: center;
}

.pending-page .note {
    margin-top: 19px !important;
    padding: 12px 13px !important;
    border: 1px solid #d8e8f3;
    border-radius: 12px;
    color: #678096 !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
    background: #f4faff;
}

/* Batch scan */
.batch-scan-page .page {
    width: min(1180px, calc(100% - 32px)) !important;
    margin: 0 auto !important;
    padding: 30px 0 48px !important;
}

.batch-scan-page .top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 18px !important;
    padding: 15px 17px;
    border: 1px solid rgba(190, 212, 230, 0.86);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px rgba(14, 58, 93, 0.08);
    backdrop-filter: blur(10px);
}

.batch-scan-page .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.batch-scan-page .brand img {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain;
    padding: 4px;
    border: 1px solid var(--pub-line);
    border-radius: 15px;
    background: #fff;
}

.batch-scan-page .brand h1 {
    margin: 0 0 3px !important;
    color: var(--pub-text) !important;
    font-size: clamp(19px, 3vw, 26px) !important;
    font-weight: bold !important;
    letter-spacing: -0.02em;
}

.batch-scan-page .brand p {
    margin: 0 !important;
    color: var(--pub-muted) !important;
    font-size: 11.5px !important;
}

.batch-scan-page .back-link {
    min-height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 14px !important;
    border: 1px solid var(--pub-line) !important;
    border-radius: 12px !important;
    color: #41576b !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    background: #f6f9fc !important;
}

.batch-scan-page .scanner-card,
.batch-scan-page .list-card {
    overflow: hidden;
    border: 1px solid rgba(190, 212, 230, 0.9) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 18px 48px rgba(14, 58, 93, 0.10) !important;
}

.batch-scan-page .scanner-card {
    position: relative;
    margin-bottom: 17px !important;
    padding: 23px !important;
    background:
        radial-gradient(circle at 96% 0%, rgba(22, 167, 199, 0.14), transparent 18rem),
        linear-gradient(135deg, #f3faff, #fff) !important;
}

.batch-scan-page .scanner-label {
    display: block;
    margin-bottom: 9px;
    color: var(--pub-primary) !important;
    font-size: 13px !important;
    font-weight: bold !important;
}

.batch-scan-page .scanner-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px !important;
}

.batch-scan-page .scanner-input {
    min-height: 55px !important;
    padding: 0 15px !important;
    border: 1.5px solid #9ecbe5 !important;
    border-radius: 13px !important;
    outline: none;
    color: var(--pub-text) !important;
    font-size: 18px !important;
    font-weight: bold !important;
    letter-spacing: 0.04em;
    background: #fff !important;
}

.batch-scan-page .scanner-input:focus {
    border-color: var(--pub-primary) !important;
    box-shadow: 0 0 0 4px rgba(8, 119, 190, 0.11) !important;
}

.batch-scan-page .scan-btn,
.batch-scan-page .action-btn {
    min-height: 45px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    cursor: pointer;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-cyan)) !important;
    box-shadow: 0 10px 22px rgba(8, 119, 190, 0.18);
}

.batch-scan-page .scanner-help {
    margin-top: 9px !important;
    color: var(--pub-muted) !important;
    font-size: 11px !important;
}

.batch-scan-page .scan-message {
    margin-top: 12px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--pub-line) !important;
    border-radius: 11px !important;
    font-size: 11.5px !important;
    background: #f7fafc !important;
}

.batch-scan-page .scan-message.success {
    color: #0d7046 !important;
    border-color: #bce8d0 !important;
    background: #eaf8f1 !important;
}

.batch-scan-page .scan-message.warning {
    color: #935c0a !important;
    border-color: #efd49f !important;
    background: #fff5df !important;
}

.batch-scan-page .scan-message.error {
    color: #a62b3d !important;
    border-color: #efbdc5 !important;
    background: #fff0f2 !important;
}

.batch-scan-page .list-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 18px 20px !important;
    border-bottom: 1px solid var(--pub-line) !important;
    background: #fbfdff !important;
}

.batch-scan-page .list-header h2 {
    margin: 0 0 3px !important;
    color: var(--pub-text) !important;
    font-size: 16px !important;
}

.batch-scan-page .list-header p {
    margin: 0 !important;
    color: var(--pub-muted) !important;
    font-size: 11px !important;
}

.batch-scan-page .count-box {
    min-width: 90px;
    padding: 9px 12px !important;
    border: 1px solid #bfe0f2 !important;
    border-radius: 12px !important;
    color: var(--pub-primary) !important;
    text-align: center;
    background: #e8f6ff !important;
}

.batch-scan-page .table-wrap {
    overflow-x: auto !important;
}

.batch-scan-page table {
    width: 100% !important;
    min-width: 700px;
    border-collapse: collapse !important;
    font-size: 12px !important;
}

.batch-scan-page th,
.batch-scan-page td {
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #e9eff5 !important;
    text-align: left;
}

.batch-scan-page th {
    color: #587086 !important;
    font-size: 10px !important;
    font-weight: bold !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #f5f9fc !important;
}

.batch-scan-page tbody tr:hover td {
    background: #f7fbff !important;
}

.batch-scan-page .code-cell {
    color: #17476d !important;
    font-weight: bold !important;
}

.batch-scan-page .empty-row td {
    padding: 38px 20px !important;
    color: var(--pub-muted) !important;
    text-align: center;
}

.batch-scan-page .actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 9px !important;
    padding: 17px 20px !important;
    border-top: 1px solid var(--pub-line) !important;
    background: #fbfdff !important;
}

.batch-scan-page .clear-btn {
    color: var(--pub-danger) !important;
    border-color: #f0c0c8 !important;
    background: #fff0f2 !important;
    box-shadow: none !important;
}

.batch-scan-page .print-btn:disabled,
.batch-scan-page .action-btn:disabled {
    cursor: not-allowed;
    color: #8d9baa !important;
    border-color: #dfe7ee !important;
    background: #eef2f5 !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .public-search-page .card,
    .login-page .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .public-search-page .left,
    .login-page .login-hero {
        min-height: auto;
    }

    .public-search-page .brand {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-bottom: 36px;
    }

    .public-search-page .hero-title {
        margin-top: 0;
    }

    .public-search-page .feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-search-page .feature-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .login-page .login-hero {
        display: none;
    }

    .login-page .mobile-brand {
        width: 72px;
        height: 72px;
        display: grid;
        place-items: center;
        margin: 0 auto 22px;
        padding: 5px;
        border: 1px solid var(--pub-line);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(14, 58, 93, 0.10);
    }

    .login-page .mobile-brand img {
        width: 100% !important;
        height: 100%;
        object-fit: contain;
    }

    .login-page .login-card h2,
    .login-page .subtitle {
        text-align: center;
    }
}

@media (max-width: 620px) {
    .public-search-page .page,
    .login-page {
        padding: 10px !important;
    }

    .public-search-page .card,
    .login-page .login-shell,
    .not-found-page .not-found-card,
    .error-page .error-card,
    .access-denied-page .card,
    .delete-page .card,
    .pending-page .card {
        border-radius: 21px !important;
    }

    .public-search-page .left,
    .public-search-page .right,
    .login-page .login-panel {
        padding: 28px 22px;
    }

    .public-search-page .brand {
        margin-bottom: 28px;
    }

    .public-search-page .brand img {
        width: 50px;
        height: 50px;
    }

    .public-search-page .feature-list {
        grid-template-columns: 1fr;
    }

    .public-search-page .feature-item {
        grid-template-columns: 38px 1fr;
    }

    .batch-scan-page .top-bar,
    .batch-scan-page .list-header,
    .batch-scan-page .actions {
        align-items: stretch !important;
        flex-direction: column;
    }

    .batch-scan-page .scanner-row {
        grid-template-columns: 1fr !important;
    }

    .batch-scan-page .scan-btn,
    .batch-scan-page .action-btn,
    .batch-scan-page .back-link {
        width: 100%;
    }

    .not-found-page .actions,
    .delete-page .actions {
        flex-direction: column;
    }

    .not-found-page .btn,
    .delete-page .actions a,
    .delete-page .actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
