body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f8f9fb;
    color: #333;
  }
  
  /* Navbar container */
  .navbar {
    background: #1e293b;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .logo {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .nav-links {
    display: flex;
    gap: 1.2rem;
  }
  
  .nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
  }
  
  .nav-links a:hover {
    background: #334155;
    color: #fff;
  }
  
  .nav-links a.active {
    background: #2563eb;
    color: #fff;
  }
  
  /* Hamburger button */
  .menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
  }
  
  /* Main content */
  .content {
    padding: 2rem;
  }
  
  /* Footer */
  footer {
    text-align: center;
    padding: 1rem;
    background: #1e293b;
    color: #cbd5e1;
    font-size: 0.9rem;
  }
  
  /* Responsive design */
  @media (max-width: 768px) {
    .menu-toggle {
      display: block;
    }
  
    .nav-links {
      position: absolute;
      top: 64px;
      left: 0;
      right: 0;
      background: #1e293b;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      padding: 1rem 0;
      display: none;
    }
  
    .nav-links.active {
      display: flex;
      animation: slideDown 0.3s ease forwards;
    }
  
    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }
  
  /* POS PAGE STYLING */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  .pos-header h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin: 0;
  }
  
  .search-bar {
    display: flex;
    gap: 10px;
  }
  
  .search-bar input {
    width: 250px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
  }
  
  .search-bar input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  }
  
  .btn-clear {
    background: #f43f5e;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
  }
  
  .btn-clear:hover {
    background: #e11d48;
  }
  





/* Make tables responsive on small screens */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 8px;
  padding: 5px;
}

/* Prevent table from breaking layout */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px; /* Forces scroll instead of squeezing */
}

.styled-table th,
.styled-table td {
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap; /* Prevent text from stacking weirdly */
}

/* Header fixes */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.btn-add {
  padding: 8px 14px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.btn-edit {
  padding: 6px 10px;
  background: #ffc107;
  color: #000;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
}

/* Better mobile spacing */
@media (max-width: 600px) {
  .page-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}





  
  /* ==========================================================
   DASHBOARD: Gradient Modern Theme (final + responsive)
   Theme 2: soft gradients
   ========================================================== */

/* GRADIENT PALETTE (Theme 2) */
:root{
  --bg: #f8f9fb;
  --muted: #64748b;
  --card-shadow: rgba(16,24,40,0.08);
  --glass: rgba(255,255,255,0.65);
  --accent: #2563eb;
  --ugx-prefix: "UGX";
}

/* DARK MODE VARS */
body.dark-mode {
  --bg: #0b1220;
  --muted: #9aa6b2;
  --card-shadow: rgba(2,6,23,0.6);
  --glass: rgba(10,14,20,0.55);
  --accent: #60a5fa;
  background-color: var(--bg) !important;
  color: #e6eef8;
}

/* wrapper & header (uses Inter default from main css) */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 20px;
  font-family: 'Inter', sans-serif;
  background: transparent;
}

.dashboard-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  flex-wrap:wrap;
}

.dashboard-header h2 {
  font-size: 1.9rem;
  margin: 0;
  font-weight: 700;
  color: #0f1724;
}

body.dark-mode .dashboard-header h2 { color: #e6eef8; }

.dashboard-header .subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* Dark-mode toggle (small pill) */
.dm-toggle {
  border: 0;
  background: linear-gradient(90deg,#ffffff55,#ffffff22);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight:600;
  display:flex;
  gap:8px;
  align-items:center;
  box-shadow: 0 6px 18px rgba(16,24,40,0.06);
}
body.dark-mode .dm-toggle {
  background: linear-gradient(90deg,#0f172440,#08112255);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  color: #e6eef8;
}

/* TOP CARDS GRID */
.dashboard-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Card base */
.dash-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 12px;
  min-height: 110px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px var(--card-shadow);
  transition: transform .28s cubic-bezier(.2,.9,.3,1), box-shadow .28s;
  will-change: transform;
  background-clip: padding-box;
}

/* soft glass overlay for depth */
.dash-card::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.00));
  mix-blend-mode: overlay;
}

/* hover */
.dash-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(2,6,23,0.12); }

/* card header + number */
.dash-card h4 { margin: 0 0 8px 0; font-size: 0.98rem; font-weight: 650; color: rgba(255,255,255,0.95);}
.dash-card .stat {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* icon */
.card-icon { position:absolute; top:12px; right:12px; font-size:2.2rem; opacity:0.18; transform: rotate(-10deg); }

/* Gradients for Theme 2 */
.g-teal { background: linear-gradient(135deg,#2dd4bf 0%, #0ea5a3 100%); }
.g-purple { background: linear-gradient(135deg,#a78bfa 0%, #7c3aed 100%); }
.g-blue { background: linear-gradient(135deg,#60a5fa 0%, #2563eb 100%); }
.g-sunset { background: linear-gradient(135deg,#ff9a9e 0%, #fecfef 100%); }
.g-rose { background: linear-gradient(135deg,#ff7ab6 0%, #ffb86b 100%); }
.g-neon { background: linear-gradient(135deg,#7efc8d 0%, #3ee7b5 100%); }

/* Recent section title */
.recent-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f1724;
  margin-bottom: 12px;
}
body.dark-mode .recent-title { color: #e6eef8; }

/* Tables layout - two columns preserved */
.tables-row {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* <-- two-column on wide screens */
}

/* Table card */
.table-card {
  background: var(--glass);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 8px 28px var(--card-shadow);
  backdrop-filter: blur(6px);
}

/* table styles */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: #0b1220;
}

body.dark-mode .styled-table { color: #e6eef8; }

.styled-table thead tr {
  background: linear-gradient(90deg,#34495e,#2b4a6b);
  color: #fff;
  text-align: left;
}

body.dark-mode .styled-table thead tr {
  background: linear-gradient(90deg,#12202b,#0b2436);
}

.styled-table th, .styled-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226,232,240,0.6);
}

body.dark-mode .styled-table th, body.dark-mode .styled-table td {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.styled-table tbody tr:nth-of-type(even) { background: rgba(0,0,0,0.02); }
body.dark-mode .styled-table tbody tr:nth-of-type(even) { background: rgba(255,255,255,0.01); }

.styled-table tbody tr:hover { background: rgba(0,0,0,0.04); }
body.dark-mode .styled-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* weekly summary cards grid */
.weekly-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* small responsive tweaks */
@media (max-width: 1024px) {
  .dashboard-header h2 { font-size: 1.6rem; }
  .tables-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .dashboard-cards { grid-template-columns: 1fr; }
  .tables-row { grid-template-columns: 1fr; }
  .dashboard-wrapper { gap: 26px; padding: 16px; }
}

@media (max-width: 480px) {
  .dashboard-header { align-items:flex-start; }
  .dashboard-header h2 { font-size: 1.4rem; }
  .card-icon { display:none; }
}

/* Small utilities */
.kpi {
  display:flex;
  align-items:baseline;
  gap:12px;
}
.kpi .caption { color: var(--muted); font-size:0.88rem; font-weight:600; }

/* animations: count up fade */
.countup {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.countup.visible {
  opacity: 1;
  transform: translateY(0);
}





 
/* ADD ITEM PAGE and TRANSFER*/
.page-header.centered {
    text-align: center;
    margin-bottom: 15px;
  }
  
  .page-header h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 4px;
  }
  
  .page-header .subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
  }
  
  /* Card */
  .form-card.compact {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 20px 25px;
    max-width: 520px;
    margin: 0 auto;
  }
  
  /* Horizontal compact layout */
  .styled-form.horizontal .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }
  
  .styled-form.horizontal label {
    flex: 1;
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
    text-align: right;
  }
  
  .styled-form.horizontal input,
  .styled-form.horizontal select {
    flex: 2;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
  }
  
  .styled-form.horizontal input:focus,
  .styled-form.horizontal select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.2);
  }
  
  /* Button */
  .btn-primary.full {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: block;
    margin: 15px auto 0 auto;
    width: 100%;
  }
  
  .btn-primary.full:hover {
    background: #1e40af;
  }
  
  /* Success alert */
  .alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 10px;
    max-width: 500px;
    margin: 15px auto 0 auto;
    text-align: center;
  }
  
  /* Mobile fix */
  @media (max-width: 600px) {
    .styled-form.horizontal .form-row {
      flex-direction: column;
      align-items: stretch;
    }
  
    .styled-form.horizontal label {
      text-align: left;
    }
  }
  

/* ==========================================
   DASHBOARD: Table Horizontal Scroll Fix
=========================================== */

/* Make table cards scrollable */
.table-card {
    overflow-x: auto;      /* allow horizontal scroll if table is too wide */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Table layout */
.styled-table {
    width: 100%;
    min-width: 0; /* prevents table from exceeding container */
    table-layout: auto;
}

/* Optional: hide horizontal overflow on the wrapper */
.tables-row {
    overflow-x: hidden;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .tables-row {
        grid-template-columns: 1fr;  /* single column layout */
        overflow-x: hidden;           /* prevent page horizontal scroll */
    }

    .table-card {
        overflow-x: auto;             /* scroll inside card */
    }
}
  

  



  