/* Qudra Charge Connect — ERP Modern v13
   Structural redesign layer. Loaded after compiled/base themes. */
:root,
html[data-theme="qudra-green"],
html[data-theme="qudra-green-light"] {
  --green-light:#178D73;
  --green-main:#087D62;
  --green-deep:#075540;
  --green-dark:#064433;
  --orange-light:#F0C69D;
  --orange-soft:#EAAE76;
  --orange-main:#EA9C42;
  --orange-strong:#E58A29;
  --orange-dark:#D87920;
  --bg-main:#E9E3DD;
  --bg-soft:#F5F1EC;
  --surface:#F7F6F4;
  --surface-alt:#EFE8E1;
  --radius-sm:12px;
  --radius-md:16px;
  --radius-lg:22px;
  --radius-xl:28px;
  --background:#E9E3DD !important;
  --app-bg:#E9E3DD !important;
  --foreground:#202020 !important;
  --card:#F7F6F4 !important;
  --card-foreground:#202020 !important;
  --popover:#F7F6F4 !important;
  --popover-foreground:#202020 !important;
  --primary:#087D62 !important;
  --primary-hover:#075540 !important;
  --primary-foreground:#FFFFFF !important;
  --primary-light:rgba(8,125,98,.10) !important;
  --primary-deep:#064433 !important;
  --primary-glow:#178D73 !important;
  --secondary:#F5F1EC !important;
  --secondary-hover:#EFE8E1 !important;
  --secondary-foreground:#087D62 !important;
  --accent:#F0C69D !important;
  --accent-hover:#EAAE76 !important;
  --accent-foreground:#064433 !important;
  --muted:#EFE8E1 !important;
  --muted-foreground:#6B6B6B !important;
  --border:#DDD2C8 !important;
  --border-strong:#D0C3B6 !important;
  --input:#DDD2C8 !important;
  --ring:#087D62 !important;
  --sidebar:#F7F6F4 !important;
  --sidebar-bg:#F7F6F4 !important;
  --sidebar-foreground:#202020 !important;
  --sidebar-accent:rgba(8,125,98,.10) !important;
  --sidebar-accent-foreground:#064433 !important;
  --sidebar-border:#DDD2C8 !important;
  --sidebar-primary:#087D62 !important;
  --text-main:#202020 !important;
  --text-secondary:#6B6B6B !important;
  --text-muted:#9A9A9A !important;
  --gold:#EA9C42 !important;
  --gold-foreground:#202020 !important;
  --success:#087D62 !important;
  --warning:#EA9C42 !important;
  --danger:#C13A42 !important;
  --info:#178D73 !important;
  --radius:16px !important;
  --shadow:0 18px 40px rgba(60,40,20,.08),0 4px 10px rgba(60,40,20,.05) !important;
  --shadow-card:0 18px 40px rgba(60,40,20,.08),0 4px 10px rgba(60,40,20,.05) !important;
  --shadow-brand:0 8px 18px rgba(8,125,98,.22),inset 0 1px 0 rgba(255,255,255,.25) !important;
  --shadow-gold:0 10px 22px rgba(234,156,66,.28),inset 0 1px 0 rgba(255,255,255,.28) !important;
  --gradient-brand:linear-gradient(145deg,#178D73 0%,#087D62 58%,#075540 100%) !important;
  --gradient-gold:linear-gradient(145deg,#F0C69D 0%,#EA9C42 70%,#E58A29 100%) !important;
  --gradient-header:linear-gradient(120deg,#087D62,#075540) !important;
  --erp-table-header:#EFE8E1 !important;
  --erp-table-row:#F7F6F4 !important;
  --erp-table-alt:#F5F1EC !important;
  --erp-table-hover:#F0E8DF !important;
  --erp-input-bg:#FFFFFF !important;
  --erp-input-border:#DDD2C8 !important;
  --erp-focus-border:#087D62 !important;
}

html.dark,
html[data-theme="qudra-reverse"] {
  --background:#091611 !important;
  --foreground:#EFF7F3 !important;
  --card:#0E2019 !important;
  --card-foreground:#EFF7F3 !important;
  --popover:#10261E !important;
  --popover-foreground:#EFF7F3 !important;
  --primary:#56B491 !important;
  --primary-hover:#78C7AA !important;
  --primary-foreground:#071A13 !important;
  --secondary:#173228 !important;
  --secondary-foreground:#EAF5F0 !important;
  --accent:#16382C !important;
  --accent-foreground:#86D2B6 !important;
  --muted:#142A22 !important;
  --muted-foreground:#9CB3AA !important;
  --border:#24453A !important;
  --input:#315548 !important;
  --ring:#6BC4A3 !important;
  --sidebar:#061A13 !important;
  --sidebar-bg:#061A13 !important;
  --sidebar-foreground:#E9F1EE !important;
  --sidebar-border:#1D3A30 !important;
  --sidebar-accent:rgba(255,255,255,.08) !important;
  --sidebar-accent-foreground:#FFFFFF !important;
  --sidebar-primary:#7FC7AD !important;
  --gold:#C6A55B !important;
}

html,body{background:var(--background)!important;color:var(--foreground)!important}
body{font-family:Inter,Manrope,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important}
h1,h2,h3,h4,h5,h6,.font-heading,.font-display{font-family:Manrope,"Plus Jakarta Sans",Inter,sans-serif!important;letter-spacing:-.025em}

/* Contrast: filled primary / destructive always light label */
.bg-primary,.bg-destructive,[class~="bg-primary"],button.bg-primary,a.bg-primary{
  color:var(--primary-foreground,#fff)!important
}
html:not(.dark):not([data-theme="qudra-reverse"]) .bg-primary,
html[data-theme="qudra-green"] .bg-primary,
html[data-theme="qudra-green-light"] .bg-primary{
  color:#fff!important
}
html.dark .bg-primary,html[data-theme="qudra-reverse"] .bg-primary{
  color:var(--primary-foreground,#071A13)!important
}
.bg-destructive,button.bg-destructive{color:#fff!important}

/* App shell — cream floating sidebar */
aside.bg-sidebar{width:17rem!important;background:var(--sidebar)!important;color:var(--sidebar-foreground)!important;box-shadow:10px 0 36px rgba(60,40,20,.07);border-right:1px solid var(--sidebar-border)!important}
aside.bg-sidebar>div:first-child{padding:1.15rem 1.15rem!important;border-bottom:1px solid var(--sidebar-border)!important}
aside.bg-sidebar>div:first-child img{border-radius:14px!important;box-shadow:0 8px 18px rgba(8,125,98,.16)!important}
aside.bg-sidebar>div:first-child [class*="bg-gold-gradient"]{background:var(--gradient-gold)!important;color:#202020!important;box-shadow:var(--shadow-gold)!important}
aside.bg-sidebar>div:first-child [class*="text-[color:var(--gold)]"]{color:var(--orange-dark,#D87920)!important;letter-spacing:.11em!important}

.qc-nav-group{margin:0 .35rem .42rem;border-radius:16px;overflow:hidden}
.qc-nav-summary,.qc-nav-system-summary{list-style:none;cursor:pointer;user-select:none;display:flex;align-items:center;gap:.55rem;color:var(--text-muted,#9A9A9A);font-size:.69rem;font-weight:800;text-transform:uppercase;letter-spacing:.11em;padding:.7rem .72rem .46rem}
.qc-nav-summary::-webkit-details-marker,.qc-nav-system-summary::-webkit-details-marker{display:none}
.qc-nav-summary .qc-nav-chevron,.qc-nav-system-summary .qc-nav-chevron{margin-left:auto;transition:transform .18s ease;opacity:.7}
.qc-nav-group[open]>.qc-nav-summary .qc-nav-chevron,.qc-nav-system[open]>.qc-nav-system-summary .qc-nav-chevron{transform:rotate(90deg)}
.qc-nav-items{display:grid;gap:3px;padding:0 .15rem .35rem}
.qc-nav-link{min-height:40px;border-radius:14px!important;font-size:.82rem!important;padding:.55rem .72rem!important;color:var(--sidebar-foreground)!important}
.qc-nav-link:hover{background:var(--surface-alt,#EFE8E1)!important;color:var(--green-deep,#075540)!important}
.qc-nav-link.is-active{background:linear-gradient(135deg,rgba(8,125,98,.14),rgba(23,141,115,.08))!important;border-color:rgba(8,125,98,.18)!important;color:var(--green-dark,#064433)!important;box-shadow:inset 3px 0 0 #087D62,0 6px 14px rgba(8,125,98,.08)!important;font-weight:700}
.qc-nav-link.is-active svg{color:#087D62!important}
.qc-nav-system{margin:.32rem .35rem .15rem;border:1px solid var(--border);border-radius:16px;background:var(--surface-alt,#EFE8E1)}
.qc-nav-system-summary{padding:.58rem .7rem;font-size:.64rem;letter-spacing:.08em;text-transform:none;color:var(--text-secondary,#6B6B6B)}
.qc-nav-system-items{padding:0 .35rem .4rem}
.qc-nav-link-system{padding:.46rem .62rem!important;font-size:.77rem!important}

/* Desktop command bar */
.lg\:flex.border-b.bg-card\/60{min-height:64px!important;margin:.7rem 1rem 0;padding:.62rem 1.25rem!important;border-radius:22px;border:1px solid rgba(255,255,255,.7)!important;background:var(--card)!important;box-shadow:0 10px 28px rgba(60,40,20,.07);backdrop-filter:blur(18px)}
.qc-global-search-trigger{height:42px;width:min(32vw,360px);display:flex;align-items:center;gap:.55rem;border:1px solid var(--border);background:#fff;border-radius:999px;padding:0 .9rem;color:var(--muted-foreground);box-shadow:inset 0 1px 2px rgba(0,0,0,.02);transition:.2s ease}
.qc-global-search-trigger:hover{background:#fff;border-color:color-mix(in srgb,var(--primary) 35%,var(--border));box-shadow:0 8px 18px rgba(8,125,98,.12)}
.qc-search-glyph{font-size:1.1rem;color:var(--primary)}
.qc-search-placeholder{font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:left}
.qc-global-search-trigger kbd{font-size:.62rem;border:1px solid var(--border);border-bottom-width:2px;background:var(--card);border-radius:6px;padding:.12rem .38rem;color:var(--muted-foreground)}
.qc-command-overlay{position:fixed;inset:0;z-index:9999;background:rgba(4,15,11,.48);backdrop-filter:blur(5px);display:flex;justify-content:center;align-items:flex-start;padding-top:10vh}
.qc-command-panel{width:min(720px,92vw);max-height:72vh;background:var(--popover);border:1px solid var(--border);border-radius:16px;box-shadow:0 28px 80px -24px rgba(0,0,0,.45);overflow:hidden}
.qc-command-input-wrap{display:flex;align-items:center;gap:.75rem;padding:.9rem 1rem;border-bottom:1px solid var(--border)}
.qc-command-input-wrap>span{font-size:1.25rem;color:var(--primary)}
.qc-command-input-wrap input{flex:1;border:0!important;outline:0!important;background:transparent!important;font-size:.95rem;box-shadow:none!important}
.qc-command-input-wrap button{font-size:.68rem;color:var(--muted-foreground);border:1px solid var(--border);padding:.25rem .45rem;border-radius:6px}
.qc-command-results{max-height:55vh;overflow:auto;padding:.45rem}
.qc-command-empty{padding:2.5rem 1rem;text-align:center;color:var(--muted-foreground);font-size:.82rem}
.qc-command-result{display:grid;grid-template-columns:86px 1fr auto;gap:.8rem;align-items:center;padding:.72rem .75rem;border-radius:10px;color:var(--foreground)}
.qc-command-result:hover{background:var(--muted)}
.qc-command-type{font-size:.64rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--primary)}
.qc-command-result strong{display:block;font-size:.83rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qc-command-result small{display:block;color:var(--muted-foreground);font-size:.7rem;margin-top:.12rem}
.qc-command-open{font-size:.7rem;color:var(--muted-foreground)}
.qc-create-wrap{position:relative}
.qc-create-button{height:40px;border:0;border-radius:14px;background:var(--primary);color:#fff;font-size:.77rem;font-weight:750;padding:0 .95rem;box-shadow:0 8px 18px rgba(8,125,98,.22),inset 0 1px 0 rgba(255,255,255,.25)}
.qc-create-button:hover{background:var(--primary-hover);transform:translateY(-1px)}
.qc-create-button:active{transform:translateY(1px);box-shadow:inset 0 2px 6px rgba(6,68,51,.25)}
.qc-create-menu{position:absolute;right:0;top:46px;z-index:100;width:330px;background:var(--popover);border:1px solid var(--border);border-radius:14px;box-shadow:0 22px 55px -24px rgba(0,0,0,.35);padding:.55rem}
.qc-create-title{padding:.4rem .5rem .55rem;font-size:.68rem;font-weight:800;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.1em}
.qc-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px}
.qc-create-grid a{padding:.62rem .68rem;border-radius:9px;font-size:.77rem;color:var(--foreground)}
.qc-create-grid a:hover{background:var(--muted);color:var(--primary)}

/* Workspace */
.qc-erp-main{background:transparent;padding:1.45rem 1.6rem 2rem!important}
.qc-dashboard{max-width:1540px;margin:0 auto}
.qc-dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.35rem 1.5rem;background:linear-gradient(135deg,#178D73 0%,#087D62 48%,#075540 100%);color:#fff;border-radius:28px;box-shadow:0 22px 48px rgba(8,125,98,.28),inset 0 1px 0 rgba(255,255,255,.22);position:relative;overflow:hidden}
.qc-dashboard-hero:after{content:"";position:absolute;width:240px;height:240px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:-65px;top:-100px;box-shadow:0 0 0 38px rgba(255,255,255,.04),0 0 0 78px rgba(234,156,66,.08)}
.qc-eyebrow{font-size:.62rem;font-weight:800;letter-spacing:.15em;opacity:.68;margin-bottom:.25rem}
.qc-dashboard-hero h1{font-size:clamp(1.2rem,2vw,1.72rem);font-weight:750;line-height:1.2;margin:0;color:#fff}
.qc-dashboard-hero p{font-size:.78rem;color:rgba(255,255,255,.78);margin-top:.3rem}
.qc-hero-actions{display:flex;align-items:center;gap:.55rem;position:relative;z-index:1}
.qc-hero-actions a{height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;padding:0 .9rem;font-size:.75rem;font-weight:700}
.qc-hero-secondary{border:1px solid rgba(255,255,255,.28);color:#fff;background:rgba(255,255,255,.12)}
.qc-hero-primary{background:#EA9C42;color:#fff;box-shadow:0 10px 22px rgba(234,156,66,.32)}

.qc-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.85rem}
.qc-kpi-card{padding:1.05rem 1.1rem!important;border:1px solid rgba(255,255,255,.7)!important;border-radius:24px!important;background:var(--card)!important;box-shadow:var(--shadow-card)!important;min-width:0;position:relative;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
.qc-kpi-card:hover{transform:translateY(-3px);box-shadow:0 22px 46px rgba(60,40,20,.12)!important}
.qc-kpi-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.qc-kpi-top>span:first-child{font-size:.62rem;font-weight:800;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.07em}
.qc-kpi-icon{height:28px;width:28px;border-radius:8px;background:var(--muted);display:flex;align-items:center;justify-content:center;color:var(--primary)}
.qc-kpi-value{font-size:clamp(1.08rem,1.6vw,1.48rem);font-weight:780;letter-spacing:-.035em;margin-top:.46rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qc-kpi-sub{font-size:.68rem;color:var(--muted-foreground);margin-top:.14rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qc-kpi-success:before,.qc-kpi-warning:before,.qc-kpi-danger:before{content:"";position:absolute;inset:0 auto 0 0;width:3px}
.qc-kpi-success:before{background:var(--success)}.qc-kpi-warning:before{background:var(--warning)}.qc-kpi-danger:before{background:var(--danger)}

.qc-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(300px,.9fr);gap:.85rem}
.qc-secondary-grid,.qc-bottom-grid{grid-template-columns:1fr 1fr}
.qc-panel{padding:1.1rem 1.15rem!important;border:1px solid rgba(255,255,255,.7)!important;border-radius:24px!important;background:var(--card)!important;box-shadow:var(--shadow-card)!important}
.qc-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.8rem;margin-bottom:.85rem}
.qc-panel-head h2{font-size:.9rem;font-weight:750;margin:0}.qc-panel-head p{font-size:.68rem;color:var(--muted-foreground);margin-top:.13rem}
.qc-panel-link{font-size:.7rem;font-weight:650;color:var(--primary);white-space:nowrap}
.qc-chart-wrap{height:245px}
.qc-action-list{display:grid;gap:.42rem}
.qc-action-row{display:flex;align-items:center;gap:.7rem;padding:.63rem .68rem;border:1px solid var(--border);border-radius:10px;background:var(--background);transition:.14s ease}
.qc-action-row:hover{border-color:color-mix(in srgb,var(--primary) 35%,var(--border));background:var(--muted)}
.qc-action-count{height:30px;min-width:30px;padding:0 .35rem;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:.78rem;background:var(--muted)}
.qc-action-row strong{display:block;font-size:.76rem}.qc-action-row small{display:block;color:var(--muted-foreground);font-size:.64rem;margin-top:.1rem}
.qc-action-open{font-size:.66rem;color:var(--muted-foreground);white-space:nowrap}.qc-tone-danger .qc-action-count{color:var(--danger);background:rgba(193,58,66,.09)}.qc-tone-warning .qc-action-count{color:var(--warning);background:rgba(193,123,24,.1)}.qc-tone-info .qc-action-count{color:var(--info);background:rgba(54,127,159,.1)}
.qc-pipeline{display:flex;align-items:stretch;gap:.42rem;flex-wrap:wrap}.qc-pipeline-step{min-width:88px;flex:1;border:1px solid var(--border);border-radius:11px;padding:.72rem .65rem;background:var(--background);text-align:center}.qc-pipeline-step:hover{border-color:var(--primary)}.qc-pipeline-step strong{display:block;font-size:1.15rem;line-height:1}.qc-pipeline-step span{display:block;font-size:.62rem;color:var(--muted-foreground);margin-top:.28rem}.qc-pipeline-arrow{align-self:center;color:var(--muted-foreground);opacity:.5}.qc-lifecycle-caption{font-size:.63rem;color:var(--muted-foreground);margin-top:.7rem;text-align:center}
.qc-ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}.qc-mini{display:block;border:1px solid var(--border);border-radius:10px;padding:.7rem;background:var(--background)}.qc-mini:hover{border-color:var(--primary)}.qc-mini small{display:block;color:var(--muted-foreground);font-size:.62rem}.qc-mini strong{display:block;font-size:1rem;margin:.18rem 0}.qc-mini span{display:block;color:var(--muted-foreground);font-size:.62rem}
.qc-activity-list,.qc-performance-list{display:grid}.qc-activity-row,.qc-performance-row{display:flex;align-items:center;gap:.7rem;padding:.62rem .1rem;border-bottom:1px solid var(--border)}.qc-activity-row:last-child,.qc-performance-row:last-child{border-bottom:0}.qc-activity-dot{height:8px;width:8px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 4px rgba(15,107,80,.1)}.qc-activity-row strong,.qc-performance-row strong{display:block;font-size:.76rem}.qc-activity-row small,.qc-performance-row small{display:block;color:var(--muted-foreground);font-size:.64rem}.qc-activity-row time{font-size:.62rem;color:var(--muted-foreground)}.qc-rank{height:26px;width:26px;border-radius:8px;background:var(--muted);display:flex;align-items:center;justify-content:center;font-size:.68rem;font-weight:800;color:var(--primary)}.qc-performance-row b{font-size:.72rem}.qc-empty{padding:1.7rem;text-align:center;color:var(--muted-foreground);font-size:.75rem;border:1px dashed var(--border);border-radius:10px;background:var(--background)}

/* Work queue */
.qc-work-actions{display:flex;align-items:center;gap:.25rem;padding:0 1rem .55rem 3.75rem}.qc-work-actions a,.qc-work-actions button{font-size:.62rem;border:1px solid var(--border);border-radius:6px;padding:.22rem .42rem;background:transparent;color:var(--muted-foreground)}.qc-work-actions a:hover,.qc-work-actions button:hover{color:var(--primary);border-color:color-mix(in srgb,var(--primary) 40%,var(--border));background:var(--muted)}

/* Customer 360 */
.qc-customer-360-dialog{width:min(1120px,94vw)!important}
.qc-customer-360{display:grid;gap:.85rem}.qc-360-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:.3rem .1rem}.qc-360-header h2{font-size:1.3rem;font-weight:780}.qc-360-header p{font-size:.72rem;color:var(--muted-foreground);margin-top:.18rem}.qc-360-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:.55rem}.qc-360-metric{border:1px solid var(--border);background:var(--background);border-radius:11px;padding:.72rem}.qc-360-metric small{display:block;color:var(--muted-foreground);font-size:.62rem;text-transform:uppercase;font-weight:750;letter-spacing:.06em}.qc-360-metric strong{display:block;font-size:1rem;margin-top:.24rem}.qc-360-danger{border-left:3px solid var(--danger)}.qc-360-warn{border-left:3px solid var(--warning)}.qc-360-ok{border-left:3px solid var(--success)}
.qc-lifecycle{display:flex;align-items:flex-start;padding:.8rem .5rem;border:1px solid var(--border);border-radius:12px;background:var(--background);overflow:auto}.qc-life-step{min-width:62px;text-align:center;flex:0 0 auto}.qc-life-step>span{height:27px;width:27px;margin:0 auto;border-radius:50%;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:800;color:var(--muted-foreground);background:var(--card)}.qc-life-step small{display:block;font-size:.58rem;color:var(--muted-foreground);margin-top:.28rem}.qc-life-step.is-done>span{background:var(--primary);color:#fff;border-color:var(--primary)}.qc-life-step.is-current>span{border-color:var(--warning);color:var(--warning);box-shadow:0 0 0 4px rgba(193,123,24,.1)}.qc-life-line{height:1px;min-width:28px;flex:1;background:var(--border);margin-top:13px}.qc-life-line.is-done{background:var(--primary)}
.qc-360-tabs{display:flex!important;justify-content:flex-start!important;overflow-x:auto!important;max-width:100%;height:auto!important;padding:.2rem!important;gap:.15rem!important;background:var(--muted)!important}.qc-360-tabs button{white-space:nowrap;font-size:.66rem!important;min-height:32px!important;padding:.35rem .55rem!important}.qc-360-content{margin-top:.6rem!important}.qc-360-two-col{display:grid;grid-template-columns:.9fr 1.1fr;gap:.65rem}.qc-360-section-title{font-size:.8rem;font-weight:750;margin-bottom:.5rem}.qc-360-list{display:grid;gap:.38rem}.qc-360-row{display:flex;align-items:center;gap:.75rem;border:1px solid var(--border);background:var(--card);border-radius:10px;padding:.65rem .75rem}.qc-360-row strong{display:block;font-size:.75rem}.qc-360-row small{display:block;font-size:.63rem;color:var(--muted-foreground);margin-top:.1rem}.qc-360-row b{display:block;font-size:.7rem;margin-bottom:.18rem}.qc-timeline{position:relative;display:grid;gap:.15rem}.qc-timeline-row{display:flex;align-items:center;gap:.65rem;padding:.56rem .2rem}.qc-timeline-dot{width:8px;height:8px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 4px rgba(15,107,80,.08)}.qc-timeline-row strong{display:block;font-size:.73rem}.qc-timeline-row small{display:block;font-size:.62rem;color:var(--muted-foreground)}.qc-timeline-row time{font-size:.6rem;color:var(--muted-foreground)}

/* Professional tables across ERP */
.qc-erp-main table{border-collapse:separate!important;border-spacing:0!important;width:100%;font-size:.77rem}
.qc-erp-main table thead th{position:sticky;top:0;z-index:3;background:var(--muted)!important;color:var(--muted-foreground)!important;text-transform:uppercase;letter-spacing:.045em;font-size:.64rem!important;font-weight:800!important;border-bottom:1px solid var(--border)!important;white-space:nowrap}
.qc-erp-main table tbody td{border-bottom:1px solid color-mix(in srgb,var(--border) 75%,transparent)!important;padding-top:.68rem!important;padding-bottom:.68rem!important}
.qc-erp-main table tbody tr{background:var(--card)}.qc-erp-main table tbody tr:hover{background:color-mix(in srgb,var(--primary) 3%,var(--card))!important}
.qc-erp-main [role="table"],.qc-erp-main .overflow-x-auto:has(table){border-radius:22px;border:1px solid rgba(255,255,255,.7);background:var(--card);box-shadow:var(--shadow-card)}
.qc-status-paid{background:rgba(8,125,98,.12)!important;color:#064433!important;border-color:rgba(8,125,98,.28)!important}.qc-status-partial{background:rgba(234,156,66,.16)!important;color:#D87920!important;border-color:rgba(234,156,66,.32)!important}.qc-status-overdue{background:rgba(193,58,66,.1)!important;color:#B12F38!important;border-color:rgba(193,58,66,.25)!important}.qc-status-draft{background:var(--muted)!important;color:var(--muted-foreground)!important;border-color:var(--border)!important}
.qc-table-tools{display:flex;justify-content:flex-end;align-items:center;gap:.35rem;margin:.45rem 0 .55rem}.qc-table-tools>button{height:31px;border:1px solid var(--border);border-radius:8px;background:var(--card);padding:0 .6rem;font-size:.66rem;color:var(--muted-foreground)}.qc-table-tools>button:hover{color:var(--primary);border-color:color-mix(in srgb,var(--primary) 35%,var(--border))}.qc-column-menu{position:absolute;right:0;top:36px;z-index:30;min-width:210px;max-height:270px;overflow:auto;border:1px solid var(--border);border-radius:10px;background:var(--popover);box-shadow:0 18px 45px -28px rgba(0,0,0,.4);padding:.4rem}.qc-column-menu label{display:flex;align-items:center;gap:.5rem;padding:.38rem .45rem;font-size:.68rem;border-radius:7px}.qc-column-menu label:hover{background:var(--muted)}
.qc-saved-view-toast{position:fixed;right:18px;bottom:18px;z-index:9999;background:#0B211B;color:#fff;border-radius:10px;padding:.65rem .8rem;font-size:.72rem;box-shadow:0 16px 40px -22px rgba(0,0,0,.7)}

/* System update safe-flow */
.qc-update-flow{grid-column:1/-1;border:1px solid var(--border);border-radius:14px;background:var(--card);padding:1rem}.qc-update-flow h3{font-size:.86rem;font-weight:760}.qc-update-flow p{font-size:.68rem;color:var(--muted-foreground);margin-top:.15rem}.qc-update-steps{display:flex;align-items:center;gap:.35rem;margin-top:.8rem;overflow:auto;padding-bottom:.15rem}.qc-update-step{min-width:94px;border:1px solid var(--border);border-radius:9px;background:var(--background);padding:.55rem;text-align:center;font-size:.62rem;font-weight:700}.qc-update-arrow{color:var(--muted-foreground);opacity:.55}

/* Mobile field-sales UX */
.qc-mobile-bottom{position:fixed;left:0;right:0;bottom:0;z-index:60;height:64px;background:color-mix(in srgb,var(--card) 96%,transparent);border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(5,1fr);backdrop-filter:blur(18px);padding-bottom:env(safe-area-inset-bottom)}.qc-mobile-bottom a,.qc-mobile-bottom button{display:flex;align-items:center;justify-content:center;font-size:.64rem;font-weight:680;color:var(--muted-foreground)}.qc-mobile-bottom a[aria-current="page"]{color:var(--primary)}.qc-mobile-visit-fab{position:fixed;right:18px;bottom:78px;z-index:61;background:var(--primary);color:#fff;border-radius:999px;padding:.72rem 1rem;font-size:.72rem;font-weight:800;box-shadow:0 14px 30px -14px rgba(15,107,80,.72)}
.qc-mobile-field-card{padding:1rem!important;border-radius:15px!important;background:linear-gradient(145deg,#0B211B,#0F6049)!important;color:#fff!important}.qc-mobile-field-card h2{font-size:.95rem}.qc-mobile-field-kpis{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin:.75rem 0}.qc-mobile-field-kpis>div{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:.6rem}.qc-mobile-field-kpis strong{display:block;font-size:.95rem}.qc-mobile-field-kpis span{font-size:.6rem;color:rgba(255,255,255,.66)}.qc-next-visit{background:#fff;color:#18211E;border-radius:12px;padding:.8rem}.qc-next-visit>small{display:block;font-size:.58rem;font-weight:800;color:#66736E;letter-spacing:.08em}.qc-next-visit>strong{display:block;font-size:.86rem;margin:.25rem 0}.qc-next-visit>span{font-size:.65rem;color:#66736E}.qc-next-visit>div{display:flex;gap:.4rem;margin-top:.6rem}.qc-next-visit a{flex:1;text-align:center;border:1px solid #DCE4E0;border-radius:8px;padding:.45rem;font-size:.64rem;font-weight:700;color:#0F6B50}.qc-next-visit a.is-primary{background:#0F6B50;color:#fff;border-color:#0F6B50}.qc-mobile-route{margin-top:.65rem}.qc-mobile-route>small{font-size:.58rem;letter-spacing:.08em;color:rgba(255,255,255,.62)}.qc-mobile-route>div{display:grid;grid-template-columns:24px 1fr auto;gap:.45rem;align-items:center;padding:.48rem 0;border-bottom:1px solid rgba(255,255,255,.1)}.qc-mobile-route>div span{height:20px;width:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);font-size:.6rem}.qc-mobile-route>div strong{font-size:.68rem}.qc-mobile-route>div small{font-size:.58rem;color:rgba(255,255,255,.6)}

@media (max-width:1279px){.qc-kpi-grid{grid-template-columns:repeat(3,1fr)}.qc-dashboard-grid{grid-template-columns:1fr 360px}.qc-secondary-grid,.qc-bottom-grid{grid-template-columns:1fr 1fr}.qc-global-search-trigger{width:240px}.qc-search-placeholder{display:none}.qc-global-search-trigger{width:96px}.qc-global-search-trigger kbd{margin-left:auto}}
@media (max-width:1023px){.qc-erp-main{padding:1rem 1rem 5.5rem!important}.qc-dashboard-grid,.qc-secondary-grid,.qc-bottom-grid{grid-template-columns:1fr}.qc-kpi-grid{grid-template-columns:repeat(2,1fr)}.qc-dashboard-hero{padding:1rem}.qc-hero-actions{display:none}.qc-chart-wrap{height:220px}.qc-360-two-col{grid-template-columns:1fr}.qc-360-metrics{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.qc-kpi-grid{grid-template-columns:1fr 1fr;gap:.5rem}.qc-kpi-card{padding:.72rem!important}.qc-kpi-value{font-size:1rem}.qc-dashboard-hero h1{font-size:1.18rem}.qc-dashboard-hero p{font-size:.68rem}.qc-ops-grid{grid-template-columns:1fr 1fr}.qc-pipeline{display:grid;grid-template-columns:repeat(3,1fr)}.qc-pipeline-arrow{display:none}.qc-pipeline-step{min-width:0}.qc-360-metrics{grid-template-columns:1fr 1fr}.qc-360-row{align-items:flex-start}.qc-360-row>div:last-child{max-width:40%}.qc-command-panel{width:94vw}.qc-command-result{grid-template-columns:64px 1fr}.qc-command-open{display:none}}

/* Approval controls */
.qc-approval-policies{margin:0 0 18px;padding:18px;border:1px solid var(--qc-border);border-radius:18px;background:linear-gradient(135deg,#ffffff 0%,#f7fbf9 100%);box-shadow:0 12px 30px rgba(11,33,27,.05)}
.qc-approval-policy-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}.qc-approval-policy-head strong{font-size:16px;color:var(--qc-text)}.qc-approval-policy-head span{font-size:12px;color:var(--qc-muted)}
.qc-approval-policy-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.qc-approval-policy-grid>div{min-width:0;padding:12px;border:1px solid var(--qc-border);border-radius:13px;background:#fff}.qc-approval-policy-grid b,.qc-approval-policy-grid span{display:block}.qc-approval-policy-grid b{font-size:12px;color:var(--qc-text);margin-bottom:5px}.qc-approval-policy-grid span{font-size:11px;color:var(--qc-primary);font-weight:700}
@media(max-width:1100px){.qc-approval-policy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.qc-approval-policy-head{align-items:flex-start;flex-direction:column}.qc-approval-policy-grid{grid-template-columns:1fr}}

/* QCC v13.4 editor/add-form performance guard */
.qc-erp-main [role="dialog"],.qc-erp-main [data-radix-popper-content-wrapper]{animation:none!important;transition:none!important;will-change:auto!important}
.qc-erp-main [role="dialog"]{contain:layout paint style;transform:translate(-50%,-50%)!important}
.qc-erp-main select[data-qcc-native-select],.qc-erp-main [data-qcc-product-master] select{appearance:auto!important;-webkit-appearance:menulist!important;min-height:40px!important;cursor:pointer}
@media (prefers-reduced-motion:reduce){.qc-erp-main *{scroll-behavior:auto!important}}

/* 14.3.100 visit contrast (scoped) */
.qcc-visit-page,.qcc-visit-dialog,.qcc-visit-form{color:var(--foreground)!important}
.qcc-visit-page label,.qcc-visit-dialog label,.qcc-visit-form label,
.qcc-visit-page p,.qcc-visit-dialog p,.qcc-visit-form p,
.qcc-visit-page .text-muted-foreground,.qcc-visit-dialog .text-muted-foreground,.qcc-visit-form .text-muted-foreground,
.qcc-visit-page [class*="text-muted"],.qcc-visit-dialog [class*="text-muted"],.qcc-visit-form [class*="text-muted"]{color:var(--foreground)!important}
.qcc-visit-page input,.qcc-visit-dialog input,.qcc-visit-form input,
.qcc-visit-page textarea,.qcc-visit-dialog textarea,.qcc-visit-form textarea,
.qcc-visit-page select,.qcc-visit-dialog select,.qcc-visit-form select{color:var(--foreground)!important;background-color:var(--background)!important}
.qcc-visit-dialog.bg-card,.qcc-visit-dialog[class*="bg-card"]{color:var(--card-foreground)!important;background:var(--card)!important}

/* 14.3.103 visit Total Amount / deal-products card contrast */
.qcc-visit-form [class*="bg-primary"]:not(.bg-primary\/10):not(.bg-primary\/5):not(.bg-primary\/20),
.qcc-visit-dialog [class*="bg-primary"]:not(.bg-primary\/10):not(.bg-primary\/5):not(.bg-primary\/20){color:var(--foreground)!important}
.qcc-visit-form [class*="bg-primary"] div,.qcc-visit-dialog [class*="bg-primary"] div,
.qcc-visit-form [class*="bg-primary"] .font-semibold,.qcc-visit-dialog [class*="bg-primary"] .font-semibold,
.qcc-visit-form .text-primary,.qcc-visit-dialog .text-primary,
.qcc-visit-form [class*="text-primary"]:not(.text-primary-foreground),
.qcc-visit-dialog [class*="text-primary"]:not(.text-primary-foreground){color:var(--foreground)!important}
.qcc-visit-form input[type="number"],.qcc-visit-dialog input[type="number"]{color:var(--foreground)!important;-webkit-text-fill-color:var(--foreground)!important}
.qcc-visit-form .bg-brand-gradient,.qcc-visit-dialog .bg-brand-gradient{color:#fff!important;-webkit-text-fill-color:#fff!important}

/* =====================================================================
   14.3.133 — Soft 3D / neumorphic ERP theme
   Visual tokens + shared surfaces only. No workflow changes.
   ===================================================================== */
html:not(.dark):not([data-theme="qudra-reverse"]){
  --qc-card-shadow:0 18px 40px rgba(60,40,20,.08),0 4px 10px rgba(60,40,20,.05);
  --qc-press:inset 0 2px 6px rgba(60,40,20,.12);
}
body:not(:has(.qc-portal)){
  background:
    radial-gradient(1200px 520px at 8% -10%, rgba(23,141,115,.10), transparent 55%),
    radial-gradient(900px 480px at 110% 8%, rgba(234,156,66,.14), transparent 50%),
    var(--background)!important;
}

/* Shared cards */
.qc-erp-main .bg-card,
.qc-erp-main [class*="bg-card"],
.qc-erp-main .shadow-card,
.qc-erp-main .rounded-xl.border,
.qc-erp-main .rounded-2xl.border,
.qc-erp-main .rounded-lg.border.bg-card{
  background:var(--card)!important;
  border-color:rgba(255,255,255,.7)!important;
  border-radius:24px!important;
  box-shadow:var(--shadow-card)!important;
}
.qc-erp-main .card-hover-lift:hover{transform:translateY(-3px);box-shadow:0 22px 46px rgba(60,40,20,.12)!important}

/* Dashboard KPI mix: cream / orange / green */
.qc-erp-main .grid.grid-cols-2.md\:grid-cols-4 > .rounded-xl:nth-child(4n+2),
.qc-erp-main .grid.grid-cols-2 > .rounded-xl.shadow-card:nth-child(4n+2){
  background:linear-gradient(165deg,#F0C69D 0%,#F7F6F4 72%)!important;
  border-color:rgba(255,255,255,.8)!important;
}
.qc-erp-main .grid.grid-cols-2.md\:grid-cols-4 > .rounded-xl:nth-child(4n+3),
.qc-erp-main .grid.grid-cols-2 > .rounded-xl.shadow-card:nth-child(4n+3){
  background:linear-gradient(155deg,#178D73 0%,#087D62 58%,#075540 100%)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.18)!important;
}
.qc-erp-main .grid.grid-cols-2.md\:grid-cols-4 > .rounded-xl:nth-child(4n+3) .text-muted-foreground,
.qc-erp-main .grid.grid-cols-2.md\:grid-cols-4 > .rounded-xl:nth-child(4n+3) [class*="text-muted"],
.qc-erp-main .grid.grid-cols-2 > .rounded-xl.shadow-card:nth-child(4n+3) .text-muted-foreground{
  color:rgba(255,255,255,.78)!important;
}
.qc-erp-main .grid.grid-cols-2.md\:grid-cols-4 > .rounded-xl:nth-child(4n+3) .bg-accent,
.qc-erp-main .grid.grid-cols-2 > .rounded-xl.shadow-card:nth-child(4n+3) .bg-accent{
  background:rgba(255,255,255,.16)!important;color:#fff!important
}

/* Buttons */
.qc-erp-main button.bg-primary,
.qc-erp-main a.bg-primary,
.qc-erp-main .bg-brand-gradient,
button.bg-brand-gradient,
a.bg-brand-gradient{
  background:var(--gradient-brand)!important;
  color:#fff!important;
  border-radius:14px!important;
  box-shadow:0 8px 18px rgba(8,125,98,.22),inset 0 1px 0 rgba(255,255,255,.25)!important;
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
.qc-erp-main button.bg-primary:hover,
.qc-erp-main .bg-brand-gradient:hover{filter:brightness(1.05);transform:translateY(-1px)}
.qc-erp-main button.bg-primary:active,
.qc-erp-main .bg-brand-gradient:active{transform:translateY(1px);box-shadow:inset 0 2px 6px rgba(6,68,51,.28)!important}
.qc-erp-main button[class*="variant"]:is(.border),
.qc-erp-main button.border{
  border-radius:14px!important;
  background:#fff!important;
  color:var(--green-main,#087D62)!important;
  box-shadow:0 4px 10px rgba(60,40,20,.05)!important;
}
.qc-erp-main .bg-destructive,button.bg-destructive{border-radius:14px!important}

/* Forms */
.qc-erp-main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.qc-erp-main textarea,
.qc-erp-main select,
.qc-erp-main [role="combobox"]{
  min-height:44px;
  border-radius:14px!important;
  background:#fff!important;
  border:1px solid var(--border)!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.02);
  color:var(--foreground)!important;
}
.qc-erp-main textarea{min-height:88px}
.qc-erp-main input:focus-visible,
.qc-erp-main textarea:focus-visible,
.qc-erp-main select:focus-visible,
.qc-erp-main [role="combobox"]:focus-visible,
.qc-erp-main input:focus,
.qc-erp-main textarea:focus,
.qc-erp-main select:focus{
  outline:none!important;
  border-color:#087D62!important;
  box-shadow:0 0 0 4px rgba(8,125,98,.16),inset 0 1px 2px rgba(0,0,0,.02)!important;
}
.qc-erp-main label{color:var(--text-main,#202020)!important;font-weight:600}

/* Tables */
.qc-erp-main table thead th{
  background:#EFE8E1!important;
  color:#6B6B6B!important;
}
.qc-erp-main table tbody tr:hover{background:#F5F1EC!important}

/* Modals */
body [role="dialog"],
.qc-erp-main [role="dialog"],
[data-radix-dialog-content]{
  background:var(--card)!important;
  color:var(--foreground)!important;
  border:1px solid rgba(255,255,255,.75)!important;
  border-radius:28px!important;
  box-shadow:0 28px 70px rgba(60,40,20,.18)!important;
}
body [role="dialog"] input,
body [role="dialog"] textarea,
body [role="dialog"] select,
[data-radix-dialog-content] input,
[data-radix-dialog-content] textarea,
[data-radix-dialog-content] select{
  color:var(--foreground)!important;
  background:var(--background)!important;
}
[data-radix-dialog-overlay],.fixed.inset-0.z-50[class*="bg-black"],.fixed.inset-0[class*="bg-black/80"]{
  background:rgba(32,24,16,.38)!important;
  backdrop-filter:blur(8px);
}

/* Badges */
.qc-erp-main [class*="badge"],
.qc-erp-main .rounded-full.border,
.qc-erp-main .rounded-full.px-2{
  border-radius:999px!important;
  font-weight:700;
}
.qc-erp-main .bg-primary\/10,
.qc-erp-main [class*="bg-primary/10"]{background:rgba(8,125,98,.12)!important;color:#064433!important}
.qc-erp-main .bg-amber-100,.qc-erp-main [class*="bg-amber-"]{background:rgba(234,156,66,.18)!important;color:#D87920!important}
.qc-erp-main .bg-rose-100{background:rgba(193,58,66,.12)!important;color:#B12F38!important}

/* Tabs / filters */
.qc-erp-main [role="tablist"]{background:var(--surface-alt,#EFE8E1)!important;border-radius:16px!important;padding:4px!important}
.qc-erp-main [role="tab"][data-state="active"],
.qc-erp-main [role="tab"][aria-selected="true"]{
  background:#fff!important;color:#064433!important;border-radius:12px!important;box-shadow:0 4px 10px rgba(60,40,20,.08)
}

/* Login */
.auth-page{
  --auth-bg:#E9E3DD !important;
  --auth-card:#F7F6F4 !important;
  --auth-primary:#087D62 !important;
  --auth-purple:#178D73 !important;
  --auth-text:#202020 !important;
  --auth-muted:#6B6B6B !important;
  --auth-border:#DDD2C8 !important;
  --auth-input:#FFFFFF !important;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(23,141,115,.16), transparent 56%),
    radial-gradient(800px 420px at 100% 10%, rgba(234,156,66,.18), transparent 50%),
    #E9E3DD !important;
}
.auth-page canvas{opacity:.22!important;filter:blur(10px) saturate(.8)}
.auth-glass{
  background:#F7F6F4 !important;
  border:1px solid rgba(255,255,255,.75) !important;
  border-radius:28px !important;
  box-shadow:0 22px 50px rgba(60,40,20,.12), inset 0 1px 0 rgba(255,255,255,.8) !important;
  backdrop-filter:none !important;
}
.auth-input{
  background:#fff !important;
  border-color:#DDD2C8 !important;
  color:#202020 !important;
  border-radius:14px !important;
  height:44px !important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.02);
}
.auth-input::placeholder{color:#9A9A9A !important}
.auth-btn-gradient{
  background:linear-gradient(135deg,#178D73 0%,#087D62 100%) !important;
  color:#fff !important;
  border-radius:14px !important;
  box-shadow:0 8px 18px rgba(8,125,98,.28), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.customer-register-page,
div:has(> .auth-glass){--auth-text:#202020}

/* Command palette + toasts */
.qc-command-panel{border-radius:24px!important;box-shadow:0 28px 70px rgba(60,40,20,.18)!important;background:#F7F6F4!important}
.qc-command-overlay{background:rgba(32,24,16,.38)!important;backdrop-filter:blur(8px)}
.qc-saved-view-toast{background:#087D62;border-radius:16px}

/* Mobile */
.qc-mobile-bottom{background:rgba(247,246,244,.94)!important;border-top:1px solid #DDD2C8!important;border-radius:22px 22px 0 0;box-shadow:0 -12px 30px rgba(60,40,20,.08)}
.qc-mobile-visit-fab{background:var(--gradient-brand)!important;box-shadow:0 14px 30px rgba(8,125,98,.32)!important}
.qc-mobile-field-card{background:linear-gradient(145deg,#178D73,#075540)!important;border-radius:24px!important}

html.dark .qc-erp-main .rounded-xl.border,
html[data-theme="qudra-reverse"] .qc-erp-main .rounded-xl.border{background:var(--card)!important;border-color:var(--border)!important}
html.dark aside.bg-sidebar,
html[data-theme="qudra-reverse"] aside.bg-sidebar{background:var(--sidebar)!important;color:var(--sidebar-foreground)!important}

