:root{
  --bg:#f3f5f7;--panel:#ffffff;--line:#d9dfe4;--line2:#e9edf0;--text:#2d3742;--muted:#7a8792;
  --nav:#18222c;--nav2:#202c37;--green:#78b83d;--green2:#8cc451;--danger:#d9544d;--amber:#d79a25;--blue:#3187c8;
  --shadow:0 2px 10px rgba(31,45,61,.06);
}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:13px/1.4 Arial,Helvetica,sans-serif}a{color:inherit;text-decoration:none}
.app{min-height:100vh;display:flex}.sidebar{position:fixed;left:0;top:0;bottom:0;width:218px;background:var(--nav);color:#c7d0d7;display:flex;flex-direction:column;z-index:20}.brand{height:58px;display:flex;align-items:center;padding:0 19px;border-bottom:1px solid rgba(255,255,255,.07);font-weight:800;font-size:18px;letter-spacing:.2px}.brand span{color:var(--green2)}
.nav{padding:10px 8px;overflow:auto}.nav-section{margin:12px 10px 5px;color:#71808d;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.8px}.nav a{display:flex;align-items:center;gap:10px;padding:9px 11px;margin:2px 0;border-radius:3px;color:#bcc6ce}.nav a:hover{background:#22313d;color:#fff}.nav a.active{background:#2b3944;color:#fff;border-left:3px solid var(--green);padding-left:8px}.nav .ico{width:16px;text-align:center;color:#84939f}.sidebar-foot{margin-top:auto;padding:14px 15px;border-top:1px solid rgba(255,255,255,.07);font-size:11px;color:#768793}
.main{margin-left:218px;min-width:0;flex:1}.topbar{height:58px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;position:sticky;top:0;z-index:10}.crumb{font-size:12px;color:#7b8792}.userbox{display:flex;align-items:center;gap:14px;color:#5a6670}.avatar{width:28px;height:28px;border-radius:50%;background:#dce4e8;display:grid;place-items:center;font-weight:700;color:#52616e}
.content{padding:18px 20px 35px}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.page-title{font-size:18px;font-weight:700;color:#38434d}.page-sub{font-size:12px;color:var(--muted);margin-top:3px}.actions{display:flex;gap:8px;align-items:center}.btn{border:1px solid #c9d0d6;background:#fff;color:#46525d;padding:7px 11px;border-radius:3px;cursor:pointer;font:inherit;font-weight:600}.btn:hover{background:#f8fafb}.btn.primary{background:var(--green);border-color:#6aa634;color:#fff}.btn.danger{background:#fff;color:var(--danger);border-color:#e4bab7}.btn.small{padding:5px 8px;font-size:11px}.btn.wide{width:100%;padding:10px}.btn:disabled{opacity:.5;cursor:not-allowed}
.panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:3px;margin-bottom:14px}.panel-head{height:43px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;border-bottom:1px solid var(--line2);font-weight:700;color:#44515c}.panel-body{padding:14px}.toolbar{display:flex;align-items:center;gap:8px;padding:9px 10px;border-bottom:1px solid var(--line2);background:#fbfcfd}.toolbar .spacer{flex:1}.input,.select,input[type=text],input[type=email],input[type=password],input[type=number],input[type=url],select,textarea{border:1px solid #cbd3d9;border-radius:3px;padding:7px 8px;background:#fff;color:#34404a;font:inherit}.toolbar input{height:30px}.toolbar select{height:30px;padding:4px 7px}.search{min-width:210px}.muted{color:var(--muted)}.tiny{font-size:11px}.mono{font-family:Consolas,Monaco,monospace}
.metrics{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));border-bottom:1px solid var(--line2);background:#fff}.metric{padding:12px 14px;border-right:1px solid var(--line2);min-height:70px}.metric:last-child{border-right:0}.metric .label{font-size:10px;color:#7c8994;text-transform:uppercase;letter-spacing:.5px}.metric .value{font-size:18px;font-weight:700;margin-top:7px;color:#35414b}.metric .delta{font-size:10px;margin-top:3px;color:#7e8a93}.metric .delta.up{color:#5f9b2e}.metric .delta.down{color:#c55750}
.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;white-space:nowrap}.data-table th{background:#f8fafb;color:#6f7b85;font-size:10px;text-transform:uppercase;letter-spacing:.35px;font-weight:700;text-align:left;padding:8px 9px;border-bottom:1px solid #dce2e6;border-right:1px solid #edf0f2}.data-table td{padding:8px 9px;border-bottom:1px solid #edf0f2;border-right:1px solid #f2f4f5;color:#3f4b55}.data-table tr:hover td{background:#fbfdf9}.data-table th.num,.data-table td.num{text-align:right}.data-table td.name{font-weight:600;color:#35414b}.status{display:inline-flex;align-items:center;gap:5px;font-size:11px}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#aeb7be}.dot.ok{background:var(--green)}.dot.warn{background:var(--amber)}.dot.bad{background:var(--danger)}.badge{display:inline-block;padding:2px 6px;border-radius:10px;background:#eef2f4;color:#64727d;font-size:10px}.badge.green{background:#edf7e5;color:#5a8b32}.badge.blue{background:#e8f2f9;color:#397ca9}.badge.dark{background:#e6eaed;color:#495761}.badge.red{background:#fae9e8;color:#a84d48}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:5px}.field.wide{grid-column:1/-1}.field label{font-weight:700;font-size:11px;color:#5a6772}.field .hint{font-size:10px;color:#8a959e}.field textarea{min-height:82px;resize:vertical}.form-actions{display:flex;gap:8px;justify-content:flex-end;padding-top:14px;margin-top:5px;border-top:1px solid var(--line2)}
.alert{padding:10px 12px;border-radius:3px;margin-bottom:12px;border:1px solid}.alert.success{background:#f0f8ea;border-color:#cfe6bd;color:#4f792d}.alert.danger{background:#fff1f0;border-color:#f0cbc7;color:#a54540}.alert.info{background:#eef6fb;border-color:#c7dfef;color:#397394}.alert.warn{background:#fff8e8;border-color:#ecd9a9;color:#886a24}
.tabs{display:flex;border-bottom:1px solid var(--line);background:#fff}.tabs a{padding:10px 14px;border-right:1px solid var(--line2);color:#66737e}.tabs a.active{color:#3e4b55;font-weight:700;border-bottom:2px solid var(--green)}
.codebox{background:#1e2a34;color:#d6e0e7;border-radius:3px;padding:12px;font:12px/1.55 Consolas,Monaco,monospace;overflow:auto;white-space:pre-wrap}.copy-row{display:flex;gap:8px}.copy-row .codebox{flex:1}.copy-row button{align-self:flex-start}.split{display:grid;grid-template-columns:2fr 1fr;gap:14px}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.kpi{background:#fff;border:1px solid var(--line);border-radius:3px;padding:14px;box-shadow:var(--shadow)}.kpi .label{font-size:10px;text-transform:uppercase;color:#7b8791}.kpi .value{font-size:23px;font-weight:700;margin-top:7px}.kpi .sub{color:#8c969e;font-size:10px;margin-top:4px}
.login-body{min-height:100vh;display:grid;place-items:center;background:#202a33}.login-card{width:360px;background:#fff;padding:28px 30px;border-radius:4px;box-shadow:0 15px 50px rgba(0,0,0,.22)}.login-brand{font-size:23px;font-weight:800;color:#28343e}.login-brand span{color:var(--green)}.login-sub{color:#87929b;margin:4px 0 22px}.login-card label{display:block;font-weight:700;font-size:11px;color:#5f6b75;margin:11px 0 5px}.login-card input{width:100%;padding:10px}.login-card .btn{margin-top:18px}
.empty{padding:34px;text-align:center;color:#87919a}.pagination{padding:10px;display:flex;justify-content:flex-end;color:#74818b;font-size:11px}.right{text-align:right}.hidden{display:none!important}.modal-backdrop{position:fixed;inset:0;background:rgba(19,27,34,.45);z-index:50;display:grid;place-items:center;padding:20px}.modal{width:min(760px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:4px;box-shadow:0 20px 70px rgba(0,0,0,.3)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid var(--line);font-weight:700}.modal-body{padding:16px}.close{border:0;background:none;font-size:20px;color:#78838c;cursor:pointer}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(3,1fr)}.kpi-grid{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}}@media(max-width:760px){.sidebar{width:62px}.brand{font-size:0;padding:0;justify-content:center}.brand span{font-size:18px}.nav-section,.nav a span:not(.ico),.sidebar-foot{display:none}.nav a{justify-content:center}.main{margin-left:62px}.form-grid{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,1fr)}.content{padding:12px}.topbar{padding:0 12px}.page-head{align-items:flex-start;gap:10px}.actions{flex-wrap:wrap;justify-content:flex-end}}

/* CentralTrack 1.1 Reports */
.ct-report-nav{display:flex;align-items:stretch;gap:0;border-bottom:1px solid var(--line);background:#fff;overflow:visible;white-space:nowrap;position:relative;z-index:8}.ct-report-tab{border:0;border-right:1px solid var(--line2);background:#fff;padding:10px 11px;font:inherit;color:#52616d;cursor:pointer;display:inline-flex;align-items:center}.ct-report-tab:hover{background:#f7f9fb}.ct-report-tab.active{background:#4f70c9;color:#fff}.ct-report-menu{position:relative;display:inline-flex}.ct-report-menu-list{display:none;position:absolute;left:0;top:100%;min-width:165px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 22px rgba(20,30,40,.15);z-index:30}.ct-report-menu:hover .ct-report-menu-list{display:block}.ct-report-menu-list a{display:block;padding:9px 11px;border-bottom:1px solid var(--line2);color:#44515c}.ct-report-menu-list a:hover{background:#f4f7fa}.ct-col-optional{display:none}.ct-columns-modal{width:min(1000px,96vw)}.ct-columns-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px}.ct-column-list{border:1px solid var(--line);max-height:420px;overflow:auto;margin-top:10px;padding:4px 0}.ct-column-list label{display:block;padding:6px 10px}.ct-column-list label:hover{background:#f5f7fa}.ct-toggle{float:right;font-size:12px}.ct-columns-grid h3{margin:0 0 10px;font-size:15px}@media(max-width:900px){.ct-report-nav{overflow-x:auto}.ct-columns-grid{grid-template-columns:1fr}}


/* CentralTrack 1.1.1 responsive report navigation */
.ct-report-nav{display:flex;align-items:stretch;width:100%;min-width:0;overflow:visible;white-space:nowrap;position:relative;z-index:8;background:#fff;border-bottom:1px solid var(--line)}
.ct-report-primary{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;overflow:hidden}
.ct-report-item{flex:0 0 auto}
.ct-report-tab{height:39px;line-height:1;gap:5px;white-space:nowrap}
.ct-report-tab.active{background:#4f70c9;color:#fff}
.ct-report-menu-list a.active-sub{background:#edf2ff;color:#3659b4;font-weight:700}
.ct-caret{font-size:10px;opacity:.85}
.ct-report-more{flex:0 0 auto;margin-left:auto;border-left:1px solid var(--line2)}
.ct-report-more.is-empty{display:none}
.ct-report-more-btn{font-weight:700;color:#4b617a}
.ct-more-icon{font-size:13px;line-height:1}
.ct-report-more-list{right:0;left:auto;min-width:190px;padding:4px 0}
.ct-report-more-list>.ct-report-tab{display:flex;width:100%;height:auto;border:0;padding:10px 13px;background:#fff;color:#44515c;justify-content:flex-start}
.ct-report-more-list>.ct-report-tab:hover{background:#f4f7fa}
.ct-report-more-list>.ct-report-tab.active{background:#edf2ff;color:#3659b4}
.ct-report-more-list>.ct-report-menu{display:block;width:100%;position:relative}
.ct-report-more-list>.ct-report-menu>button{display:flex;width:100%;height:auto;border:0;padding:10px 13px;background:#fff;color:#44515c;justify-content:space-between}
.ct-report-more-list>.ct-report-menu>button:hover{background:#f4f7fa}
.ct-report-more-list>.ct-report-menu>button.active{background:#edf2ff;color:#3659b4}
.ct-report-more-list>.ct-report-menu>.ct-report-menu-list{left:auto;right:100%;top:-1px;min-width:175px}
.ct-report-more-list>.ct-report-menu:hover>.ct-report-menu-list{display:block}
@media(max-width:900px){.ct-report-nav{overflow:visible}.ct-report-primary{overflow:hidden}.ct-report-more-list>.ct-report-menu>.ct-report-menu-list{right:auto;left:100%}}


/* === CenterTrack global mobile containment v2 === */
html,body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,svg{max-width:100%;height:auto}
.main,.content,.page,.page-content,.panel,.panel-body,.toolbar,.form-grid,.field{min-width:0!important;max-width:100%}
.table-wrap{display:block;width:100%;max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
.table-wrap table,.data-table{width:max-content;min-width:100%;max-width:none}
pre,.mono,.codebox{max-width:100%;overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere}
input,select,textarea{max-width:100%}
@media(max-width:768px){
  body{min-width:0!important}
  .app-shell,.layout,.admin-layout{display:block!important;width:100%!important;min-width:0!important}
  .sidebar{position:fixed!important;left:0;top:0;bottom:0;width:min(82vw,280px)!important;max-width:280px;z-index:10020;transform:translateX(-105%);transition:transform .2s ease;overflow-y:auto}
  body.sidebar-open .sidebar,.sidebar.open{transform:translateX(0)}
  .main,.main-content,.content{margin-left:0!important;width:100%!important;max-width:100vw!important;padding-left:12px!important;padding-right:12px!important}
  .topbar,.header,.page-head{width:100%!important;max-width:100vw!important;min-width:0!important}
  .toolbar,.filters,.filter-row,.form-grid{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .toolbar>* ,.filters>* ,.filter-row>*{min-width:0!important;max-width:100%!important}
  .field{flex:1 1 100%!important;width:100%!important}
  .kpis,.stats-grid,.cards,.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  .modal-backdrop{padding:10px!important;align-items:flex-start!important;overflow-y:auto!important}
  .modal{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important;margin:10px auto!important;overflow:auto!important}
  .modal-body{overflow-x:hidden!important}
  .tabs,.tabbar{max-width:100%;overflow-x:auto!important;white-space:nowrap;-webkit-overflow-scrolling:touch}
  input[type="date"],input[type="datetime-local"],input[type="text"],select{width:100%!important}
  .btn{max-width:100%}
}
@media(max-width:430px){
  .kpis,.stats-grid,.cards,.metric-grid{grid-template-columns:1fr!important}
}

/* Lead Center mobile: stop fixed desktop sidebar/content from creating a long horizontal page. */
@media(max-width:768px){
  .lc-layout{display:block!important;width:100%!important;min-width:0!important}
  .lc-sidebar{position:relative!important;width:100%!important;min-width:0!important;height:auto!important;overflow:visible!important}
  .lc-main{margin-left:0!important;width:100%!important;min-width:0!important;max-width:100vw!important;padding:12px!important}
  .lc-nav{display:flex!important;gap:6px!important;overflow-x:auto!important;white-space:nowrap!important;padding-bottom:8px!important}
  .lc-nav a,.lc-sidebar a{flex:0 0 auto!important}
  .lc-filters,.lc-filter-grid{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .lc-kpis,.lc-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .lc-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}

/* === Native report dropdowns v5: no JavaScript required === */
.ct-report-nav-native{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:stretch!important;
  overflow:visible!important;
  position:relative!important;
  z-index:200!important;
  background:#fff;
}
.ct-report-nav-native>.ct-report-tab,
.ct-report-nav-native>.ct-native-dropdown{
  flex:0 0 auto;
}
.ct-native-dropdown{
  position:relative!important;
  overflow:visible!important;
}
.ct-native-dropdown>summary{
  list-style:none!important;
  user-select:none;
  cursor:pointer!important;
}
.ct-native-dropdown>summary::-webkit-details-marker{display:none}
.ct-native-dropdown[open]{z-index:10080!important}
.ct-native-dropdown[open]>.ct-native-dropdown-list{
  display:block!important;
}
.ct-native-dropdown-list{
  display:none;
  position:absolute!important;
  left:0!important;
  top:100%!important;
  min-width:190px!important;
  padding:4px 0!important;
  background:#fff!important;
  border:1px solid #d7dee8!important;
  border-radius:4px!important;
  box-shadow:0 10px 28px rgba(20,30,40,.18)!important;
  z-index:10090!important;
}
.ct-native-more .ct-native-dropdown-list{left:auto!important;right:0!important}
.ct-native-dropdown-list a,
.ct-native-dropdown-list .ct-native-disabled{
  display:block!important;
  padding:10px 13px!important;
  white-space:nowrap!important;
  color:#44515c!important;
  text-decoration:none!important;
}
.ct-native-dropdown-list a:hover{background:#f4f7fa!important}
.ct-native-dropdown-list a.active-sub{background:#edf2ff!important;color:#3659b4!important}
.ct-native-disabled{color:#9aa5af!important}
.ct-report-panel,.panel,.main,.content{overflow:visible}
@media(max-width:900px){
  .ct-report-nav-native{
    display:flex!important;
    flex-wrap:wrap!important;
    overflow:visible!important;
  }
  .ct-native-dropdown-list{
    position:absolute!important;
    max-width:calc(100vw - 24px)!important;
  }
}

/* === Mobile full sidebar labels v3 === */
@media(max-width:768px){
  .sidebar{
    width:min(84vw,300px)!important;
    max-width:300px!important;
    min-width:260px!important;
    overflow-x:hidden!important;
  }
  .sidebar .brand{
    width:100%!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:nowrap!important;
    text-align:left!important;
    padding-left:20px!important;
    padding-right:16px!important;
    font-size:20px!important;
  }
  .sidebar .brand span{
    display:inline!important;
  }
  .sidebar .nav{
    width:100%!important;
  }
  .sidebar .nav-section{
    display:block!important;
    width:100%!important;
    padding-left:20px!important;
    padding-right:16px!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
  .sidebar .nav a{
    display:flex!important;
    width:calc(100% - 16px)!important;
    margin-left:8px!important;
    margin-right:8px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    padding:10px 12px!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
  .sidebar .nav a .ico{
    display:inline-flex!important;
    flex:0 0 20px!important;
    width:20px!important;
    min-width:20px!important;
    justify-content:center!important;
  }
  .sidebar .nav a span:not(.ico){
    display:inline!important;
    opacity:1!important;
    visibility:visible!important;
    width:auto!important;
    max-width:none!important;
    overflow:visible!important;
    font-size:14px!important;
  }
  body.sidebar-open .sidebar .brand,
  body.sidebar-open .sidebar .nav-section,
  body.sidebar-open .sidebar .nav a span{
    opacity:1!important;
    visibility:visible!important;
  }
}

/* Mobile sidebar scrollbar cleanup */
@media(max-width:768px){
 .sidebar{overflow-x:hidden!important;scrollbar-width:none!important;-ms-overflow-style:none!important}
 .sidebar::-webkit-scrollbar,.sidebar .nav::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
 .sidebar .nav{overflow-x:hidden!important}
}


/* === CenterTrack table readability theme v1 === */
.data-table thead th{background:#e9eef3!important;color:#4b5966!important;border-bottom:1px solid #cbd4dc!important;border-right:1px solid #d9e0e6!important;font-weight:800!important}
.data-table tbody tr:nth-child(odd)>td{background:#fff}
.data-table tbody tr:nth-child(even)>td{background:#f6f8fa}
.data-table tbody tr:hover>td{background:#eef5fb!important}
.data-table tbody td{border-bottom-color:#e2e7eb!important;border-right-color:#e8ecef!important}
.data-table tfoot td{background:#eaf0f5!important;font-weight:800}
.money-positive,.revenue-positive,.profit-positive{color:#159447!important;font-weight:500!important}
