/* TIGERMCDO dashboard.css - MAJOR REPAIR - CLEAN & STABLE (March 2026) */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* Topbar - fixed */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #2c2453;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 1100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.topbar-left {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.welcome-text {
  font-size: 14px;
  opacity: 0.9;
}

.logout-btn {
  background: #8a4dff;
  padding: 6px 14px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  transition: 0.3s;
}

.logout-btn:hover {
  background: #a066ff;
}

/* Layout wrapper */
.container {
  display: flex;
  min-height: 100vh;
  padding-top: 60px; /* exactly topbar height */
}

/* Sidebar - fixed below topbar */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #2c2453, #3b2f6b);
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  color: white;
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.4s ease;
  padding: 20px 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 4px 0;
}

.sidebar-menu li a {
  display: block;
  padding: 12px 22px;
  color: #ddd;
  text-decoration: none;
  font-size: 14px;
  border-left: 4px solid transparent;
  transition: 0.3s;
  position: relative;
  z-index: 5;
}
.sidebar-menu a{
  position: relative;
  z-index: 5;
}
.sidebar-menu li a:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  border-left: 4px solid #8a4dff;
}

.sidebar-menu li.logout a {
  color: #ff6666;
}

/* Content area - base */
.content {
  margin-left: 240px;
  flex: 1;
  padding: 20px 30px 60px;
  background: #f4f6f8;
}

/* Default minimal top spacing for all pages */
.content h1,
.content h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.form-card {
  background: #f2f3f5;
  padding: 30px 40px;
  border-radius: 20px;
  max-width: 1100px;
  margin: 0 auto 40px;
}

table {
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.form-actions {
  margin-top: 20px;
}

.primary-btn {
  background: #6d28d9;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}

.primary-btn:hover {
  background: #5b21b6;
}

/* ====================== DASHBOARD-SPECIFIC ====================== */
/* KPI Tiles - FIXED & UPGRADED (March 2026) */

body.dashboard .content {
  padding-top: 30px;
}

body.dashboard h1 {
  margin-bottom: 35px;
  color: #2c2453;
  font-weight: 700;
}

body.dashboard .kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 20px;
  margin-bottom: 40px;
}

body.dashboard .kpi-card {
  min-height: 160px;
  padding: 30px 25px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.dashboard .kpi-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Big numbers + labels */
body.dashboard .kpi-card h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #2c2453;
}

body.dashboard .kpi-card p {
  font-size: 1.05rem;
  color: #555;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ====================== TILE ACCENT COLORS ====================== */
.kpi-card.kpi-blue   { border-left: 8px solid #3498db; }
.kpi-card.kpi-green  { border-left: 8px solid #2ecc71; }
.kpi-card.kpi-orange { border-left: 8px solid #e67e22; }
.kpi-card.kpi-purple { border-left: 8px solid #9b59b6; }
.kpi-card.kpi-indigo { border-left: 8px solid #34495e; }
.kpi-card.kpi-teal   { border-left: 8px solid #1abc9c; }
.kpi-card.kpi-pink   { border-left: 8px solid #e84393; }

/* Negative profit = red */
.text-danger {
  color: #e74c3c !important;
}

/* Mobile */
.sidebar-toggle { display: none; }

.hamburger {
  display: none;
  position: fixed;
  top: 70px;
  left: 15px;
  z-index: 1200;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 4px;
  background: white;
  margin: 6px auto;
  transition: 0.3s;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  #sidebar-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }
  .content {
    margin-left: 0 !important;
    padding: 20px 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .form-card {
    padding: 25px 20px;
  }
  .primary-btn {
    width: 100%;
    padding: 14px;
  }
  #sidebar-toggle:checked ~ .content::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 900;
  }
  #sidebar-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #sidebar-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }
  #sidebar-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none !important;
  }
}
/* ============================
   KPI DASHBOARD TILES
============================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.kpi-link {
  text-decoration: none;
}

.kpi-card {
  background: white;
  padding: 30px 25px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.kpi-card h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.kpi-card p {
  font-size: 14px;
  color: #555;
}

/* Tile Colors */

.kpi-blue {
  border-left: 6px solid #3b82f6;
}

.kpi-green {
  border-left: 6px solid #22c55e;
}

.kpi-orange {
  border-left: 6px solid #f97316;
}

.kpi-purple {
  border-left: 6px solid #8b5cf6;
}

.kpi-indigo {
  border-left: 6px solid #6366f1;
}

.kpi-teal {
  border-left: 6px solid #14b8a6;
}

.kpi-pink {
  border-left: 6px solid #ec4899;
}

/* Negative profit */

.text-danger {
  color: #e11d48;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

th {
  background: #f4f6f8;
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

td {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}

tr:hover {
  background: #f9fafb;
}
@media (max-width: 768px) {

  .form-grid {
    grid-template-columns: 1fr;
  }

}
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
@media (max-width: 768px) {

  .sidebar {
    width: 260px;
  }

  .content {
    margin-left: 0;
  }

}
.primary-btn {
  min-height: 44px;
}

@media (max-width: 768px) {

  .primary-btn {
    width: 100%;
  }

}
/* ===============================
   MOBILE REPAIR PATCH
   TIGERMCDO - March 2026
================================*/

@media (max-width: 768px) {

  /* Fix topbar spacing */
  .topbar{
    padding: 0 15px;
  }

  .topbar-left{
    font-size: 13px;
  }

  .welcome-text{
    display:none; /* prevents crowding */
  }

  .logout-btn{
    padding:6px 10px;
    font-size:12px;
  }

  /* Sidebar fix */
  .sidebar{
    width:260px;
  }

  /* Content spacing */
  .content{
    padding:20px 15px;
    margin-left:0;
  }

  /* KPI cards resize */
  .kpi-card{
    padding:20px;
  }

  .kpi-card h2{
    font-size:1.9rem;
  }

  .kpi-card p{
    font-size:0.9rem;
  }

  /* Tables scroll horizontally */
  table{
    font-size:13px;
  }

  .table-responsive{
    overflow-x:auto;
    width:100%;
  }

  /* Prevent long text breaking layout */
  td, th{
    white-space:nowrap;
  }

  /* Form card spacing */
  .form-card{
    padding:20px;
  }

  /* Inputs better touch size */
  input, textarea, select{
    font-size:16px;
  }

}