.table{
  margin-bottom: 0rem;
}

.btn-primary{
  background-color: #b40e3a !important;
  border-color: #b40e3a !important;
}
.btn-primary:hover{
  background-color: #d31145 !important;
/*  border-color: #b40e3a !important;*/
}
.alert-warning-light{
  background-color: #f9ecc6 !important;
  border-color: #f9ecc6 !important;
}
.alert-danger-light{
  background-color: #ffb5bcc7 !important;
  border-color: #ffb5bcc7 !important;
}

.bg-disabled{
  background-color: #f4f4f4;
  border-color: #f4f4f4;
}

.table th{
/*  background-color: #333d47 !important;*/
  background-color: #454e56 !important;
  color: #fff !important;
}
.light-gray-bg td{
  background-color: #eee;
}

.swal2-styled.swal2-confirm{
/*    background-color: #28a745 !important;*/
}

.swal2-styled.swal2-deny{
    background-color: #b40e3a !important;
}

/* effect in all .swal2-html-container , need to find another solution*/
/*.swal2-html-container {
    font-size: 1.5em !important;
}
*/
.badge-default{
  border: 1px solid #ccc;
}

.table-xs th{
  font-size: 14px;
}
.table-xs td{
  font-size: 12px;
}

.ariya-body{
  font-size: 0.7em;
}
.ariyaform-narrow input, 
.ariyaform-narrow select{
  padding: 2px 2px 2px 5px !important;
}
/* The select2 override in ci3-journal-head pins its box to 25px; a bare .form-control on the
   same row sizes from its text instead and lands on 24.19px, so its underline sat a hair's
   breadth higher than the dropdown's (cash_receive's Invoice No. vs Receive Amount,
   asked 2026-09-23). Pin the inputs to the same 25px and the row shares one baseline. */
.ariyaform-narrow input.form-control,
.ariyaform-narrow select.form-control{
  height: 25px !important;
}
/* ...except beside an add-on (the SV prefix of Journal No, a calendar icon): there the 25px left
   the input shorter than the box it is glued to (asked 2026-09-24). Let the flex row stretch it to
   the add-on's height instead. */
.ariyaform-narrow .input-group > input.form-control{
  height: auto !important;
}
.btn-add-remove-row{
  padding-top: 2px !important;
  padding-right: 7px !important;
  padding-bottom: 2px !important;
  padding-left: 7px !important;
  border-radius: 50% !important;
  opacity: 70%;
  scale: 0.5;
}
.btn-describe-wht, .btn-add-remove-wht {
    padding-top: 2px !important;
    padding-right: 7px !important;
    padding-bottom: 2px !important;
    padding-left: 7px !important;
    border-radius: 50% !important;
    opacity: 70%;
    scale: 0.5;
}
.el-error{
  background-color: #ff828f47 !important;
}

.select2-selection{
  border: none !important;
  border-bottom: 1px solid #000 !important;
}
.select2-dropdown{
  border: 1px solid #333;
}
.select2{
  /* 1rem follows the root size the option panel inherits — the selected text and the
     option values stay the SAME size (16px fixed left the selection oversized) */
  font-size: 1rem !important;
}
.select2 ul li{
  font-size: 1rem !important;
}

/* Multi-select choice tag → company tone (ruby red) */
.select2-container--default .select2-selection--multiple .select2-selection__choice{
  background-color: #b40e3a !important;
  border-color: #8f0b2e !important;
  color: #fff !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display{
  color: #fff !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
  color: #fff !important;
  opacity: .85;
  border-color: #8f0b2e !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{
  background-color: #d31145 !important;
  color: #fff !important;
  opacity: 1;
}

/* Active tab/pill → company tone (ruby red) */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link{
  background-color: #b40e3a !important;
  color: #fff !important;
}
.nav-tabs .nav-link.active{
  color: #b40e3a !important;
  border-bottom-color: #b40e3a !important;
}

.navbar-badge {
    position: absolute;
    top: 9px;
    right: 3px;
    font-size: .6rem;
    font-weight: 300;
    padding: 1px 4px;
}

#new_journal_id{
  border: 1px solid #ccc !important;
  font-size: 15px;
  /* padding-left: 0px !important; */
  padding-top: 3px !important;
}
.select2-selection__rendered{
  margin-top: -1px !important;
}
.select2-selection.select2-selection--single{
  margin-top: -0px !important;
/*  font-size: 1.3em !important;*/
}

.select2-container--default .select2-selection--single{
  height: 30px !important;
}

.last_cal{
  font-style: italic;
  font-size: 0.8em;
  text-decoration: underline;
}

th, td{
  min-height: 70px !important;
  max-height: 70px !important;
}

.ttooltip{
/*  font-style: italic;*/
/*  color: #ff1553;*/
    text-decoration: line-through;
}
.exclamate{
  font-style: italic;
  font-weight: bold;
  color: #ff1553;
  display: none;
}
tr.text-bold td{
  font-weight: bold;
}

.report_journal_no_column{
  width: 50px;
}
.report_date_column{
  width: 60px;
}
.report_account_column{
  width: 300px;
}
.report_description_column{
  width: 400px;
}
.report_debit_column, .report_credit_column{
  width: 100px;
}
.report_posting_check{
  width: 50px;
}
.report_summary_row td{
  background-color: #eeeeee29;
}

._description_column{
  color: #666;
}

.custom-control {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
}
.custom-switch {
    padding-left: 2.25rem;
}
.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}
.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}
label:not(.form-check-label):not(.custom-file-label) {
    font-weight: 700;
}

.custom-switch .custom-control-label::before{
    left:-2.25rem;
    width:1.75rem;
    pointer-events:all;
    border-radius:.5rem
}
.custom-switch .custom-control-label::after{
    top:calc(.25rem + 2px);
    left:calc(-2.25rem + 2px);
    width:calc(1rem - 4px);
    height:calc(1rem - 4px);
    background-color:#adb5bd;
    border-radius:.5rem;
    transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;
    transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out
}
@media (prefers-reduced-motion:reduce){
    .custom-switch .custom-control-label::after{
        transition:none
    }
}
.custom-switch .custom-control-input:checked~.custom-control-label::after{
    background-color:#dee2e6;
    -webkit-transform:translateX(.75rem);
    transform:translateX(.75rem)
}
.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{
    background-color:rgba(0,123,255,.5)
}

#ap_aging_table tr th{
  text-align: center;
  vertical-align: middle;
}

#ap_aging_table #aging_owner{
  width: 450px;
}
#ap_aging_table #credit_day{
  width: 50px;
}


ol.ap_inv_aging_list, 
ol.ap_inv_aging_list li{
  width: 140px;
}
ol.ap_inv_aging_list li{
  border-bottom: 1px solid #ccc;
}
ol.ap_inv_aging_list li span{
  float: left;
/*  border: 1px solid red;*/
}
ol.ap_inv_aging_list li span.invlist{
  width: 70px;
  text-align: left;
}
ol.ap_inv_aging_list li span.amountlist{
  width: 70px;
  text-align: right;
}

.inv_summary{
  cursor: pointer;
}
.inv_summary strong:hover{
  text-decoration: underline;
}
.inv_summary_detail{
  display: none;
}

/*should greater than 1100*/
.swal2-container{
  z-index: 1200 !important;
}
.swal2-container, 
.swal2-container th, 
.swal2-container td, 
.swal2-container th span, 
.swal2-container td span{
/*  font-size: 0.8em !important;*/
  font-size: 1em !important;
}

th.invoice_under_due, 
td.invoice_under_due{
  background-color: #1e7e34 !important;
}

th.invoice_over_due, 
td.invoice_over_due{
  background-color: #7f0e19!important;
}

th.inv_org_value{
  background-color: #1e7e34 !important;
} 
td.inv_org_value{
  background-color: #ddffe5 !important;
}

th.inv_latest_value{
  background-color: #7f0e19!important;
} 
td.inv_latest_value{
  background-color:#fbe9eb!important;
}

tr.minus_value_row td{
  color: red !important;
}

#customfxdate{
  width: 215px;
  margin: 0px auto;
  text-align: center;
}
.notifyjs-container{
  z-index: 1111;
}

.clear{
  clear: both;
}

/*custom card*/
.card-custom{
  display: block;
  box-shadow: 0 0 0px rgba(0,0,0,.125), 0 0px 0px rgba(0,0,0,.2);
}

.custom_selected{
  border-bottom: 5px solid #ccc;
}


input::placeholder {
  font-size:0.9em;
  opacity: 0.5;
}

tr.middlecenter, 
tr.middlecenter th{
  text-align: center !important;
  vertical-align: middle !important;
}

.text-middle{
  vertical-align: middle !important;
}

.arpagination{
  float:left;
}
.artotalpage{
  float: left;
}

.text-center{
  text-align: center;
  vertical-align: middle !important;
}

.show_benchmark{
  text-align: right;
  padding: 20px;
}

.text-red{
  color: red !important;
}
.text-success{
  color: #28a745;
}
.text-blue{
  color: #007bff;
}
.text-danger{
  color: #dc3545;
}
.swal-normal-size{
  max-width: 500px;
}
.swal-normal-size .swal2-html-container {
    font-size: 1.5em !important;
}

.small_italic{
  font-size:0.8em !important;
  font-style: italic !important;
}

.invoice_info_span{
  cursor: pointer;
}

.bg-debit-note{
  background-color: #dc3545;/*#6c757d;*/
  color: #fff !important;
}
.bg-credit-note{
  background-color: #17a2b8;
  color: #fff !important;
}

.swal2-popup{
  font-size:0.9em;
  border-radius: 0px !important;
  border: 1px solid #b40e3a !important;

}

/* The four advance engines (pdomestic/sdomestic/pinter/sinter _advance.js) have asked for this
   class since the CI3 port — nothing ever defined it, so the "Advance payment available" list
   rendered at SweetAlert's default 32em: one advance line wrapped and grew a horizontal
   scrollbar. Wide enough for "PVGL202601036 Amount: 6,848.00 ( supplier #invoice /จ่ายชำระหนี้ )"
   on one line, capped so it stays inside a laptop screen. */
.swal2-popup.swal-medium-size{
  width: 44em !important;
  max-width: 94vw;
}
/* The select2 dressed as the P.N.D.53 popup dresses it — a bordered rounded box instead of the
   page underline, and a panel (.wht-dd, select2 dropdownCssClass) at the dialog's own size.
   Shared by the pnd53 describe popup and the VAT-detail edit popup; the panel class lives here
   because a body-attached panel can only be reached by a class select2 stamps on it. */
.wht-dd { font-size: .875rem; border-color: #ddd8dd; }
.wht-dd .select2-results__option { padding: 5px 10px; line-height: 1.4; color: #2C2228; }
.wht-dd .select2-results__option--highlighted[aria-selected] { background: #8B3A52; }
.wht-dd .select2-results__option[aria-selected="true"] { background: #f3eef1; color: #2C2228; }
.wht-dd .select2-search--dropdown .select2-search__field { font-size: .875rem; padding: .3rem .5rem;
             border: 1px solid #ddd8dd; border-radius: 6px; }

/* The PP.36 / PND.54 filing popups read at plain weight (asked 2026-09-24): the global bold
   label rule reached every radio option in the cloned form, and the whole thing shouted. The
   form ids survive Swal's clone, so the selector holds inside the popup too. */
#pnd54_form_detail label, #pp36_form_detail label { font-weight: 400; }

.vat-edit .select2-selection.select2-selection--single { height: 31px !important;
             border: 1px solid #ddd8dd !important; border-radius: 6px !important; }
.vat-edit .select2-selection__rendered { line-height: 29px !important; font-size: .875rem; }
.vat-edit .select2-selection__arrow { height: 29px !important; }

/* Every select2 on the REPORT and PREVIEW screens wears the same dress — the popups' bordered
   rounded box and quiet panel — instead of the entry forms' underline. Scoped by the
   screen-report body class the layout stamps on those prefixes, which also reaches the
   body-attached panels those filters open. */
.screen-report .select2-selection.select2-selection--single { height: 31px !important;
             border: 1px solid #ddd8dd !important; border-radius: 6px !important;
             /* flex-centred: the base sheet nudges __rendered with its own margins (the global
                margin-top:-1px above, select2's own padding), which left the text riding 6px
                low in the box (asked 2026-09-22). Centring by layout is immune to all of it. */
             display: flex; align-items: center; }
.screen-report .select2-selection__rendered { line-height: normal !important; font-size: .875rem;
             margin-top: 0 !important; width: 100%; }
.screen-report .select2-selection__arrow { height: 29px !important; }
.screen-report .select2-dropdown { font-size: .875rem; border: 1px solid #ddd8dd; }
.screen-report .select2-results__option { padding: 5px 10px; line-height: 1.4; color: #2C2228; }
.screen-report .select2-results__option--highlighted[aria-selected] { background: #8B3A52; }
.screen-report .select2-results__option[aria-selected="true"] { background: #f3eef1; color: #2C2228; }
.screen-report .select2-search--dropdown .select2-search__field { border: 1px solid #ddd8dd; border-radius: 6px; }
/* The DataTables "Show N entries" box, everywhere: wide enough that the number never hides
   behind the spinner arrow (asked 2026-09-24 — "10" showed as "1◂▸"). min-width, so a theme
   that already sizes it wider keeps its size. */
div.dataTables_length select { min-width: 62px; padding-right: 18px; }

/* The NATIVE selects on the same screens (BOI Type, Segment, the DataTables page length…)
   wear the identical dress — same height, border, radius and .875rem type as the select2
   boxes beside them, so a filter row reads as one family whichever widget renders it. */
.screen-report select.form-control,
.screen-report .dataTables_length select {
  height: 31px; padding: 3px 10px; font-size: .875rem; color: #2C2228;
  border: 1px solid #ddd8dd; border-radius: 6px; background-color: #fff;
}
.screen-report select.form-control:focus,
.screen-report .dataTables_length select:focus {
  border-color: #8B3A52; box-shadow: 0 0 0 .12rem rgba(139, 58, 82, .15); outline: 0;
}

/* Every Excel-export button in the app wears Microsoft Excel's own green (the icon's #1D6F42),
   one shade darker on hover — not Bootstrap's info-teal or success-green, which varied screen
   by screen. Buttons only; dropdown menu items keep their menu styling. */
.btn-excel { background-color: #1D6F42; border-color: #1D6F42; color: #fff; }
.btn-excel:hover, .btn-excel:focus { background-color: #185C37; border-color: #185C37; color: #fff; }
.btn-excel:not(:disabled):active { background-color: #14512F; border-color: #14512F; color: #fff; }
.btn-excel:focus { box-shadow: 0 0 0 .15rem rgba(29, 111, 66, .3); }
.btn-excel.disabled, .btn-excel:disabled { background-color: #1D6F42; border-color: #1D6F42; color: #fff; opacity: .55; }

/* The taxrate settings tables (/taxrate/wht, wht_inter, vat) wear the same dress as the
   report select2 filters: soft #ddd8dd borders, 6px radius, brand focus — so the page-length
   select2, the DataTables search box and the rate inputs read as one family. */
.taxrate-rate .form-control,
.taxrate-rate .dataTables_filter input {
  border: 1px solid #ddd8dd; border-radius: 6px; color: #2C2228;
}
.taxrate-rate .form-control:focus,
.taxrate-rate .dataTables_filter input:focus {
  border-color: #8B3A52; box-shadow: 0 0 0 .12rem rgba(139, 58, 82, .15); outline: 0;
}
.taxrate-rate .dataTables_filter input {
  height: 31px; padding: 2px 10px; font-size: .875rem; background: #fff;
}
.taxrate-rate .dataTables_length .select2-container { min-width: 5.5em; margin: 0 .35em; }
/* "Show [ 50 ] entries" on ONE line, the words centred against the box (asked 2026-09-17): the
   label is inline-block and the select2 container sits on the text baseline, so a 29px box left
   the words riding 6px high. A flex row centres text nodes and widget alike, whichever of the
   three taxrate screens renders it. */
.taxrate-rate .dataTables_length label {
  display: flex; align-items: center; gap: .1rem; margin-bottom: 0;
}
/* and the NUMBER inside the box, which select2 lays out on a 29px line inside a 31px box and so
   printed 5px below "Show". Centred by making the box itself a flex row — the arrow is
   absolutely positioned and rides along unaffected. */
.taxrate-rate .dataTables_length .select2-selection--single {
  display: flex; align-items: center;
}
.taxrate-rate .dataTables_length .select2-selection--single .select2-selection__rendered {
  line-height: 1.2; padding-top: 0; padding-bottom: 0;
}

/* The advance list inside it: quieter type, and NEVER a horizontal scrollbar — the long
   "PVGLxxx Amount: 6,848.00 ( supplier #invoice /จ่ายชำระหนี้ )" line wraps instead. */
.swal2-popup.swal-medium-size .swal2-title{ font-size: 1.15em; }
.swal2-popup.swal-medium-size .swal2-html-container{
  font-size: .95em;
  overflow-x: hidden;
}
.swal2-popup.swal-medium-size ul{
  list-style: none; margin: 0; padding: 0; text-align: left;
}
.swal2-popup.swal-medium-size li{ overflow-wrap: anywhere; margin-bottom: .25em; }

.__jp *{
  font-size: 1em !important;
}

.ribbon-wrapper {
    height: 70px;
    overflow: hidden;
    position: fixed;
    right: 0px;
    top: 0px;
    width: 70px;
    z-index: 10000;
}
.ribbon-wrapper.ribbon-xl {
    height: 180px;
    width: 180px;
}
.ribbon-wrapper.ribbon-xl .ribbon {
    right: 4px;
    top: 47px;
    width: 240px;
}
.ribbon-wrapper .ribbon {
    box-shadow: 0 0 3px rgba(0,0,0,.3);
    font-size: .8rem;
    line-height: 100%;
    padding: .375rem 0;
    position: relative;
    right: -2px;
    text-align: center;
    text-shadow: 0 -1px 0 rgba(0,0,0,.4);
    text-transform: uppercase;
    top: 10px;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    width: 90px;
}

.fixpreview{
  top: 0;
  width: 100%;
  position: fixed;
  border: 1px solid #b40e3a;
  background-color: rgba(180,14,58,0.2);
/*    background-color: rgba(23,162,184,0.5);*/
  padding: 1px;
  color: #fff;
/*    text-shadow: 2px 2px #fff;*/
  font-style: bold;
  text-align: center;
  z-index: 9999;
}
.fixpreview span{
  font-size: 1.2em;
}

.floatleft{float:left;}
.floatright{float:right;}
.adjusting-circle {
    color: #fff;
    background-color: green;
    float: left;
    width: 17px;
    height: 17px;
    text-align: center;
    vertical-align: middle;
    border-radius: 50%;
    font-size: 0.7em;
    padding-top: 2px;
    margin-top:2px;
    margin-left:3px;
}

 .form-control[readonly] {
    background-color: #fff;/*#e9ecef;*/
    opacity: 1;
}

/* A DISABLED form control must look disabled. The period selector greys the End-of-month dropdown
   out (and the From/To boxes in the other mode) by setting `disabled`, but the native <select>
   renders on a white ground here, so a disabled dropdown looked identical to a live one sitting
   beside greyed-out date boxes — the report that "the dropdown does not disable" was really "the
   dropdown does not LOOK disabled". This greys it the same #e9ecef the inputs already use. Scoped
   to :disabled only, so the readonly-stays-white rule above is untouched. */
.form-control:disabled,
select.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

.dashboard-alert{
  margin-top:5px;
}

.no-margin-bottom{
  margin-bottom: 0rem;
}

.bg-debit, .bg-credit{
  background-color: transparent;
}

.inv-closed{
  font-style: italic;
  color: #ccc;
}

/*
 * The ban icon used to be painted red globally, which on the activity log's red Ban button meant
 * red on red — the icon was there and nobody could see it. A button already states its colour;
 * the icon inherits it.
 */

/* invoice detail (inter) */
.fx-data .card-body{
  background-color: #ffffff;
}
.local-data .card-body{
  background-color: #fff7f7;
}

.resp-table {
  width: 100%;
  display: table;
}
.resp-table-body{
  display: table-row-group;
}
.resp-table-row{
  display: table-row;
}
.table-body-cell{
  display: table-cell;
  border: 1px solid #dddddd;
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: top;
}

.cellheader{
  background-color: #454e56 ;
  border-color: #454e56;
  color: #fff;
  font-weignt: bold;
  text-align: center;
}

.cellsummarynumber{
  font-weight: bold;
}
.pay_amount_converted{
  text-align: right;
}
.converted_journal_item{
  line-height: 32px;
}

/* text color*/
.redtext{
  color: red !important;
}


#journal_form_table tr th, #journal_form_table tr td{
  line-height: 25px !important;
  vertical-align: middle;
}

#journal_form_table tr td div.form-group{
/*  border: 1px solid blue;*/
  position: relative;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  margin-bottom: 0;
}

th.fxcolumnstyle, 
td.fxcolumnstyle{
  background-color: #fff5db !important;
  color: #333 !important;
  text-align: center !important;
}
th.fxcolumnstyle span, 
td.fxcolumnstyle span{
  text-align: right !important;
  background-color: #fff5db !important;

}

th.nobackground, 
td.nobackground{
  background-color: #fff !important;
}

th.nobordertop, 
td.nobordertop{
  border-top:none !important;
}


span.fxcurrency_infront_of_input{
    float: left;
    width: 27px;
    position: absolute;
    font-weight: bold;
    font-size:12px;
    margin-top: -2px;
    padding: 7px 0px 7px 0px;
/*    border: 1px solid red;*/
}
input.withfxinfrontofit{
  float: left;
/*  width: 90%;*/
  position: absolute;
  margin-left: 27px;
  margin-top: 0px;
}

.textright, .text-right,
.numberright, .number-right{
  text-align: right !important;
}

/* Debit/Credit money cells (inputs + display spans) read right-aligned like currency.
   Amount columns use different classes by form/mode: .moneyinput (PA amounts + all FX spans),
   .converted_value (PA edit THB), .converted_view (DNPA/CNPA split-THB Debit/Credit). Cover all. */
.moneyinput,
.converted_value,
.converted_view{
  text-align: right !important;
}

.width200{
  width: 200px !important;
}

.table-noborder th, .table-noborder td{
  border: none !important;
}

.force-copy-summary-text{
  cursor: copy;
}
/*
 * Card headers laid out with flex: drop Bootstrap's clearfix pseudo-element.
 *
 * `.card-header::after` is a float clearfix — content:""; display:block — and in a flex container
 * that is not decoration, it is a THIRD FLEX ITEM. So `d-flex justify-content-between` with a title
 * and a button group was spacing three things, not two: the title at the left, the buttons stranded
 * in the MIDDLE, and an invisible zero-width box holding the right edge. Every one of the 49 pages
 * using this header pattern showed its action buttons floating in the middle of the header.
 *
 * Nothing is lost by removing it here: a flex container does not need float clearing, because
 * floats on flex items are ignored to begin with. Scoped to .d-flex so ordinary block card headers
 * keep their clearfix.
 */
.card-header.d-flex::after {
  content: none;
}

/*
 * Pop-up announcement (resources/views/partials/announcement-modal.blade.php).
 *
 * Its own overlay rather than Bootstrap's modal: that one needs JS to open, and this has to be up
 * before anything else on the page is usable — including on a page whose scripts failed to load.
 * Here rather than in a @push('styles'), because the partial is included in the body and the
 * head's stack has already rendered by then.
 */
.ariya-announcement { position: fixed; inset: 0; z-index: 2000;
                      display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ariya-announcement__backdrop { position: absolute; inset: 0; background: rgba(30,12,16,.6); }
.ariya-announcement__panel { position: relative; width: 100%; max-width: 520px; background: #fff;
                             border-radius: 14px; padding: 1.5rem;
                             box-shadow: 0 24px 60px rgba(30,12,16,.28);
                             max-height: 90vh; overflow-y: auto; }
.ariya-announcement__title { font-weight: 700; color: #211d1e; margin-bottom: .75rem; }
.ariya-announcement__body { color: #5f5a5b; line-height: 1.7; }
.ariya-announcement__body a { color: #b40e3a; text-decoration: underline; }
.ariya-announcement__body ul { list-style: disc; padding-left: 1.25rem; }
.ariya-announcement__body ol { list-style: decimal; padding-left: 1.25rem; }
.ariya-announcement__consent { display: flex; align-items: flex-start; gap: .6rem;
                               margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #f0ebeb;
                               font-size: .92em; }
.ariya-announcement__consent input { margin-top: .35rem; }
.ariya-announcement__btn { margin-top: 1.25rem; background: #211d1e; color: #fff; font-weight: 600;
                           padding: .65rem; border-radius: 10px; }
.ariya-announcement__btn:hover { background: #000; color: #fff; }

/* The rich-text editor on the console's announcement composer. */
.rt-toolbar { background: #faf7f7; border: 1px solid #ced4da; border-bottom: 0;
              border-radius: .25rem .25rem 0 0; padding: .25rem; }
.rt-toolbar .btn { padding: .1rem .4rem; font-size: .85rem; }
.rt-editor { min-height: 220px; max-height: 460px; overflow-y: auto; background: #fff;
             border: 1px solid #ced4da; border-radius: 0 0 .25rem .25rem; padding: .5rem .75rem; }
.rt-editor:focus { outline: 0; border-color: #b40e3a; }
.rt-editor a { color: #b40e3a; text-decoration: underline; }
.rt-editor ul { list-style: disc; padding-left: 1.25rem; }
.rt-editor ol { list-style: decimal; padding-left: 1.25rem; }

/* .btn-xs — Bootstrap 3's extra-small button, which 50 buttons across 28 views still ask for.
   Bootstrap 4 / AdminLTE 3 dropped the class without a replacement, so those buttons had been
   rendering at full size since the migration. Same metrics BS3 shipped, in rem. */
.btn-xs, .btn-group-xs > .btn {
  padding: .0625rem .3125rem;
  font-size: .75rem;
  line-height: 1.5;
  border-radius: .2rem;
}

/* ── VAT-detail edit form (report/_tax_vat_edit_modal, shown inside a SweetAlert popup) ──
   The markup is cloned into .swal2-popup, so every rule here has to be global rather than
   travelling with the partial. Scoped to .vat-edit so nothing leaks into the reports behind it.
   Square corners and #b40e3a follow .swal2-popup's own border. */
.vat-edit {
  text-align: left;            /* swal centres its html container */
  font-size: .95rem;
  color: #3d4852;
  /* The gutter the .form-row negative margins below are pulled back into.
     Without it those rows sit .35rem wider than the form on each side, and since
     .swal2-html-container is overflow-x:auto the popup grew a horizontal scrollbar — which
     appeared under the Remark box, the last field, and read as the textarea being too wide.
     It was never the textarea: it is a bare .vat-edit__field and measured exactly the form's
     width. This padding also keeps the two kinds of field flush on the left: a .form-row column
     lands at .35rem (padding - row margin + column padding) and so does a full-width field. */
  padding-left: .35rem;
  padding-right: .35rem;
}
.vat-edit .form-row { margin-left: -.35rem; margin-right: -.35rem; }
.vat-edit .form-row > [class*="col-"] { padding-left: .35rem; padding-right: .35rem; }

/* what is being edited — read-only, so it heads the form instead of sitting among the inputs */
.vat-edit__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 2.5rem;
  padding: .55rem .8rem;
  margin-bottom: 1rem;
  background: #f7f7f9;
  border-left: 3px solid #b40e3a;
}
.vat-edit__meta-item { display: flex; align-items: baseline; gap: .5rem; }
.vat-edit__meta-label {
  font-size: .75rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #8a9199;
}
.vat-edit__meta-value { font-weight: 600; color: #212529; }

.vat-edit__section { margin-bottom: .9rem; }
.vat-edit__legend {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #b40e3a;
  padding-bottom: .25rem;
  margin-bottom: .55rem;
  border-bottom: 1px solid #e6e6ea;
}

.vat-edit__field { margin-bottom: .6rem; }
/* ariya.css already carries `label:not(.form-check-label):not(.custom-file-label){font-weight:700}`,
   which outweighs a single class — hence the extra .vat-edit on these two selectors. */
.vat-edit .vat-edit__field > label {
  display: block;
  margin-bottom: .2rem;
  font-size: .78rem;
  font-weight: 600;
  color: #6c757d;
}
.vat-edit .form-control {
  height: calc(1.5em + .6rem + 2px);
  padding: .3rem .55rem;
  font-size: .95rem;
  border-radius: 0;
  border-color: #ced4da;
}
.vat-edit textarea.form-control { height: auto; }
.vat-edit .form-control:focus {
  border-color: #b40e3a;
  box-shadow: 0 0 0 .15rem rgba(180, 14, 58, .12);
}
/* derived, not typed — say so rather than looking like an input someone forgot to fill */
.vat-edit .form-control[readonly] {
  background-color: #f2f2f4;
  color: #495057;
  border-style: dashed;
}
.vat-edit .input-group-text { border-radius: 0; background: #f7f7f9; }

/* money reads down a column, so the digits line up */
.vat-edit__money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.vat-edit__field--total .vat-edit__money {
  font-weight: 700;
  color: #b40e3a;
  background-color: #fdf3f5;
  border-style: solid;
  border-color: #e8c3ce;
}

.vat-edit__choices { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .9rem; }
.vat-edit__choice { display: inline-flex; align-items: center; gap: .35rem; }
.vat-edit .vat-edit__choice > label {
  margin: 0;
  font-size: .95rem;
  font-weight: 400;
  color: #3d4852;
  text-transform: none;
  cursor: pointer;
}
.vat-edit__choice > input[type="radio"] { margin: 0; cursor: pointer; }
.vat-edit .vat-edit__branchno { width: 5rem; }   /* 5 digits — and it must share the radios' line */

/* Boxes sized to the data they hold, not to their grid column — a 13-digit TAX ID in a
   half-dialog box and a dd/mm/yyyy date stretched to five columns read as empty space.
   max-width, so a narrow phone column can still shrink them. */
.vat-edit #m_taxid { max-width: 11em; }        /* 13 digits */
.vat-edit #m_taxno { max-width: 16em; }        /* the longest tax-invoice numbers seen */
.vat-edit .input-group { max-width: 13em; }    /* dd/mm/yyyy + the calendar button */
.vat-edit__money { max-width: 11em; }          /* 9,999,999.99 with room */

/* Extras the P.P.30 filing form needs on top of the shared .vat-edit block. */
.vat-edit__choices--stack { flex-direction: column; align-items: flex-start; gap: .3rem; }
.vat-edit__required { color: #b40e3a; font-weight: 700; }
.vat-edit__hint {
  margin-top: .2rem;
  font-size: .72rem;
  line-height: 1.35;
  color: #8a9199;
}
.vat-edit__field .vat-edit__choices { margin-top: .3rem; }

/* A section with no legend still has to read as one, so it carries the rule itself. Asked for by
   name rather than inferred with :has(), which would also need the legend'd sections to opt out. */
.vat-edit__section + .vat-edit__section--ruled {
  padding-top: .8rem;
  border-top: 1px solid #e6e6ea;
}

/* The P.P.30 filing form went compact (asked 2026-09-23): its columns shrink to the boxes they
   hold — an 11em money box was sitting alone in half the dialog — so same-line fields stand
   beside each other, and the row/section air roughly halves. Only that form wears the modifier;
   the VAT-detail edit popup keeps the grid above. --wide is for the one column whose radio pair
   must keep to a single line. */
.vat-edit--compact .form-row > [class*="col-"] { flex: 0 1 auto; width: auto; max-width: 15em; }
/* the explicit min-width is what actually holds the radio pair to one line: auto-sizing
   settled the column narrower than the pair's unwrapped width and folded it */
.vat-edit--compact .form-row > .vat-edit__field--wide { min-width: 322px; max-width: 27em; flex-shrink: 0; }
.vat-edit--compact .vat-edit__field--wide .vat-edit__choices { flex-wrap: nowrap; }
.vat-edit--compact .vat-edit__field--wide .vat-edit__choice { white-space: nowrap; }
.vat-edit--compact .vat-edit__choices { gap: .35rem .5rem; }
.vat-edit--compact .vat-edit__meta { padding: .35rem .8rem; margin-bottom: .55rem; }
.vat-edit--compact .vat-edit__section { margin-bottom: .45rem; }
.vat-edit--compact .vat-edit__field { margin-bottom: .3rem; }
.vat-edit--compact .vat-edit__section + .vat-edit__section--ruled { padding-top: .45rem; }
.vat-edit--compact .vat-edit__field .vat-edit__choices { margin-top: .15rem; }

/* Side-by-side fields whose labels wrap to two lines would otherwise sit a line lower than
   their neighbours; the boxes line up when the labels reserve the same height. */
.vat-edit .form-row .vat-edit__field > label { min-height: 2.3em; }

@media (max-width: 575.98px) {
  .vat-edit__meta { gap: .25rem 1rem; }
}

/* Radios wear the brand colour rather than the browser's blue.
   Every radio in the app is a native <input type="radio"> — the .custom-control markup here is
   all custom-switch, never custom-radio — so accent-color reaches all of them without touching a
   single view. Checkboxes are deliberately left alone; they were not part of the ask. */
input[type="radio"] {
  accent-color: #b40e3a;
}

/* Clear (×) inside a search box.
   Registered for every DataTable by layouts/adminlte on init.dt, and used by hand on the
   superadmin console, which builds its filters as a plain GET form. Lives here rather than in
   either layout so the two cannot drift into looking different. */
.dt-clear-wrap { position: relative; display: inline-block; }
.dt-clear-input { padding-right: 22px; }
.dt-clear-x {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: #999; font-weight: bold; line-height: 1; display: none;
}
.dt-clear-x:hover { color: #333; }

/* The site's own red, for text that has to be noticed without being a Bootstrap alert. Used by the
   credit-note guard when the company allows a note over the invoice balance: the reader is still
   told, in the theme's colour rather than an amber that belongs to nothing else on the page. */
.text-brand { color: #b40e3a; }

/* The amount field on a credit note, while the amount is over the reference invoice's balance.

   A class, not an inline style from the guard: .ariyaform-narrow sets the field's border with
   !important, and a jQuery .css() writes an inline declaration WITHOUT it — which loses. That is
   why the border cue never appeared, in either the blocking or the warning state, for as long as
   the guard has existed.

   The class is written twice on purpose. `.ariyaform-narrow input` is one class plus one element,
   which outranks a single class however far down the file it sits; repeating the class makes it
   two classes, which outranks it back. Anchoring to `.ariyaform-narrow` instead would work on the
   domestic books and silently fail on the international ones, whose fields are not inside it.

   Verifying this needs a wait. Bootstrap gives .form-control `transition: border-color .15s`, so
   getComputedStyle read straight after the class lands still reports the OLD colour — the
   transition has not started moving. Two separate investigations concluded the fix did not work
   from exactly that reading. Wait ~300ms, then measure. */
.cn-cap-over.cn-cap-over,
.cn-cap-over.cn-cap-over:focus { border-color: #b40e3a !important; border-bottom-color: #b40e3a !important; }


/* Panels widened past the control they belong to — the Segment column, which shows "001" but lists
   "001 | Bangkok", and Supplier/Client/Payer, which lists a code plus a company name. Widening the
   controls would widen their columns and push the line table sideways, so only the panel grows.

   min-width, fed a px value by assets/ariya/js/dropdown-width.js on select2:open. Neither half of
   that is arbitrary. A percentage is out: the dropdown's containing block is the absolutely
   positioned container select2 appends to <body>, which has NO width of its own (measured 0), so a
   percentage resolves against nothing. And `width` is out: select2 writes its own inline width on
   .select2-dropdown from _resizeDropdown, which runs AFTER the select2:open event relays and also
   re-runs while the panel is open on scroll and resize — anything set there is overwritten moments
   later. min-width is never written by select2 and always wins over a smaller width, so it survives
   every one of those passes. */
.select2-container--dd-wide .select2-dropdown { min-width: var(--dd-w, 10rem); }
/* only where the entries are short enough to fit on one line once widened (Segment); a client name
   set to nowrap would just move the wrapping into a scrollbar inside the panel */
.select2-container--dd-nowrap .select2-results__option { white-space: nowrap; }

/* segment-gate: a segment select pinned by its account's Segmentflg=0 — kept enabled so the
   parallel POST arrays stay aligned, so the cue has to be visual rather than [disabled] */
select.segments[data-gated="1"] + .select2 .select2-selection {
  background: #e9ecef;
  cursor: not-allowed;
}

/* A SweetAlert popup must not narrow the page (asked 2026-10-09, /report/outputvat_add). SweetAlert
   pads the body by a scrollbar's width on open, expecting the page's scrollbar to vanish; this
   layout keeps its scrollbar, so the padding only took 15px off the content and a DataTable — sized
   in pixels when it was drawn — spilled over and grew a horizontal scrollbar under the popup. Its
   inline padding is set without !important, so this wins. */
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { padding-right: 0 !important; }

/* A note under a field in a SweetAlert popup (the Vat 0 Tax Period help, 2026-10-15): smaller than the
   fields. The rule above sets every popup td and span to 1em !important, so this must outrank it. */
.swal2-container td.vat-note, .swal2-container td.vat-note span { font-size: .72rem !important; line-height: 1.3; }

/* The OCR review's Document Type, in a band of its own so it is seen first (asked 2026-10-15):
   it decides which book the document posts to. */
.ocr-doctype { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: .3rem;
  background: #f9e9ee; border: 1px solid #e9b8c6; border-left: 4px solid #b40e3a; font-weight: 600; color: #8a0b2d; }
.ocr-doctype .form-control { border-color: #b40e3a; font-weight: 600; background: #fffafb; color: #5c0a21; }
.ocr-doctype .badge { font-size: .85em; }

/* Switches and checks in the site's maroon, not Bootstrap's blue (asked 2026-10-15 on the OCR type filter;
   every switch is a custom-control, so the theme holds everywhere). */
.custom-control-input:checked ~ .custom-control-label::before { background-color: #b40e3a !important; border-color: #b40e3a !important; }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 .2rem rgba(180, 14, 58, .25) !important; }
.custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: #d98aa0 !important; }
.custom-switch .custom-control-input:focus:not(:checked) ~ .custom-control-label::after { background-color: #d98aa0; }

/* A drag-and-drop file box — the /ocr upload popup's look, for pages outside the OCR bundle
   (the Payroll import, 2026-10-19). */
.file-dropzone { border: 2px dashed #ced4da; border-radius: .5rem; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.file-dropzone:hover, .file-dropzone:focus { border-color: #adb5bd; background: #f8f9fa; outline: none; }
.file-dropzone.is-over, .file-dropzone.is-over:hover { border-color: #b40e3a; background: #fdf2f4; }
.file-dropzone .fa-cloud-upload { font-size: 2.5rem; color: #adb5bd; }
.file-dropzone.is-over .fa-cloud-upload, .file-dropzone.has-file .fa-cloud-upload { color: #b40e3a; }
