@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&display=swap');
/* Shared typography, including login screens and dialogs rendered in portals.
   Override legacy utility/inline weights; only main headings stay bold. */
body, body * {font-weight:400!important}
.crm-language-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:8px;border:1px solid #e5e7eb;border-radius:10px;background:white;color:#4b5563;cursor:pointer}
.crm-language-toggle:hover{background:#f3f4f6}.crm-language-toggle:focus-visible{outline:2px solid var(--crm-primary,#0AADA9);outline-offset:2px}
body h1, body h1 *, body [role="heading"][aria-level="1"], body [role="heading"][aria-level="1"] * {font-weight:700!important}
.crm-settings{max-width:1120px;margin:auto;color:#172033;font-family:var(--crm-font,'Anuphan',sans-serif)}
.crm-intro{margin-bottom:20px}.crm-intro h1{font-size:24px;font-weight:700;margin:0 0 6px}.crm-intro p{color:#64748b;margin:0;line-height:1.6}
.crm-search{width:100%;background:#fff;border:1px solid #dce6e7;border-radius:12px;padding:12px 16px;min-height:44px}
.crm-tabs,.crm-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.crm-tabs button,.crm-actions button{padding:10px 16px;border:1px solid #dce6e7;border-radius:10px;background:white;font-weight:600;min-height:44px}
.crm-tabs button[aria-pressed=true],.crm-actions .crm-save{background:#087f7c;color:#fff;border-color:#087f7c}
.crm-settings h2{font-size:16px;font-weight:650;margin:20px 0 10px}.crm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}
.crm-settings-card{display:flex;align-items:center;gap:14px;text-align:left;padding:20px;border:1px solid #dce6e7;background:#fff;border-radius:var(--crm-radius,12px);min-height:76px;box-shadow:0 2px 8px #17203305}
.crm-settings-card svg{color:#087f7c;flex-shrink:0}.crm-settings-card span:first-of-type{flex:1}.crm-settings-card:hover{border-color:#0aada9;box-shadow:0 4px 12px #0aada915}
.crm-settings button:focus-visible,.crm-settings input:focus-visible,.crm-settings select:focus-visible{outline:3px solid #0aada9;outline-offset:3px}
.crm-field{display:flex;flex-direction:column;gap:8px;background:white;padding:16px;border:1px solid #dce6e7;border-radius:12px;min-width:0}.crm-field>span{font-size:13px;font-weight:600}
.crm-field input,.crm-field select{width:100%;min-height:44px;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:white}.crm-field input[type=color]{padding:3px}
.crm-preview{display:grid;grid-template-columns:200px 1fr;min-height:200px;overflow:hidden;border:1px solid #dce6e7;margin:20px 0}.crm-preview aside,.crm-preview>div{padding:24px}.crm-preview aside{font-weight:600}.crm-preview h2{font-size:1.4em}.crm-preview p{margin:12px 0}.crm-preview-action{display:inline-block;font-weight:600}
.crm-notice{padding:12px 16px;background:#e6f7f7;color:#075e5b;border-radius:10px;margin:12px 0;line-height:1.6}.crm-error{padding:12px;color:#991b1b;background:#fef2f2;border-radius:10px;margin:12px 0}
.crm-settings button:disabled{opacity:.45;cursor:not-allowed}.kc-app{font-family:var(--crm-font,'Anuphan','Inter','Segoe UI',sans-serif)!important;background-color:var(--crm-background,#F5F7FA)!important;font-size:var(--crm-font-size,14px)}
.kc-sidebar{background-color:var(--crm-sidebar,#0EA5A0)!important}.kc-sidebar nav button{color:var(--crm-sidebar-ink,white)!important}
.kc-sidebar .text-white,.kc-sidebar nav span{color:var(--crm-sidebar-ink,white)!important}
.kc-app .text-sm{font-size:var(--crm-font-size,14px)}.kc-app .text-xs{font-size:calc(var(--crm-font-size,14px) - 2px)}
.kc-app td{padding-top:var(--crm-row-padding);padding-bottom:var(--crm-row-padding)}
.kc-app .bg-white.rounded-xl{border-radius:var(--crm-radius,12px)}
@media(max-width:640px){.crm-preview{grid-template-columns:1fr}.crm-preview aside{padding:14px 20px}.crm-actions button{flex:1}.crm-intro h1{font-size:21px}.crm-settings-card{padding:16px}}
.crm-master-table{width:100%;border-collapse:collapse;min-width:620px}.crm-master-table td,.crm-master-table th{padding:var(--crm-row-padding,12px);text-align:left;border-bottom:1px solid #e5e7eb}.crm-master-form{margin-top:20px;padding:20px;border:1px solid #cbd5e1;border-radius:var(--crm-radius,12px);background:white}.crm-master-table button{color:var(--crm-primary,#0AADA9);font-weight:600}
.crm-table-scroll{max-width:100%;overflow-x:auto;margin-top:16px}.crm-settings textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px}.crm-settings input[type=checkbox]{min-height:20px;width:20px;accent-color:var(--crm-primary,#0AADA9)}.crm-settings fieldset label{display:flex;align-items:center;gap:8px}.crm-settings .crm-master-table td{max-width:360px;overflow-wrap:anywhere}

.crm-breadcrumb button{background:transparent;border:0;border-radius:4px;padding:4px;cursor:pointer;color:inherit;white-space:nowrap}.crm-breadcrumb button:hover{color:var(--crm-primary,#0AADA9);text-decoration:underline}.crm-breadcrumb button:focus-visible{outline:2px solid var(--crm-primary,#0AADA9);outline-offset:2px}
.crm-personal-workspace{background:var(--crm-surface,#fff);color:var(--crm-surface-ink,#172033);border:1px solid var(--crm-border,#dce6e7);border-radius:var(--crm-radius,12px);padding:24px;margin:0 0 24px;box-shadow:var(--crm-shadow,none)}
.crm-personal-workspace>h2{margin:0 0 8px}.crm-personal-workspace>p{line-height:1.6;margin-bottom:16px}.crm-personal-enable{display:flex;gap:10px;align-items:center;margin:16px 0}.crm-personal-workspace fieldset{border:0;padding:0;margin:0;min-width:0}.crm-personal-workspace fieldset:disabled{opacity:.55}
.crm-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-bottom:20px}.crm-preset-grid button{background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#dce6e7);border-radius:12px;padding:14px;text-align:left;color:inherit;min-height:90px;cursor:pointer}.crm-preset-grid button[aria-pressed=true]{outline:2px solid var(--crm-primary,#0AADA9);outline-offset:-2px}.crm-preset-swatches{display:flex;height:28px;overflow:hidden;border-radius:6px;margin-bottom:10px;border:1px solid #dce6e7}.crm-preset-swatches i{flex:1}.crm-color-control{display:flex;align-items:center;gap:8px}.crm-color-control input[type=color]{width:42px;flex-shrink:0;border:0;padding:0}.crm-color-control input[type=text]{min-width:0}.crm-personal-preview{display:grid;grid-template-columns:130px 1fr;gap:20px;padding:20px;margin-top:20px;border:1px solid;border-radius:12px}.crm-personal-preview aside,.crm-personal-preview>div{padding:20px}.crm-personal-preview p{margin:12px 0}.crm-personal-preview span{display:inline-block;padding:10px 16px}
.crm-workspace-overlay{position:fixed;inset:0;z-index:500;background:#0f172a80;display:flex;align-items:center;justify-content:center;padding:20px}.crm-workspace-dialog{width:min(1120px,100%);max-height:90vh;overflow:auto;overscroll-behavior:contain;background:var(--crm-background,#f7fafa);padding:20px;border-radius:16px}.crm-workspace-close{display:block;margin:0 0 12px auto;padding:8px 18px;background:white;color:#172033;border:1px solid #dce6e7;border-radius:8px}.crm-workspace-dialog .crm-personal-workspace{margin:0}
@media screen{
 html[data-crm-personal=true] .kc-app{color:var(--crm-background-ink)}
 html[data-crm-personal=true] .kc-app :is(.bg-white.rounded-xl,.bg-white.rounded-2xl,.bg-white.rounded-lg,.crm-settings-card,.crm-field,.crm-master-form){background-color:var(--crm-surface)!important;color:var(--crm-surface-ink);border-color:var(--crm-border)!important;border-radius:var(--crm-radius)!important;box-shadow:var(--crm-shadow)!important}
 html[data-crm-personal=true] .crm-settings{color:var(--crm-background-ink)}
 html[data-crm-personal=true] .kc-app :is(.bg-white.rounded-xl,.bg-white.rounded-2xl,.bg-white.rounded-lg) :is(.text-gray-900,.text-gray-800,.text-gray-700,.text-gray-600,.text-gray-500){color:var(--crm-surface-ink)!important}
 html[data-crm-personal=true] .crm-settings :is(input,select,textarea){background-color:var(--crm-surface);color:var(--crm-surface-ink);border-color:var(--crm-border)}
 html[data-crm-personal=true] .crm-actions .crm-save{background:var(--crm-primary);color:var(--crm-primary-ink);border-color:var(--crm-primary)}
 html[data-crm-personal=true] .kc-app .crm-master-table :is(td,th){border-color:var(--crm-border)}
}
@media(max-width:640px){.crm-workspace-overlay{padding:8px}.crm-workspace-dialog{padding:10px;max-height:95vh}.crm-personal-workspace{padding:16px}.crm-personal-preview{grid-template-columns:1fr;gap:12px;padding:12px}.crm-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen{html[data-crm-personal=true] .kc-app .text-gray-900{color:var(--crm-background-ink)!important}html[data-crm-personal=true] .kc-app :is(.bg-white.rounded-xl,.bg-white.rounded-2xl,.bg-white.rounded-lg) .text-gray-900{color:var(--crm-surface-ink)!important}html[data-crm-personal=true] .crm-tabs button[aria-pressed=true]{background:var(--crm-primary);color:var(--crm-primary-ink);border-color:var(--crm-primary)}html[data-crm-personal=true] .crm-settings-card svg{color:var(--crm-primary)}}

/* Account 360-style category overview; scoped to the settings landing page. */
.crm-settings-hub{max-width:1440px;width:100%;padding:8px 0 24px}
.crm-hub-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px}
.crm-hub-header .crm-intro{margin:0}.crm-hub-header h1{font-size:30px;margin-bottom:12px}.crm-hub-header p{font-size:14px}
.crm-hub-role{border:1px solid var(--crm-border,#dce6e7);border-radius:24px;padding:10px 16px;font-size:13px;white-space:nowrap;color:inherit}
.crm-hub-search{display:flex;align-items:center;gap:12px;max-width:760px;padding:8px 16px;border:1px solid var(--crm-border,#dce6e7);border-radius:12px;background:var(--crm-surface,#fff);color:var(--crm-surface-ink,#64748b);margin-bottom:24px}
.crm-hub-search svg{flex-shrink:0}.crm-hub-search .crm-search{border:0;min-width:0;padding:8px 0;background:transparent;color:inherit;font-size:14px}
.crm-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.crm-category-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;min-height:228px;padding:22px;border:1px solid var(--crm-border,#dce6e7);border-radius:var(--crm-radius,14px);background:var(--crm-surface,#fff);color:var(--crm-surface-ink,#172033);box-shadow:var(--crm-shadow,none);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.crm-category-card:hover{border-color:var(--crm-primary,#0AADA9);box-shadow:0 4px 16px #1720330a}
.crm-category-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:13px;margin-bottom:16px;background:#e6f7f7;color:#087f7c}
.crm-category-icon[data-tone="0"],.crm-category-icon[data-tone="3"]{background:#eff6ff;color:#2563eb}.crm-category-icon[data-tone="2"],.crm-category-icon[data-tone="5"]{background:#f5f3ff;color:#7c3aed}.crm-category-icon[data-tone="4"]{background:#fffbeb;color:#a16207}
.crm-category-title{font-size:16px;line-height:1.6;margin-bottom:8px;overflow-wrap:anywhere}
.crm-category-description{font-size:14px;line-height:1.7;color:var(--crm-surface-ink,#64748b);margin-bottom:24px;overflow-wrap:anywhere}
.crm-category-action{display:flex;align-items:center;gap:12px;margin-top:auto;color:var(--crm-primary,#087f7c);font-size:14px;line-height:1.6}.crm-category-action>span{font-size:22px;line-height:1}
@media(max-width:1199px){.crm-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.crm-hub-grid{grid-template-columns:1fr}.crm-category-card{min-height:210px;padding:20px}.crm-hub-header h1{font-size:26px}.crm-hub-role{padding:8px 10px}.crm-hub-header{gap:10px}.crm-hub-search{padding:8px 12px}}

/* Sidebar logo: transparent backing and larger proportional artwork. */
.kc-sidebar > div:first-child > div:has(img[alt="KC CuTo CRM"]){width:100%;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.kc-sidebar > div:first-child img[alt="KC CuTo CRM"]{display:block;width:100%;height:auto;max-height:64px;object-fit:contain}

.crm-breadcrumb{display:flex;align-items:center;gap:4px;position:relative;min-width:0;font-size:14px;color:#64748b}.crm-breadcrumb button{display:inline-flex;align-items:center;gap:5px;min-height:36px;text-align:left}.crm-breadcrumb .crm-crumb-current{color:inherit;padding:0 4px;overflow-wrap:anywhere}.crm-crumb-separator{color:#94a3b8}
@media(max-width:1100px){.kc-app div:has(>.crm-breadcrumb){height:auto;min-height:56px;flex-wrap:wrap;padding-top:6px;padding-bottom:6px}.crm-breadcrumb{order:100;flex-basis:100%;flex-wrap:wrap}.crm-breadcrumb button{white-space:normal}.crm-crumb-current{max-width:100%}}

.crm-internal{max-width:none}.crm-internal .crm-actions{flex-wrap:wrap}.crm-board{display:flex;gap:12px;overflow:auto}.crm-board>section{min-width:230px;background:var(--crm-surface,#fff);padding:14px;border:1px solid var(--crm-border,#dce6e7);border-radius:12px}.crm-board button{display:block;width:100%;padding:12px;text-align:left;border-bottom:1px solid var(--crm-border,#dce6e7)}.crm-quote-line{display:grid;grid-template-columns:3fr 1fr 1fr 1fr 1fr auto;gap:8px;margin:12px 0}.crm-record-detail{scroll-margin-top:80px}.kc-app .overflow-y-auto:has(>.crm-internal)>.mb-4{display:none}@media(max-width:640px){.crm-quote-line{grid-template-columns:1fr 1fr}.crm-internal .crm-actions input{max-width:100%}}@media print{body *{visibility:hidden!important}#crm-quotation-print,#crm-quotation-print *{visibility:visible!important}#crm-quotation-print{position:absolute;top:0;left:0;width:100%;background:white;color:black}.kc-app,.kc-app .overflow-y-auto{height:auto!important;overflow:visible!important}@page{size:A4;margin:15mm}}

.crm-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-top:12px}.crm-calendar>section{padding:10px;min-height:100px;border:1px solid var(--crm-border,#dce6e7);border-radius:10px;background:var(--crm-surface,#fff);overflow-wrap:anywhere}.crm-calendar h3{font-size:12px;color:var(--crm-primary,#0aada9)}.crm-calendar button{display:block;text-align:left;font-size:12px;margin-top:8px}@media(max-width:800px){.crm-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media screen{html[data-crm-personal=true] .crm-breadcrumb button:hover,html[data-crm-personal=true] .crm-category-action,html[data-crm-personal=true] .crm-master-table button{color:var(--crm-link-ink,var(--crm-primary))}html[data-crm-personal=true] .crm-account-name{color:var(--crm-link-ink)!important}}

.crm-quick-create-menu{position:fixed;z-index:150;display:flex;flex-direction:column;gap:3px;box-sizing:border-box;padding:8px;background:var(--crm-surface,#fff);color:var(--crm-surface-ink,#183744);border:1px solid var(--crm-border,#dce6e7);border-radius:14px;box-shadow:0 14px 38px #102f3d26;overflow-y:auto;overscroll-behavior:contain}.crm-quick-create-menu>button{display:block;flex:none;width:100%;min-height:42px;padding:10px 14px;text-align:left;white-space:normal;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;line-height:1.5;cursor:pointer}.crm-quick-create-menu>button:hover{background:#eaf7f4;color:#183744}.crm-quick-create-menu>button:focus-visible{outline:2px solid #087f83;outline-offset:-2px;background:#eaf7f4}
