

body {
    font-family: "IBM Plex Sans Thai", sans-serif;
}

:root {
    --clg1: #cbe6e7;
    --clg2: #00e9ed;
    --clg3: #16abad;
    --clg4: #003838;
    --clr1: #fff8cd;
    --clr2: #f08080;
    --clr3: #800000;
    --clw: #ffffff;
    --clb: #000000;
}




Ybutton {
    background-color: var(--clg2);
    color: var(--clb);
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding-right: 40px;
}
.rah-notice { margin: 1rem 0; padding: .75rem; border: 1px solid #2dd4bf; border-radius: .5rem; background: #134e4a; color: #f0fdfa; font-size: .95rem; }
.rah-notice:empty { display: none; }
.rah-account, .rah-pagination { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: .75rem; }
.rah-account button, .rah-pagination button { background: #0f766e; color: white; border-radius: .4rem; padding: .4rem .8rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select { color: #111827; background-color: #e5e7eb; }
input:disabled, textarea:disabled { background-color: #9ca3af; }
.rah-customer-main form > .flex { flex-wrap: wrap; }
.rah-delete, .rah-restore { color: white; padding: .4rem .75rem; border-radius: .4rem; cursor: pointer; }
.rah-delete { background: #b91c1c; }
#csvFile { display: block; max-width: 100%; padding: .5rem; color: #bfdbfe; background: #172554; border: 1px solid #60a5fa; border-radius: .5rem; }
#csvFile::file-selector-button { margin-right: .75rem; padding: .5rem .85rem; color: #172554; background: #fbbf24; border: 0; border-radius: .35rem; font-weight: 600; cursor: pointer; }
#csvFile::file-selector-button:hover { background: #fde68a; }
#csvFile:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }
#csvFile:disabled { opacity: .6; }
.rah-body-picture { padding: 1rem; border: 1px solid #475569; border-radius: .75rem; background: #111827; }
.rah-body-image { display: block; max-width: 100%; max-height: 340px; object-fit: contain; margin: .75rem auto; border-radius: .5rem; }
.rah-body-image[hidden] { display: none; }
.rah-body-preview-button { color: #5eead4; text-decoration: underline; cursor: pointer; padding: .25rem; }
.rah-body-preview-button[aria-pressed=true] { background: #0f766e; color: white; border-radius: .25rem; }
.rah-diamond-table tbody tr:nth-child(odd) { background-color: #111827; }
.rah-diamond-table tbody tr:nth-child(even) { background-color: #1e293b; }
.rah-diamond-table tbody tr:hover { background-color: #334155; }
.rah-filter-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 28px; height: 28px; margin-right: 4px; border: 1px solid transparent; border-radius: 4px; color: #94a3b8; cursor: pointer; }
.rah-filter-icon:hover, .rah-filter-icon:focus-visible { color: #f0fdfa; border-color: #2dd4bf; }
.rah-filter-icon.is-active { color: #042f2e; background: #2dd4bf; }
.rah-filter-popup { position: fixed; margin: 0; width: max-content; min-width: 140px; max-width: calc(100vw - 16px); max-height: min(420px, calc(100vh - 16px)); overflow-y: auto; padding: 8px; border: 1px solid #475569; border-radius: 8px; background: #1e293b; color: #f1f5f9; box-shadow: 0 8px 24px #0006; }
.rah-filter-popup::backdrop { background: transparent; }
.rah-filter-popup strong { display: block; padding: 8px; }
.rah-filter-popup button { display: block; width: 100%; padding: 8px 12px; text-align: left; border-radius: 4px; cursor: pointer; }
.rah-filter-popup button:hover, .rah-filter-popup button:focus-visible { background: #334155; }
.rah-filter-popup button[aria-pressed=true] { background: #0f766e; color: white; }
.rah-diamond-multi-choices { max-height: 250px; overflow-y: auto; }
.rah-diamond-multi-choices label { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; }
.rah-diamond-multi-choices input { width: 17px; height: 17px; margin: 0; accent-color: #0f766e; }
.rah-diamond-multi-actions { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid #94a3b8; }
.rah-filter-popup.rah-diamond-multi .rah-diamond-multi-actions button { width: auto; text-align: center; color: white; background: #475569; }
.rah-filter-popup.rah-diamond-multi .rah-diamond-multi-actions button:first-child { background: #0f766e; }
.rah-filter-popup.rah-diamond-multi .rah-diamond-multi-actions button:nth-child(2) { background: #b91c1c; }
.rah-filter-popup.rah-diamond-multi .rah-diamond-multi-actions button:hover { filter: brightness(1.15); }
.rah-password-field { position: relative; }
.rah-password-field #password { padding-right: 52px; min-height: 44px; }
.rah-password-field .rah-password-toggle { position: absolute; right: 2px; top: 0; bottom: 0; width: 44px; display: flex; align-items: center; justify-content: center; color: #0f766e; background: transparent; border-radius: 4px; cursor: pointer; }
.rah-password-field .rah-password-toggle:focus-visible { outline: 2px solid #0f766e; outline-offset: -3px; }
.rah-restore { background: #0f766e; }
.rah-product-form { width: calc(100% - 2rem); margin: 0 auto; }
.rah-product-main > .rah-account, .rah-product-main > .rah-notice, .rah-product-main > section { margin-left: 1rem; margin-right: 1rem; }
.rah-product-top-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .5rem 1rem; border-radius: .75rem .75rem 0 0; background: #14b8a6; color: white; }
.rah-product-top-button:hover, .rah-product-save:hover { background: #dc2626; }
.rah-product-input, #productDetails select:not([hidden]), #productDetails textarea, #productDetails input:not([type=radio]):not([hidden]) { width: 100%; padding: .5rem .75rem; border: 1px solid #d1d5db; border-radius: .25rem; box-shadow: 0 1px 2px #0002; }
.rah-product-input:focus, #productDetails select:focus, #productDetails textarea:focus { outline: 2px solid #14b8a6; outline-offset: 1px; }
.rah-product-code { display: block; margin-top: .25rem; padding: .5rem .75rem; color: #7f1d1d; background: #9ca3af; border: 1px solid #d1d5db; border-radius: .25rem; }
.rah-product-options { grid-column: 1 / -1; padding: 1rem; background: #1f2937; border: 1px solid #4b5563; border-radius: .25rem; }
.rah-product-save, .rah-product-reset { padding: .5rem 2rem; color: white; border-radius: 0 0 .75rem .75rem; cursor: pointer; }
.rah-product-save { background: #14b8a6; }
.rah-product-reset { background: #b91c1c; }
.rah-product-main input[type=file]::file-selector-button { padding: .5rem 1rem; margin-right: 1rem; background: #f0fdfa; color: #0f766e; border: 0; border-radius: .25rem; cursor: pointer; }
.rah-deleted-filter { display: flex; gap: .5rem; align-items: center; margin: 1rem; }
#staffBadge { max-width: 6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .rah-customer-main form, .rah-customer-list form, .rah-customer-list > .flex { max-width: calc(100% - 1rem); }
  .rah-customer-list > .flex { flex-wrap: wrap; gap: .75rem; }
  .rah-customer-main form > .flex > button { padding-left: .75rem; padding-right: .75rem; }
  .rah-customer-main .rah-account { gap: .5rem; }
  nav { font-size: .75rem; }
}

.rah-list-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.rah-home-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .5rem 1rem; border-radius: .5rem; background: #0d9488; color: #fff; text-decoration: none; }
.rah-home-button:hover { background: #0f766e; }
.rah-home-button:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }

/* Payment slip chooser: visible upload action and filename. */
.rah-slip-input { width:100%; max-width:100%; border:2px solid #2dd4bf; border-radius:8px; padding:8px; background:#134e4a; color:#f0fdfa; }
.rah-slip-input::file-selector-button { background:#fbbf24; color:#1f2937; border:0; border-radius:6px; padding:10px 14px; margin-right:10px; font-weight:700; cursor:pointer; }
.rah-slip-input::file-selector-button:hover { background:#fcd34d; }
.rah-slip-input:focus-visible { outline:3px solid #fbbf24; outline-offset:3px; }

/* Consistent list-page workflow links. */
.rah-workflow-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;width:100%;margin:16px 0 20px}
.rah-workflow-links{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;flex:1}
.rah-workflow-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-left:auto}
.rah-workflow-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1px solid #64748b;border-radius:8px;background:#334155;color:#f1f5f9;text-decoration:none;white-space:nowrap}
.rah-workflow-link:hover{background:#475569;border-color:#2dd4bf}
.rah-workflow-link:focus-visible{outline:2px solid #5eead4;outline-offset:3px}
.rah-bill-list-title{width:calc(100% - 5rem);margin:0 auto;padding-top:16px}
.rah-remaining{color:#facc15!important;font-weight:600}
@media(max-width:700px){.rah-workflow-nav{gap:12px}.rah-workflow-links{order:3;flex-basis:100%;justify-content:flex-start}.rah-workflow-actions{margin-left:auto}.rah-workflow-link{flex:1 1 auto}.rah-bill-list-title{width:calc(100% - 2rem)}}

/* Shared list sections: teal heading, blue filter panel, striped data surface. */
.rah-list-page { background:#0b1220; color:#e2e8f0; }
.rah-list-page .rah-list-header { width:100%; max-width:none; margin:0 0 20px; padding:20px 22px; border:1px solid #267b7a; border-top:3px solid #2dd4bf; border-radius:14px; background:linear-gradient(115deg,#134e4a,#12323f); box-shadow:0 6px 20px #0002; gap:16px; flex-wrap:wrap; }
.rah-list-header h1,.rah-list-header h2 { margin:0; color:#f0fdfa; font-size:1.4rem; line-height:1.4; font-weight:700; }
.rah-list-header .rah-workflow-nav { margin:16px 0 0; }
.rah-list-header .rah-workflow-link { background:#153d49; border-color:#397078; }
.rah-list-header .rah-workflow-link:hover { background:#205462; }
.rah-list-page .rah-product-top-button { border-radius:8px; background:#0f766e; }
.rah-list-page .rah-product-top-button:hover { background:#115e59; }
.rah-list-page .rah-list-filters { position:relative; width:100%; max-width:none; margin:16px 0 20px; padding:18px 20px 20px; background:#18263b; border:1px solid #3c536f; border-radius:12px; box-shadow:0 3px 12px #0002; }
.rah-list-filters::before { content:'ตัวกรอง / Filters'; display:block; grid-column:1 / -1; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid #354b65; color:#93c5fd; font-size:14px; font-weight:600; letter-spacing:.02em; }
.rah-list-page .rah-list-filters label { color:#cbd5e1; }
.rah-list-page .rah-list-filters input:not([type=checkbox]):not([type=radio]),.rah-list-page .rah-list-filters select { min-width:0; max-width:100%; min-height:42px; border:1px solid #94a3b8; border-radius:7px; background:#f1f5f9; color:#0f172a; }
.rah-list-filters input:focus-visible,.rah-list-filters select:focus-visible { outline:2px solid #2dd4bf; outline-offset:2px; }
.rah-list-filters button { border-radius:7px; min-height:38px; }
.rah-list-filters > .flex { flex-wrap:wrap; gap:12px; }
.rah-list-page .rah-list-table-wrap { max-width:100%; margin:18px 0; overflow-x:auto; border:1px solid #3a5266; border-radius:12px; background:#111f30; box-shadow:0 4px 16px #0002; }
.rah-list-page .rah-list-table { width:100%; border-collapse:separate; border-spacing:0; color:#e2e8f0; font-size:14px; }
.rah-list-table thead,.rah-list-table thead tr,.rah-list-table th { background:#194653; color:#ccfbf1; }
.rah-list-table th { padding:14px 16px; border-bottom:2px solid #388387; font-weight:600; text-transform:none; white-space:nowrap; }
.rah-list-table td { padding:13px 16px; border-bottom:1px solid #2b3d51; vertical-align:middle; }
.rah-list-page .rah-list-table tbody tr:nth-child(odd) { background:#111f30; }
.rah-list-page .rah-list-table tbody tr:nth-child(even) { background:#1c2d41; }
.rah-list-page .rah-list-table tbody tr:hover { background:#284659; }
.rah-list-table tbody tr:last-child td { border-bottom:0; }
.rah-list-table .rah-filter-icon { color:#a5d8dc; border-color:#47727c; background:#123641; }
.rah-list-table .rah-filter-icon.is-active { background:#2dd4bf; color:#042f2e; border-color:#5eead4; }
.rah-list-page .rah-pagination,.rah-list-page .rah-list-pager { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 16px; background:#142235; border:1px solid #34475f; border-radius:10px; margin:14px 0; }
.rah-list-page .rah-account { color:#94a3b8; font-size:13px; }
.rah-list-page > hr,.rah-list-page > div > hr { display:none; }
.rah-list-page .rah-notice:empty { display:none; }
.rah-list-page.rah-customer-list,.rah-list-page:has(.rah-bill-list-title) { padding:20px; }
.rah-list-page button:disabled { opacity:.45; cursor:not-allowed; }
@media(max-width:700px) {
 .rah-list-page .rah-list-header { padding:16px; border-radius:10px; }
 .rah-list-header h1,.rah-list-header h2 { font-size:1.2rem; }
 .rah-list-page .rah-list-filters { padding:14px; }
 .rah-list-page.rah-customer-list,.rah-list-page:has(.rah-bill-list-title) { padding:12px; }
 .rah-list-page .rah-list-table th,.rah-list-page .rah-list-table td { padding:12px; }
 .rah-list-header > div { max-width:100%; }
 .rah-list-page .rah-list-pager { padding:10px; gap:8px; }
}

.rah-correction-panel { margin:24px 0; padding:20px; border:1px solid #64748b; border-top:3px solid #fbbf24; border-radius:12px; background:#142235; }
.rah-correction-panel h2 { color:#fcd34d; font-size:1.2rem; font-weight:600; margin-bottom:12px; }
.rah-correction-panel h3 { color:#99f6e4; font-weight:600; }
.rah-correction-form { display:grid; gap:12px; margin:18px 0; padding:16px; border:1px solid #475569; border-radius:8px; }
.rah-correction-form label { display:block; }
.rah-correction-form input,.rah-correction-form select { display:block; width:100%; padding:10px; margin-top:4px; border-radius:6px; }
.rah-correction-form button { justify-self:start; padding:10px 16px; }
.rah-correction-panel details { padding:12px 0; border-top:1px solid #475569; }

/* Compact customer-facing engraving reference in each bill product. */
.rah-bill-engraving { margin:4px 0 8px; padding:6px 8px; color:#cbd5e1; font-size:10px; line-height:1.4; overflow-wrap:anywhere; }
.rah-bill-engraving p { margin:2px 0; }
.rah-bill-engraving .rah-bill-engraving-text { width:fit-content; max-width:100%; background:#6b7280; border-radius:6px; padding:6px 10px; font-size:18px; line-height:1.8; color:#ffffff; white-space:pre-wrap; }
.rah-bill-engraving-note { font-size:10px; line-height:1.8; padding:3px 0; color:#facc15; }
.rah-bill-item-total { font-weight:700; }
.rah-bill-discount { font-size:11px; line-height:1.8; padding:4px 0 6px; align-items:baseline; }
.rah-bill-discount > span { display:block; line-height:1.8; }
.rah-bill-payment { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:10px 0; border-bottom:1px solid #475569; }
.rah-bill-payment-details { min-width:0; overflow-wrap:anywhere; font-size:12px; }
.rah-bill-payment-details p { margin:2px 0; }
.rah-bill-payment-amount { flex-shrink:0; text-align:right; font-weight:600; }
.rah-bill-remaining { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-top:16px; padding-top:12px; border-top:1px solid #64748b; }
.rah-bill-remaining #billRemain { color:#facc15; font-weight:700; text-align:right; }
.rah-summary-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid #374151; padding-bottom:8px; margin-bottom:12px; }
.rah-receipt-print { padding:6px 10px; border-radius:6px; background:#0f766e; color:white; font-size:12px; cursor:pointer; }
.rah-receipt-print:focus-visible { outline:2px solid #5eead4; outline-offset:2px; }
.rah-receipt-print:disabled { opacity:.5; cursor:wait; }
