@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

:root {
    --font-family: Bai Jamjuree, sans-serif;
    --blue-header-color: #003C71D9;
    --blue-value-color: #0051CAD9;
    --blue-icon-color: #1890FF;
    --primary-color: #4CAFEB;
    --primary-border-color: #33A2E5;
    --secondary-color: #E6E6E6;
    --secondary-border-color: #9E9E9E;
    --success-color: #6FBA4A;
    --success-border-color: #629C46;
    --danger-color: #FF4D00;
    --danger-border-color: #FF4D00;
    --warning-color: #FF5722;
    --warning-border-color: #FF5722;
    --verify-color: rgba(255, 249, 237, 0.40);
    --verify-border-color: #FFDE9B;
    --info-color: #F6FCFF;
    --info-border-color: #62C0EF;
    --link-color: #006AFF;
}

.container-modal {
    /*width: 750px !important;*/
    width: 1200px !important;
    max-width: 95vw !important;
}

/* Responsive modal - no scrollbars */
.ant-modal-body {
    overflow: visible !important;
}

/* Adjust modal for smaller screens */
@media (max-width: 1200px) {
    .container-modal {
        width: 90vw !important;
    }
}

@media (max-width: 768px) {
    .container-modal {
        width: 95vw !important;
    }
}

@media (max-width: 750px) {
    .container-percent {
        width: 100% !important;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    /* Show only the specific class and its children */
    .printable-area,
    .printable-area * {
        visibility: visible !important;
    }

    /* Position the printable area at the top of the page */
    .printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .page-break {
        page-break-before: always;
    }

    /* บังคับให้ AntDesign Collapse ทุกแผงกางออกเสมอตอนพิมพ์ (ไม่ว่าผู้ใช้จะยุบไว้หรือไม่) */
    .printable-area .ant-collapse-content,
    .printable-area .ant-collapse-content-inactive,
    .printable-area .ant-collapse-content-hidden {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .printable-area .ant-collapse-content-box {
        display: block !important;
    }

    .print-footer {
        display: flex !important;
        justify-content: space-between;
        font-size: 10pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding-top: 6px;
        margin-top: 12px;
        visibility: visible !important;
    }

    .print-page-badge {
        display: block !important;
        visibility: visible !important;
        text-align: right;
        font-size: 10pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding-top: 6px;
        margin-top: 12px;
        margin-bottom: 4px;
    }
}

@page {
    margin: 10mm 10mm 18mm 10mm;
    @bottom-right {
        content: "หน้า " counter(page) " / " counter(pages);
        font-size: 9pt;
        color: #666;
    }
}

body {
    font-family: var(--font-family) !important;
    font-size: 16px !important;
}

a {
    color: var(--link-color) !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.form-label {
    width: 180px !important;
}

/* Content */
.content-container {
    padding: 10px !important;
}

.content-body {
    padding: 12px 20px 20px 20px !important;
    border-radius: 6px !important;
    width: 100% !important;
    background-color: white !important;
}

/* Tighten the gap above the first page-title Divider */
.content-body > .ant-divider:first-child,
.content-body > .divider:first-of-type {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

.content-header {
    padding-bottom: 20px !important;
    margin-bottom: 10px !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

    .content-header i {
        font-size: 20px !important;
        font-weight: bold !important;
        color: var(--blue-icon-color) !important;
    }

    .content-header span {
        font-size: 20px !important;
        font-weight: bold !important;
        color: var(--blue-header-color) !important;
    }

/* Alert */
.alert {
    display: flex !important;
    align-content: center !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
}

.alert-warning-light {
    background: #FFF8F5 !important;
}

    .alert-warning-light i {
        color: #FF4D00 !important;
    }

    .alert-warning-light span {
        font-weight: 500 !important;
        font-size: 16px !important;
        color: #5B4B2A !important;
    }

.alert-warning-dark {
    background: #FFEFBB !important;
    border: 1px solid #FFC914 !important;
}

    .alert-warning-dark i {
        color: #FF4D00 !important;
    }

    .alert-warning-dark span {
        font-weight: 600 !important;
        font-size: 16px !important;
        color: #785C00 !important;
    }

/* Card */
.card {
    width: 100% !important;
    border-radius: 6px !important;
    padding: 15px 50px 15px 50px !important;
    margin-bottom: 20px !important;
}

.card-gray {
    border: solid 1px #e0e0e0 !important;
    background: #FBFBFC80 !important;
}

/* Border Styles */
.border-dashed {
    border-style: dashed !important;
}

.border-dotted {
    border-style: dotted !important;
}

/* Border */
.border-primary {
    border-color: var(--primary-color) !important;
}

.border-secondary {
    border-color: var(--secondary-color) !important;
}

.border-warning {
    border-color: var(--warning-color) !important;
}

.border-success {
    border-color: var(--success-color) !important;
}

.border-danger {
    border-color: var(--danger-color) !important;
}

.border-info {
    border-color: var(--info-border-color) !important;
}

.border-verify {
    border-color: var(--verify-border-color) !important;
}

/* Background */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-verify {
    background-color: var(--verify-color) !important;
}

/* Text */
.text-link {
    color: var(--link-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-red {
    color: red;
}

.text-blue-value {
    color: var(--blue-value-color) !important;
}

.text-blue-header {
    color: var(--blue-header-color) !important;
}

.text-blue-icon {
    color: var(--blue-icon-color) !important;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field label {
    font-size: 13px;
    margin-bottom: 0;
}

.text-dark-label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #000000D9 !important;
}

.text-dark-value {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #000000 !important;
}

/* Font Size & Weight */
.fs-20 {
    font-size: 20px !important;
}

.fs-16 {
    font-size: 16px !important;
}

.fs-14 {
    font-size: 14px !important;
}

.fs-13 {
    font-size: 13px !important;
}

.fs-12 {
    font-size: 12px !important;
}

.fs-11 {
    font-size: 11px !important;
}

.fw-400 {
    font-weight: 400 !important;
}

.fw-500 {
    font-weight: 500 !important;
}

.fw-600 {
    font-weight: 600 !important;
}

/*  Button  */
.button {
    font-size: 14px;
    border-radius: 6px;
    padding: 5px 10px 5px 10px;
    margin: 0px 5px 0px 5px;
}

.button-primary {
    color: white;
    background: #4CAFEB;
    border: 1px solid #33A2E5;
}

.button-secondary {
    color: #4C4C4C;
    background: #E6E6E6;
}

.button-success {
    color: white;
    background: #6FBA4A;
    border: 1px solid #629C46
}

.button-warning {
    color: white;
    background: #FF8957;
    border: 1px solid #E46128;
}

.button-danger {
    color: white;
    background: #FF4D00;
    border: 1px solid #FF4D00;
}

.button-action {
    text-align: center;
    border: 2px solid #AFD4F5 !important;
    background: #E3EEF8 !important;
    color: #326CA5;
}

.button-add {
    color: white;
    background: #949FFF;
    border: 1px solid #8083FF;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.collapse-panel {
    background: #ffffff !important;
    overflow: hidden !important;
    border-radius: 2px !important;
    border: 0px !important;
    padding: 0px !important;
    margin: 0px !important;
}

.vertical-line {
    border: none;
    border-left: 1px solid black;
    height: 100px;
    width: 3px;
}

/* Ant Design Blazor Override */
.ant-collapse-header-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--blue-header-color) !important;
}

.ant-divider-inner-text {
    color: #2D6199 !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    white-space: normal; 
    overflow-wrap: break-word; 
    word-break: break-word;
}

@media (min-width: 850px) {
    .ant-divider-inner-text {
        white-space: unset;
    }
}

.ant-divider-horizontal.ant-divider-with-text::before, .ant-divider-horizontal.ant-divider-with-text::after {
    border-top: 3px solid #2D6199 !important;
}

.ant-table-thead > tr > th {
    text-align: center;
    border-top: 2px solid #AFD4F5 !important;
    border-left: 2px solid #AFD4F5 !important;
    border-bottom: 2px solid #AFD4F5 !important;
    background: #E3EEF8 !important;
    color: #326CA5 !important;
    font-weight: 500 !important;
}

    .ant-table-thead > tr > th:last-child {
        border-right: 2px solid #AFD4F5 !important;
    }

.ant-modal-content {
    border-radius: 12px !important;
}

.ant-modal-header {
    background: #F0F4F8 !important;
    border-radius: 12px 12px 0 0 !important;
}

.ant-modal-footer {
    background: #F0F4F8 !important;
    border-radius: 0 0 12px 12px !important;
}

.ant-table-row-expand-icon {
    color: #13C2C2 !important;
    border: 1px solid #13C2C2 !important;
    border-radius: 2px !important;
}

.ant-tabs-tab {
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    width: 100% !important;
}

.ant-tabs-tab-active {
    border-top: solid 3px #326CA5 !important;
    background: #caf0f8 !important;
    color: #326CA5 !important;
    /*    font-weight: 500 !important;*/
}

.ant-switch-inner {
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Segmented Control */
.segmented-control {
    display: inline-flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.segmented-control-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control-label {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.segmented-control-label:hover {
    color: #023e8a;
}

.segmented-control-input:checked + .segmented-control-label {
    background: #ffffff;
    color: #023e8a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.04);
}

.segmented-control-label i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .segmented-control {
        width: 100%;
    }
    
    .segmented-control-label {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }
}

/* Print-only label */
.print-only-label {
    display: none;
}

.print-footer {
    display: none;
}

@media print {
    .print-only-label {
        display: block !important;
    }
}

/* Gap utilities */
.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}


/* News section container */
.news-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #c8dcf8;
    padding: 20px 16px;
    margin-top: 20px;
    box-shadow: 0 2px 16px rgba(62, 116, 207, 0.08);
}

/* News card */
.news-card {
    border: 1px solid #e4eefb;
    border-left: 4px solid #3e74cf;
    border-radius: 0 10px 10px 0;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-left-color 0.2s ease;
    box-shadow: 0 1px 4px rgba(62, 116, 207, 0.06);
}

.news-card:hover {
    border-left-color: #1d5bbf;
    box-shadow: 0 4px 18px rgba(62, 116, 207, 0.15);
    transform: translateY(-1px);
}

.news-card-latest {
    border-left-color: #e07b1a !important;
    background: linear-gradient(to right, #fffbf6, #fff);
}

.news-card-latest:hover {
    border-left-color: #c56a10 !important;
}

.news-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px 9px;
    background: transparent;
    border-bottom: 1px solid #eef4fd;
}

.news-icon {
    color: #3e74cf;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.news-card-latest .news-icon {
    color: #e07b1a;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    line-height: 1.5;
    flex: 1;
}

.news-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6e90b8;
    background: #f0f6ff;
    border: 1px solid #dce8fb;
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
}

.news-new-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #f59340, #e07b1a);
    border-radius: 20px;
    padding: 1px 7px;
    margin-left: 6px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    animation: pulse-new 2.5s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes pulse-new {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(0.95); }
}

.news-body {
    padding: 10px 14px 12px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.7;
}

