:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --ink:#162033; --muted:#697386; --line:#e6eaf0; --brand:#335cff; }
* { box-sizing:border-box; } html,body { max-width:100%; overflow-x:hidden; } body { margin:0; color:var(--ink); background:#f6f8fc; } button,input { font:inherit; }
#ray-install { position:fixed; bottom:20px; right:20px; z-index:100; border:1px solid #b47500; border-radius:8px; padding:12px 18px; background:#faa61d; color:#151617; font:600 14px Arial,sans-serif; cursor:pointer; box-shadow:0 3px 14px #0003; }
#ray-install[hidden] { display:none; }
@media print { #ray-install { display:none; } }
.auth-page { min-height:100vh; background:#0e1830; } .auth-shell { min-height:100vh; display:grid; grid-template-columns:1.05fr .95fr; }
.brand-panel { padding:clamp(2rem,7vw,7rem); display:flex; align-items:center; gap:1.5rem; color:white; background:radial-gradient(circle at 20% 20%,#294ea2,#0e1830 58%); }
.brand-mark,.logo span { display:grid; place-items:center; color:white; background:var(--brand); font-weight:800; }
.brand-mark { width:4rem; height:4rem; border-radius:1.15rem; font-size:1.8rem; box-shadow:0 14px 35px #0004; }
.eyebrow { color:#7486ac; font-size:.72rem; letter-spacing:.16em; font-weight:800; } .brand-panel .eyebrow { color:#9db6ec; }
.brand-panel h1 { margin:.45rem 0; font-size:clamp(2.5rem,6vw,5.5rem); letter-spacing:-.055em; } .brand-panel p { margin:0; color:#b9c7e6; font-size:1.05rem; }
.auth-card { margin:auto; width:min(86%,430px); padding:clamp(2rem,5vw,3.25rem); border-radius:1.5rem; background:white; box-shadow:0 24px 80px #0005; }
.auth-card h2 { margin:.6rem 0 .35rem; font-size:1.8rem; letter-spacing:-.035em; } .muted { margin:0 0 1.7rem; color:var(--muted); line-height:1.55; }
label { display:block; margin:1rem 0 .45rem; font-weight:700; font-size:.88rem; } input { width:100%; min-height:3.15rem; padding:.8rem 1rem; border:1px solid var(--line); border-radius:.75rem; background:#fbfcff; outline:none; }
input:focus { border-color:var(--brand); box-shadow:0 0 0 3px #335cff1f; } input[readonly] { color:#566074; }
.auth-card button { width:100%; margin-top:1.4rem; min-height:3.2rem; border:0; border-radius:.75rem; color:white; background:var(--brand); font-weight:800; cursor:pointer; }
.alert { margin:1rem 0; padding:.85rem 1rem; border-radius:.7rem; color:#a32929; background:#fff0f0; font-size:.9rem; }
.topbar { height:72px; padding:0 clamp(1.25rem,5vw,5rem); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); background:white; }
.logo { display:flex; align-items:center; gap:.7rem; color:var(--ink); text-decoration:none; font-weight:850; } .logo span { width:2rem; height:2rem; border-radius:.55rem; }
.logout { border:1px solid var(--line); border-radius:.65rem; padding:.6rem .9rem; background:white; color:#4c566b; cursor:pointer; }
.dashboard { width:min(1180px,92%); margin:0 auto; padding:clamp(2.5rem,7vw,5.5rem) 0; } .welcome h1 { margin:.6rem 0 .35rem; font-size:clamp(2rem,5vw,3.6rem); letter-spacing:-.05em; } .welcome p { margin:0; color:var(--muted); }
.business-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; margin-top:2.8rem; } .business-card { min-height:250px; padding:1.5rem; display:flex; flex-direction:column; justify-content:space-between; border:1px solid var(--line); border-radius:1.25rem; background:white; box-shadow:0 10px 35px #23304a0b; color:inherit; text-decoration:none; }
.business-card h2 { margin:1rem 0 .25rem; letter-spacing:-.025em; } .business-card p { margin:0; color:var(--muted); } .card-icon { width:3.2rem; height:3.2rem; display:grid; place-items:center; border-radius:.9rem; font-weight:850; }
.tech .card-icon { color:#3152d8; background:#e9eeff; } .it .card-icon { color:#08775c; background:#e0f8f0; } .wool .card-icon { color:#a34863; background:#ffe8ef; }
.status { width:fit-content; padding:.4rem .65rem; border-radius:999px; color:#5d687d; background:#f0f2f6; font-size:.75rem; font-weight:750; }

/* TechDecodes workspace */
.workspace-shell { min-height:100vh; display:grid; grid-template-columns:76px 1fr; color:#f7f8ff; background:radial-gradient(circle at 86% 7%,#34236a 0,transparent 24%),radial-gradient(circle at 10% 92%,#132f57 0,transparent 28%),#070b18; }
.side-nav { position:sticky; top:0; height:100vh; padding:1.25rem .75rem; display:flex; flex-direction:column; align-items:center; border-right:1px solid #ffffff12; background:#090e1ed9; backdrop-filter:blur(18px); }
.side-logo { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:white; background:linear-gradient(145deg,#6f4cff,#b13eff); text-decoration:none; font-weight:900; box-shadow:0 0 30px #7e48ff66; }
.side-nav nav { display:grid; gap:.8rem; margin:auto 0; } .side-nav nav a,.side-bottom { width:42px; height:42px; display:grid; place-items:center; border:1px solid transparent; border-radius:12px; color:#8390aa; text-decoration:none; font-size:1.15rem; }
.side-nav nav a:hover,.side-nav nav a.active { color:white; border-color:#7255ff55; background:#6b46ff33; } .side-bottom { color:#8390aa; }
.td-dashboard { width:min(1440px,100%); min-width:0; margin:0 auto; padding:clamp(1.5rem,4vw,3.5rem); }
.td-header { display:flex; justify-content:space-between; align-items:end; gap:2rem; } .td-header h1 { margin:.4rem 0 .25rem; font-size:clamp(2rem,4vw,3.5rem); letter-spacing:-.05em; } .td-header p { margin:0; color:#8590a9; }
.back-link { display:block; margin-bottom:1.5rem; color:#8c98b2; text-decoration:none; font-size:.82rem; } .header-actions { display:flex; gap:.75rem; }
.primary-button,.ghost-button,.small-button { min-height:42px; padding:.7rem 1rem; border-radius:10px; font-weight:750; }
.primary-button { border:0; color:white; background:linear-gradient(135deg,#6b4dff,#a53bf0); box-shadow:0 8px 26px #6f45ff44; } .ghost-button,.small-button { border:1px solid #ffffff17; color:#c6cde0; background:#ffffff08; }
button:disabled { cursor:not-allowed; opacity:.72; }
.metric-grid { min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin:2rem 0 1rem; } .metric-card,.panel { min-width:0; border:1px solid #ffffff12; background:linear-gradient(145deg,#131a2dcc,#0d1325cc); box-shadow:0 18px 50px #0005; backdrop-filter:blur(15px); }
.metric-card { min-height:140px; padding:1.2rem; border-radius:18px; display:flex; flex-direction:column; } .metric-card span { color:#8e99b2; font-size:.82rem; } .metric-card strong { margin:.55rem 0; font-size:2.1rem; letter-spacing:-.04em; } .metric-card small { margin-top:auto; color:#6f7b95; }
.metric-card.purple { box-shadow:inset 0 2px #8651ff55,0 18px 50px #0005; } .metric-card.green { box-shadow:inset 0 2px #2fd49b55,0 18px 50px #0005; } .metric-card.orange { box-shadow:inset 0 2px #ffa73d55,0 18px 50px #0005; }
.td-grid { min-width:0; display:grid; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); gap:1rem; } .panel { border-radius:18px; padding:1.25rem; } .panel-heading { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:1rem; } .panel-heading h2 { margin:.35rem 0 0; font-size:1.2rem; }
.leads-panel { grid-row:span 2; min-height:510px; } .stage-tabs { margin:1.25rem 0; display:flex; gap:.35rem; overflow:auto; border-bottom:1px solid #ffffff0f; } .stage-tabs span { padding:.7rem .75rem; color:#7e89a2; white-space:nowrap; font-size:.82rem; } .stage-tabs span.selected { color:white; border-bottom:2px solid #8651ff; } .stage-tabs b { margin-left:.3rem; color:#aeb7cb; }
.empty-state { min-height:330px; display:grid; place-items:center; align-content:center; text-align:center; } .empty-state h3 { margin:.8rem 0 .3rem; } .empty-state p { max-width:380px; margin:0 0 1.25rem; color:#768199; line-height:1.55; } .upload-icon { width:58px; height:58px; display:grid; place-items:center; border-radius:16px; color:#b99fff; background:#7952ff22; font-size:1.6rem; }
.lead-upload { display:flex; align-items:center; gap:.65rem; margin:1rem 0; } .lead-upload input[type=file] { position:absolute; width:1px; height:1px; opacity:0; } .lead-upload label { margin:0; cursor:pointer; } .lead-upload button { cursor:pointer; } .td-notice { margin:1rem 0; padding:.75rem .9rem; border:1px solid #7556ff55; border-radius:10px; color:#d9d2ff; background:#7556ff19; font-size:.85rem; }
.lead-table-wrap { max-width:100%; overflow:auto; } .lead-table { width:100%; border-collapse:collapse; font-size:.82rem; } .lead-table th,.lead-table td { padding:.8rem .65rem; border-bottom:1px solid #ffffff0d; text-align:left; vertical-align:top; } .lead-table th { color:#7e89a2; } .lead-table td { color:#dce1ef; } .lead-table td small,.lead-table td strong { display:block; } .lead-table td small { margin-top:.25rem; color:#77839c; } .lead-status { display:inline-block; padding:.3rem .5rem; border-radius:999px; font-size:.72rem; } .lead-status.new { color:#cbbcff; background:#7952ff22; } .call-link { color:#65e4b6; text-decoration:none; font-weight:800; }
.quick-action { display:flex; align-items:center; gap:.85rem; padding:1rem 0; border-bottom:1px solid #ffffff0d; } .quick-action:last-child { border:0; } .quick-action div { display:grid; gap:.25rem; } .quick-action small { color:#748099; } .quick-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; } .quick-icon.call { color:#5ee0b0; background:#32c9921c; } .quick-icon.mail { color:#af94ff; background:#8258ff1c; } .quick-icon.note { color:#ffb45f; background:#ff9a311c; }
.money-row { padding:.8rem 0; display:flex; justify-content:space-between; border-bottom:1px solid #ffffff0d; color:#a8b2c8; } .money-row strong { color:white; } .money-row.pending strong { color:#ffb45f; } .soft-badge { padding:.35rem .55rem; border-radius:999px; color:#8995ad; background:#ffffff09; font-size:.72rem; }
.panel-note { color:#727e98; font-size:.82rem; line-height:1.55; } .flow { display:flex; align-items:center; justify-content:space-between; gap:.4rem; margin:1.5rem 0; } .flow span { padding:.55rem .7rem; border-radius:9px; color:#c5cce0; background:#ffffff0a; font-size:.76rem; } .flow i { color:#5f6980; font-style:normal; }
@media (max-width:900px) { .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .td-grid { grid-template-columns:minmax(0,1fr); } .leads-panel { grid-row:auto; } }
@media (max-width:1000px) and (min-width:781px) { .business-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:780px) { .auth-shell { grid-template-columns:1fr; } .brand-panel { min-height:36vh; padding:2rem; align-items:end; } .brand-panel h1 { font-size:2.8rem; } .auth-card { margin:-1.25rem auto 2rem; width:calc(100% - 2rem); position:relative; } .business-grid { grid-template-columns:1fr; } .business-card { min-height:210px; } .workspace-shell { min-width:0; grid-template-columns:minmax(0,1fr); padding-bottom:74px; } .side-nav { position:fixed; z-index:20; top:auto; bottom:0; width:100%; height:64px; padding:.55rem 1rem; flex-direction:row; border-top:1px solid #ffffff12; border-right:0; } .side-nav nav { margin:0 auto; display:flex; } .side-logo,.side-bottom { display:none; } .td-dashboard { padding:1.25rem; } .td-header { min-width:0; align-items:start; } .td-header .header-actions { display:none; } .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .metric-card { min-width:0; min-height:125px; } .metric-card strong { font-size:1.7rem; } .metric-card small { overflow-wrap:anywhere; } .flow { flex-wrap:wrap; } }

/* TechDecodes multi-page workspace */
.workspace-shell:has(.td-side-wide) { --sidebar-width:154px; grid-template-columns:var(--sidebar-width) minmax(0,1fr); transition:grid-template-columns .25s ease; }
.td-side-wide { align-items:stretch; padding:.9rem; }
.td-side-wide .side-logo { margin:0 auto; }
.td-side-wide nav { width:100%; gap:.3rem; }
.td-side-wide nav a { width:100%; height:43px; padding:0 .7rem; display:flex; justify-content:flex-start; gap:.65rem; font-size:1rem; }
.td-side-wide nav a small { font-size:.72rem; white-space:nowrap; }
.button-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.metric-link { color:inherit; text-decoration:none; transition:transform .2s,border-color .2s; }
.metric-link:hover { transform:translateY(-2px); border-color:#7952ff55; }
.text-link { color:#9b86ff; text-decoration:none; font-size:.8rem; font-weight:750; }
.page-panel { margin-top:2rem; min-height:520px; }
.two-column { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1rem; margin-top:2rem; }
.two-column .panel h2,.page-panel h2 { margin:.35rem 0 1rem; }
.pipeline-list { margin-top:1rem; }
.pipeline-list div,.setting-row,.campaign-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.9rem 0; border-bottom:1px solid #ffffff0d; }
.pipeline-list span,.setting-row span { color:#8c97af; }
.pipeline-list strong { font-size:1.15rem; }
.bulk-bar { display:flex; align-items:center; gap:.6rem; margin:1rem 0; }
.stack-form { display:grid; gap:.35rem; }
.stack-form label { margin:.8rem 0 .15rem; color:#9da7bc; }
.stack-form input,.stack-form select,.stack-form textarea,.bulk-bar select { width:100%; min-height:44px; padding:.7rem .8rem; border:1px solid #ffffff16; border-radius:9px; color:#edf0fa; background:#ffffff08; outline:none; }
.stack-form select option,.bulk-bar select option { color:#172033; background:white; }
.stack-form textarea { resize:vertical; }
.stack-form .primary-button { margin-top:1rem; cursor:pointer; }
.sender-pill { padding:.4rem .6rem; border-radius:999px; color:#65e4b6; background:#32c99218; font-size:.72rem; }
.recipient-list { max-height:260px; overflow:auto; border:1px solid #ffffff0d; border-radius:10px; }
.recipient-list label { margin:0; padding:.65rem .75rem; display:flex; align-items:center; gap:.7rem; border-bottom:1px solid #ffffff0d; cursor:pointer; }
.recipient-list input,.lead-table input[type=checkbox] { width:18px; min-height:18px; accent-color:#7952ff; }
.recipient-list span { display:grid; gap:.18rem; color:#dfe4f2; }
.recipient-list small,.campaign-row small,.activity-row small { color:#77839c; }
.campaign-row { align-items:flex-start; flex-direction:column; gap:.25rem; }
.activity-row { padding:1rem 0; border-bottom:1px solid #ffffff0d; }
.activity-row p { margin:.4rem 0; color:#adb6ca; line-height:1.5; }
.lead-status.pending { color:#ffc46c; background:#ff9a311c; } .lead-status.contacted { color:#6fdbff; background:#259edb1c; } .lead-status.closed { color:#65e4b6; background:#32c9921c; } .lead-status.lost { color:#ff8c9d; background:#ff526b1c; }
.category-filter { display:flex; align-items:end; gap:.65rem; margin:1rem 0; }
.category-filter label { margin:0; color:#9da7bc; }
.category-filter select { min-width:240px; min-height:42px; padding:.65rem .75rem; border:1px solid #ffffff16; border-radius:9px; color:#edf0fa; background:#ffffff08; }
.category-filter select option { color:#172033; background:white; }
.danger-button { min-height:42px; padding:.7rem 1rem; border:1px solid #ff526b55; border-radius:10px; color:#ff9baa; background:#ff526b18; font-weight:750; cursor:pointer; }
.delete-confirm { margin:0; display:flex; align-items:center; gap:.4rem; color:#aeb7c9; font-size:.75rem; white-space:nowrap; }
.delete-confirm input { width:17px; min-height:17px; accent-color:#ff526b; }
.delete-tools { position:relative; align-self:center; }
.delete-tools summary { padding:.45rem .6rem; color:#8d97aa; cursor:pointer; font-size:.72rem; list-style:none; }
.delete-tools > div { position:absolute; z-index:5; right:0; top:100%; min-width:190px; padding:.65rem; display:flex; align-items:center; justify-content:space-between; gap:.5rem; border:1px solid #ff526b30; border-radius:10px; background:#11182a; box-shadow:0 12px 28px #0008; }
.delete-tools .danger-button { min-height:32px; padding:.4rem .55rem; font-size:.7rem; }
.email-compose { width:100%; max-width:100%; min-width:0; margin:2rem 0 0; display:grid; grid-template-columns:minmax(0,1fr); gap:1rem; }
.compose-panel { width:100%; max-width:100%; min-width:0; padding:clamp(1.25rem,3vw,2rem); overflow:hidden; }
.compose-panel .stack-form,.compose-panel input,.compose-panel select,.compose-panel textarea { width:100%; max-width:100%; min-width:0; }
.compose-panel .panel-note { max-width:760px; }
.send-button { min-height:50px; font-size:.95rem; }
.campaign-history { width:100%; max-width:100%; min-width:0; margin-top:0; padding:0; overflow:hidden; }
.campaign-history summary { padding:1rem 1.2rem; display:flex; justify-content:space-between; color:#dce1ef; cursor:pointer; font-weight:750; list-style:none; }
.campaign-history summary span { padding:.15rem .45rem; border-radius:999px; color:#a995ff; background:#7952ff22; font-size:.72rem; }
.history-content { padding:0 1.2rem 1rem; }
.empty-state.compact { min-height:220px; }
code { color:#c8b9ff; }
@media (max-width:900px) { .two-column { grid-template-columns:minmax(0,1fr); } }
@media (max-width:780px) {
  .workspace-shell:has(.td-side-wide) { grid-template-columns:minmax(0,1fr); }
  .td-side-wide { width:100%; align-items:center; overflow:hidden; }
  .td-side-wide nav { width:100%; margin:0; overflow-x:auto; justify-content:flex-start; scrollbar-width:none; }
  .td-side-wide nav a { min-width:auto; width:auto; height:48px; padding:.35rem .65rem; justify-content:center; }
  .td-side-wide nav a small { font-size:.68rem; }
  .td-dashboard { padding:1rem; }
  .td-header h1 { font-size:2rem; }
  .page-panel,.two-column { margin-top:1rem; }
  .metric-grid { margin-top:1.25rem; gap:.7rem; }
  .metric-card { padding:1rem; }
  .lead-upload { display:grid; grid-template-columns:1fr 1.25fr; align-items:stretch; }
  .lead-upload label,.lead-upload button { width:100%; text-align:center; }
  .bulk-bar { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:.45rem; }
  .bulk-bar select { min-width:0; }
  .bulk-bar .status-button { width:auto; min-height:40px; padding:.55rem .7rem; white-space:nowrap; }
  .delete-tools { justify-self:end; }
  .delete-tools > div { position:fixed; right:1rem; bottom:78px; top:auto; }
  .email-layout .sender-pill { display:none; }
  .category-filter { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:.45rem; }
  .category-filter label { grid-column:1/-1; }
  .category-filter select { min-width:0; width:100%; }
  .category-filter button { width:auto; min-height:42px; }
  .category-filter .text-link { grid-column:1/-1; }
  .delete-confirm { padding:.2rem 0; }
  .page-panel { padding:.95rem; }
  .lead-table { min-width:670px; }
  .lead-table th,.lead-table td { padding:.7rem .55rem; }
  .two-column .panel { padding:1rem; }
  .stack-form input,.stack-form select,.stack-form textarea { font-size:16px; }
  .campaign-history summary { padding:.9rem 1rem; }
  .setting-row { align-items:flex-start; flex-direction:column; gap:.25rem; }
}

/* Woollen Rangoli workspace */
.rangoli-workspace .td-header h1 { max-width:900px; }
.rangoli-contact { padding:.85rem 0; display:flex; align-items:center; justify-content:space-between; gap:1rem; border-bottom:1px solid #ffffff0d; }
.rangoli-contact > div:first-child { display:grid; gap:.2rem; }
.rangoli-contact small { color:#7e8798; }
.stock-low { padding:.28rem .45rem; border-radius:6px; color:#ff9d88; background:#e45b4f18; font-weight:850; }
html[data-theme="light"] .rangoli-contact { border-color:#35415b12; }
html[data-theme="light"] .rangoli-contact small { color:#6b6458; }
html[data-theme="light"] .stock-low { color:#a62d1f; background:#ffe8e3; }
@media (max-width:780px) {
  .rangoli-contact { align-items:flex-start; flex-direction:column; }
  .rangoli-contact .lead-quick-actions { width:100%; }
}
@media (max-width:420px) {
  .td-dashboard { padding:.8rem; }
  .metric-grid { grid-template-columns:1fr 1fr; gap:.55rem; }
  .metric-card { min-height:112px; padding:.8rem; }
  .metric-card strong { font-size:1.45rem; }
  .metric-card small { font-size:.7rem; }
  .td-header h1 { font-size:1.75rem; }
  .td-header p { font-size:.85rem; }
  .lead-upload { grid-template-columns:1fr; }
  .bulk-bar { grid-template-columns:minmax(0,1fr) auto; }
  .delete-tools { grid-column:1/-1; }
}

/* Glass workspace and day/night themes */
.workspace-shell { background:radial-gradient(circle at 88% 8%,#6043b84a 0,transparent 28%),radial-gradient(circle at 8% 92%,#1e5ca14a 0,transparent 30%),linear-gradient(145deg,#080b16,#0b1020 62%,#11172a); background-attachment:fixed; }
.metric-card,.panel { border-color:#ffffff18; background:linear-gradient(145deg,#ffffff12,#ffffff08); box-shadow:inset 0 1px #ffffff18,0 18px 55px #0006; backdrop-filter:blur(28px) saturate(145%); -webkit-backdrop-filter:blur(28px) saturate(145%); }
.side-nav { border-color:#ffffff17; background:#080d1cbf; box-shadow:inset -1px 0 #ffffff08; backdrop-filter:blur(28px) saturate(140%); -webkit-backdrop-filter:blur(28px) saturate(140%); }
.ray-wordmark { width:58px; font-size:.7rem; letter-spacing:.08em; }
.theme-toggle { width:100%; min-height:40px; margin:0 0 .45rem; padding:.4rem; display:flex; align-items:center; justify-content:center; gap:.45rem; border:1px solid #ffffff15; border-radius:11px; color:#aeb8cc; background:#ffffff08; cursor:pointer; }
.theme-toggle span { font-size:1rem; }.theme-toggle small { font-size:.65rem; }
.sidebar-toggle { position:fixed; z-index:30; top:14px; left:calc(var(--sidebar-width,154px) + 10px); width:34px; height:34px; display:grid; place-items:center; border:1px solid #ffffff18; border-radius:10px; color:#bdc6da; background:#101729d9; box-shadow:0 8px 24px #0004; backdrop-filter:blur(18px); cursor:pointer; transition:left .25s ease,transform .2s ease; }
.sidebar-toggle:hover { transform:scale(1.05); }
.revenue-panel { min-height:0; }

html[data-theme="light"] .workspace-shell { color:#172034; background:radial-gradient(circle at 88% 8%,#cabaff70 0,transparent 30%),radial-gradient(circle at 6% 94%,#aad8ff75 0,transparent 32%),linear-gradient(145deg,#f5f7ff,#eef2fb 60%,#e8effc); }
html[data-theme="light"] .side-nav { border-color:#ffffffaa; background:#ffffffa8; box-shadow:inset -1px 0 #ffffffcc,10px 0 40px #61709b12; }
html[data-theme="light"] .metric-card,html[data-theme="light"] .panel { border-color:#ffffffcc; background:linear-gradient(145deg,#ffffffc9,#ffffff7d); box-shadow:inset 0 1px #fff,0 18px 45px #68759a1c; }
html[data-theme="light"] .td-header p,html[data-theme="light"] .back-link,html[data-theme="light"] .panel-note,html[data-theme="light"] .metric-card span,html[data-theme="light"] .metric-card small,html[data-theme="light"] .lead-table th,html[data-theme="light"] .quick-action small,html[data-theme="light"] .setting-row span,html[data-theme="light"] .activity-row small { color:#64708a; }
html[data-theme="light"] .side-nav nav a,html[data-theme="light"] .side-bottom { color:#65718a; }
html[data-theme="light"] .side-nav nav a:hover,html[data-theme="light"] .side-nav nav a.active { color:#3f2b99; border-color:#7155db28; background:#7155db16; }
html[data-theme="light"] .lead-table td,html[data-theme="light"] .money-row strong,html[data-theme="light"] .pipeline-list strong,html[data-theme="light"] .setting-row strong { color:#202a3e; }
html[data-theme="light"] .lead-table th,html[data-theme="light"] .lead-table td,html[data-theme="light"] .money-row,html[data-theme="light"] .quick-action,html[data-theme="light"] .setting-row,html[data-theme="light"] .pipeline-list div,html[data-theme="light"] .campaign-row,html[data-theme="light"] .activity-row { border-color:#35415b12; }
html[data-theme="light"] .stack-form input,html[data-theme="light"] .stack-form select,html[data-theme="light"] .stack-form textarea,html[data-theme="light"] .bulk-bar select,html[data-theme="light"] .category-filter select { color:#202a3e; border-color:#35415b22; background:#ffffffa8; }
html[data-theme="light"] .ghost-button,html[data-theme="light"] .small-button,html[data-theme="light"] .theme-toggle { color:#4e5a73; border-color:#35415b20; background:#ffffff8a; }
html[data-theme="light"] .stage-tabs { border-color:#35415b15; } html[data-theme="light"] .stage-tabs span { color:#68748d; } html[data-theme="light"] .stage-tabs span.selected { color:#3f2b99; }
html[data-theme="light"] .recipient-list,html[data-theme="light"] .recipient-list label { border-color:#35415b15; } html[data-theme="light"] .recipient-list span,html[data-theme="light"] .campaign-history summary { color:#263149; }
html[data-theme="light"] .delete-tools > div { background:#fff; }
html[data-theme="light"] .sidebar-toggle { color:#45516a; border-color:#ffffffcc; background:#ffffffc9; box-shadow:0 8px 22px #68759a20; }

@media (min-width:781px) {
  html[data-sidebar="collapsed"] .workspace-shell:has(.td-side-wide) { --sidebar-width:0px; }
  html[data-sidebar="collapsed"] .td-side-wide { transform:translateX(-105%); opacity:0; pointer-events:none; }
  html[data-sidebar="collapsed"] .sidebar-toggle { left:12px; }
  .td-side-wide { transition:transform .25s ease,opacity .2s ease; }
}

@media (max-width:1500px) and (min-width:781px) {
  .workspace-shell:has(.td-side-wide) { --sidebar-width:112px; }
  .td-side-wide { padding:.7rem; }
  .td-side-wide nav a { height:39px; padding:0 .55rem; gap:.45rem; }
  .td-side-wide nav a small { font-size:.63rem; }
  .td-dashboard { padding:1.6rem 2rem; }
  .td-header h1 { font-size:clamp(2rem,3vw,2.8rem); }
  .back-link { margin-bottom:.85rem; }
  .metric-grid { margin:1.35rem 0 .85rem; gap:.75rem; }
  .metric-card { min-height:118px; padding:1rem; }
  .metric-card strong { font-size:1.75rem; }
  .panel { padding:1rem; }
  .page-panel { margin-top:1.25rem; min-height:0; }
  .email-compose { margin-top:1.25rem; }
  .compose-panel { padding:1.25rem; }
  .compose-panel textarea { min-height:220px; }
}

@media (max-width:780px) {
  .sidebar-toggle { display:none; }
  .theme-toggle { width:52px; min-width:52px; height:48px; margin:0; flex-direction:column; gap:0; }
  .theme-toggle small { font-size:.55rem; }
  .td-side-wide .ray-wordmark { display:none; }
}

/* Ray brand: flat black + #faa61d */
:root { --brand:#faa61d; }
.auth-page { background:#090909; }
.brand-panel { color:#fff; background:#0b0b0b; border-right:1px solid #faa61d33; }
.brand-mark,.logo span { color:#111; background:#faa61d; box-shadow:none; }
.brand-panel .eyebrow,.eyebrow { color:#d98c0b; }
.brand-panel p { color:#b7b7b7; }
.auth-card { border:1px solid #faa61d2e; box-shadow:0 24px 70px #0008; }
.auth-card button { color:#17120a; background:#faa61d; }
input:focus { border-color:#faa61d; box-shadow:0 0 0 3px #faa61d25; }
.topbar { border-bottom-color:#faa61d30; }
.app-page { color:#f7f7f7; background:#090909; }
.topbar { background:#111; }
.logo { color:#fff; }
.logout { color:#eee; border-color:#faa61d38; background:#181818; }
.welcome p { color:#aaa; }
.business-card { color:#f5f5f5; border-color:#2c2c2c; background:#151515; box-shadow:0 12px 34px #0006; }
.business-card p { color:#aaa; }
.status { color:#d5d5d5; background:#222; }
.business-card:hover { border-color:#faa61d; }
.tech .card-icon,.it .card-icon,.wool .card-icon { color:#1a1408; background:#faa61d; }
.chem .card-icon { color:#1a1408; background:var(--chemtech-accent,#faa61d); }
.workspace-shell,.workspace-shell:has(.td-side-wide) { background:#090909; background-image:none; }
.side-nav { border-color:#faa61d25; background:#0d0d0df2; box-shadow:none; }
.side-logo,.ray-wordmark { color:#161008; background:#faa61d; background-image:none; box-shadow:none; }
.side-nav nav a:hover,.side-nav nav a.active { color:#faa61d; border-color:#faa61d55; background:#faa61d16; }
.primary-button { color:#171108; background:#faa61d; background-image:none; box-shadow:0 8px 24px #faa61d22; }
.primary-button:hover { background:#ffb52f; }
.ghost-button,.small-button,.theme-toggle { color:#ddd; border-color:#faa61d2b; background:#171717; }
.text-link,.call-link { color:#faa61d; }
.metric-card,.panel { border-color:#ffffff13; background:#151515; background-image:none; box-shadow:inset 0 1px #ffffff0a,0 16px 42px #0007; }
.metric-card.purple,.metric-card.green,.metric-card.orange { box-shadow:inset 0 2px #faa61d,0 16px 42px #0007; }
.metric-link:hover { border-color:#faa61d80; }
.stage-tabs span.selected { color:#faa61d; border-bottom-color:#faa61d; }
.lead-status.new,.soft-badge,.campaign-history summary span { color:#faa61d; background:#faa61d17; }
.td-notice { color:#ffd98f; border-color:#faa61d55; background:#faa61d13; }
.upload-icon { color:#faa61d; background:#faa61d18; }
.sender-pill { color:#faa61d; background:#faa61d15; }
.sidebar-toggle { color:#faa61d; border-color:#faa61d38; background:#151515ed; }
.stack-form input,.stack-form select,.stack-form textarea,.bulk-bar select,.category-filter select { border-color:#ffffff17; background:#1c1c1c; }
.recipient-list { border-color:#ffffff12; }
.quick-icon.call,.quick-icon.mail,.quick-icon.note { color:#faa61d; background:#faa61d16; }
html[data-theme="light"] .workspace-shell { color:#1b1b1b; background:#f7f4ed; background-image:none; }
html[data-theme="light"] .side-nav { border-color:#faa61d55; background:#fffdf8ed; box-shadow:none; }
html[data-theme="light"] .metric-card,html[data-theme="light"] .panel { border-color:#e8ddc7; background:#fffdf8; background-image:none; box-shadow:0 14px 34px #5e430d12; }
html[data-theme="light"] .side-nav nav a:hover,html[data-theme="light"] .side-nav nav a.active { color:#8c5700; border-color:#faa61d66; background:#faa61d20; }
html[data-theme="light"] .ghost-button,html[data-theme="light"] .small-button,html[data-theme="light"] .theme-toggle { color:#453a28; border-color:#d7bd8a; background:#fffaf0; }
html[data-theme="light"] .sidebar-toggle { color:#744800; border-color:#e0c58d; background:#fffaf0ed; box-shadow:0 8px 20px #6d4a0915; }
html[data-theme="light"] .stack-form input,html[data-theme="light"] .stack-form select,html[data-theme="light"] .stack-form textarea,html[data-theme="light"] .bulk-bar select,html[data-theme="light"] .category-filter select { color:#242424; border-color:#dec99f; background:#fff; }
html[data-theme="light"] .stage-tabs span.selected { color:#8c5700; border-bottom-color:#faa61d; }
html[data-theme="light"] body.app-page { color:#1b1b1b; background:#f7f4ed; }
html[data-theme="light"] .topbar { background:#fffdf8; }
html[data-theme="light"] .logo { color:#1b1b1b; }
html[data-theme="light"] .logout { color:#453a28; border-color:#d7bd8a; background:#fffaf0; }
html[data-theme="light"] .business-card { color:#202020; border-color:#e8ddc7; background:#fffdf8; box-shadow:0 12px 30px #5e430d12; }
html[data-theme="light"] .business-card p { color:#6b6458; }
html[data-theme="light"] .status { color:#514630; background:#f4ead6; }

/* ITedvantage blog builder */
.blog-builder { min-width:0; display:grid; grid-template-columns:minmax(340px,.88fr) minmax(420px,1.12fr); gap:1rem; margin-top:1.5rem; align-items:start; }
.blog-editor,.blog-preview-panel { min-width:0; }
.blog-editor { max-height:calc(100vh - 3rem); overflow:auto; scrollbar-width:thin; }
.blog-editor input[type=file] { padding:.65rem; color:#aeb6c7; }
.form-split { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.form-divider { margin:1.2rem 0 .15rem; padding-top:1rem; border-top:1px solid #ffffff12; color:#faa61d; font-size:.72rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.upload-wordpress:disabled { color:#85734e; background:#faa61d30; box-shadow:none; }
.connection-note { margin-top:.35rem; color:#7f8796; line-height:1.45; text-align:center; }
.preview-device { padding:.35rem .55rem; border:1px solid #ffffff13; border-radius:999px; color:#929bad; font-size:.7rem; }
.blog-preview { margin-top:1rem; overflow:hidden; border:1px solid #dedede; border-radius:14px; color:#222; background:#fff; box-shadow:0 15px 40px #0005; }
.preview-cover { min-height:270px; display:grid; place-items:center; color:#85622b; background:#f4ead6 center/cover no-repeat; font-weight:750; }
.preview-body { padding:clamp(1.4rem,4vw,3rem); }
.preview-category { color:#b46d00; font-size:.68rem; font-weight:850; letter-spacing:.14em; }
.preview-body h1 { margin:.65rem 0 .5rem; color:#171717; font-family:Georgia,serif; font-size:clamp(2rem,4vw,3.4rem); line-height:1.08; letter-spacing:-.035em; }
.preview-meta { margin:0 0 1.8rem; color:#858585; font-size:.8rem; }
.preview-copy { min-height:180px; color:#343434; font-family:Georgia,serif; font-size:1rem; line-height:1.85; white-space:pre-wrap; overflow-wrap:anywhere; }
.preview-gallery { display:grid; grid-template-columns:repeat(2,1fr); gap:.7rem; margin-top:1.5rem; }
.preview-gallery img { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:8px; }
html[data-theme="light"] .form-divider { border-color:#4d3a1715; }

@media (max-width:1100px) { .blog-builder { grid-template-columns:1fr; } .blog-editor { max-height:none; } }
@media (max-width:780px) { .blog-builder { margin-top:1rem; } .form-split { grid-template-columns:1fr; gap:0; } .preview-cover { min-height:190px; } .preview-body { padding:1.25rem; } .preview-body h1 { font-size:2rem; } }

/* Website-style desktop navigation; mobile keeps bottom menu */
.desktop-menu { width:100%; min-width:0; min-height:62px; margin-bottom:1.4rem; padding:.55rem .75rem; display:flex; align-items:center; gap:1rem; border:1px solid #faa61d24; border-radius:14px; background:#111; }
.desktop-brand { padding:.55rem .7rem; border-radius:9px; color:#171108; background:#faa61d; text-decoration:none; font-size:.72rem; font-weight:900; letter-spacing:.08em; }
.desktop-menu > div { min-width:0; display:flex; align-items:center; gap:.2rem; overflow-x:auto; scrollbar-width:none; }
.desktop-menu > div a { padding:.62rem .72rem; border-radius:8px; color:#aaa; text-decoration:none; white-space:nowrap; font-size:.75rem; font-weight:700; }
.desktop-menu > div a:hover,.desktop-menu > div a.active { color:#faa61d; background:#faa61d13; }
.desktop-theme-toggle { width:auto; min-width:76px; margin:0 0 0 auto; }
html[data-theme="light"] .desktop-menu { border-color:#e2c98f; background:#fffdf8; }
html[data-theme="light"] .desktop-menu > div a { color:#6b604e; }
html[data-theme="light"] .desktop-menu > div a:hover,html[data-theme="light"] .desktop-menu > div a.active { color:#8c5700; background:#faa61d20; }

@media (min-width:781px) {
  .workspace-shell:has(.td-side-wide),html[data-sidebar="collapsed"] .workspace-shell:has(.td-side-wide) { grid-template-columns:minmax(0,1fr); }
  .td-side-wide { display:none; }
  .td-dashboard { width:min(1500px,100%); padding-top:1.25rem; }
}
@media (max-width:780px) { .desktop-menu { display:none; } }

.reminder-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:1.5rem 0 1rem; }
.lead-quick-actions { display:flex; flex-wrap:wrap; gap:.35rem; }
.lead-quick-actions a { padding:.42rem .58rem; border:1px solid #faa61d35; border-radius:7px; color:#faa61d; background:#faa61d0d; text-decoration:none; font-size:.68rem; font-weight:800; }
.lead-quick-actions .whatsapp-action { color:#6ee7a8; border-color:#25d36655; background:#25d36612; }
.activity-row.overdue { margin-inline:-.5rem; padding-inline:.5rem; border-left:3px solid #e45b4f; background:#e45b4f0c; }
.activity-row.due-today { margin-inline:-.5rem; padding-inline:.5rem; border-left:3px solid #faa61d; background:#faa61d0c; }
html[data-theme="light"] .lead-quick-actions a { color:#7b4b00; border-color:#d7aa55; background:#fff4dc; }
html[data-theme="light"] .lead-quick-actions .whatsapp-action { color:#087f3e; border-color:#25a85b66; background:#e9fff1; }
@media (max-width:780px) {
  .reminder-grid { grid-template-columns:repeat(3,1fr); gap:.5rem; margin-top:1rem; }
  .reminder-grid .metric-card { min-height:auto; padding:.75rem; }
  .reminder-grid .metric-card strong { font-size:1.65rem; }
  .reminder-grid .metric-card small { font-size:.58rem; }
  .lead-quick-actions { min-width:150px; }
  .lead-quick-actions a { flex:1; min-width:68px; text-align:center; }
}

/* Shared monthly content calendars */
.calendar-layout { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:1rem; margin-top:1.5rem; align-items:start; }
.calendar-main,.calendar-add { min-width:0; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; text-align:center; }
.calendar-toolbar h2 { margin:.3rem 0 0; }
.calendar-scroll { max-width:100%; overflow:auto; }
.calendar-grid { min-width:760px; display:grid; grid-template-columns:repeat(7,minmax(100px,1fr)); gap:1px; overflow:hidden; border:1px solid #ffffff12; border-radius:12px; background:#ffffff12; }
.calendar-weekday { padding:.65rem; color:#a9a9a9; background:#111; text-align:center; font-size:.7rem; font-weight:800; }
.calendar-day { min-height:118px; padding:.55rem; color:#ddd; background:#151515; }
.calendar-day.empty { background:#101010; }
.calendar-day.today { box-shadow:inset 0 0 0 2px #faa61d; }
.calendar-day > strong { display:block; margin-bottom:.45rem; color:#888; font-size:.72rem; }
.calendar-day.today > strong { color:#faa61d; }
.calendar-item { margin-top:.35rem; padding:.4rem; border-left:2px solid #faa61d; border-radius:5px; background:#faa61d13; }
.calendar-item span,.calendar-item b { display:block; }
.calendar-item span { color:#c58721; font-size:.58rem; text-transform:uppercase; }
.calendar-item b { margin-top:.15rem; color:#eee; font-size:.66rem; line-height:1.3; }
.calendar-add h2 { margin:.35rem 0 1rem; }
html[data-theme="light"] .calendar-grid { border-color:#dfcfac; background:#dfcfac; }
html[data-theme="light"] .calendar-weekday { color:#6f624c; background:#f4ead7; }
html[data-theme="light"] .calendar-day { color:#282828; background:#fffdf8; }
html[data-theme="light"] .calendar-day.empty { background:#f7f1e6; }
html[data-theme="light"] .calendar-item b { color:#332713; }
@media (max-width:1050px) { .calendar-layout { grid-template-columns:1fr; } .calendar-add { order:-1; } }
@media (max-width:780px) { .calendar-layout { margin-top:1rem; } .calendar-main,.calendar-add { padding:.9rem; } .calendar-grid { min-width:700px; } .calendar-day { min-height:105px; } }

/* Isolated ChemTech CRM workspace */
.ct-workspace { --ct-bg:#f4f6f8; --ct-surface:#fff; --ct-ink:#17212b; --ct-muted:#66727f; --ct-line:#dfe4e8; --ct-accent-text:#8a5700; --ct-soft:color-mix(in srgb,var(--ct-accent) 9%,white); min-height:100vh; display:grid; grid-template-columns:244px minmax(0,1fr); color:var(--ct-ink); background:var(--ct-bg); }
.ct-sidebar { position:sticky; z-index:30; top:0; height:100vh; padding:1rem .8rem; display:flex; flex-direction:column; border-right:1px solid var(--ct-line); background:#fff; transition:width .2s,transform .2s; }
.ct-brand { min-height:56px; padding:.3rem .35rem .9rem; display:flex; align-items:center; gap:.7rem; border-bottom:1px solid var(--ct-line); }
.ct-brand>span,.ct-brand-preview>span { flex:0 0 auto; width:38px; height:38px; display:grid; place-items:center; border-radius:10px; color:#1a1408; background:var(--ct-accent); font-size:.76rem; font-weight:900; letter-spacing:.03em; }
.ct-brand strong { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.85rem; }
.ct-brand button { width:28px; height:28px; border:1px solid var(--ct-line); border-radius:7px; color:var(--ct-muted); background:#fff; cursor:pointer; }
.ct-sidebar nav { flex:1; margin:.8rem 0; overflow:auto; scrollbar-width:thin; }
.ct-sidebar nav section>small { display:block; margin:.75rem .55rem .35rem; color:#929ca5; font-size:.59rem; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.ct-sidebar nav a,.ct-back { min-height:36px; padding:.48rem .55rem; display:flex; align-items:center; gap:.7rem; border-radius:8px; color:#5d6873; text-decoration:none; font-size:.75rem; }
.ct-sidebar nav a>span,.ct-back>span { width:22px; flex:0 0 22px; color:#8a959f; text-align:center; font-size:.67rem; font-weight:900; }
.ct-sidebar nav a b,.ct-back b { font-weight:700; }
.ct-sidebar nav a:hover,.ct-sidebar nav a.active { color:var(--ct-accent-text); background:var(--ct-soft); }
.ct-sidebar nav a.active { box-shadow:inset 3px 0 var(--ct-accent); }
.ct-back { border-top:1px solid var(--ct-line); border-radius:0; }
.ct-main { width:min(1540px,100%); min-width:0; margin:0 auto; padding:1.5rem clamp(1rem,3vw,2.5rem) 3rem; }
.ct-topbar { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding-bottom:1.25rem; }
.ct-breadcrumb { color:var(--ct-muted); font-size:.7rem; }
.ct-topbar h1 { margin:.28rem 0 .18rem; font-size:clamp(1.65rem,3vw,2.45rem); letter-spacing:-.035em; }
.ct-topbar p { margin:0; color:var(--ct-muted); font-size:.86rem; }
.ct-top-actions { display:flex; align-items:center; gap:.65rem; }
.ct-top-actions .theme-toggle { color:#55616c; border-color:var(--ct-line); background:#fff; }
.ct-mobile-menu { display:none; }
.ct-button { min-height:40px; padding:.68rem .9rem; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--ct-line); border-radius:8px; color:var(--ct-ink); background:#fff; text-decoration:none; font-size:.78rem; font-weight:800; cursor:pointer; }
.ct-button.primary { color:#1a1408; border-color:var(--ct-accent); background:var(--ct-accent); }
.ct-notice { margin:.2rem 0 1rem; padding:.75rem .9rem; border:1px solid color-mix(in srgb,var(--ct-accent) 32%,white); border-radius:9px; color:var(--ct-accent); background:var(--ct-soft); font-size:.8rem; }
.ct-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.9rem; margin:.55rem 0 1rem; }
.ct-metrics>a,.ct-metrics>div { min-width:0; min-height:126px; padding:1.05rem; display:flex; flex-direction:column; border:1px solid var(--ct-line); border-radius:12px; color:inherit; background:var(--ct-surface); text-decoration:none; box-shadow:0 4px 14px #20304008; }
.ct-metrics span { color:var(--ct-muted); font-size:.74rem; }
.ct-metrics strong { margin:.55rem 0; overflow:hidden; text-overflow:ellipsis; font-size:1.65rem; letter-spacing:-.035em; }
.ct-metrics small { margin-top:auto; color:#89939c; font-size:.68rem; }
.ct-metrics.compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ct-grid { display:grid; gap:1rem; margin:1rem 0; align-items:start; }
.ct-grid.two { grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); }
.ct-grid.form-list { grid-template-columns:minmax(320px,.72fr) minmax(520px,1.28fr); }
.ct-grid.settings { grid-template-columns:minmax(420px,1.15fr) minmax(300px,.85fr); }
.ct-card { min-width:0; padding:1.15rem; border:1px solid var(--ct-line); border-radius:12px; background:var(--ct-surface); box-shadow:0 4px 14px #20304008; }
.ct-card h2 { margin:.3rem 0 1rem; font-size:1.12rem; letter-spacing:-.02em; }
.ct-card h3 { margin:1.4rem 0 .2rem; font-size:.9rem; }
.ct-card-head { display:flex; align-items:start; justify-content:space-between; gap:1rem; }
.ct-card-head>a { color:var(--ct-accent-text); text-decoration:none; font-size:.72rem; font-weight:800; }
.ct-kicker { color:var(--ct-accent-text); font-size:.61rem; font-weight:900; letter-spacing:.14em; }
.ct-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; }
.ct-action-grid a { min-height:76px; padding:.85rem; display:flex; flex-direction:column; justify-content:center; border:1px solid var(--ct-line); border-radius:9px; color:var(--ct-ink); background:#fafbfc; text-decoration:none; }
.ct-action-grid a:hover { border-color:var(--ct-accent); }
.ct-action-grid b { font-size:.8rem; }.ct-action-grid small { margin-top:.25rem; color:var(--ct-muted); font-size:.68rem; }
.ct-attention>div,.ct-line { min-height:52px; padding:.7rem 0; display:flex; align-items:center; justify-content:space-between; gap:1rem; border-bottom:1px solid var(--ct-line); }
.ct-attention span,.ct-line>span { color:var(--ct-muted); font-size:.78rem; }.ct-attention strong { color:var(--ct-accent-text); font-size:1.05rem; }
.ct-line span b,.ct-line span small { display:block; }.ct-line span b { color:var(--ct-ink); }.ct-line span small { margin-top:.2rem; font-size:.65rem; }
.ct-table-wrap { max-width:100%; overflow:auto; }
.ct-table { width:100%; border-collapse:collapse; font-size:.74rem; }
.ct-table th,.ct-table td { padding:.72rem .65rem; border-bottom:1px solid var(--ct-line); text-align:left; vertical-align:top; white-space:nowrap; }
.ct-table th { color:#808b95; background:#fafbfc; font-size:.65rem; text-transform:uppercase; letter-spacing:.06em; }
.ct-table td b,.ct-table td small { display:block; }.ct-table td small { margin-top:.22rem; color:#84909a; font-size:.65rem; }
.ct-status { padding:.28rem .48rem; display:inline-block; border-radius:999px; color:var(--ct-accent); background:var(--ct-soft); font-size:.63rem; font-weight:800; }
.ct-status.warning,.ct-status.unpaid { color:#a45b00; background:#fff1d8; }.ct-status.paid,.ct-status.ready { color:#187451; background:#e3f5ec; }.ct-status.part_paid { color:#765500; background:#fff4c8; }
.ct-form { display:grid; gap:.15rem; }.ct-form label { margin:.72rem 0 .1rem; color:#52606b; font-size:.72rem; font-weight:750; }
.ct-form input,.ct-form select,.ct-form textarea { width:100%; min-height:40px; margin-top:.35rem; padding:.65rem .7rem; border:1px solid var(--ct-line); border-radius:8px; color:var(--ct-ink); background:#fff; outline:none; }
.ct-form input:focus,.ct-form select:focus,.ct-form textarea:focus { border-color:var(--ct-accent); box-shadow:0 0 0 3px var(--ct-soft); }
.ct-form textarea { resize:vertical; }.ct-form .ct-button { width:100%; margin-top:1rem; }
.ct-form-row { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; }
.ct-help { margin:.65rem 0; color:var(--ct-muted); font-size:.72rem; line-height:1.55; }
.ct-empty { min-height:120px; display:grid; place-items:center; padding:1rem; color:#87919a; text-align:center; font-size:.76rem; }
.ct-select-list { max-height:370px; overflow:auto; border:1px solid var(--ct-line); border-radius:9px; }
.ct-select-list label { margin:0; padding:.75rem; display:flex; align-items:center; gap:.65rem; border-bottom:1px solid var(--ct-line); cursor:pointer; }
.ct-select-list input { width:17px; min-height:17px; margin:0; accent-color:var(--ct-accent); }.ct-select-list span b,.ct-select-list span small { display:block; }.ct-select-list span small { margin-top:.2rem; color:var(--ct-muted); }
.ct-select-list label.disabled { opacity:.42; cursor:not-allowed; }
.ct-brand-preview { margin:.8rem 0; padding:.75rem; display:flex; align-items:center; gap:.7rem; border:1px solid var(--ct-line); border-radius:9px; background:#fafbfc; }.ct-brand-preview div { display:grid; gap:.15rem; }.ct-brand-preview small { color:var(--ct-muted); }
.ct-rule { margin-top:.65rem; padding:.8rem; display:flex; justify-content:space-between; border:1px solid var(--ct-line); border-radius:8px; font-size:.74rem; }.ct-rule span { color:var(--ct-accent); font-weight:800; }
.ct-module { min-height:420px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; }.ct-module>p { max-width:600px; color:var(--ct-muted); line-height:1.6; }
.ct-module-flow { margin:1.2rem 0; display:flex; flex-wrap:wrap; justify-content:center; gap:.6rem; }.ct-module-flow span { padding:.65rem .8rem; border:1px solid var(--ct-line); border-radius:8px; color:var(--ct-accent); background:var(--ct-soft); font-size:.72rem; font-weight:800; }
.ct-module-flow span+span:before { content:'→'; margin-right:.6rem; color:#9aa3aa; }
html[data-ct-sidebar="collapsed"] .ct-workspace { grid-template-columns:72px minmax(0,1fr); }
html[data-ct-sidebar="collapsed"] .ct-sidebar { padding-inline:.55rem; }
html[data-ct-sidebar="collapsed"] .ct-brand strong,html[data-ct-sidebar="collapsed"] .ct-brand button,html[data-ct-sidebar="collapsed"] .ct-sidebar nav small,html[data-ct-sidebar="collapsed"] .ct-sidebar nav a b,html[data-ct-sidebar="collapsed"] .ct-back b { display:none; }
html[data-ct-sidebar="collapsed"] .ct-brand { justify-content:center; }html[data-ct-sidebar="collapsed"] .ct-sidebar nav a { justify-content:center; }

html[data-theme="dark"] .ct-workspace { --ct-bg:#111516; --ct-surface:#191e20; --ct-ink:#eef3f1; --ct-muted:#9ca7a4; --ct-line:#2d3535; --ct-accent-text:#faa61d; --ct-soft:color-mix(in srgb,var(--ct-accent) 20%,#151919); }
html[data-theme="dark"] .ct-sidebar,html[data-theme="dark"] .ct-brand button,html[data-theme="dark"] .ct-button,html[data-theme="dark"] .ct-top-actions .theme-toggle { color:var(--ct-ink); background:#171b1c; }
html[data-theme="dark"] .ct-action-grid a,html[data-theme="dark"] .ct-table th,html[data-theme="dark"] .ct-form input,html[data-theme="dark"] .ct-form select,html[data-theme="dark"] .ct-form textarea,html[data-theme="dark"] .ct-brand-preview { color:var(--ct-ink); background:#14191a; }

@media (max-width:1100px) { .ct-workspace { grid-template-columns:205px minmax(0,1fr); }.ct-grid.form-list,.ct-grid.settings { grid-template-columns:1fr; }.ct-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .ct-workspace,html[data-ct-sidebar="collapsed"] .ct-workspace { display:block; }.ct-main { padding:.9rem .8rem 5rem; }.ct-sidebar { position:fixed; inset:0 auto 0 0; width:min(82vw,290px); height:100dvh; transform:translateX(-105%); box-shadow:16px 0 44px #0003; }.ct-sidebar.open { transform:translateX(0); }.ct-brand button { display:none; }.ct-mobile-menu { margin-bottom:.65rem; padding:.45rem .65rem; display:inline-flex; border:1px solid var(--ct-line); border-radius:7px; color:var(--ct-ink); background:var(--ct-surface); font-size:.7rem; font-weight:800; }.ct-topbar { align-items:flex-start; }.ct-topbar p { max-width:240px; }.ct-top-actions .theme-toggle { min-width:48px; width:48px; }.ct-top-actions .ct-button { display:none; }.ct-metrics,.ct-metrics.compact { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }.ct-metrics>a,.ct-metrics>div { min-height:108px; padding:.8rem; }.ct-metrics strong { font-size:1.23rem; }.ct-grid.two { grid-template-columns:1fr; }.ct-action-grid { grid-template-columns:1fr 1fr; gap:.5rem; }.ct-card { padding:.9rem; }.ct-form-row { grid-template-columns:1fr; gap:0; }.ct-table th,.ct-table td { padding:.65rem .55rem; }.ct-module { min-height:330px; }.ct-module-flow span+span:before { display:none; }
}

/* ChemTech professional admin v2 */
.ct-workspace { --ct-bg:#f3f3f3; --ct-surface:#fff; --ct-ink:#202223; --ct-muted:#6d7175; --ct-line:#dcdcdc; --ct-accent-text:#5c3b00; grid-template-columns:228px minmax(0,1fr); font-size:14px; }
.ct-sidebar { padding:0; color:#d7d7d7; border:0; background:#202123; box-shadow:none; }
.ct-brand { min-height:60px; padding:10px 12px; border-bottom:1px solid #36383b; }
.ct-brand>span { width:34px; height:34px; border-radius:7px; }
.ct-brand strong { color:#fff; font-size:13px; }
.ct-brand button { color:#aaa; border-color:#44464a; background:#2b2c2f; }
.ct-sidebar nav { margin:6px 0; padding:0 8px 12px; }
.ct-sidebar nav section>small { margin:15px 10px 4px; color:#85888c; font-size:10px; letter-spacing:.08em; }
.ct-sidebar nav a { min-height:34px; padding:7px 10px; color:#c8c9cb; border-radius:6px; font-size:13px; }
.ct-sidebar nav a:hover { color:#fff; background:#2d2e31; }
.ct-sidebar nav a.active { color:#1d1d1d; background:#faa61d; box-shadow:none; }
.ct-sidebar nav a b { font-weight:550; }
.ct-back { min-height:49px; margin:0 8px 8px; padding:8px 10px; color:#c8c9cb; border:0; border-top:1px solid #383a3d; font-size:12px; }
.ct-main { width:100%; max-width:1440px; padding:26px clamp(22px,3.5vw,48px) 48px; }
.ct-topbar { min-height:72px; padding:0 0 22px; align-items:flex-end; border-bottom:0; }
.ct-heading { min-width:0; }
.ct-breadcrumb { display:block; margin-bottom:5px; color:#8c9196; font-size:11px; }
.ct-topbar h1 { margin:0; font-size:25px; font-weight:680; letter-spacing:-.025em; }
.ct-topbar p { margin-top:4px; font-size:13px; }
.ct-top-actions { flex:0 0 auto; }
.ct-theme { width:36px; height:36px; display:grid; place-items:center; border:1px solid #c9cacc; border-radius:7px; color:#4a4d50; background:#fff; cursor:pointer; }
.ct-button { min-height:36px; padding:7px 13px; border-color:#c9cacc; border-radius:7px; color:#303336; background:#fff; box-shadow:0 1px 0 #0000000d; font-size:12px; font-weight:650; }
.ct-button:hover { border-color:#999; background:#f7f7f7; }
.ct-button.primary { color:#201708; border-color:#d99200; background:#faa61d; box-shadow:0 1px 0 #00000012; }
.ct-button.primary:hover { background:#f2a00f; }
.ct-button:disabled { opacity:.45; }
.ct-notice { margin:0 0 16px; padding:10px 12px; border-radius:7px; font-size:12px; }
.ct-summary { margin:0 0 18px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:hidden; border:1px solid var(--ct-line); border-radius:9px; background:var(--ct-surface); box-shadow:0 1px 1px #00000008; }
.ct-summary>a,.ct-summary>div { min-width:0; min-height:98px; padding:17px 19px; display:flex; flex-direction:column; color:inherit; border-right:1px solid var(--ct-line); text-decoration:none; }
.ct-summary>a:last-child,.ct-summary>div:last-child { border-right:0; }
.ct-summary>a:hover { background:#fafafa; }
.ct-summary span { color:var(--ct-muted); font-size:12px; }
.ct-summary strong { margin:7px 0 3px; overflow:hidden; text-overflow:ellipsis; font-size:21px; font-weight:670; letter-spacing:-.025em; }
.ct-summary small { color:#909499; font-size:11px; }
.ct-summary-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ct-workflow-guide { margin:0 0 18px; overflow:hidden; }
.ct-workflow-guide>header { min-height:58px; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--ct-line); }
.ct-workflow-guide>header span { color:#996100; font-size:9px; font-weight:800; letter-spacing:.09em; }
.ct-workflow-guide>header h2 { margin:3px 0 0; font-size:14px; }.ct-workflow-guide>header p { margin:0; color:var(--ct-muted); font-size:11px; }
.ct-workflow-guide>div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
.ct-workflow-guide a { min-width:0; padding:13px 14px; display:flex; align-items:center; gap:10px; color:inherit; border-right:1px solid var(--ct-line); text-decoration:none; }
.ct-workflow-guide a:last-child { border-right:0; }.ct-workflow-guide a:hover { background:#fff8e8; }
.ct-workflow-guide a>b { width:24px; height:24px; flex:0 0 24px; display:grid; place-items:center; border-radius:50%; color:#332300; background:#faa61d; font-size:10px; }
.ct-workflow-guide a>span { min-width:0; display:grid; gap:2px; }.ct-workflow-guide a strong { font-size:11px; }.ct-workflow-guide a small { overflow:hidden; color:var(--ct-muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.ct-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(280px,.65fr); gap:18px; align-items:start; }
.ct-stack { display:grid; gap:18px; }
.ct-card { padding:0; border-color:var(--ct-line); border-radius:9px; box-shadow:0 1px 1px #00000008; }
.ct-section-head,.ct-index-toolbar { min-height:62px; padding:13px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--ct-line); }
.ct-section-head h2,.ct-index-toolbar h2 { margin:0; font-size:14px; font-weight:680; letter-spacing:-.01em; }
.ct-section-head p,.ct-index-toolbar>div>span { display:block; margin:3px 0 0; color:var(--ct-muted); font-size:11px; }
.ct-section-head>a { color:#6b4700; font-size:11px; font-weight:650; text-decoration:none; }
.ct-attention>a { min-height:59px; padding:11px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:inherit; border-bottom:1px solid var(--ct-line); text-decoration:none; }
.ct-attention>a:last-child { border-bottom:0; }
.ct-attention>a:hover { background:#fafafa; }
.ct-attention a>span { color:#333638; font-size:12px; }
.ct-attention a small { display:block; margin-top:3px; color:var(--ct-muted); font-size:10px; }
.ct-attention a strong { color:#3a3c3e; font-size:15px; }
.ct-shortcuts nav { padding:5px 0; }
.ct-shortcuts nav a { padding:9px 16px; display:flex; justify-content:space-between; color:#3e4144; text-decoration:none; font-size:12px; }
.ct-shortcuts nav a:hover { color:#5c3b00; background:#fff8e8; }
.ct-index { margin:0; overflow:hidden; }
.ct-toolbar-actions { display:flex; align-items:center; gap:8px; }
.ct-search { position:relative; margin:0; }
.ct-search>span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.ct-search input { width:210px; min-height:36px; padding:7px 10px 7px 31px; border:1px solid #c9cacc; border-radius:7px; color:#303336; background:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7175' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:10px center; font-size:12px; }
.ct-search input:focus { border-color:#a66d00; box-shadow:0 0 0 2px #faa61d40; }
.ct-table-wrap { width:100%; }
.ct-table { font-size:12px; }
.ct-table th,.ct-table td { height:48px; padding:9px 14px; border-bottom-color:#e6e6e6; white-space:nowrap; }
.ct-table th { color:#5f6367; background:#f7f7f7; font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:none; }
.ct-table tbody tr:hover { background:#fafafa; }
.ct-table tbody tr:last-child td { border-bottom:0; }
.ct-table td b { color:#282b2d; font-size:12px; font-weight:650; }
.ct-table td small { margin-top:3px; color:#858a8f; font-size:10px; }
.ct-pagination { min-height:48px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--ct-line); color:var(--ct-muted); background:#fafafa; font-size:11px; }
.ct-pagination>div { display:flex; gap:5px; }.ct-pagination button { width:30px; height:28px; border:1px solid #c9cacc; border-radius:6px; color:#45484b; background:#fff; cursor:pointer; }.ct-pagination button:disabled { opacity:.4; cursor:default; }
.ct-table-action { padding:5px 9px; display:inline-flex; border:1px solid #c9cacc; border-radius:6px; color:#4b360b; background:#fff; font-size:10px; font-weight:700; text-decoration:none; }
.ct-table-action[type="button"] { cursor:pointer; }
.ct-locked { color:var(--ct-muted); font-size:10px; }
.ct-record-link { padding:0; border:0; color:#754d00; background:transparent; font:inherit; font-weight:700; text-align:left; text-decoration:none; cursor:pointer; }
.ct-record-link:hover { color:#9d6700; text-decoration:underline; text-underline-offset:3px; }
.ct-table-action.primary { color:#2c1d00; border-color:#d99200; background:#faa61d; cursor:pointer; }.ct-inline-form { margin:0; display:inline; }.ct-inline-form button { font:inherit; }
.ct-customer-actions { margin:0 0 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ct-customer-hero { margin:0 0 18px; padding:18px; display:flex; align-items:center; gap:14px; }
.ct-customer-avatar { width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center; border-radius:8px; color:#332300; background:#faa61d; font-size:13px; font-weight:800; }
.ct-customer-hero>div:nth-child(2) { min-width:0; }.ct-customer-hero>div:nth-child(2)>span { color:#8a5a00; font-size:9px; font-weight:800; letter-spacing:.09em; }.ct-customer-hero h2 { margin:3px 0; overflow:hidden; font-size:18px; text-overflow:ellipsis; white-space:nowrap; }.ct-customer-hero p { margin:0; color:var(--ct-muted); font-size:11px; }
.ct-customer-hero nav { margin-left:auto; display:flex; gap:7px; }
.ct-customer-grid { margin:0 0 18px; display:grid; grid-template-columns:minmax(280px,.75fr) minmax(0,1.4fr); gap:18px; align-items:stretch; }
.ct-customer-details dl { margin:0; padding:4px 16px 13px; display:grid; grid-template-columns:125px minmax(0,1fr); }.ct-customer-details dt,.ct-customer-details dd { margin:0; padding:10px 0; border-bottom:1px solid var(--ct-line); font-size:11px; line-height:1.45; }.ct-customer-details dt { color:var(--ct-muted); }.ct-customer-details dd { overflow-wrap:anywhere; font-weight:600; }.ct-customer-details dt:last-of-type,.ct-customer-details dd:last-of-type { border-bottom:0; }
.ct-empty.compact { min-height:230px; padding:24px; }
.ct-customer-invoices { margin-top:0; }
.ct-status { padding:3px 7px; color:#4e3500; background:#fff1cd; font-size:10px; font-weight:650; }
.ct-status.ready,.ct-status.paid { color:#125c3c; background:#e3f1e9; }
.ct-status.warning,.ct-status.unpaid { color:#8b4200; background:#ffead9; }
.ct-status.part_paid { color:#694f00; background:#f6edc7; }
.ct-empty { min-height:260px; padding:36px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; }
.ct-empty b { color:#333638; font-size:14px; }.ct-empty span { color:var(--ct-muted); font-size:12px; }.ct-empty .ct-button { margin-top:7px; }
.ct-settings-form { max-width:1000px; }
.ct-settings-row { padding:0 0 22px; display:grid; grid-template-columns:230px minmax(0,1fr); gap:32px; border-bottom:1px solid var(--ct-line); margin-bottom:22px; }
.ct-settings-row>div h2 { margin:3px 0 5px; font-size:14px; }.ct-settings-row>div p { margin:0; color:var(--ct-muted); font-size:11px; line-height:1.5; }
.ct-settings-row .ct-card { padding:18px; }
.ct-settings-form label,.ct-dialog label { display:block; margin:0 0 14px; color:#4b4f52; font-size:11px; font-weight:650; }
.ct-settings-form input,.ct-settings-form select,.ct-settings-form textarea,.ct-dialog input,.ct-dialog select,.ct-dialog textarea { width:100%; min-height:38px; margin-top:5px; padding:8px 10px; border:1px solid #c9cacc; border-radius:6px; color:#282b2d; background:#fff; outline:none; font-size:12px; }
.ct-settings-form textarea,.ct-dialog textarea { resize:vertical; }
.ct-settings-form input:focus,.ct-settings-form select:focus,.ct-settings-form textarea:focus,.ct-dialog input:focus,.ct-dialog select:focus,.ct-dialog textarea:focus { border-color:#a66d00; box-shadow:0 0 0 2px #faa61d40; }
.ct-form-grid { display:grid; gap:0 13px; }.ct-form-grid.two { grid-template-columns:1fr 1fr; }.ct-form-grid.three { grid-template-columns:2fr 1fr 1fr; }
.ct-choice-group { margin:0 0 16px; padding:0; display:flex; gap:7px; border:0; }.ct-choice-group legend { margin:0 0 7px; width:100%; color:#4b4f52; font-size:11px; font-weight:650; }.ct-choice-group label { margin:0; padding:8px 11px; display:inline-flex; align-items:center; gap:7px; border:1px solid #c9cacc; border-radius:6px; color:#555; background:#fff; cursor:pointer; }.ct-choice-group label:has(input:checked) { border-color:#d99200; color:#4b3000; background:#fff4db; }.ct-choice-group input { width:auto!important; min-height:0!important; margin:0!important; accent-color:#faa61d; }
.ct-order-lines-head { margin:4px 0 9px; display:flex; align-items:center; justify-content:space-between; gap:10px; }.ct-order-lines-head>div { display:grid; gap:3px; }.ct-order-lines-head>div span { color:#777; font-size:10px; }.ct-order-lines-head .ct-button { padding:6px 9px; font-size:10px; }
.ct-order-line { margin:0 0 10px; padding:10px 38px 2px 11px; position:relative; display:grid; grid-template-columns:minmax(0,1fr) 120px 135px; gap:0 10px; border:1px solid #ddd; border-radius:7px; background:#fafafa; }.ct-order-line label { margin-bottom:8px; }.ct-line-remove { width:25px; height:25px; position:absolute; top:9px; right:8px; border:1px solid #ccc; border-radius:5px; color:#777; background:#fff; cursor:pointer; }.ct-edit-price-lines { display:grid; gap:9px; }.ct-edit-price-lines label { margin:0; padding:10px; border:1px solid #ddd; border-radius:7px; background:#fafafa; }.ct-edit-price-lines label small { margin:3px 0 5px; display:block; color:#777; font-size:10px; }
.ct-brand-preview { margin:0 0 16px; padding:11px; border-radius:7px; }.ct-brand-preview div { display:grid; }.ct-brand-preview small { color:var(--ct-muted); font-size:10px; }
.ct-settings-save { position:sticky; bottom:12px; padding:10px; display:flex; justify-content:flex-end; border:1px solid var(--ct-line); border-radius:8px; background:#ffffffed; box-shadow:0 4px 16px #0002; }
.ct-dialog { width:100%; max-width:none; height:100%; max-height:none; margin:0; padding:0; border:0; background:transparent; }
.ct-dialog::backdrop { background:#0008; backdrop-filter:blur(1px); }
.ct-dialog[open] { display:flex; justify-content:flex-end; }
.ct-dialog-panel { width:min(520px,100vw); height:100%; margin:0; display:flex; flex-direction:column; color:#252729; background:#fff; box-shadow:-18px 0 50px #0003; animation:ct-slide-in .18s ease-out; }
.ct-dialog-panel-wide { width:min(760px,100vw); }
.ct-dialog-panel-invoice { width:min(1160px,100vw); }
@keyframes ct-slide-in { from { transform:translateX(35px); opacity:.7; } }
.ct-dialog-panel>header { min-height:67px; padding:13px 17px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #ddd; }
.ct-dialog-panel>header span { color:#787d81; font-size:10px; }.ct-dialog-panel>header h2 { margin:3px 0 0; font-size:16px; }
.ct-dialog-panel>header button { width:32px; height:32px; border:1px solid #ccc; border-radius:7px; color:#555; background:#fff; font-size:20px; cursor:pointer; }
.ct-dialog-body { flex:1; padding:18px; overflow:auto; }
.ct-field-help { margin:-4px 0 0; color:#777; font-size:10px; line-height:1.5; }
.ct-popup-customer-head { margin:0 0 16px; padding:14px; display:flex; align-items:center; gap:12px; border:1px solid #ddd; border-radius:8px; background:#fafafa; }
.ct-popup-customer-head>div:nth-child(2) { min-width:0; flex:1; display:grid; gap:3px; }.ct-popup-customer-head>div:nth-child(2)>strong { overflow:hidden; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }.ct-popup-customer-head>div:nth-child(2)>span { color:#777; font-size:10px; }
.ct-popup-customer-head nav { display:flex; gap:6px; }.ct-popup-customer-head nav [hidden] { display:none; }
.ct-popup-stats { margin:0 0 18px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid #ddd; border-radius:8px; overflow:hidden; }
.ct-popup-stats>div { min-width:0; padding:12px; display:grid; gap:4px; border-right:1px solid #ddd; }.ct-popup-stats>div:last-child { border-right:0; }.ct-popup-stats span { color:#777; font-size:9px; text-transform:uppercase; }.ct-popup-stats strong { overflow:hidden; font-size:14px; text-overflow:ellipsis; }
.ct-invoice-popup-body { padding:22px; background:#f2f2f2; }.ct-invoice-popup-body .ct-invoice-document { padding:28px; }
.ct-dialog-panel>footer { padding:12px 17px; display:flex; justify-content:flex-end; gap:8px; border-top:1px solid #ddd; background:#fafafa; }
.ct-inline-note { margin:0 0 16px; padding:10px 11px; border-left:3px solid #faa61d; color:#5a4a2d; background:#fff8e8; font-size:11px; line-height:1.5; }
.ct-order-picker-title { margin-bottom:5px!important; }.ct-select-list { max-height:none; border-color:#ddd; }.ct-select-list>p { margin:0; padding:18px 12px; color:#777; text-align:center; font-size:11px; }.ct-select-list label { margin:0; padding:11px; }.ct-select-list label:hover { background:#fafafa; }
.ct-invoice-actions { max-width:1040px; margin:0 auto 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; }.ct-invoice-actions>div { display:flex; gap:7px; }
.ct-invoice-document { max-width:1040px; margin:0 auto; padding:36px; color:#1f2326; border:1px solid #d7d8da; border-radius:8px; background:#fff; box-shadow:0 2px 10px #0000000a; }
.ct-invoice-header { padding-bottom:26px; display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:36px; border-bottom:2px solid #252729; }
.ct-invoice-header>div:first-child>span,.ct-invoice-parties span { color:#8a5a00; font-size:9px; font-weight:800; letter-spacing:.12em; }
.ct-invoice-header h2 { margin:8px 0 6px; font-size:22px; }.ct-invoice-header p,.ct-invoice-parties p { margin:0 0 7px; color:#5e6367; font-size:11px; line-height:1.55; }
.ct-invoice-header>div:last-child { padding:17px; border-radius:7px; background:#f7f7f7; }.ct-invoice-header>div:last-child>strong { display:block; margin-bottom:12px; font-size:18px; }
.ct-invoice-header dl,.ct-invoice-totals dl { margin:0; display:grid; grid-template-columns:1fr auto; gap:7px 20px; font-size:11px; }.ct-invoice-header dt,.ct-invoice-totals dt { color:#71767a; }.ct-invoice-header dd,.ct-invoice-totals dd { margin:0; font-weight:650; text-align:right; }
.ct-invoice-parties { padding:24px 0; display:grid; grid-template-columns:1fr 1fr; gap:40px; }.ct-invoice-parties strong { margin:7px 0 4px; display:block; font-size:13px; }
.ct-invoice-lines { width:100%; border-collapse:collapse; font-size:10px; }.ct-invoice-lines th { padding:9px 8px; color:#5f6367; border-block:1px solid #dedede; background:#f7f7f7; text-align:left; }.ct-invoice-lines td { padding:11px 8px; border-bottom:1px solid #e6e6e6; white-space:nowrap; }.ct-invoice-lines td:nth-child(2) { white-space:normal; }.ct-invoice-lines small { margin-top:3px; display:block; color:#7b8084; }
.ct-invoice-totals { padding-top:24px; display:grid; grid-template-columns:1fr 330px; gap:40px; align-items:start; }.ct-invoice-totals>div { padding:13px; display:grid; gap:4px; border-left:3px solid #faa61d; background:#fff8e8; }.ct-invoice-totals>div span { color:#755a24; font-size:9px; text-transform:uppercase; }.ct-invoice-totals>div strong { font-size:14px; }.ct-invoice-totals .total { padding-top:9px; border-top:1px solid #ccc; color:#202223; font-size:12px; font-weight:750; }
.ct-invoice-note { margin:28px 0 0; padding-top:12px; color:#7c8185; border-top:1px solid #ddd; font-size:9px; text-align:center; }
.ct-module { min-height:480px; }.ct-module-badge { margin-bottom:12px; padding:4px 8px; border-radius:999px; color:#654300; background:#fff0c7; font-size:10px; font-weight:700; }.ct-module>h2 { font-size:19px; }
.ct-module-flow span { color:#5d3d00; border-color:#efd18d; background:#fff8e8; }
html[data-ct-sidebar="collapsed"] .ct-workspace { grid-template-columns:62px minmax(0,1fr); }
html[data-ct-sidebar="collapsed"] .ct-brand { padding-inline:10px; }
html[data-ct-sidebar="collapsed"] .ct-sidebar nav a { min-height:8px; margin:7px 10px; padding:0; background:#777; border-radius:999px; }
html[data-ct-sidebar="collapsed"] .ct-sidebar nav a.active { background:#faa61d; }
@media (min-width:761px) {
  html[data-ct-sidebar="collapsed"] .ct-brand { flex-direction:column; gap:8px; padding:10px 0; }
  html[data-ct-sidebar="collapsed"] .ct-brand button { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; }
}

html[data-theme="dark"] .ct-workspace { --ct-bg:#151617; --ct-surface:#202224; --ct-ink:#f1f1f1; --ct-muted:#a6a9ac; --ct-line:#35383b; --ct-accent-text:#faa61d; }
html[data-theme="dark"] .ct-theme,html[data-theme="dark"] .ct-button { color:#eee; border-color:#494c50; background:#292b2d; }
html[data-theme="dark"] .ct-button.primary { color:#201708; border-color:#d99200; background:#faa61d; }
html[data-theme="dark"] .ct-summary>a:hover,html[data-theme="dark"] .ct-attention>a:hover,html[data-theme="dark"] .ct-table tbody tr:hover { background:#27292b; }
html[data-theme="dark"] .ct-table th,html[data-theme="dark"] .ct-search input,html[data-theme="dark"] .ct-settings-form input,html[data-theme="dark"] .ct-settings-form select,html[data-theme="dark"] .ct-settings-form textarea { color:#eee; border-color:#45484b; background:#292b2d; }
html[data-theme="dark"] .ct-pagination { background:#1c1e20; }.ct-select-list label[hidden] { display:none; }
html[data-theme="dark"] .ct-table td b,html[data-theme="dark"] .ct-attention a>span { color:#eee; }
html[data-theme="dark"] .ct-settings-save { background:#202224ed; }
html[data-theme="dark"] .ct-workflow-guide a:hover { background:#2c271d; }
html[data-theme="dark"] .ct-table-action { color:#ffd985; border-color:#555; background:#292b2d; }
html[data-theme="dark"] .ct-table-action.primary { color:#2c1d00; border-color:#d99200; background:#faa61d; }
html[data-theme="dark"] .ct-record-link { color:#ffd985; }
html[data-theme="dark"] .ct-dialog-panel { color:#eee; background:#202224; }
html[data-theme="dark"] .ct-dialog-panel>header,html[data-theme="dark"] .ct-dialog-panel>footer { border-color:#3d4043; background:#1c1e20; }
html[data-theme="dark"] .ct-dialog-panel>header button,html[data-theme="dark"] .ct-dialog input,html[data-theme="dark"] .ct-dialog select,html[data-theme="dark"] .ct-dialog textarea { color:#eee; border-color:#4b4e51; background:#292b2d; }
html[data-theme="dark"] .ct-popup-customer-head,html[data-theme="dark"] .ct-popup-stats { border-color:#3d4043; background:#26282a; }
html[data-theme="dark"] .ct-popup-stats>div { border-color:#3d4043; }
html[data-theme="dark"] .ct-invoice-popup-body { background:#151617; }
html[data-theme="dark"] .ct-choice-group legend { color:#ddd; }
html[data-theme="dark"] .ct-choice-group label,html[data-theme="dark"] .ct-order-line,html[data-theme="dark"] .ct-edit-price-lines label,html[data-theme="dark"] .ct-line-remove { color:#eee; border-color:#4b4e51; background:#292b2d; }
html[data-theme="dark"] .ct-choice-group label:has(input:checked) { color:#ffe0a0; border-color:#d99200; background:#3a2d18; }

@media (max-width:1050px) { .ct-dashboard-grid { grid-template-columns:1fr; }.ct-stack { grid-template-columns:1fr 1fr; } }
@media (max-width:760px) {
  .ct-main { padding:16px 12px 40px; }.ct-topbar { min-height:64px; padding-bottom:16px; align-items:flex-end; }.ct-topbar h1 { font-size:21px; }.ct-topbar p { max-width:260px; font-size:11px; }.ct-breadcrumb { display:none; }.ct-mobile-menu { margin:0 0 8px; }.ct-theme { width:34px; height:34px; }.ct-top-actions>.ct-button { display:none; }
  .ct-summary,.ct-summary-three { grid-template-columns:repeat(2,minmax(0,1fr)); }.ct-summary>a,.ct-summary>div { min-height:91px; padding:13px; border-bottom:1px solid var(--ct-line); }.ct-summary>a:nth-child(2n),.ct-summary>div:nth-child(2n) { border-right:0; }.ct-summary strong { font-size:17px; }
  .ct-dashboard-grid { gap:12px; }.ct-stack { grid-template-columns:1fr; gap:12px; }.ct-section-head,.ct-index-toolbar { min-height:58px; padding:11px 12px; }.ct-index-toolbar { align-items:flex-start; flex-direction:column; }.ct-toolbar-actions { width:100%; }.ct-search { flex:1; }.ct-search input { width:100%; }.ct-table th,.ct-table td { height:45px; padding:8px 11px; }.ct-empty { min-height:220px; }
  .ct-workflow-guide>header { align-items:flex-start; flex-direction:column; gap:4px; }.ct-workflow-guide>div { grid-template-columns:1fr; }.ct-workflow-guide a { border-right:0; border-bottom:1px solid var(--ct-line); }.ct-workflow-guide a:last-child { border-bottom:0; }
  .ct-customer-hero { align-items:flex-start; flex-wrap:wrap; }.ct-customer-hero nav { width:100%; margin:2px 0 0; }.ct-customer-hero nav .ct-button { flex:1; justify-content:center; }.ct-customer-grid { grid-template-columns:1fr; gap:12px; }.ct-customer-details dl { grid-template-columns:105px minmax(0,1fr); }
  .ct-settings-row { grid-template-columns:1fr; gap:10px; }.ct-form-grid.two { grid-template-columns:1fr; }.ct-settings-row .ct-card { padding:14px; }.ct-dialog-panel { width:100vw; }.ct-dialog-body { padding:15px; }
  .ct-popup-customer-head { align-items:flex-start; flex-wrap:wrap; }.ct-popup-customer-head nav { width:100%; }.ct-popup-customer-head nav .ct-button { flex:1; justify-content:center; }.ct-popup-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }.ct-popup-stats>div:nth-child(2) { border-right:0; }.ct-popup-stats>div:nth-child(-n+2) { border-bottom:1px solid #ddd; }.ct-invoice-popup-body { padding:0; }
  .ct-form-grid.three { grid-template-columns:1fr; }.ct-order-line { grid-template-columns:1fr 1fr; gap:0 10px; }.ct-order-line label:first-child { grid-column:1/-1; }.ct-line-remove { top:8px; }
  .ct-invoice-actions { align-items:stretch; flex-wrap:wrap; }.ct-invoice-actions>div { margin-left:auto; }.ct-invoice-document { padding:18px 14px; border-radius:7px; }.ct-invoice-header { grid-template-columns:1fr; gap:16px; }.ct-invoice-parties,.ct-invoice-totals { grid-template-columns:1fr; gap:18px; }.ct-invoice-lines { min-width:760px; }
}

@media print {
  @page { size:A4; margin:12mm; }
  body.app-page { background:#fff!important; }
  .ct-sidebar,.ct-topbar,.ct-notice,.ct-invoice-actions,.ct-dialog { display:none!important; }
  .ct-workspace { min-height:0; display:block!important; background:#fff!important; }
  .ct-main { max-width:none; margin:0; padding:0; }
  .ct-invoice-document { max-width:none; margin:0; padding:0; border:0; box-shadow:none; }
  .ct-invoice-header { break-inside:avoid; }.ct-invoice-lines { min-width:0; }.ct-invoice-lines tr { break-inside:avoid; }
}
