/* Sumon Enterprise V2 · Phase 5 global design system */
:root{
  --sidebar-width:282px;--header-height:68px;
  --primary:#7652c8;--primary-light:#9a7be7;--primary-dark:#5635a6;
  --success:#15966b;--danger:#d84e61;--warning:#d99324;--info:#2586bd;
  --bg-body:#f5f6fb;--bg-card:#ffffff;--bg-surface-alt:#f8f8fc;
  --text-primary:#222238;--text-secondary:#687087;--text-muted:#9097aa;
  --border:#e7e8f0;--border-light:#f0f1f6;
  --radius:14px;--radius-sm:10px;--radius-lg:18px;
  --shadow:0 2px 10px rgba(34,28,66,.045);
  --shadow-md:0 8px 24px rgba(34,28,66,.07);
  --shadow-lg:0 16px 40px rgba(34,28,66,.11);
}
body{
  background:var(--bg-body)!important;color:var(--text-primary)!important;
  font-family:Inter,"Noto Sans Bengali",system-ui,sans-serif!important;
  font-size:14px;line-height:1.55;
}
body.dark-mode{
  --bg-body:#11121b;--bg-card:#1a1c29;--bg-surface-alt:#202232;
  --text-primary:#f0eff8;--text-secondary:#b5b8ca;--text-muted:#858ba2;
  --border:#303346;--border-light:#292c3e;
  --shadow:0 2px 12px rgba(0,0,0,.2);--shadow-md:0 8px 26px rgba(0,0,0,.25);
  --shadow-lg:0 16px 42px rgba(0,0,0,.32);
}
.top-bar{
  left:var(--sidebar-width)!important;height:var(--header-height)!important;
  padding:0 24px!important;background:rgba(255,255,255,.92)!important;
  border-bottom:1px solid var(--border)!important;box-shadow:0 2px 12px rgba(32,29,61,.035);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
body.dark-mode .top-bar{background:rgba(25,27,40,.94)!important;border-color:var(--border)!important}
body.sidebar-collapsed .top-bar{left:0!important}
.header-left{gap:14px!important}
.header-left .brand{font-size:1rem!important;font-weight:800!important;letter-spacing:-.02em;color:var(--text-primary)!important}
.header-left .brand i{color:var(--primary)!important}
.sidebar-toggle{width:40px!important;height:40px!important;border:1px solid var(--border)!important;border-radius:12px!important;color:var(--text-secondary)!important;background:var(--bg-card)!important;font-size:1.2rem!important}
.sidebar-toggle:hover{background:var(--bg-surface-alt)!important;color:var(--primary)!important}
.header-right{gap:10px!important;padding-right:0!important}
.header-right .lang-btn,.header-right .theme-btn,.header-right .user-btn{
  min-height:40px;border:1px solid var(--border)!important;border-radius:11px!important;
  background:var(--bg-card)!important;color:var(--text-secondary)!important;
  padding:7px 12px!important;font-size:12px!important;font-weight:650!important;
}
.header-right .user-avatar{width:32px!important;height:32px!important;border-radius:10px!important;background:linear-gradient(135deg,#805bd2,#ae75ce)!important}
.header-right .pos-btn{min-height:40px;border-radius:11px!important;padding:8px 16px!important;background:linear-gradient(135deg,#7956ce,#6542b7)!important;box-shadow:0 5px 14px rgba(111,75,190,.2)!important}
.mfv4-head-search{
  position:relative;display:flex;align-items:center;gap:10px;
  height:42px;width:min(360px,30vw);margin:0 auto 0 24px;padding:0 12px;
  background:var(--bg-surface-alt);border:1px solid var(--border);border-radius:12px;
  color:var(--text-muted);transition:border-color .18s,box-shadow .18s;
}
.mfv4-head-search:focus-within{border-color:#a88cdd;box-shadow:0 0 0 3px rgba(118,82,200,.10)}
.mfv4-head-search>i{font-size:15px;color:var(--text-muted)}
.mfv4-head-search input#mfv4GlobalSearch{
  width:100%;min-width:0;height:38px!important;min-height:0!important;padding:0!important;
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
  color:var(--text-primary)!important;font:500 12px Inter,"Noto Sans Bengali",sans-serif!important;
}
.mfv4-head-search input::placeholder{color:var(--text-muted)!important}
.mfv4-head-search kbd{white-space:nowrap;background:var(--bg-card);border:1px solid var(--border);border-radius:6px;padding:2px 6px;color:var(--text-muted);font-size:10px}
#mfv4SearchResults{
  position:absolute;z-index:1500;top:calc(100% + 9px);left:0;right:0;
  max-height:340px;overflow:auto;padding:6px;background:var(--bg-card);
  border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow-lg);
}
#mfv4SearchResults a{display:block;padding:10px 12px;border-radius:8px;text-decoration:none;color:var(--text-primary);font-size:12px;font-weight:600}
#mfv4SearchResults a:hover{background:var(--bg-surface-alt);color:var(--primary)}
.main-sidebar.mf-sidebar-v4{width:var(--sidebar-width)!important}
.main-area{margin-left:var(--sidebar-width)!important;margin-top:var(--header-height)!important;min-height:calc(100vh - var(--header-height))}
body.sidebar-collapsed .main-area{margin-left:0!important}
.content-area{padding:28px 30px!important;max-width:100%;overflow-x:hidden}
.site-footer{background:transparent!important;border-color:var(--border)!important;color:var(--text-muted)!important;padding:16px 24px!important}
.page-header{
  background:transparent!important;color:var(--text-primary)!important;
  border-radius:0!important;box-shadow:none!important;border:0!important;
  border-bottom:1px solid var(--border)!important;padding:0 0 18px!important;
  margin:0 0 22px!important;min-height:56px;
}
.page-header:before,.page-header:after{display:none!important}
.page-header h1,.page-header h2,.page-header h3{
  color:var(--text-primary)!important;font-size:22px!important;font-weight:800!important;
  letter-spacing:-.035em;margin:0!important;line-height:1.25;
}
.page-header h1 i,.page-header h2 i,.page-header h3 i{color:var(--primary)!important;background:rgba(118,82,200,.10)!important;border-radius:11px;padding:9px;font-size:17px!important}
.page-header p{color:var(--text-secondary)!important;font-size:12px!important;margin:6px 0 0!important;opacity:1!important}
.card,.card-modern,.card-modern .card-body,.card-modern .card-header{
  background:var(--bg-card)!important;color:var(--text-primary);
  border-color:var(--border)!important;border-radius:var(--radius)!important;
  box-shadow:var(--shadow)!important;
}
.card{overflow:hidden}
.card:hover{border-color:rgba(118,82,200,.22)!important}
.card-header{background:var(--bg-surface-alt)!important;color:var(--text-primary)!important;border-bottom:1px solid var(--border)!important}
.card h1,.card h2,.card h3,.card h4,.card h5,.card h6,.card-modern h1,.card-modern h2,.card-modern h3,.card-modern h4,.card-modern h5{color:var(--text-primary)}
.text-muted{color:var(--text-muted)!important}
.table{--bs-table-bg:transparent;--bs-table-color:var(--text-primary);--bs-table-border-color:var(--border);margin-bottom:0}
.table thead th{background:var(--bg-surface-alt)!important;color:var(--text-secondary)!important;border-bottom:1px solid var(--border)!important;font-size:10px!important;font-weight:800!important;letter-spacing:.055em;text-transform:uppercase;padding:13px 12px!important;white-space:nowrap}
.table tbody td{padding:12px!important;border-color:var(--border-light)!important;vertical-align:middle}
.table-hover>tbody>tr:hover>*{--bs-table-bg:rgba(118,82,200,.045);color:var(--text-primary)}
.table-responsive{border-radius:11px}
.form-label,label{color:var(--text-secondary)}
.form-control,.form-select,.input-group-text{
  background:var(--bg-card)!important;color:var(--text-primary)!important;
  border:1px solid var(--border)!important;border-radius:10px!important;
  min-height:42px;box-shadow:none!important;
}
textarea.form-control{min-height:84px}
.form-control:focus,.form-select:focus{border-color:#a58bd9!important;box-shadow:0 0 0 3px rgba(118,82,200,.11)!important}
.form-control::placeholder{color:var(--text-muted)!important}
.form-check-input{border-color:var(--border)!important}
.form-check-input:checked{background-color:var(--primary)!important;border-color:var(--primary)!important}
.btn{border-radius:10px!important;font-weight:650!important;transition:transform .16s,box-shadow .16s,background .16s}
.btn-primary{background:linear-gradient(135deg,#7956ce,#6542b7)!important;border-color:#6e4cbe!important;box-shadow:0 4px 11px rgba(111,75,190,.15)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(111,75,190,.22)}
.btn-success{background:#15966b!important;border-color:#15966b!important}
.btn-outline-primary{color:var(--primary)!important;border-color:rgba(118,82,200,.42)!important}
.btn-outline-primary:hover{background:var(--primary)!important;color:white!important}
.btn-outline-secondary,.btn-light{background:var(--bg-card)!important;color:var(--text-secondary)!important;border-color:var(--border)!important}
.btn-outline-secondary:hover,.btn-light:hover{background:var(--bg-surface-alt)!important;color:var(--primary)!important}
.badge{font-weight:700;letter-spacing:.01em}
.alert{border-radius:12px!important;border-width:1px!important}
.modal-content{background:var(--bg-card)!important;color:var(--text-primary)!important;border:1px solid var(--border)!important;border-radius:16px!important;box-shadow:var(--shadow-lg)!important}
.modal-header,.modal-footer{border-color:var(--border)!important}
.btn-close{filter:var(--bs-btn-close-white-filter,none)}
.dropdown-menu,.user-menu{background:var(--bg-card)!important;border:1px solid var(--border)!important;border-radius:12px!important;box-shadow:var(--shadow-lg)!important}
.dropdown-menu .dropdown-item{color:var(--text-primary)}
.dropdown-menu .dropdown-item:hover{background:var(--bg-surface-alt)}
.stats-grid,.summary-cards{gap:14px!important}
.stat-card,.summary-card,.card-modern{border:1px solid var(--border)!important;box-shadow:var(--shadow)!important;border-radius:var(--radius)!important}
.stat-card:hover,.summary-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)!important}
.dash-header{border-radius:18px!important;background:linear-gradient(120deg,#4f367e,#7856bf 58%,#a47bd6)!important;box-shadow:0 12px 28px rgba(86,55,137,.17)!important}
.chart-box,.info-box{background:var(--bg-card)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow)!important}
body.dark-mode .chart-box,body.dark-mode .info-box{background:var(--bg-card)!important}
.overlay{background:rgba(14,12,24,.52)!important;backdrop-filter:blur(2px)}
@media(max-width:1200px){.content-area{padding:22px 22px!important}.mfv4-head-search{width:min(300px,26vw);margin-left:12px}}
@media(max-width:992px){
  .top-bar{left:0!important;padding:0 12px!important;height:var(--header-height)!important}
  .main-area{margin-left:0!important}
  .main-sidebar.mf-sidebar-v4{left:-100%!important;width:282px!important;max-width:88vw!important}
  .main-sidebar.mf-sidebar-v4.open{left:0!important}
  body.sidebar-collapsed .main-sidebar.mf-sidebar-v4{left:-100%!important;width:282px!important}
  body.sidebar-collapsed .main-sidebar.mf-sidebar-v4.open{left:0!important}
  .content-area{padding:20px 14px!important}
  .mfv4-head-search{width:min(280px,36vw);margin-left:4px;height:38px}
  .mfv4-head-search kbd{display:none}
  .header-right{gap:6px!important}
}
@media(max-width:640px){
  :root{--header-height:60px}
  .top-bar{padding:0 9px!important}
  .header-left .brand{display:none!important}
  .header-right .lang-btn span,.header-right .user-btn>span:not(.user-avatar){display:none!important}
  .header-right .lang-btn,.header-right .theme-btn,.header-right .user-btn{padding:5px 8px!important;min-height:36px}
  .header-right .pos-btn{padding:7px 10px!important;min-height:36px}
  .mfv4-head-search{flex:1;width:auto;margin:0 5px;height:36px;padding:0 9px}
  .mfv4-head-search input#mfv4GlobalSearch{font-size:11px!important}
  .content-area{padding:16px 10px!important}
  .page-header h1,.page-header h2,.page-header h3{font-size:19px!important}
  .stats-grid,.summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .table td,.table th{font-size:12px!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Phase 5 overrides for the legacy V4 theme layer */
:root{
  --mfv4-primary:#7652c8;--mfv4-secondary:#9a7be7;--mfv4-widget-title:#29263d;
  --mfv4-background:var(--bg-body);--mfv4-card:var(--bg-card);--mfv4-border:var(--border);
  --mfv4-text:var(--text-primary);--mfv4-success:#15966b;--mfv4-danger:#d84e61;
}
body.mf-classic-v4 .top-bar{
  left:var(--sidebar-width)!important;height:var(--header-height)!important;
  background:rgba(255,255,255,.93)!important;border-bottom:1px solid var(--border)!important;
  box-shadow:0 2px 12px rgba(32,29,61,.04)!important;padding:0 24px!important;
}
body.dark-mode.mf-classic-v4 .top-bar{background:rgba(25,27,40,.94)!important;border-color:var(--border)!important}
body.mf-classic-v4 .content-area{padding:28px 30px 32px!important;background:transparent!important}
body.mf-classic-v4 .page-header{
  background:transparent!important;color:var(--text-primary)!important;
  border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important;
  box-shadow:none!important;padding:0 0 18px!important;margin:0 0 22px!important;min-height:56px!important;
}
body.mf-classic-v4 .page-header h1,body.mf-classic-v4 .page-header h2,body.mf-classic-v4 .page-header h3{
  color:var(--text-primary)!important;font-size:22px!important;font-weight:800!important;letter-spacing:-.035em!important;
}
body.mf-classic-v4 .page-header h1 i,body.mf-classic-v4 .page-header h2 i,body.mf-classic-v4 .page-header h3 i{
  color:var(--primary)!important;background:rgba(118,82,200,.10)!important;border:0!important;border-radius:11px!important;padding:9px!important;
}
body.mf-classic-v4 .page-header p{color:var(--text-secondary)!important;font-size:12px!important;margin-top:6px!important}
body.mf-classic-v4 .card,body.mf-classic-v4 .card-modern,body.mf-classic-v4 .stat-card,
body.mf-classic-v4 .summary-card,body.mf-classic-v4 .chart-box,body.mf-classic-v4 .info-box,
body.mf-classic-v4 .sales-card,body.mf-classic-v4 .action-btn{
  background:var(--bg-card)!important;color:var(--text-primary)!important;
  border:1px solid var(--border)!important;border-radius:var(--radius)!important;
  box-shadow:var(--shadow)!important;
}
body.mf-classic-v4 .card-header,body.mf-classic-v4 .card-modern .card-header,
body.mf-classic-v4 .chart-box .ch-header,body.mf-classic-v4 .info-box .ib-header,
body.mf-classic-v4 .sales-card .sc-header{
  background:var(--bg-surface-alt)!important;border-color:var(--border)!important;
}
body.mf-classic-v4 .table thead th,body.mf-classic-v4 .table-light th{
  background:var(--bg-surface-alt)!important;color:var(--text-secondary)!important;border-color:var(--border)!important;
}
body.mf-classic-v4 .table td,body.mf-classic-v4 .table th{border-color:var(--border)!important}
body.mf-classic-v4 .table tbody tr:hover{background:rgba(118,82,200,.045)!important}
body.mf-classic-v4 .btn,body.mf-classic-v4 button.btn{border-radius:10px!important;box-shadow:none!important}
body.mf-classic-v4 .btn-primary,body.mf-classic-v4 .btn-export{
  background:linear-gradient(135deg,#7956ce,#6542b7)!important;border:1px solid #6e4cbe!important;
  border-radius:10px!important;box-shadow:0 4px 11px rgba(111,75,190,.15)!important;
}
body.mf-classic-v4 .btn-outline-primary{background:var(--bg-card)!important;border:1px solid rgba(118,82,200,.42)!important;color:var(--primary)!important;border-radius:10px!important}
body.mf-classic-v4 .form-control,body.mf-classic-v4 .form-select,
body.mf-classic-v4 input:not([type=checkbox]):not([type=radio]):not([type=range]),
body.mf-classic-v4 textarea,body.mf-classic-v4 select{
  background:var(--bg-card)!important;color:var(--text-primary)!important;
  border:1px solid var(--border)!important;border-radius:10px!important;box-shadow:none!important;min-height:42px;
}
body.mf-classic-v4 .form-control:focus,body.mf-classic-v4 .form-select:focus,
body.mf-classic-v4 input:focus,body.mf-classic-v4 textarea:focus,body.mf-classic-v4 select:focus{
  border-color:#a58bd9!important;outline:0!important;box-shadow:0 0 0 3px rgba(118,82,200,.11)!important;
}
body.mf-classic-v4 .site-footer{background:transparent!important;border-top:1px solid var(--border)!important;color:var(--text-muted)!important}
body.mf-classic-v4 .site-footer a{color:var(--text-secondary)!important}
body.mf-classic-v4 #sidebar.mf-sidebar-v4{
  width:var(--sidebar-width)!important;background:linear-gradient(180deg,#fcfbff 0%,#f7f5fc 100%)!important;
  border-right:1px solid #e8e3f2!important;box-shadow:5px 0 22px rgba(48,35,76,.045)!important;
}
body.mf-classic-v4 #sidebar .mf-sidebar-brand{background:transparent!important;border-bottom:1px solid #e9e4f1!important}
body.mf-classic-v4 #sidebar .mf-sb-logo{border-radius:14px!important;background:#7652c8!important;border-color:#d8c9f4!important;box-shadow:0 7px 16px rgba(118,82,200,.16)!important}
body.mf-classic-v4 #sidebar .mf-sb-brand-text strong{color:#2c2541!important}
body.mf-classic-v4 #sidebar .mf-sb-brand-text .mf-sb-overline{color:#7652c8!important}
body.mf-classic-v4 #sidebar .mf-sb-brand-text small{color:#8b849b!important}
body.mf-classic-v4 #sidebar .mf-sidebar-top{background:transparent!important;border-color:#e9e4f1!important}
body.mf-classic-v4 #sidebar .mf-sidebar-search{background:#fff!important;border:1px solid #e6e1ef!important;border-radius:11px!important}
body.mf-classic-v4 #sidebar .mf-sidebar-search input#mfSidebarSearch{color:#332b47!important}
body.mf-classic-v4 #sidebar .mf-sidebar-search input::placeholder{color:#9a93a8!important}
body.mf-classic-v4 #sidebar .mf-quick-action{background:#fff!important;border:1px solid #e8e2f1!important;border-radius:10px!important;color:#625a73!important}
body.mf-classic-v4 #sidebar .mf-quick-action i{color:#7652c8!important}
body.mf-classic-v4 #sidebar .mf-quick-sale{background:linear-gradient(135deg,#7956ce,#6542b7)!important;color:#fff!important;border-color:#7652c8!important}
body.mf-classic-v4 #sidebar .mf-quick-sale i{color:#fff!important}
body.mf-classic-v4 #sidebar .mf-nav-section{color:#a19aae!important}
body.mf-classic-v4 #sidebar .mf-nav-row>a.mf-nav-leaf-link,
body.mf-classic-v4 #sidebar .mf-nav-group-btn{color:#5d566d!important;border-radius:9px!important}
body.mf-classic-v4 #sidebar .mf-nav-row>a.mf-nav-leaf-link i,
body.mf-classic-v4 #sidebar .mf-nav-group-btn>i:first-child{color:#8e86a0!important}
body.mf-classic-v4 #sidebar .mf-nav-row:hover>a.mf-nav-leaf-link,
body.mf-classic-v4 #sidebar .mf-nav-group-btn:hover{background:#eee9f8!important;color:#6544a7!important}
body.mf-classic-v4 #sidebar .mf-nav-leaf.mf-is-active>.mf-nav-row>a.mf-nav-leaf-link{
  background:#7652c8!important;color:#fff!important;border-color:#7652c8!important;border-radius:9px!important;
  box-shadow:0 4px 10px rgba(118,82,200,.16)!important;
}
body.mf-classic-v4 #sidebar .mf-nav-leaf.mf-is-active>.mf-nav-row>a.mf-nav-leaf-link i{color:#fff!important}
body.mf-classic-v4 #sidebar .mf-nav-group-li.open>.mf-nav-group-btn{background:#eee9f8!important;color:#6544a7!important;border-color:#e4dcf3!important}
body.mf-classic-v4 #sidebar .mf-nav-children{border-left-color:#e2d9ef!important}
body.mf-classic-v4 #sidebar .mf-sidebar-footer{background:#f8f6fc!important;border-top:1px solid #e9e4f1!important}
body.mf-classic-v4 #sidebar .mf-profile-avatar{background:#7652c8!important;border-color:#7652c8!important;border-radius:10px!important}
body.mf-classic-v4 #sidebar .mf-profile-details strong{color:#453b59!important}
body.mf-classic-v4 #sidebar .mf-profile-details small{color:#938ba2!important}
body.mf-classic-v4 #sidebar .mf-sidebar-footer-note{color:#9a92a8!important}
body.mf-classic-v4 .mfv4-head-search{height:42px!important;border-radius:12px!important;background:var(--bg-surface-alt)!important;border:1px solid var(--border)!important;min-width:220px!important}
body.mf-classic-v4 .mfv4-head-search input#mfv4GlobalSearch{width:100%!important;color:var(--text-primary)!important}
body.mf-classic-v4 .mfv4-head-search kbd{border-radius:6px!important}
body.dark-mode.mf-classic-v4 #sidebar.mf-sidebar-v4{
  background:linear-gradient(180deg,#1e1a2b,#181522)!important;border-color:#302940!important;
}
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-brand,
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-top,
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-footer{background:transparent!important;border-color:#342d43!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-sb-brand-text strong,
body.dark-mode.mf-classic-v4 #sidebar .mf-profile-details strong{color:#f3effb!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-sb-brand-text small,
body.dark-mode.mf-classic-v4 #sidebar .mf-profile-details small{color:#b2a8c2!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-search,
body.dark-mode.mf-classic-v4 #sidebar .mf-quick-action{background:#ffffff0c!important;border-color:#40364f!important;color:#d7cde7!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-search input#mfSidebarSearch{color:#fff!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-row>a.mf-nav-leaf-link,
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-group-btn{color:#d3c9e1!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-row>a.mf-nav-leaf-link i,
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-group-btn>i:first-child{color:#b7a8ce!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-row:hover>a.mf-nav-leaf-link,
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-group-btn:hover,
body.dark-mode.mf-classic-v4 #sidebar .mf-nav-group-li.open>.mf-nav-group-btn{background:#302740!important;color:#e8d9ff!important}
body.dark-mode.mf-classic-v4 #sidebar .mf-sidebar-footer-note{color:#a99db8!important}
@media(max-width:992px){
  body.mf-classic-v4 .content-area{padding:20px 14px!important}
  body.mf-classic-v4 .mfv4-head-search{display:flex!important;flex:1;width:auto;min-width:0!important;margin:0 6px!important}
}
@media(max-width:640px){
  body.mf-classic-v4 .content-area{padding:16px 10px!important}
  body.mf-classic-v4 .mfv4-head-search{height:36px!important}
  body.mf-classic-v4 .mfv4-head-search kbd{display:none!important}
}

/* Dashboard V5 */
.phase5-dashboard{display:flex;flex-direction:column;gap:18px}
.dash-welcome{
  display:flex;justify-content:space-between;align-items:center;gap:20px;padding:26px 30px;
  border-radius:18px;background:linear-gradient(115deg,#4d367d,#7350b8 60%,#9a73cb);
  color:#fff;box-shadow:0 12px 28px rgba(86,55,137,.16);position:relative;overflow:hidden;
}
.dash-welcome:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:15%;top:-170px;background:rgba(255,255,255,.08);pointer-events:none}
.dash-welcome>div{position:relative;z-index:1}
.dash-eyebrow{font-size:9px;font-weight:800;letter-spacing:.18em;color:#e1d2fa}
.dash-welcome h1{margin:7px 0 5px;font-size:25px;font-weight:850;letter-spacing:-.04em;color:#fff}
.dash-welcome p{margin:0;color:#e8def7;font-size:12px}
.dash-welcome-meta{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.dash-date-pill{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2);border-radius:10px;padding:8px 12px;font-size:11px;font-weight:650;color:#fff}
.dash-transaction-count{font-size:11px;color:#e5d9f7}
.dash-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.dash-kpi{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:16px 15px;border-radius:14px!important;background:var(--bg-card);border:1px solid var(--border);box-shadow:var(--shadow);text-decoration:none;color:var(--text-primary);transition:transform .18s,box-shadow .18s,border-color .18s}
.dash-kpi:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:rgba(118,82,200,.28);color:var(--text-primary)}
.kpi-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:rgba(118,82,200,.11);color:#7652c8;font-size:16px}
.kpi-green .kpi-icon{background:#e8f7f0;color:#15966b}.kpi-blue .kpi-icon{background:#eaf2ff;color:#3978d7}.kpi-orange .kpi-icon{background:#fff4e5;color:#c7811e}.kpi-violet .kpi-icon{background:#f1eaff;color:#8453c8}.kpi-red .kpi-icon{background:#fff0f1;color:#d84e61}
.dash-kpi .kpi-label{font-size:10px;color:var(--text-secondary);font-weight:700;line-height:1.3}
.dash-kpi strong{font-size:18px;line-height:1.2;letter-spacing:-.03em;font-weight:850;color:var(--text-primary);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.dash-kpi small{font-size:9px;color:var(--text-muted)}
.dash-kpi small i{color:#15966b}
.dash-quick-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.dash-quick-actions a{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:12px 13px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px;text-decoration:none;color:var(--text-primary);box-shadow:var(--shadow);transition:transform .18s,border-color .18s}
.dash-quick-actions a:hover{transform:translateY(-2px);border-color:#bca8e4;color:var(--primary)}
.dash-quick-actions a>i{grid-row:1/3;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#f1eaff;color:#7652c8;font-size:16px}
.dash-quick-actions a span{font-size:11px;font-weight:800}
.dash-quick-actions a small{font-size:9px;color:var(--text-muted)}
.dash-main-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(270px,.85fr);gap:14px}
.dash-bottom-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:14px}
.dash-panel{min-width:0;padding:18px;background:var(--bg-card);border:1px solid var(--border);border-radius:15px;box-shadow:var(--shadow)}
.dash-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px}
.dash-panel-head h3{font-size:14px;font-weight:820;letter-spacing:-.02em;margin:0;color:var(--text-primary)}
.dash-panel-head p{font-size:10px;color:var(--text-muted);margin:4px 0 0}
.dash-panel-head>a{font-size:10px;font-weight:750;color:var(--primary);text-decoration:none;white-space:nowrap}
.dash-panel-head>a:hover{text-decoration:underline}
.dash-panel-icon{width:35px;height:35px;display:grid;place-items:center;border-radius:10px;background:#f1eaff;color:#7652c8}
.dash-month-stat{display:flex;flex-direction:column;gap:4px;padding:12px 0;border-bottom:1px solid var(--border-light)}
.dash-month-stat span{font-size:10px;color:var(--text-muted);font-weight:650}
.dash-month-stat strong{font-size:18px;font-weight:850;letter-spacing:-.03em;color:var(--text-primary)}
.dash-month-stat strong.positive{color:#15966b}.dash-month-stat strong.negative{color:#d84e61}
.dash-panel-link{display:flex;justify-content:space-between;align-items:center;margin-top:13px;padding:10px 12px;border-radius:10px;background:#f4f0fb;color:#6849ad;text-decoration:none;font-size:10px;font-weight:800}
.dash-panel-link:hover{background:#ece4f8;color:#573594}
.dash-recent-list{display:flex;flex-direction:column}
.dash-recent-item{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border-light);text-decoration:none;color:var(--text-primary);min-width:0}
.dash-recent-item:last-child{border-bottom:0}
.dash-recent-item:hover .dash-recent-main strong{color:var(--primary)}
.dash-recent-icon{width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;border-radius:10px;background:var(--bg-surface-alt);color:var(--primary)}
.dash-recent-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.dash-recent-main strong{font-size:10px;font-weight:800;color:var(--text-primary)}
.dash-recent-main small{font-size:9px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-recent-amount{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}
.dash-recent-amount strong{font-size:10px;color:var(--text-primary)}
.dash-recent-amount small{font-size:9px}
body.dark-mode .dash-quick-actions a>i,body.dark-mode .dash-panel-icon{background:#302541;color:#c6a8f6}
body.dark-mode .dash-panel-link{background:#302541;color:#d7c4f8}
body.dark-mode .kpi-green .kpi-icon{background:#18372e;color:#65d5a8}
body.dark-mode .kpi-blue .kpi-icon{background:#1c2f4a;color:#8cb7ff}
body.dark-mode .kpi-orange .kpi-icon{background:#3d3020;color:#e6b66a}
body.dark-mode .kpi-violet .kpi-icon{background:#302541;color:#c6a8f6}
body.dark-mode .kpi-red .kpi-icon{background:#40232c;color:#f18d9a}
@media(max-width:1400px){.dash-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dash-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.dash-main-grid{grid-template-columns:1fr}.dash-bottom-grid{grid-template-columns:1fr}}
@media(max-width:640px){
 .dash-welcome{padding:19px 17px;flex-direction:column;align-items:flex-start}
 .dash-welcome h1{font-size:21px}.dash-welcome-meta{align-items:flex-start;text-align:left}
 .dash-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .dash-kpi{padding:12px}.dash-kpi strong{font-size:15px}
 .dash-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .dash-panel{padding:13px}.dash-panel-head{align-items:flex-start}
}
