/* ============ Custom Fonts ============ */

/* Sarabun (UI Font — self-hosted, no Google Fonts needed) */
@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Regular-thai.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Medium-thai.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Medium-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-SemiBold-thai.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-SemiBold-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Bold-thai.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-Bold-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-ExtraBold-thai.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Sarabun';
  src: url('/assets/fonts/Sarabun-ExtraBold-latin.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Prompt (KBank, Krungthai) - Using provided gstatic URLs for better coverage */
@font-face {
  font-family: 'Prompt';
  src: url('https://fonts.gstatic.com/s/prompt/v12/-W__XJnvUD7dzB2KdNodVkI.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Prompt';
  src: url('https://fonts.gstatic.com/s/prompt/v12/-W__XJnvUD7dzB2KYNod.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Prompt';
  src: url('https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Ck_kIfWMuQ5Q.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Prompt';
  src: url('https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Cv_4IaWMu.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Prompt';
  src: url('https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2C2_8IaWMu.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Prompt';
  src: url('/assets/fonts/Prompt-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Prompt';
  src: url('/assets/fonts/Prompt-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Prompt';
  src: url('/assets/fonts/Prompt-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Prompt';
  src: url('/assets/fonts/Prompt-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Ekachon (Bangkok Bank, SCB) */
@font-face {
  font-family: 'Ekachon';
  src: url('/assets/fonts/ekachon-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ekachon';
  src: url('/assets/fonts/font_medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ekachon';
  src: url('/assets/fonts/font_semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ekachon';
  src: url('/assets/fonts/ekachon-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* FC Paragraph (Custom) */
@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-LIGHT.TTF') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-LIGHTITALIC.TTF') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-MEDIUM.TTF') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-MEDIUMITALIC.TTF') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FC Paragraph';
  src: url('/assets/fonts/FCPARAGRAPH[NON-COMMERCIAL]-BOLDITALIC.TTF') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* SFThonburi (TTB, Krungthai) */
@font-face {
  font-family: 'SFThonburi';
  src: url('/assets/fonts/SFThonburi-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SFThonburi';
  src: url('/assets/fonts/SFThonburi-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SFThonburi';
  src: url('/assets/fonts/SFThonburi-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Kurious (Custom) */
@font-face {
  font-family: 'Kurious';
  src: url('/assets/fonts/kurious-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kurious';
  src: url('/assets/fonts/kurious-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kurious';
  src: url('/assets/fonts/kurious-semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kurious';
  src: url('/assets/fonts/kurious-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* UOB (ธนาคารยูโอบี) */
@font-face {
  font-family: 'UOB';
  src: url('/assets/fonts/Uob_Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'UOB';
  src: url('/assets/fonts/Uob_Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'UOB';
  src: url('/assets/fonts/Uob_SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* KKP (ธนาคารเกียรตินาคินภัทร) */
@font-face {
  font-family: 'KKP';
  src: url('/assets/fonts/KKP_Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KKP';
  src: url('/assets/fonts/KKP_Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KKP';
  src: url('/assets/fonts/KKP_SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KKP';
  src: url('/assets/fonts/KKP_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* BAAC (ธ.ก.ส.) */
@font-face {
  font-family: 'BAAC';
  src: url('/assets/fonts/Baac_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* FC Iconic (SCB) */
@font-face {
  font-family: 'FC Iconic';
  src: url('/assets/fonts/FC Iconic Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* KrungthaiFastWeb (กรุงไทย) */
@font-face {
  font-family: 'KrungthaiFastWeb';
  src: url('/assets/fonts/KrungthaiFastWeb-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KrungthaiFastWeb';
  src: url('/assets/fonts/KrungthaiFastWeb-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KrungthaiFastWeb';
  src: url('/assets/fonts/KrungthaiFastWeb-ExtraBold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Noto Sans Thai (GH Bank / CIMB Thai style) */
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('/assets/fonts/NotoSansThai-thai.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Noto Sans Thai';
  src: url('/assets/fonts/NotoSansThai-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mitr (กรุงศรี Krungsri) */
@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Regular-thai.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Medium-thai.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Medium-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-SemiBold-thai.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-SemiBold-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Bold-thai.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Mitr';
  src: url('/assets/fonts/Mitr-Bold-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Kanit (TrueMoney / CIMB / ทั่วไป) - Using provided gstatic URLs for better coverage */
@font-face { font-family: 'Kanit'; src: url('https://fonts.gstatic.com/s/kanit/v17/nKKZ-Go6G5tXcraVGwCKd6xB.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; src: url('https://fonts.gstatic.com/s/kanit/v17/nKKZ-Go6G5tXcraBGwCKd6xBDFs.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; src: url('/assets/fonts/Kanit-Regular-thai.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; src: url('/assets/fonts/Kanit-Regular-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-Medium-thai.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-Medium-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-SemiBold-thai.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-SemiBold-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-Bold-thai.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Kanit';
  src: url('/assets/fonts/Kanit-Bold-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans Thai (LH Bank / GH Bank style) */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Regular-thai.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Medium-thai.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Medium-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-SemiBold-thai.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-SemiBold-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Bold-thai.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'IBM Plex Sans Thai';
  src: url('/assets/fonts/IBMPlexSansThai-Bold-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --primary-light: rgba(34, 197, 94, 0.1);
  --bg: #f0fdf4;
  --card: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e5e7eb;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --input-bg: #ffffff;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Dark Mode ===== */
body.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --sidebar-bg: #1e293b;
  --sidebar-border: #334155;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --input-bg: #2d3748;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}
body.dark { background: var(--bg); color: var(--text); }
body.dark .header { background: #1e293b !important; border-color: #334155 !important; }
body.dark .page-title { color: #f1f5f9 !important; }
body.dark .card { background: #1e293b !important; color: #f1f5f9 !important; }
body.dark .card-title { color: #f1f5f9 !important; }
body.dark .home-card { background: #1e293b !important; }
body.dark .home-card-title { color: #f1f5f9 !important; }
body.dark .stat-card { background: #1e293b !important; border-color: #334155 !important; }
body.dark .form-input, body.dark .form-select, body.dark textarea {
  background: #2d3748 !important; border-color: #475569 !important; color: #f1f5f9 !important;
}
body.dark .form-label { color: #cbd5e1 !important; }
body.dark .modal-box { background: #1e293b !important; color: #f1f5f9 !important; border-color: #334155 !important; }
body.dark .modal-overlay { background: rgba(0,0,0,0.75) !important; }
body.dark table { background: transparent !important; }
body.dark th { background: #334155 !important; color: #94a3b8 !important; border-color: #475569 !important; }
body.dark td { border-color: #334155 !important; color: #f1f5f9 !important; }
body.dark tr:hover td { background: rgba(255,255,255,0.04) !important; }
body.dark .nav-section-label { color: #64748b !important; }
body.dark .nav-item { color: #cbd5e1 !important; }
body.dark .nav-item:hover { background: rgba(34,197,94,0.1) !important; color: #fff !important; }
body.dark .nav-item.active { background: rgba(34,197,94,0.15) !important; color: #22c55e !important; }
body.dark .acc-trigger { color: #cbd5e1 !important; }
body.dark .acc-trigger:hover { background: rgba(255,255,255,0.06) !important; }
body.dark .acc-sub { color: #94a3b8 !important; }
body.dark .acc-sub:hover { background: rgba(255,255,255,0.06) !important; color: #f1f5f9 !important; }
body.dark .acc-sub.active { background: rgba(34,197,94,0.12) !important; color: #22c55e !important; }
body.dark .admin-section-header:hover { background: rgba(255,255,255,0.06) !important; }
body.dark .sidebar-user { border-bottom-color: #334155 !important; }
body.dark .su-name { color: #f1f5f9 !important; }
body.dark .su-role { color: #64748b !important; }
body.dark .sidebar-bottom { border-top-color: #334155 !important; }
body.dark .btn-outline { border-color: #475569 !important; color: #cbd5e1 !important; }
body.dark .btn-outline:hover { background: #334155 !important; }
body.dark h2, body.dark h3 { color: #f1f5f9 !important; }
body.dark p { color: #94a3b8; }
body.dark .rec-card { background: #1e293b !important; border-color: #334155 !important; }
body.dark .rec-card-title { color: #f1f5f9 !important; }
body.dark input::placeholder, body.dark textarea::placeholder { color: #64748b !important; }

/* Dashboard */
body.dark .dash-welcome { background: #1e293b !important; border-color: #334155 !important; }
body.dark .dash-welcome-title { color: #f1f5f9 !important; }
body.dark .dash-welcome-sub { color: #94a3b8 !important; }
body.dark .dash-section-title { color: #f1f5f9 !important; }
body.dark .dash-sys-card { background: #1e293b !important; border-color: #334155 !important; }
body.dark .dash-sys-name { color: #f1f5f9 !important; }
body.dark .dash-sys-meta { color: #94a3b8 !important; }
body.dark .dash-sys-status.empty { background: #334155 !important; color: #64748b !important; }
body.dark .stat-number { color: #f1f5f9 !important; }
body.dark .stat-label { color: #94a3b8 !important; }

/* User Management panels */
body.dark .add-user-panel,
body.dark .users-list-panel { background: #1e293b !important; border-color: #334155 !important; }
body.dark .panel-title { color: #f1f5f9 !important; }
body.dark .users-table tbody tr.self-row { background: rgba(239,68,68,0.12) !important; }
body.dark .users-table tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
body.dark .users-table td { border-bottom-color: #334155 !important; }
body.dark .self-badge { background: rgba(239,68,68,0.15) !important; color: #f87171 !important; }
body.dark .role-badge.admin { background: rgba(37,99,235,0.2) !important; color: #93c5fd !important; }
body.dark .role-badge.user { background: #334155 !important; color: #94a3b8 !important; }
body.dark .btn-icon { background: #2d3748 !important; border-color: #475569 !important; }
body.dark .btn-icon:hover { background: #334155 !important; }
body.dark .btn-del:hover { border-color: #ef4444 !important; background: rgba(239,68,68,0.15) !important; }

/* Alerts */
body.dark .alert-success { background: rgba(21,128,61,0.2) !important; color: #86efac !important; border-color: rgba(21,128,61,0.3) !important; }
body.dark .alert-error { background: rgba(220,38,38,0.2) !important; color: #fca5a5 !important; border-color: rgba(220,38,38,0.3) !important; }

/* Rec admin hint */
body.dark .rec-admin-hint { background: rgba(34,197,94,0.1) !important; border-color: rgba(34,197,94,0.3) !important; color: #cbd5e1 !important; }

/* Slip context menu */
body.dark #slipCtxMenu { background: #1e293b !important; border-color: #334155 !important; }
body.dark #slipCtxMenu > div { color: #f1f5f9 !important; }
body.dark #slipCtxMenu > div:hover { background: #334155 !important; }

/* IP list modal */
body.dark .ip-list-box { background: #0f172a !important; border-color: #334155 !important; }
body.dark .modal-title { color: #f1f5f9 !important; }

/* Expiry badges */
body.dark .expiry-tbl-badge.expiry-tbl-expired { color: #f87171 !important; }
body.dark .expiry-tbl-badge.expiry-tbl-warn { color: #fbbf24 !important; }
body.dark .expiry-tbl-badge.expiry-tbl-ok { color: #86efac !important; }

body {
  font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Slip canvas image sharpness */
#useSlipCanvas {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
  -ms-interpolation-mode: nearest-neighbor;
}
#useSlipCanvas img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
  -ms-interpolation-mode: nearest-neighbor;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 300px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
}

.content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

/* Sidebar */
.sidebar-logo {
  padding: 16px 24px;
  display: flex;
  align-items: center;
}

.sidebar-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.sidebar-user {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: font-weight: bold;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.nav-item.danger {
  color: var(--primary);
}

.nav-item.danger:hover {
  background: rgba(34, 197, 94, 0.1);
}

/* Header */
.back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.back-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1100px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 32px;
  height: 32px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bank cards */
.bank-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  max-width: 1100px;
}

.bank-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.bank-card:hover {
  box-shadow: var(--shadow-md);
}

.bank-card.hot {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.bank-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.bank-name {
  font-size: 14px;
  font-weight: 600;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bank-card.hot .bank-name {
  color: var(--primary);
}

.flame {
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.login-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 28px;
}

.login-title .red {
  color: var(--primary);
}

.login-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.error-msg {
  color: #dc2626;
  font-size: 14px;
  text-align: center;
  margin-top: 4px;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-field-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12);
}

.form-input:disabled {
  background: var(--bg);
  cursor: not-allowed;
}

.form-input[type="number"] {
  -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-input {
  padding-right: 44px;
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* KBank page */
.kbank-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.slip-preview {
  width: 340px;
  flex-shrink: 0;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.kbank-form {
  flex: 1;
  min-width: 0;
}

.section-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* Slip preview styles */
.slip-header {
  background: #fff;
  padding: 20px 24px 16px;
}

.slip-success {
  font-size: 20px;
  font-weight: 800;
  color: #16a34a;
}

.slip-kplus {
  font-size: 22px;
  font-weight: 900;
  color: #16a34a;
}

.slip-kplus span {
  color: var(--primary);
}

.slip-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.slip-divider {
  height: 1px;
  background: var(--border);
  margin: 0 24px;
}

.slip-body {
  background: #fff;
  padding: 20px 24px;
  position: relative;
}

.slip-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.klogo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.klogo-inner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1B9935;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slip-name {
  font-size: 14px;
  font-weight: 600;
}

.slip-bank {
  font-size: 12px;
  color: var(--text-muted);
}

.slip-acc {
  font-size: 12px;
  color: var(--text-muted);
}

.slip-arrow {
  display: flex;
  justify-content: center;
  margin: 4px 0;
  color: var(--text-muted);
}

.slip-footer {
  background: #fff;
  padding: 16px 24px 20px;
}

.slip-txn-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.slip-txn {
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.slip-amount-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 2px;
}

.slip-amount {
  font-size: 22px;
  font-weight: 800;
}

.slip-fee-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.slip-fee {
  font-size: 14px;
  font-weight: 500;
}

.slip-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.qr-box {
  width: 76px;
  height: 76px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  flex-shrink: 0;
}

/* File input */
.file-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: background 0.15s;
}

.file-label:hover {
  background: #e5e7eb;
}

.file-name {
  font-size: 13px;
  color: var(--text-muted);
}

/* Disabled page notice */
.disabled-page-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.disabled-page-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.disabled-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.disabled-page-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Disabled page tab */
.page-tab-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Expiry Badge ===== */
.expiry-badge {
  margin: 0 12px 12px;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

.expiry-icon-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expiry-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.expiry-info {
  flex: 1;
  min-width: 0;
}

.expiry-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.expiry-date {
  font-size: 11px;
  margin-top: 1px;
  opacity: 0.75;
}

.expiry-days-bar {
  height: 3px;
  border-radius: 2px;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.expiry-days-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s;
}

/* OK — green */
.expiry-ok {
  background: #f0fdf4;
  border-left-color: #22c55e;
  color: #15803d;
}

.expiry-ok .expiry-icon-wrap {
  background: #dcfce7;
  color: #16a34a;
}

.expiry-ok .expiry-days-bar-fill {
  background: #22c55e;
}

/* Yellow warning */
.expiry-yellow {
  background: #fefce8;
  border-left-color: #eab308;
  color: #854d0e;
}

.expiry-yellow .expiry-icon-wrap {
  background: #fef9c3;
  color: #a16207;
}

.expiry-yellow .expiry-days-bar-fill {
  background: #eab308;
}

/* Red warning */
.expiry-warn {
  background: #fff7ed;
  border-left-color: #f97316;
  color: #9a3412;
}

.expiry-warn .expiry-icon-wrap {
  background: #ffedd5;
  color: #c2410c;
}

.expiry-warn .expiry-days-bar-fill {
  background: #f97316;
}

/* Expired */
.expiry-expired {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b;
}

.expiry-expired .expiry-icon-wrap {
  background: #fee2e2;
  color: #dc2626;
}

.expiry-expired .expiry-days-bar-fill {
  background: #ef4444;
  width: 100% !important;
}

/* Sidebar additions */
.nav-section-label {
  padding: 8px 12px 2px 12px;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item.sub {
  font-size: 13px;
  padding: 8px 12px;
}

.nav-item.sub svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.nav-item.sub.active svg {
  opacity: 1;
}

/* Accordion sidebar menu */
.acc-group {
  margin-bottom: 2px;
}

.acc-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.acc-trigger:hover {
  background: var(--primary-light);
}

.acc-group.open .acc-trigger {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
}

.acc-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.6;
}

.acc-icon svg {
  width: 20px;
  height: 20px;
}

.acc-group.open .acc-icon {
  opacity: 1;
}

.acc-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s;
}

.acc-chevron svg {
  width: 16px;
  height: 16px;
}

.acc-group.open .acc-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.acc-body {
  display: none;
  padding: 2px 8px 4px 16px;
  border-left: 2px solid var(--primary-light);
  margin-left: 20px;
  margin-bottom: 2px;
}

.acc-group.open .acc-body {
  display: block;
}

.acc-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.acc-sub svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.acc-sub:hover {
  background: #f3f4f6;
  color: var(--text);
}

.acc-sub.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.acc-sub.active svg {
  opacity: 1;
}

/* Slip text elements (use page) */
.slip-text-elem {
  pointer-events: none;
}

.elem-logo {
  display: none;
}

/* ===== Dashboard ===== */
.dash-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.dash-welcome-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.dash-welcome-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.dash-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.dash-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.dash-systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dash-sys-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.dash-sys-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dash-sys-name {
  font-size: 14px;
  font-weight: 700;
}

.dash-sys-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
}

.dash-sys-status.configured {
  background: #dcfce7;
  color: #16a34a;
}

.dash-sys-status.empty {
  background: #f3f4f6;
  color: #9ca3af;
}

.dash-sys-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.dash-sys-actions {
  display: flex;
  gap: 8px;
}

.dash-sys-actions .btn {
  flex: 1;
}

/* ===== User Management ===== */
.user-mgmt-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.add-user-panel,
.users-list-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.users-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f9fafb;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.users-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.users-table tbody tr:hover {
  background: #fafafa;
}

.users-table tbody tr.self-row {
  background: #fef2f2;
}

.user-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}

.self-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  background: #fef2f2;
  color: var(--primary);
  border-radius: 8px;
  padding: 2px 6px;
  margin-left: 6px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.role-badge.admin {
  background: #dbeafe;
  color: #2563eb;
}

.role-badge.user {
  background: #f3f4f6;
  color: #6b7280;
}

.user-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: #f3f4f6;
}

.btn-del:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

/* ===== Alert messages ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-username {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

@media (max-width:900px) {
  .user-mgmt-layout {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .kbank-layout {
    flex-direction: column;
  }

  .slip-preview {
    width: 100%;
  }

  .content {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .cards-grid,
  .bank-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Recommendation Cards (home page) ===== */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.rec-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}

.rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.rec-card-img {
  height: 110px;
  overflow: hidden;
  background: #f9fafb;
}

.rec-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-card-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-card-body {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.rec-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
  flex: 1;
}

.rec-card-link-icon {
  color: #22c55e;
  flex-shrink: 0;
}

.rec-admin-hint {
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* Slip right-click context menu */
#slipCtxMenu {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  overflow: hidden;
}

#slipCtxMenu>div {
  padding: 10px 16px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  user-select: none;
}

#slipCtxMenu>div:hover {
  background: #f3f4f6;
}