@font-face {
    font-family: "Thai Sans Lite";
    src: url('../fonts/153686524-thaisanslite_r1.eot');
    src: url('../fonts/153686524-thaisanslite_r1.eot?#iefix') format('embedded-opentype'),
    url('../fonts/153686524-thaisanslite_r1.svg#Thai Sans Lite') format('svg'),
    url('../fonts/153686524-thaisanslite_r1.woff') format('woff'),
    url('../fonts/153686524-thaisanslite_r1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: "Thai Sans Lite";
    direction: ltr;
}

label {
    font-weight:bold;
}

.readonly_field
{
   font-size:1.6em;
   height:auto !important;
   background-color:#FFFAD5 !important;
}

.input-group-text {
    font-size:1.6em !important;
}

input[type="text"] {
    font-weight:normal;
    font-size:1.6em !important;
    height:100% !important;
}

input[type="password"] {
    font-weight:normal;
    font-size:1.6em !important;
    height:100% !important;
}

input[type="file"] {
    font-weight:normal;
    font-size:1.5em !important;
    height:100% !important;
}

select {
    font-size:1.6em !important;
    height:100% !important;
}

.error_notification {
    font-size:1.6em;
    border:3px solid #F21D2F;
    padding:10px;
    border-radius:5px;
    background-color:#FFC4C1;
    color:#F21D2F;
}

.error {
    color:#F21D2F;
    font-size:1.6em;
}

.hidden {
    display:none;
}

.center {
    text-align:center;
}

.hilight {
    color:#2376ff;
}

/* */
.file_label {
    font-size:1.5em;
}

.exist_file {
    font-size:1.4em;
    color: darkgreen;
}

.red_star {
    color: red; 
    font-size: 1.2em;
}

/* Template */
.navbar {
    padding-top: 8px;
    padding-bottom: 8px;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    font-size: 1.35em; /* Slimmer font size for PC */
    letter-spacing: 1.5px;
    box-shadow: 0 6px 18px rgba(20, 77, 120, 0.05);
}

.navbar-action-list-direct {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-action-list-direct:has(#liLogIn) {
    display: flex;
}
.navbar-nav  li a:hover {
    color: #18a4e0 !important;
}

.navbar-toggler {
    border: 1px solid #d8e7f0;
    padding: .45rem .65rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(24, 164, 224, 0.15);
}

.navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

.navbar-brand-custom {
    display: inline-flex !important;
    align-items: center;
    gap: 14px;
    height: auto;
    padding: 0 !important;
    margin-right: 16px;
    text-decoration: none;
}

.navbar-brand-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(145deg, #eef8ff 0%, #ffffff 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(24, 164, 224, 0.12);
    flex: 0 0 auto;
}

.navbar-brand-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.navbar-brand-title {
    color: #1f5f8b;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.navbar-brand-title-mobile {
    display: none;
}

.navbar-brand-subtitle {
    color: #6d7f90;
    font-size: 0.72em;
    letter-spacing: 0.4px;
}

.navbar-action-group {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.navbar-nav .nav-link {
    color: #6d7785;
}

.navbar-action-list {
    align-items: center;
    gap: 12px;
}

.navbar-action-list > li {
    margin-left: 0;
}

.navbar-nav .dropdown-menu {
    border: 1px solid #e7edf3;
    box-shadow: 0 12px 24px rgba(34, 62, 90, 0.08);
}

.dropdown-item {
    font-size: 1.1em;
}

.navbar-brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.nav-action-button {
    min-height: 46px;
    border-radius: 999px;
    padding: 0.65rem 1rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    letter-spacing: 0.2px;
    transition: all .2s ease;
}

.nav-action-outline {
    border: 1px solid #cfe2ef;
    background: #ffffff;
    color: #35556f !important;
}

.nav-action-soft {
    border: 1px solid #dcebf5;
    background: #f4fbff;
    color: #1f87bf !important;
}

.nav-action-solid {
    border: 1px solid #1d975c;
    background: linear-gradient(135deg, #25a862 0%, #1f8e54 100%);
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(31, 142, 84, 0.16);
}

.nav-action-button:hover {
    transform: translateY(-1px);
}

.nav-action-outline:hover {
    background: #f8fcff;
}

.nav-action-soft:hover {
    background: #edf8ff;
}

.nav-action-solid:hover {
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(31, 142, 84, 0.22);
}

.navbar-brand-fallback {
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    background-color: #1abc9c;
    color: #ffffff;
    font-size: 0.95em;
}

ul .dropdown-menu li {
    font-size:1.6em !important;
}


#logo {
    text-align:center;width:100%;margin-bottom:20px;
}

#page_title {
    color:#2376ff;
}

#header_top_border {
    width: 100%;
    height: 5px;
    background-color: #18a4e0;
}

th {
    font-size:1.6em;
}

td {
    font-size:1.6em;
}

.table_empty {

}

input[type="button"],input[type="submit"]
{
    font-size:1.6em !important;
}

/* footer */

.container-fluid {
    padding: 30px 60px;
    font-size: 1.6em;
}

.bg-grey {
    background-color: #f6f6f6;
    color: #818181;
}

.bg-4 {
    background-color: #2f2f2f;
    color: #fff;
}

@media (max-width: 767.98px) {
    .navbar {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .navbar > .container {
        align-items: flex-start;
    }

    .navbar-brand-custom {
        margin-left: 0;
        margin-right: 8px;
        gap: 10px;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 72px);
    }

    .navbar-brand-logo {
        width: 36px;
        height: 36px;
    }

    .navbar-brand-subtitle {
        display: none;
    }

    .navbar-brand-title {
        font-size: 0.88em;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .navbar-brand-title-desktop {
        display: none;
    }

    .navbar-brand-title-mobile {
        display: block;
    }

    .navbar-action-group {
        flex-wrap: wrap;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    .navbar-action-list-direct:has(#liLogIn) ~ .navbar-toggler {
        display: none !important;
    }

    .navbar-action-list {
        width: 100%;
        padding-top: 12px;
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .navbar-action-list > li {
        width: auto;
    }

    .nav-action-button {
        width: auto !important;
        min-height: 36px !important;
        height: 36px !important;
        font-size: 14px !important; /* Use px to prevent em multiplication */
        padding: 4px 14px !important;
        border-radius: 20px !important;
    }

    /* Scaling down layout for mobile devices */
    body {
        font-size: 13px; /* Slightly lower base size for mobile */
    }

    #page_title {
        font-size: 1.9em !important;
        line-height: 1.25;
    }

    .patron-access-subtitle {
        font-size: 1.15em !important;
        margin-top: 6px;
    }

    .patron-access-hero {
        padding: 16px 12px;
        margin-bottom: 16px;
    }

    .patron-access-hero-logo-shell,
    .patron-access-hero-logo {
        width: 58px !important;
        height: 58px !important;
    }

    .patron-access-hero-logo-fallback {
        font-size: 1.4em !important;
        line-height: 58px !important;
    }

    /* Squeezing ข้อมูลผู้เข้าใช้บริการ section */
    .patron-access-section-header {
        gap: 12px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
        align-items: center !important;
    }

    .patron-access-section-icon {
        width: 42px !important;
        height: 42px !important;
        line-height: 42px !important;
        font-size: 1.2em !important;
        border-radius: 12px !important;
    }

    .patron-access-section-title {
        font-size: 1.5em !important;
    }

    .patron-access-section-note {
        font-size: 1.05em !important;
        margin-top: 4px !important;
    }

    .patron-label {
        font-size: 1.25em !important;
        margin-bottom: 6px !important;
    }

    .patron-field {
        margin-bottom: 16px !important;
    }

    .patron-field .form-control,
    .patron-field .form-select,
    .report-field .form-control {
        height: 46px !important;
        font-size: 1.3em !important;
        border-radius: 10px;
        padding: 0.5rem 0.85rem !important;
    }

    .patron-save-button,
    .report-search-button {
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        padding: 0 16px !important;
        display: inline-block !important;
        text-align: center !important;
        vertical-align: middle !important;
        line-height: 40px !important; /* Perfect vertical center for Thai on mobile input */
        font-size: 1.3em !important;
    }
}

.logo-fallback-hidden {
    display: none;
}

.logo-crop-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 0;
    box-shadow: none;
    margin: 0 auto;
}

.display-none {
    display: none;
}

.swal-popup {
    border-radius: 20px;
    padding: 1.5rem 1.25rem 1.75rem;
}

.swal-title {
    color: #1f5f8b;
    font-size: 2.1em;
}

.swal-confirm-button {
    min-width: 120px;
    border-radius: 999px !important;
    font-size: 1.2rem !important;
    box-shadow: none !important;
}

.patron-modal-header {
    background-color: #1abc9c;
}

.patron-modal-title {
    font-weight: bold;
}

.patron-modal-link {
    font-size: 1.3em;
}

.report-result-table {
    width: 100%;
}

.login-page {
    max-width: 1080px;
    margin: 24px auto 48px;
}

.login-shell {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(34, 62, 90, 0.12);
}

.login-brand-panel {
    width: 44%;
    min-height: 620px;
    padding: 36px 28px;
    color: #ffffff;
    background: linear-gradient(160deg, #0d7ab4 0%, #1aa6d9 45%, #2ec4b6 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-logo-wrap {
    width: 220px;
    height: 220px;
    margin-bottom: 24px;
    padding: 0;
    position: relative;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.login-logo-shell {
    width: 220px;
    height: 220px;
}

.login-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.login-logo-fallback {
    width: 100%;
    height: 100%;
    font-size: 4.5em;
    line-height: 220px;
    color: #fff;
    text-align: center;
}

.login-brand-title {
    font-size: 3.1em;
    font-weight: bold;
    line-height: 1.15;
    margin: 0 0 12px;
}

.login-brand-subtitle {
    font-size: 1.45em;
    line-height: 1.5;
    margin: 0;
    max-width: 420px;
    color: rgba(255,255,255,0.92);
}

.login-form-panel {
    width: 56%;
    padding: 42px 40px 34px;
    background: #fbfdff;
}

.login-form-title {
    margin: 0 0 10px;
    color: #1f5f8b;
    font-size: 2.6em;
    font-weight: bold;
}

.login-form-subtitle {
    margin: 0 0 28px;
    color: #617487;
    font-size: 1.35em;
}

.login-field {
    margin-bottom: 18px;
}

.login-label {
    display: block;
    margin-bottom: 8px;
    color: #38556e;
    font-size: 1.6em;
}

.login-input-group .input-group-text {
    min-width: 56px;
    background-color: #eef7fb;
    border-color: #d8e7f0;
    color: #1f87bf;
}

.login-input-group .form-control {
    height: 56px !important;
    border-color: #d8e7f0;
    box-shadow: none;
}

.login-input-group .form-control:focus {
    border-color: #36a3d9;
    box-shadow: 0 0 0 3px rgba(54, 163, 217, 0.12);
}

.login-error-box {
    margin: 18px 0 10px;
    padding: 12px 14px;
    border: 1px solid #f1b6bb;
    border-radius: 10px;
    background-color: #fff1f2;
    text-align: center;
}

.login-actions {
    margin-top: 26px;
}

.login-primary-button,
.login-secondary-button {
    height: 54px !important;
    border-radius: 999px !important;
    font-size: 1.5em !important;
    font-weight: bold !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 0 20px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.login-primary-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2) !important;
    line-height: 48px !important; /* Perfect vertical center for Thai on input */
}

.login-primary-button:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28) !important;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
}

.login-secondary-button {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    border: 1px solid #0369a1 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2) !important;
    line-height: 52px !important; /* Perfect vertical center for Thai on anchor */
}

.login-secondary-button:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28) !important;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
    color: #ffffff !important;
}

.patron-access-page {
    max-width: 960px;
    margin: 10px auto 40px;
}

.patron-access-hero {
    text-align: center;
    margin-bottom: 24px;
    padding: 26px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef8ff 0%, #f8fffd 100%);
    border: 1px solid #d7eef8;
    box-shadow: 0 10px 30px rgba(24, 164, 224, 0.08);
}

.patron-access-hero-brand {
    width: 100%;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.patron-access-hero-logo-shell {
    width: 88px;
    height: 88px;
}

.patron-access-hero-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.patron-access-hero-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1abc9c;
    color: #ffffff;
    font-size: 2em;
    line-height: 88px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.patron-access-subtitle {
    font-size: 1.35em;
    color: #5f6f7f;
    margin: 8px 0 0;
}

.patron-access-card {
    background-color: #ffffff;
    border: 1px solid #e7edf3;
    border-radius: 18px;
    padding: 28px 24px 22px;
    box-shadow: 0 14px 32px rgba(34, 62, 90, 0.08);
}

.patron-access-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid #e8eff5;
}

.patron-access-section-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1aa6d9 0%, #2ec4b6 100%);
    color: #ffffff;
    font-size: 1.5em;
    line-height: 58px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(26, 166, 217, 0.2);
    flex: 0 0 auto;
}

.patron-access-section-copy {
    text-align: left;
}

.patron-access-section-title {
    margin: 0;
    color: #1f5f8b;
    font-size: 2em;
    font-weight: bold;
}

.patron-access-section-note {
    margin: 6px 0 0;
    font-size: 1.2em;
    color: #6a7d8f;
}

.patron-field {
    margin-bottom: 22px;
}

.patron-label {
    display: block;
    margin-bottom: 10px;
    color: #35556f;
    font-size: 1.45em;
    font-weight: bold;
    letter-spacing: 0.2px;
}

.patron-input {
    border: 1px solid #d9e5ef;
    border-radius: 14px;
    background-color: #ffffff;
    padding: 0.85rem 1rem;
}

.patron-field .form-control,
.patron-field .form-select {
    height: 58px !important;
    border-color: #d9e5ef;
    box-shadow: none;
}

.patron-field .form-control:focus,
.patron-field .form-select:focus {
    border-color: #36a3d9;
    box-shadow: 0 0 0 3px rgba(54, 163, 217, 0.12);
}

.patron-error {
    display: block;
    margin-top: 8px;
    font-size: 1.25em;
}

.patron-action-bar {
    text-align: center;
    margin-top: 10px;
}

.patron-save-button {
    min-width: 240px;
    height: 54px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid #047857 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 1.6em !important;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25) !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 48px !important; /* Perfect Thai centering on desktop input */
    padding: 0 32px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.patron-save-button:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35) !important;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
}

.patron-save-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2) !important;
}

.patron-notice {
    margin-top: 16px;
}

.report-page {
    max-width: 1100px;
    margin: 10px auto 40px;
}

.report-hero {
    text-align: center;
    margin-bottom: 24px;
    padding: 26px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef8ff 0%, #f8fffd 100%);
    border: 1px solid #d7eef8;
    box-shadow: 0 10px 30px rgba(24, 164, 224, 0.08);
}

.report-subtitle {
    font-size: 1.35em;
    color: #5f6f7f;
    margin: 8px 0 0;
}

.report-card {
    background-color: #ffffff;
    border: 1px solid #e7edf3;
    border-radius: 18px;
    padding: 28px 24px 22px;
    box-shadow: 0 14px 32px rgba(34, 62, 90, 0.08);
    margin-bottom: 24px;
}

.report-section-title {
    margin: 0 0 18px;
    color: #1f5f8b;
    font-size: 2em;
    font-weight: bold;
}

.report-field {
    margin-bottom: 22px;
}

.report-field .input-group {
    width: 100%;
}

.report-field .input-group-text {
    min-width: 130px;
    text-align: left;
    border: 1px solid #d9e5ef;
    background-color: #f7fbfe;
    color: #35556f;
}

.report-field .form-control {
    height: 58px !important;
    border-color: #d9e5ef;
    box-shadow: none;
}

.report-field .form-control:focus {
    border-color: #36a3d9;
    box-shadow: 0 0 0 3px rgba(54, 163, 217, 0.12);
}

.report-error {
    display: block;
    margin-top: 8px;
}

.report-action-bar {
    text-align: center;
    margin-top: 8px;
}

.report-search-button {
    min-width: 220px;
    height: 54px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid #047857 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 1.5em !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25) !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 48px !important;
    padding: 0 24px !important;
    transition: all 0.25s ease !important;
}

.report-search-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35) !important;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
}

.report-notice {
    margin-top: 16px;
}

.report-table-card {
    background-color: #ffffff;
    border: 1px solid #e7edf3;
    border-radius: 18px;
    padding: 20px 20px 16px;
    box-shadow: 0 14px 32px rgba(34, 62, 90, 0.08);
}

.report-table-card .table {
    margin-bottom: 0;
}

.report-table-card .table > thead > tr > th,
.report-table-card .table > tbody > tr > td,
.report-table-card .table > tr > th,
.report-table-card .table > tr > td {
    vertical-align: middle;
}

.report-table-card .table > thead > tr > th,
.report-table-card .table > tr > th {
    background-color: #f4f9fc;
    color: #31526b;
    border-bottom-width: 1px;
}

.report-empty {
    padding: 18px 0 4px;
}

.report-export {
    text-align: right;
    margin-top: 18px;
}

.report-export .btn {
    border-radius: 999px;
    padding: 8px 18px;
}

@media (max-width: 991px) {
    .login-shell {
        display: block;
    }

    .login-brand-panel,
    .login-form-panel {
        width: 100%;
        min-height: auto;
    }

    .login-brand-panel {
        padding: 30px 22px;
    }

    .login-form-panel {
        padding: 28px 22px 24px;
    }

    .login-logo-wrap {
        display: none !important;
    }

    .login-brand-title {
        font-size: 2.2em !important;
        margin-bottom: 8px !important;
    }

    .login-brand-subtitle {
        font-size: 1.25em !important;
        max-width: 480px;
    }
}

@media (max-width: 767.98px) {
    .navbar-nav > li {
        margin-left: 0;
    }

    .patron-access-card,
    .report-card,
    .report-table-card {
        padding: 20px 16px 16px;
    }

    .patron-field .form-control,
    .patron-field .form-select,
    .report-field .form-control {
        width: 100%;
    }

    .patron-save-button,
    .report-search-button {
        width: 100%;
        min-width: 0;
    }

    .patron-access-section-header {
        align-items: flex-start;
    }

    .report-export {
        text-align: center;
    }
}
