*{box-sizing:border-box}
:root{
  --bg:#070707;
  --panel:#111111;
  --panel2:#171717;
  --panel3:#1c1c1c;
  --gold:#d6a325;
  --gold-light:#f4c64e;
  --gold-dark:#8f6500;
  --text:#ffffff;
  --soft:#d7d7d7;
  --muted:#969696;
  --border:#3b321d;
  --border-light:#51431e;
  --red:#ff4b3e;
  --green:#67b85f;
  --orange:#e99018;
}

html,body{
  margin:0;
  padding:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}

.app-shell{
  display:flex;
  min-height:100vh;
  background:var(--bg);
}

/* SIDEBAR */
.sidebar{
  width:248px;
  background:linear-gradient(180deg,#050505 0%,#090909 66%,#0d0a03 100%);
  color:#fff;
  display:flex;
  flex-direction:column;
  position:fixed;
  inset:0 auto 0 0;
  border-right:1px solid #443514;
  box-shadow:8px 0 30px rgba(0,0,0,.25);
}

.brand-box{
  display:flex;
  gap:12px;
  align-items:center;
  padding:20px;
  border-bottom:1px solid rgba(214,163,37,.12);
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:7px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#f6c94e,#a67505);
  color:#080808;
  box-shadow:0 0 18px rgba(214,163,37,.22);
  font-size:22px;
  font-weight:900;
}

.brand-box strong{
  display:block;
  font-size:20px;
  color:#fff4d4;
}

.brand-box span{
  font-size:11px;
  color:#d1c7ad;
}

.side-nav{
  padding:12px 10px;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.side-nav a{
  padding:13px 14px;
  border-radius:6px;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:14px;
  color:#f1f1f1;
  transition:.2s ease;
}

.side-nav a.active{
  background:linear-gradient(90deg,#c59015,#e0ad2a);
  color:#080808;
  font-weight:800;
  box-shadow:0 6px 18px rgba(215,163,31,.18);
}

.side-nav a:hover:not(.active){
  background:#1c170b;
  color:#f4c64e;
}

.sidebar-user{
  margin-top:auto;
  padding:16px;
  border-top:1px solid rgba(214,163,37,.18);
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.015);
}

.avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  background:linear-gradient(135deg,#e6c163,#80600e);
  color:#0a0a0a;
  display:grid;
  place-items:center;
  font-weight:800;
  border:2px solid #c9971e;
}

.user-text{
  display:flex;
  flex-direction:column;
  font-size:12px;
}

.user-text strong{color:#fff}
.user-text span{color:#b8b09d}
.sidebar-user>a{
  margin-left:auto;
  color:#e0ac28;
  font-size:24px;
}

/* MAIN AREA + TOPBAR */
.main-area{
  margin-left:248px;
  width:calc(100% - 248px);
  background:var(--bg);
  min-height:100vh;
}

.topbar{
  height:78px;
  background:#080808;
  border-bottom:1px solid #302817;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
}

.topbar h1{
  font-size:23px;
  margin:0;
  color:#fff;
}

.crumb{
  font-size:12px;
  color:#968d78;
  margin-top:2px;
}

.top-actions{
  display:flex;
  gap:14px;
  align-items:center;
}

.icon-btn{
  border:0;
  background:transparent;
  color:#f4c64e;
  font-size:20px;
  position:relative;
  cursor:pointer;
}

.notif-dot{
  position:absolute;
  right:-4px;
  top:-7px;
  background:#d99008;
  color:#090909;
  border-radius:20px;
  font-size:9px;
  font-weight:800;
  padding:2px 5px;
}

.date-pill{
  border:1px solid #4d3b13;
  border-radius:7px;
  padding:9px 12px;
  background:#111008;
  color:#efbd39;
  font-size:13px;
}

.content{
  padding:22px;
  background:
    radial-gradient(circle at 20% 10%,rgba(214,163,37,.05),transparent 22%),
    var(--bg);
}

.flash{
  background:#142115;
  border:1px solid #345f35;
  color:#8ed68d;
  padding:10px 13px;
  border-radius:7px;
  margin-bottom:14px;
}

/* KPI CARDS */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:14px;
  margin-bottom:16px;
}

.stat-card{
  background:linear-gradient(145deg,#171717,#0e0e0e);
  border:1px solid #3c321c;
  border-radius:10px;
  padding:16px;
  display:flex;
  gap:12px;
  align-items:center;
  box-shadow:0 7px 20px rgba(0,0,0,.28);
}

.stat-card .stat-icon{
  width:46px;
  height:46px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:25px;
  background:#1b1608;
  color:#efb62a;
  border:1px solid #564114;
}

.stat-card span,.mini-stat span{
  display:block;
  font-size:12px;
  color:#eee;
}

.stat-card strong,.mini-stat strong{
  display:block;
  font-size:24px;
  margin:2px 0;
  color:#f0ba36;
}

.stat-card small{
  font-size:11px;
  color:#aaa;
}

.stat-card.orange strong{color:#ff4b3e}
.stat-card.orange .stat-icon{color:#ff5548;background:#22100d;border-color:#5b241d}
.stat-card.green .stat-icon,
.stat-card.purple .stat-icon,
.stat-card.cyan .stat-icon{background:#1b1608;color:#efb62a;border-color:#564114}

/* PANELS */
.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:16px;
}

.panel{
  background:linear-gradient(145deg,#141414,#0d0d0d);
  border:1px solid #3d321a;
  border-radius:10px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 7px 18px rgba(0,0,0,.20);
}

.panel-title{
  font-size:16px;
  font-weight:800;
  color:#f1b735;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.chart-wrap{height:280px}
.chart-wrap.donut{height:280px}

/* TABLES */
.table-wrap{overflow:auto}
.data-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  color:#e7e7e7;
}

.data-table th{
  background:#1c1c1c;
  color:#f1f1f1;
  text-align:left;
  padding:10px;
  border-bottom:1px solid #3d3422;
}

.data-table td{
  padding:10px;
  color:#e6e6e6;
  border-bottom:1px solid #272727;
}

.data-table tbody tr:hover{
  background:#17140c;
}

/* BADGES */
.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:20px;
  font-size:10px;
  background:#211b0e;
  color:#e6bd55;
  border:1px solid #4b3c15;
}

.badge.high{
  background:#28100d;
  color:#ff5548;
  border-color:#63302b;
}

.badge.medium{
  background:#291d06;
  color:#e9a51c;
  border-color:#6c4c09;
}

.badge.low{
  background:#0e2514;
  color:#70c56f;
  border-color:#285a31;
}

.badge.stage{
  background:#261d07;
  color:#eebd42;
  border-color:#5b4310;
}

.active-badge{
  background:#332806;
  color:#f2c34b;
  border:1px solid #705512;
}

.inactive-badge{
  background:#27100e;
  color:#ff5548;
  border:1px solid #63302b;
}

.danger-text{
  color:#ff5147;
  font-weight:700;
}

/* BUTTONS */
.btn{
  border:1px solid #4e3b15;
  background:#151515;
  color:#e9b535;
  border-radius:6px;
  padding:9px 14px;
  cursor:pointer;
  font-weight:700;
}

.btn:hover{background:#211a0b}

.btn.primary{
  background:linear-gradient(135deg,#d09a19,#8d6200);
  color:#080808;
  border:1px solid #dfad34;
  box-shadow:0 5px 14px rgba(213,161,33,.20);
}

.btn.primary:hover{
  background:linear-gradient(135deg,#f1bd3d,#b17b08);
}

.btn.sm{
  padding:7px 10px;
  font-size:11px;
  background:#1a1406;
  color:#f3bd37;
  border:1px solid #765714;
}

.actions{display:flex;gap:6px}
.actions form{display:inline}

.icon-action{
  border:1px solid #4c3a16;
  background:#15120a;
  color:#eab231;
  border-radius:5px;
  padding:5px 7px;
  cursor:pointer;
}

.icon-action.danger{
  color:#ff5147;
  border-color:#5f2a24;
  background:#1f0d0b;
}

/* SEARCH / FORMS */
.search-row{margin-bottom:12px}

.search-row input{
  width:100%;
  padding:10px 12px;
  border:1px solid #4a3b18;
  border-radius:6px;
  background:#0b0b0b;
  color:#fff;
}

.search-row input::placeholder{color:#777}

.form-grid{
  display:grid;
  gap:12px;
}

.form-grid.two{grid-template-columns:1fr 1fr}

.form-grid label{
  font-size:12px;
  font-weight:700;
  color:#d8cda9;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.inline-label select,
.inline-form select{
  width:100%;
  margin-top:5px;
  padding:9px 10px;
  border:1px solid #453718;
  border-radius:6px;
  background:#080808;
  color:#fff;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.search-row input:focus{
  outline:none;
  border-color:#c9971e;
  box-shadow:0 0 0 2px rgba(201,151,30,.15);
}

.form-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.span2{grid-column:1 / -1}

.inline-label{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  font-weight:700;
  color:#d8cda9;
}
.inline-label select{width:280px;margin:0}
.inline-form select{margin:0;padding:5px 7px}

/* MODALS */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.72);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:3000;
}

.modal.show{display:flex}

.modal-card{
  width:min(520px,92vw);
  background:#111;
  border:1px solid #4a3a17;
  color:#fff;
  border-radius:10px;
  padding:18px;
  box-shadow:0 20px 55px rgba(0,0,0,.7);
}

.modal-card.wide{width:min(760px,94vw)}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:15px;
}

.modal-head h3{color:#f0ba36;margin:0}

.modal-head button{
  border:0;
  background:none;
  color:#f0ba36;
  font-size:28px;
  cursor:pointer;
}

/* STAGES */
.stage-flow{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:18px;
  border:1px solid #3a321f;
  border-radius:8px;
  margin-bottom:16px;
  background:#0b0b0b;
}

.stage-box{
  min-width:120px;
  text-align:center;
  border:1px solid #745619;
  background:#191407;
  color:#fff;
  padding:11px;
  border-radius:7px;
}

.stage-box span{
  display:block;
  font-size:11px;
  margin-top:4px;
  color:#d8cda9;
}

.stage-box.s1{border-color:#987122}
.stage-box.s2{border-color:#8d821d}
.stage-box.s3{border-color:#af7610}
.stage-box.s4{border-color:#88483c}
.stage-box.s5{border-color:#6f7423}

.stage-arrow{
  font-size:24px;
  color:#eab434;
}

/* TABS */
.tabs{display:flex;gap:14px}
.tab{
  border:0;
  background:none;
  padding:6px 3px;
  color:#aaa;
  cursor:pointer;
}
.tab.active{
  color:#f0ba36;
  border-bottom:2px solid #d9a51f;
}

/* CALENDAR */
.calendar-panel .panel-head{margin-bottom:12px}
.calendar-title{
  font-size:18px;
  font-weight:800;
  color:#f0ba36;
}
.cal-nav{display:flex;gap:6px}
.view-tabs{display:flex;gap:6px}
.view-tabs span{
  padding:6px 9px;
  border:1px solid #4b3a17;
  border-radius:5px;
  font-size:11px;
  color:#cfcfcf;
  background:#111;
}
.view-tabs .active{
  background:#322505;
  color:#f1bd3a;
}
.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  border:1px solid #39301c;
  border-right:0;
  border-bottom:0;
}
.dow,.day-cell{
  border-right:1px solid #292929;
  border-bottom:1px solid #292929;
}
.dow{
  padding:8px;
  text-align:center;
  font-size:11px;
  font-weight:700;
  background:#141414;
  color:#ddd;
}
.day-cell{
  min-height:110px;
  padding:7px;
  background:#0c0c0c;
}
.day-cell:hover{background:#17140c}
.day-cell.muted{background:#090909}
.day-num{
  font-size:11px;
  color:#898989;
  margin-bottom:6px;
}
.cal-task{
  font-size:9px;
  padding:4px 5px;
  border-radius:4px;
  margin:3px 0;
  background:#2e2107;
  color:#f0bd3d;
  border:1px solid #5b4310;
}
.cal-task.in-progress{background:#102112;color:#6bc66f;border-color:#285a31}
.cal-task.review{background:#2a1c04;color:#e9a51c;border-color:#6a4708}
.cal-task.pending{background:#221229;color:#c48ae0;border-color:#58306b}
.cal-task.completed{background:#102112;color:#6bc66f;border-color:#285a31}

/* ALERTS */
.alerts-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}
.alert-panel{border-left:4px solid #e44}
.alert-panel.red{border-left-color:#ff5147}
.alert-panel.amber{border-left-color:#e7a21d}
.alert-panel.purple{border-left-color:#b47ad6}
.alert-panel.green{border-left-color:#63b66a}

/* REPORTS */
.stats-grid.four{grid-template-columns:repeat(4,1fr)}
.mini-stat{
  background:linear-gradient(145deg,#171717,#0e0e0e);
  border:1px solid #3d321a;
  border-radius:8px;
  padding:15px;
}
.mini-stat.green,
.mini-stat.orange,
.mini-stat.blue{background:linear-gradient(145deg,#171717,#0e0e0e)}
.mini-stat.orange strong{color:#ff5147}

/* SETTINGS */
.switch-row{
  display:flex;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid #272727;
  color:#ddd;
}

/* LOGIN */
.login-body{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at top,#2b2107 0%,#090909 45%,#000 100%);
}

.login-card{
  width:min(420px,92vw);
  background:#111;
  color:#fff;
  border:1px solid #4b3a17;
  border-radius:14px;
  padding:30px;
  box-shadow:0 20px 60px rgba(0,0,0,.6);
}

.login-logo{
  width:58px;
  height:58px;
  border-radius:10px;
  background:linear-gradient(135deg,#f2c34d,#a67505);
  color:#080808;
  display:grid;
  place-items:center;
  font-size:30px;
  margin:0 auto 12px;
  font-weight:900;
}

.login-card h1{
  text-align:center;
  margin:0;
  color:#f3c54d;
}
.login-card p{
  text-align:center;
  color:#aaa;
}
.login-card small{
  display:block;
  text-align:center;
  margin-top:14px;
  color:#8c8370;
}
.error-box{
  background:#27100e;
  color:#ff7c72;
  border:1px solid #63302b;
  padding:9px;
  border-radius:6px;
  margin:10px 0;
}

/* RESPONSIVE */
@media(max-width:1200px){
  .stats-grid{grid-template-columns:repeat(3,1fr)}
  .sidebar{width:210px}
  .main-area{margin-left:210px;width:calc(100% - 210px)}
}

@media(max-width:900px){
  .sidebar{position:static;width:76px}
  .brand-box div:last-child,.side-nav span,.sidebar-user .user-text,.sidebar-user>a{display:none}
  .brand-box{justify-content:center;padding:14px 6px}
  .side-nav a{justify-content:center;font-size:20px}
  .sidebar-user{justify-content:center}
  .main-area{margin-left:0;width:calc(100% - 76px)}
  .two-col,.alerts-grid,.stats-grid,.stats-grid.four{grid-template-columns:1fr 1fr}
  .stage-flow{overflow:auto;justify-content:flex-start}
}

@media(max-width:640px){
  .app-shell{display:block}
  .sidebar{width:100%;height:auto;position:static}
  .brand-box div:last-child{display:block}
  .side-nav{display:grid;grid-template-columns:repeat(3,1fr)}
  .side-nav span{display:inline}
  .sidebar-user{display:none}
  .main-area{width:100%}
  .topbar{padding:0 14px}
  .content{padding:14px}
  .stats-grid,.stats-grid.four,.two-col,.alerts-grid{grid-template-columns:1fr}
  .form-grid.two{grid-template-columns:1fr}
  .span2{grid-column:auto}
  .calendar-grid{min-width:760px}
  .calendar-panel{overflow:auto}
}


/* =========================================================
   BLACK / GOLD DASHBOARD - closer to supplied reference
   ========================================================= */
.dashboard-blackgold{
  width:100%;
}

.gold-stat-row{
  display:grid;
  grid-template-columns:repeat(5,1fr) 150px;
  gap:14px;
  margin-bottom:14px;
}

.gold-stat-card{
  min-height:96px;
  background:linear-gradient(145deg,#171717,#0c0c0c);
  border:1px solid #3c321c;
  border-radius:10px;
  padding:14px;
  display:flex;
  align-items:center;
  gap:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
}

.gold-stat-icon{
  width:45px;
  height:45px;
  border-radius:9px;
  background:#1d1708;
  border:1px solid #5e4612;
  color:#f0b62c;
  display:grid;
  place-items:center;
  font-size:24px;
  font-weight:900;
}

.gold-stat-card span{
  display:block;
  color:#eee;
  font-size:12px;
}
.gold-stat-card strong{
  display:block;
  color:#f2bd3b;
  font-size:26px;
  line-height:1;
  margin:4px 0 3px;
}
.gold-stat-card small{
  color:#b8b8b8;
  font-size:10px;
}
.gold-stat-card.danger-card strong{color:#ff4e45}

.gold-add-business{
  align-self:start;
  justify-self:stretch;
  height:40px;
  border:1px solid #7a5711;
  border-radius:6px;
  background:linear-gradient(180deg,#2b210a,#171104);
  color:#f1bd39;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
}

.dash-grid{
  display:grid;
  gap:14px;
  margin-bottom:14px;
}

.top-grid{
  grid-template-columns:1.1fr 1.45fr 1.6fr;
}
.middle-grid{
  grid-template-columns:1.55fr 1fr;
}
.bottom-grid{
  grid-template-columns:1fr .9fr 1.2fr;
}

.dash-panel{
  background:linear-gradient(145deg,#141414,#0b0b0b);
  border:1px solid #3c321c;
  border-radius:10px;
  padding:13px;
  box-shadow:0 6px 20px rgba(0,0,0,.24);
  min-width:0;
}

.dash-panel-title{
  color:#f0b735;
  font-size:14px;
  font-weight:800;
}

.dash-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.mini-gold-btn{
  border:1px solid #6f5012;
  border-radius:5px;
  background:#1a1406;
  color:#efb735;
  padding:6px 9px;
  font-size:10px;
  font-weight:700;
}

.chart-grid{
  display:grid;
  grid-template-columns:1fr 150px;
  gap:6px;
  align-items:center;
  height:235px;
}

.chart-canvas-wrap{
  height:225px;
  min-width:0;
}
.chart-canvas-wrap.wide{
  height:250px;
}

.chart-legend-custom{
  display:flex;
  flex-direction:column;
  gap:12px;
  font-size:10px;
}
.chart-legend-custom div{
  display:grid;
  grid-template-columns:10px 1fr auto;
  align-items:center;
  gap:7px;
  color:#ddd;
}
.chart-legend-custom span{
  width:8px;
  height:8px;
  border-radius:50%;
}
.chart-legend-custom b{
  color:#eee;
  font-weight:600;
}

.gold-table{
  width:100%;
  border-collapse:collapse;
  font-size:10px;
  color:#ddd;
}
.gold-table th{
  text-align:left;
  color:#ddd;
  background:#1c1c1c;
  border-bottom:1px solid #38301f;
  padding:8px 8px;
  font-weight:600;
}
.gold-table td{
  border-bottom:1px solid #262626;
  padding:8px 8px;
}
.gold-table.compact th,
.gold-table.compact td{
  padding:7px 7px;
}

.status-pill,
.stage-pill,
.priority-pill{
  display:inline-block;
  padding:3px 7px;
  border-radius:4px;
  font-size:9px;
  border:1px solid #6c5011;
  background:#2a2006;
  color:#efbb35;
}
.status-pill.inactive{
  background:#24100d;
  color:#ff5a50;
  border-color:#66312a;
}
.priority-pill.high{
  background:#24100d;
  color:#ff5a50;
  border-color:#66312a;
}
.priority-pill.medium{
  background:#2a1e05;
  color:#e9a51c;
  border-color:#6b4a09;
}
.priority-pill.low{
  background:#102314;
  color:#69bf6e;
  border-color:#285930;
}

.red-text{color:#ff4f47;font-weight:700}

.gold-icon-btn{
  display:inline-flex;
  width:22px;
  height:22px;
  align-items:center;
  justify-content:center;
  border:1px solid #6a4c0e;
  border-radius:4px;
  background:#171106;
  color:#efb331;
  font-size:11px;
}
.delete-icon{
  color:#ff5147;
  font-size:11px;
}

.pager-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#8f8f8f;
  font-size:9px;
  padding-top:8px;
}
.pager-row div{
  display:flex;
  gap:5px;
}
.pager-row div span,
.pager-row div b{
  min-width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border:1px solid #3d321c;
  border-radius:4px;
  background:#101010;
  color:#bbb;
}
.pager-row div b{
  background:#d09a19;
  color:#090909;
  border-color:#d6a325;
}

.stage-select-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  color:#aaa;
  font-size:9px;
}
.stage-select-row select{
  flex:1;
  background:#0b0b0b;
  color:#eee;
  border:1px solid #4a3915;
  border-radius:4px;
  padding:6px 8px;
}

.gold-stage-flow{
  display:flex;
  align-items:center;
  gap:5px;
  overflow:hidden;
  margin-bottom:10px;
}
.gold-stage-box{
  flex:1;
  min-width:70px;
  padding:9px 4px;
  text-align:center;
  border:1px solid #705010;
  border-radius:5px;
  background:#191306;
}
.gold-stage-box strong{
  display:block;
  font-size:9px;
  color:#fff;
}
.gold-stage-box span{
  display:block;
  font-size:8px;
  color:#d0c39e;
  margin-top:3px;
}
.gold-stage-box.s2{border-color:#6b6514}
.gold-stage-box.s3{border-color:#a86d0a}
.gold-stage-box.s4{border-color:#83443a}
.gold-stage-box.s5{border-color:#6a701f}
.gold-stage-arrow{color:#e7ad24;font-size:14px}

.gold-tabs{
  display:flex;
  gap:12px;
  color:#aaa;
  font-size:9px;
  margin-bottom:9px;
  white-space:nowrap;
}
.gold-tabs span.active{
  color:#f0b735;
  border-bottom:2px solid #d6a325;
  padding-bottom:4px;
}
.gold-search{
  height:29px;
  border:1px solid #4a3915;
  border-radius:4px;
  color:#777;
  background:#090909;
  padding:6px 9px;
  font-size:9px;
  margin-bottom:8px;
  display:flex;
  justify-content:space-between;
}
.gold-search b{color:#e7ad24}

.calendar-head-buttons{
  display:flex;
  gap:5px;
}
.calendar-head-buttons span{
  border:1px solid #4a3915;
  color:#d2b970;
  padding:4px 6px;
  border-radius:4px;
  font-size:9px;
  background:#0c0c0c;
}
.calendar-month-title{
  text-align:center;
  color:#eee;
  font-weight:700;
  font-size:12px;
  margin-bottom:7px;
}
.mini-calendar{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  border-top:1px solid #2b2b2b;
  border-left:1px solid #2b2b2b;
}
.mc-head,
.mc-day{
  border-right:1px solid #2b2b2b;
  border-bottom:1px solid #2b2b2b;
}
.mc-head{
  text-align:center;
  padding:5px 2px;
  color:#ccc;
  font-size:8px;
  background:#141414;
}
.mc-day{
  min-height:42px;
  padding:4px;
  color:#aaa;
  font-size:8px;
  background:#0b0b0b;
}
.mc-day.muted{background:#080808}
.mc-day small{
  display:block;
  margin-top:4px;
  color:#e8b43a;
  background:#261c05;
  border:1px solid #59410f;
  border-radius:3px;
  padding:2px;
  line-height:1.15;
}

.report-filters{
  display:flex;
  gap:8px;
  margin-bottom:9px;
}
.report-filters label{
  color:#999;
  font-size:8px;
  display:flex;
  align-items:center;
  gap:5px;
}
.report-filters select{
  background:#0b0b0b;
  color:#ddd;
  border:1px solid #4a3915;
  border-radius:4px;
  padding:5px 7px;
  font-size:8px;
}

.report-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin-bottom:10px;
}
.report-kpis div{
  background:linear-gradient(145deg,#18160f,#10100d);
  border:1px solid #4b3b17;
  border-radius:6px;
  padding:9px;
}
.report-kpis span{
  display:block;
  color:#c6c6c6;
  font-size:8px;
}
.report-kpis strong{
  display:block;
  color:#f0b735;
  font-size:18px;
  margin-top:3px;
}
.report-kpis .red strong{color:#ff4f47}

.report-chart-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  height:165px;
}
.report-chart-grid>div{
  min-width:0;
}
.report-chart-grid h4{
  color:#e8b438;
  font-size:10px;
  margin:0 0 4px;
}
.report-chart-grid canvas{
  width:100%!important;
  height:140px!important;
}

@media(max-width:1500px){
  .gold-stat-row{grid-template-columns:repeat(5,1fr)}
  .gold-add-business{display:none}
  .top-grid{grid-template-columns:1fr 1.35fr}
  .business-panel{grid-column:1 / -1}
  .bottom-grid{grid-template-columns:1fr 1fr}
  .report-mini-panel{grid-column:1 / -1}
}
@media(max-width:1050px){
  .gold-stat-row{grid-template-columns:repeat(3,1fr)}
  .top-grid,.middle-grid,.bottom-grid{grid-template-columns:1fr}
  .business-panel,.report-mini-panel{grid-column:auto}
}
@media(max-width:650px){
  .gold-stat-row{grid-template-columns:1fr}
  .report-kpis{grid-template-columns:1fr 1fr}
  .report-chart-grid{grid-template-columns:1fr;height:auto}
  .chart-grid{grid-template-columns:1fr;height:auto}
  .chart-legend-custom{display:grid;grid-template-columns:1fr 1fr}
}

.topbar-left{display:flex;align-items:center;gap:14px}
.menu-gold{color:#e9b335}
.top-user{display:flex;align-items:center;gap:8px}
.top-avatar{
  width:34px;height:34px;border-radius:50%;
  background:linear-gradient(135deg,#d7b151,#776015);
  color:#090909;display:grid;place-items:center;font-weight:800;
  border:1px solid #c99a1d
}
.top-user div:last-child{display:flex;flex-direction:column}
.top-user strong{font-size:11px;color:#fff}
.top-user span{font-size:9px;color:#999}
@media(max-width:700px){.top-user{display:none}}



/* =========================================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ========================================================= */

/* Desktop menu button hidden by default */
.mobile-menu-btn{
  display:none;
}

/* Prevent wide content from breaking the page */
img,canvas,svg{
  max-width:100%;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.data-table,
.gold-table{
  min-width:760px;
}

/* Tablet */
@media(max-width:1100px){
  .sidebar{
    width:220px;
  }

  .main-area{
    margin-left:220px;
    width:calc(100% - 220px);
  }

  .topbar{
    padding:0 16px;
  }

  .content{
    padding:16px;
  }

  .gold-stat-row{
    grid-template-columns:repeat(2,1fr);
  }

  .top-grid,
  .middle-grid,
  .bottom-grid{
    grid-template-columns:1fr;
  }

  .business-panel,
  .report-mini-panel{
    grid-column:auto;
  }

  .report-chart-grid{
    grid-template-columns:1fr 1fr;
  }

  .footer-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* Mobile sidebar */
@media(max-width:820px){
  body{
    overflow-x:hidden;
  }

  .mobile-menu-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border:1px solid #5c4512;
    border-radius:6px;
    background:#171108;
    color:#efb735;
    font-size:22px;
    cursor:pointer;
    flex:0 0 auto;
  }

  .sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:-270px;
    width:260px;
    height:100vh;
    z-index:5000;
    transition:left .28s ease;
    box-shadow:14px 0 35px rgba(0,0,0,.55);
  }

  .sidebar.mobile-open{
    left:0;
  }

  .sidebar-backdrop{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.66);
    z-index:4900;
  }

  .sidebar-backdrop.show{
    display:block;
  }

  .brand-box div:last-child,
  .side-nav span,
  .sidebar-user .user-text,
  .sidebar-user>a{
    display:block;
  }

  .side-nav{
    display:flex;
    flex-direction:column;
    grid-template-columns:none;
  }

  .side-nav a{
    justify-content:flex-start;
    font-size:14px;
  }

  .sidebar-user{
    display:flex;
    justify-content:flex-start;
  }

  .main-area{
    margin-left:0;
    width:100%;
  }

  .topbar{
    min-height:68px;
    height:auto;
    padding:12px 14px;
    gap:12px;
  }

  .topbar-left{
    gap:10px;
  }

  .topbar h1{
    font-size:18px;
  }

  .top-actions{
    gap:8px;
  }

  .date-pill{
    display:none;
  }

  .top-user{
    display:none;
  }

  .content{
    padding:12px;
  }

  .gold-stat-row,
  .stats-grid,
  .stats-grid.four,
  .alerts-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .gold-stat-card,
  .stat-card{
    min-height:88px;
    padding:12px;
  }

  .gold-stat-card strong,
  .stat-card strong{
    font-size:22px;
  }

  .dash-grid,
  .two-col{
    grid-template-columns:1fr;
  }

  .chart-grid{
    grid-template-columns:1fr;
    height:auto;
  }

  .chart-canvas-wrap,
  .chart-canvas-wrap.wide,
  .chart-wrap,
  .chart-wrap.donut{
    height:240px;
  }

  .chart-legend-custom{
    display:grid;
    grid-template-columns:1fr 1fr;
    margin-top:8px;
  }

  .report-kpis{
    grid-template-columns:1fr 1fr;
  }

  .report-chart-grid{
    grid-template-columns:1fr;
    height:auto;
  }

  .report-chart-grid canvas{
    height:220px!important;
  }

  .stage-flow,
  .gold-stage-flow{
    overflow-x:auto;
    justify-content:flex-start;
    padding-bottom:8px;
  }

  .stage-box,
  .gold-stage-box{
    flex:0 0 120px;
  }

  .tabs,
  .gold-tabs{
    overflow-x:auto;
    white-space:nowrap;
    padding-bottom:6px;
  }

  .calendar-grid,
  .mini-calendar{
    min-width:760px;
  }

  .calendar-panel,
  .calendar-mini-panel{
    overflow-x:auto;
  }

  .form-grid.two{
    grid-template-columns:1fr;
  }

  .span2{
    grid-column:auto;
  }

  .modal{
    align-items:flex-start;
    padding:16px 10px;
    overflow-y:auto;
  }

  .modal-card,
  .modal-card.wide{
    width:100%;
    max-width:560px;
    margin:auto;
  }

  .panel-head,
  .dash-panel-head{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .search-row input{
    font-size:16px;
  }

  .inline-label{
    width:100%;
    flex-direction:column;
    align-items:flex-start;
  }

  .inline-label select{
    width:100%;
  }
}

/* Small phones */
@media(max-width:560px){
  .container{
    width:calc(100% - 20px);
  }

  .topbar{
    padding:10px;
  }

  .topbar h1{
    font-size:16px;
  }

  .icon-btn{
    font-size:18px;
  }

  .gold-stat-row,
  .stats-grid,
  .stats-grid.four,
  .alerts-grid{
    grid-template-columns:1fr;
  }

  .gold-stat-card,
  .stat-card{
    min-height:82px;
  }

  .gold-stat-icon,
  .stat-card .stat-icon{
    width:42px;
    height:42px;
    font-size:21px;
  }

  .dash-panel,
  .panel{
    padding:12px;
    border-radius:8px;
  }

  .dash-panel-title,
  .panel-title{
    font-size:14px;
  }

  .chart-canvas-wrap,
  .chart-canvas-wrap.wide,
  .chart-wrap,
  .chart-wrap.donut{
    height:210px;
  }

  .chart-legend-custom{
    grid-template-columns:1fr;
  }

  .report-kpis{
    grid-template-columns:1fr;
  }

  .report-filters{
    flex-direction:column;
  }

  .report-filters label{
    width:100%;
    justify-content:space-between;
  }

  .report-filters select{
    width:65%;
  }

  .btn,
  .btn.primary,
  .mini-gold-btn{
    min-height:40px;
  }

  .form-actions{
    flex-direction:column-reverse;
  }

  .form-actions .btn{
    width:100%;
  }

  .login-card{
    width:calc(100% - 24px);
    padding:24px 18px;
  }

  .login-card h1{
    font-size:24px;
  }

  .login-card input{
    font-size:16px;
  }

  .pager-row{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
}
