:root {
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --primary-color: #0B2D4F;
  --secondary-color: #F57C00;
  --dark-navy: #1F2A44;
  --light-bg: #F2F4F8;
  --light: #F8FAFC;
  --text: #1e293b;
}

body {
  background: #faf9f7;
  font-family: var(--font-heading);
}

/* SIDEBAR */
.sidebar {
  background: var(--dark-navy);
  min-height: 100vh;
  padding: 25px;
}

.sidebar-inner {
  width: 100%;
}

.sidebar-logo {
  margin-left: 10px;
  width: 160px;
}

.offcanvas-logo {
  margin-top: 60px;
  margin-left: -5px;
  width: 200px;
}

.logo h3 {
  color: var(--secondary-color);
  margin: 0;
}

.logo span {
  font-size: 12px;
  color: #aaa;
  letter-spacing: 1px;
}

.menu {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.menu li {
  padding: 12px 15px;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  color: #fff;
  transition: 0.3s;
}

.menu li i {
  margin-right: 10px;
}

.menu li.active,
.menu li:hover {
  background: var(--light-bg);
  color: var(--secondary-color);
}

.menu .logout {
  margin-top: 30px;
}

/* CONTENT */
.content {
  padding: 30px 10px 30px 10px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.menu a {
  text-decoration: none;
  color: inherit;
}

/* BUTTONS */
.btn-outline {
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background: var(--secondary-color);
  color: var(--primary-color);

}

/* MOBILE TOPBAR */
.mobile-topbar {
  position: fixed !important;
  top: 0;
  z-index: 2000;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--dark-navy);
  padding: 10px 15px;
  color: #fff;
  display: flex;
}

/* give space below fixed topbar */
@media (max-width:991.98px) {
  .content {
    margin-top: 50px;
  }
}



.menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
}

/* OFFCANVAS */
.mobile-sidebar {
  width: 270px;
}

/* Make offcanvas full height */
.offcanvas.mobile-sidebar {
  height: 100vh;
}

/* Sidebar flex layout */
.sidebar-inner {
  height: 100%;
}

/* Menu scroll if needed */
.menu {
  overflow-y: auto;
  padding-right: 5px;
}

/* Logout fixed bottom */
.logout-box {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Optional: nicer scroll */
.menu::-webkit-scrollbar {
  width: 4px;
}

.menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* Logout container */
.logout-box {
  background: var(--dark-navy);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* Logout button */
.logout-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 16px;
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  color: var(--secondary-color);
}

.logout-btn i {
  margin-right: 10px;
  color: var(--secondary-color);
}

.logout-btn:hover {
  border-radius: 10px;
  background: var(--light-bg);
}

.offcanvas {
  z-index: 1050;
}

.offcanvas-backdrop {
  z-index: 1040;
}


/* FORCE offcanvas width on mobile & tablet */
@media (max-width: 991.98px) {
  .offcanvas.mobile-sidebar {
    --bs-offcanvas-width: 240px;
    /* 👈 THIS IS THE KEY */
    width: 240px;
  }
}

/* DESKTOP PERFECT WIDTH FIX */
@media (min-width: 992px) {

  .sidebar{
    position:fixed;
    left:0;
    top:0;
    width:240px;
    height:100vh;
  }

  .content{
    margin-left:240px;
    width:calc(100% - 240px); /* 🔥 KEY FIX */
    max-width:calc(100% - 240px);
    overflow-x:hidden;
    height:100vh;
    overflow-y:auto;
  }

}


html,
body {
  overflow-x: hidden !important;
  width: 100%;
}

/* Bootstrap row fix */
.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Container fix */
.container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow-x: hidden;
}


/* Prevent cards/table causing scroll */
.dash-box,
.dash-card {
  max-width: 100%;
  overflow-x: hidden;
}

/*=======================================================
                  Dashboard Style END
==========================================================*/

/*-------------------OverView ---------------*/

/* DASHBOARD CARDS */
.dash-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.dash-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.dash-card h4 {
  margin: 0;
  font-weight: 700;
}

.dash-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.icon {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.icon.blue {
  background: #0B2D4F;
}

.icon.green {
  background: #10b981;
}

.icon.orange {
  background: #f59e0b;
}

.icon.red {
  background: #ef4444;
}

/* BOX */
.dash-box {
  background: #fff;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.box-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

/* ACTIVITY */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-list li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.activity-list li i {
  margin-right: 10px;
}

/*-------------------- manageunits ----------------*/

/* ADD BUTTON */
.add-btn {
  background: var(--secondary-color);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
}

@media(max-width:768px) {
  .add-btn {
    font-size: 12px;
  }
}

.add-btn:hover {
  background: #e66f00;
}

/* UNIT STATS */
.unit-stat {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.unit-stat h3 {
  margin: 0;
  font-weight: 700;
}

.unit-stat p {
  margin: 0;
  color: #64748b;
}

.unit-stat.green {
  border-left: 5px solid #10b981;
}

.unit-stat.orange {
  border-left: 5px solid #f59e0b;
}

/* ACTION BUTTONS */
.action-btn {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin-right: 6px;
  transition: .3s;
}

.action-btn.edit:hover {
  background: #0B2D4F;
  color: #fff;
}

.action-btn.delete:hover {
  background: #ef4444;
  color: #fff;
}

/*---------------------------- Payment ------------*/

/* PAYMENT CARDS */
.pay-card{
  background:#fff;
  padding:25px;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.pay-card h3{
  margin:0;
  font-weight:700;
}

.pay-card p{
  margin:0;
  color:#64748b;
}

.pay-card.green{border-left:5px solid #10b981;}
.pay-card.orange{border-left:5px solid #f59e0b;}

/* HEADER LAYOUT */
.payments-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:25px;
  gap:20px;
  flex-wrap:nowrap;
  width:100%;
}
/* LEFT SIDE */
.payments-header > div:first-child{
  min-width:250px;
}

.page-title{
  font-weight:600;
}

/* RIGHT SIDE */
.header-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  align-items:center;
  width:100%;
  max-width:420px;
}

/* SEARCH */
.search-input{
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px 14px;
  width:230px;
  min-width:180px;
  max-width:260px;
}

/* EXPORT BUTTON */
.export-btn{
  background:var(--secondary-color);
  border:none;
  color:#fff;
  padding:10px 18px;
  border-radius:10px;
  font-weight:600;
  white-space:nowrap;
}

.export-btn:hover{
  background:#e66f00;
}

/* MOBILE FIX */
@media(max-width:768px){
  .header-actions{
    width:100%;
  }

  .search-input{
    width:100%;
  }

  .export-btn{
    width:100%;
  }
}
/* ===============================
   320px PERFECT MOBILE FIX
================================ */

/* mobile content spacing */
@media (max-width:480px){

  .content{
    padding:20px 14px !important;
  }

  /* page title */
  .page-title{
    font-size:20px;
  }

  /* subtitle */
  .payments-header p{
    font-size:13px;
  }

  /* payment cards spacing */
  .pay-card{
    padding:18px;
    border-radius:14px;
  }

  /* stack header properly */
  .payments-header{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  /* search + export full width */
  .header-actions{
    width:100%;
    flex-direction:column;
  }

  .search-input{
    width:100%;
    max-width:100%;
  }

  .export-btn{
    width:100%;
    text-align:center;
  }

}

/* REPORT HEADER */
.reports-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:25px;
  flex-wrap:wrap;
  gap:15px;
}

/* REPORT CARDS */
.report-card{
  background:#fff;
  padding:25px;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.report-card h3{
  margin:0;
  font-weight:700;
}

.report-card p{
  margin:0;
  color:#64748b;
}

.report-card.green{border-left:5px solid #10b981;}
.report-card.orange{border-left:5px solid #f59e0b;}

/* CHART PLACEHOLDER */
.chart-placeholder{
  height:260px;
  border-radius:12px;
  background:linear-gradient(135deg,#eef2f7,#f8fafc);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#94a3b8;
  font-weight:600;
}

/* HEADER */
.messages-header{
  margin-bottom:20px;
}

/* USER LIST */
.chat-users{
  background:#fff;
  border-radius:16px;
  padding:15px;
  height:520px;
  overflow-y:auto;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.chat-user{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:12px;
  cursor:pointer;
  transition:.3s;
}

.chat-user:hover,
.chat-user.active{
  background:var(--light-bg);
}

.chat-user img{
  width:40px;
  height:40px;
  border-radius:50%;
}

.chat-user h6{
  margin:0;
  font-size:14px;
}

.chat-user span{
  font-size:12px;
  color:#64748b;
}

/* CHAT BOX */
.chat-box{
  background:#fff;
  border-radius:16px;
  height:520px;
  display:flex;
  flex-direction:column;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

/* HEADER */
.chat-header{
  padding:15px 20px;
  border-bottom:1px solid #eee;
  display:flex;
  justify-content:space-between;
}

.online{
  color:#10b981;
  font-size:12px;
}

/* BODY */
.chat-body{
  flex:1;
  padding:20px;
  overflow-y:auto;
}

.msg{
  padding:10px 14px;
  border-radius:12px;
  margin-bottom:12px;
  max-width:70%;
  font-size:14px;
}

.msg.user{
  background:#f1f5f9;
}

.msg.admin{
  background:var(--secondary-color);
  color:#fff;
  margin-left:auto;
}

/* INPUT */
.chat-input{
  display:flex;
  border-top:1px solid #eee;
}

.chat-input input{
  flex:1;
  border:none;
  padding:14px;
  outline:none;
}

.chat-input button{
  background:var(--secondary-color);
  border:none;
  color:#fff;
  width:60px;
}

/*==========================================
                   User Dashboard
==============================================*/

/* PAY NOW BUTTON */
.pay-now-btn{
  background:var(--secondary-color);
  border:none;
  color:#fff;
  padding:10px 18px;
  border-radius:10px;
  font-weight:600;
}

.pay-now-btn:hover{
  background:#e66f00;
}

/* UNIT INFO */
.unit-info{
  list-style:none;
  padding:0;
}

.unit-info li{
  padding:6px 0;
  font-size:14px;
}

/* QUICK ACTIONS */
.quick-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.quick-btn{
  border:none;
  background:#f1f5f9;
  padding:10px;
  border-radius:10px;
  transition:.3s;
}

.quick-btn:hover{
  background:var(--secondary-color);
  color:#fff;
}

/*------------ User Manageunit ----------*/

/* UNIT DETAIL */
.unit-detail{
  background:#f8fafc;
  padding:16px;
  border-radius:12px;
}

.unit-detail p{
  margin:0;
  font-size:13px;
  color:#64748b;
}

.unit-detail h6{
  margin:0;
  font-weight:600;
}

/* ACTION BUTTONS */
.unit-action-btn{
  width:100%;
  border:none;
  padding:16px;
  border-radius:14px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#f1f5f9;
  transition:.3s;
}

.unit-action-btn:hover{
  transform:translateY(-3px);
}

/* COLORS */
.unit-action-btn.upgrade:hover{
  background:#0B2D4F;
  color:#fff;
}

.unit-action-btn.shift:hover{
  background:#10b981;
  color:#fff;
}

.unit-action-btn.cancel:hover{
  background:#ef4444;
  color:#fff;
}

/* SELECT BTN */
.select-btn{
  background:var(--secondary-color);
  border:none;
  color:#fff;
  padding:6px 14px;
  border-radius:8px;
}

.select-btn:hover{
  background:#e66f00;
}

/*-------------- User Payment --------*/

/* INVOICE BUTTON */
.invoice-btn{
  border:none;
  background:#f1f5f9;
  padding:6px 14px;
  border-radius:8px;
  font-size:13px;
  transition:.3s;
}

.invoice-btn:hover{
  background:var(--secondary-color);
  color:#fff;
}

/*--------------- user Reports ----------*/

.report-card{
  background:#fff;
  padding:25px;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.report-card h3{
  margin:0;
  font-weight:700;
}

.report-card p{
  margin:0;
  color:#64748b;
}

.report-card.green{border-left:5px solid #10b981;}
.report-card.orange{border-left:5px solid #f59e0b;}

/*------------ User Message ----------*/

/* SUPPORT INFO */
.support-card{
  display:flex;
  align-items:center;
  gap:12px;
  background:#f8fafc;
  padding:14px;
  border-radius:12px;
  margin-top:12px;
}

.support-card i{
  font-size:20px;
  color:var(--secondary-color);
}

.support-card h6{
  margin:0;
  font-size:14px;
}

.support-card span{
  font-size:12px;
  color:#64748b;
}
