@font-face {
    font-family: 'THSarabunNew';
    src: url('/13ThaiFonts/THSarabunNew.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'THSarabunNew';
    src: url('/13ThaiFonts/THSarabunNew Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'THSarabunNew';
    src: url('/13ThaiFonts/THSarabunNew Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'THSarabunNew';
    src: url('/13ThaiFonts/THSarabunNew BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

:root {
    --main-green: #2e7d32;
    --main-green-dark: #1b5e20;
    --main-green-light: #e8f5e9;
    --border-color: #c8e6c9;
    --text-color: #1f2937;
    --bg-color: #f4fdf6;
    --white: #ffffff;
    --danger: #c62828;
    --warning: #ef6c00;
    --info: #1565c0;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

html {
    font-size: 28px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

html, body,
input, textarea, select, button,
table, th, td,
label, a, span, div, p,
h1, h2, h3, h4, h5, h6,
ul, ol, li, small, strong {
    font-family: 'THSarabunNew', sans-serif !important;
}

body {
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.4;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--main-green-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--main-green-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1.05rem; }

p, li, label, td, th, input, select, textarea, button {
    font-size: 1rem;
}

small {
    font-size: 0.85rem;
}

input,
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #b7d7b9;
    border-radius: 10px;
    background: #fff;
    color: var(--text-color);
    outline: none;
    transition: 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--main-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: var(--main-green);
    color: #fff;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
    transition: 0.2s ease;
    box-shadow: var(--shadow);
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    background: var(--main-green-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

button:disabled,
.btn:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background: var(--main-green);
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid #d7ead8;
}

td {
    padding: 12px 14px;
    border: 1px solid #e3efe4;
    vertical-align: top;
}

tr:nth-child(even) td {
    background: #fbfffb;
}

hr {
    border: 0;
    border-top: 1px solid #d8e9d9;
    margin: 1rem 0;
}

.container,
.page-container,
.main-container,
.content-wrapper,
.form-container,
.card {
    background: var(--white);
    border: 2px solid var(--main-green);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.card,
.form-container,
.content-wrapper {
    padding: 20px;
}

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

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.alert,
.notice,
.message-box {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #edf8ee;
    color: #1b5e20;
    border-color: #b7d7b9;
}

.alert-danger,
.alert-error {
    background: #ffebee;
    color: #b71c1c;
    border-color: #ef9a9a;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #90caf9;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.badge-success {
    background: #e8f5e9;
    color: #1b5e20;
}

.badge-danger {
    background: #ffebee;
    color: #b71c1c;
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.badge-info {
    background: #e3f2fd;
    color: #0d47a1;
}

@media (max-width: 768px) {
    html {
        font-size: 24px;
    }

    body {
        padding: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .card,
    .form-container,
    .content-wrapper {
        padding: 14px;
    }

    button,
    .btn,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        width: 100%;
        margin-bottom: 8px;
    }
}


/* ===== release_calc_new bigger readable font override START ===== */

/*
 * ปรับขนาดตัวอักษรกลางให้เหมาะกับงานตรวจเอกสารจริง
 * ใช้ THSarabunNew เป็นฟอนต์หลัก และเพิ่มขนาดให้อ่านง่ายขึ้น
 */

html {
    font-size: 32px;
}

body {
    font-size: 1rem !important;
    line-height: 1.45 !important;
}

/* หัวข้อ */
h1 {
    font-size: 2.15rem !important;
    line-height: 1.15 !important;
}

h2 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
}

h3 {
    font-size: 1.45rem !important;
}

/* ข้อความทั่วไป */
p,
li,
label,
td,
th,
span,
div,
a {
    font-size: 1rem;
}

/* ฟอร์ม */
input,
select,
textarea,
button,
.btn {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
}

input,
select {
    min-height: 52px;
}

textarea {
    min-height: 130px;
}

/* กล่องข้อมูลในหน้า save / confirm / commit */
.box,
.field,
.item,
.card,
.preview,
.notice,
.alert,
.message-box {
    font-size: 1rem !important;
    line-height: 1.45 !important;
}

.label {
    font-size: 1rem !important;
    font-weight: 700 !important;
}

.value {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
}

/* กล่องคำอธิบาย / dry-run / ผล commit */
.plan,
.calc,
pre {
    font-size: 1.05rem !important;
    line-height: 1.55 !important;
}

/* ข้อความเล็กไม่ให้เล็กเกินไป */
small {
    font-size: 0.9rem !important;
}

/* มือถือ/จอแคบ */
@media (max-width: 768px) {
    html {
        font-size: 28px;
    }

    h1 {
        font-size: 1.85rem !important;
    }

    h2 {
        font-size: 1.55rem !important;
    }

    input,
    select,
    textarea,
    button,
    .btn {
        font-size: 1rem !important;
    }
}

/* ===== release_calc_new bigger readable font override END ===== */

