/* ========================================================
   ATULYA SOLAR – PREMIUM ADMIN DASHBOARD THEME
   FULL UPDATED VERSION (Compact + Colored)
======================================================== */

/* ---------- Color Palette ---------- */
:root {
  --bg:#f4f7fb;
  --card:#ffffff;
  --muted:#6b7280;

  --gold:#ffb700;
  --navy:#1b3b73;
  --blue:#4b8bff;
  --green:#16c47f;
  --amber:#f7a325;
  --red:#ff7c7c;

  --radius:16px;
  --shadow:0 6px 18px rgba(0,0,0,0.06);
  --shadow-strong:0 14px 28px rgba(0,0,0,0.12);
}

/* ---------- Global ---------- */
* { box-sizing:border-box; }

body {
  margin:0;
  padding:0;
  background:var(--bg);
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:#0b1220;
}

.container {
  max-width:1280px;
  margin:28px auto;
  padding:0 18px;
}

/* ---------- Header ---------- */
.header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:24px;
}

.header a {
  color:var(--navy);
  font-weight:600;
  text-decoration:none;
}
.header a:hover { color:var(--gold); }

/* ---------- Sidebar Navigation ---------- */
.card-nav {
  background:#fff;
  padding:22px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  margin-right:16px;
}

.card-nav a {
  display:block;
  font-size:16px;
  color:var(--navy);
  font-weight:600;
  margin-bottom:8px;
  text-decoration:none;
}
.card-nav a:hover { color:var(--gold); }

/* ---------- KPI Grid ---------- */
.app-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
  gap:14px;
  margin-bottom:20px;
}

/* ---------- ULTRA COMPACT KPI CARDS ---------- */
./* ---------- KPI CARD ---------- */
.kpi {
  padding:16px 18px;      /* Increased for balance */
  border-radius:14px;
  min-height:82px;        /* More room for larger fonts */
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
  transition:0.25s ease;
}

/* KPI Colors */
.kpi:nth-child(1){ background:var(--gold); }
.kpi:nth-child(2){ background:var(--navy); }
.kpi:nth-child(3){ background:var(--blue); }
.kpi:nth-child(4){ background:var(--green); }

.kpi:hover {
  transform:translateY(-2px);
  box-shadow:var(--shadow-strong);
}

/* -------- Text inside KPI -------- */
.kpi .label {
  font-size:18px;        /* Bigger, more readable */
  font-weight:800;
  opacity:0.95;
  color:#fff;
}

.kpi .value {
  font-size:28px;        /* Strong, visible number */
  font-weight:800;
  margin-top:4px;
  color:#fff;
  line-height:1.15;
}
/* ---------- KPI CARD ---------- */
.kpi {
  padding:16px 18px;      /* Increased for balance */
  border-radius:14px;
  min-height:82px;        /* More room for larger fonts */
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
  transition:0.25s ease;
}

/* KPI Colors */
.kpi:nth-child(1){ background:var(--gold); }
.kpi:nth-child(2){ background:var(--navy); }
.kpi:nth-child(3){ background:var(--blue); }
.kpi:nth-child(4){ background:var(--green); }

.kpi:hover {
  transform:translateY(-2px);
  box-shadow:var(--shadow-strong);
}

/* -------- Text inside KPI -------- */
.kpi .label {
  font-size:18px;        /* Bigger, more readable */
  font-weight:800;
  opacity:0.95;
  color:#fff;
}

.kpi .value {
  font-size:28px;        /* Strong, visible number */
  font-weight:800;
  margin-top:4px;
  color:#fff;
  line-height:1.15;
}

/* ---------- Section Title ---------- */
.section-title {
  font-size:20px;
  font-weight:700;
  color:var(--navy);
  margin-bottom:12px;
}

/* ---------- ULTRA COMPACT PIPELINE BOXES ---------- */
.pipeline-box {
  display:inline-block;
  width:130px;
  padding:10px 12px;
  border-radius:12px;
  color:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
  transition:0.25s ease;
  margin:6px;
  text-align:center;
}

/* Colors by index */
.pipeline-box:nth-child(1){ background:var(--gold); }
.pipeline-box:nth-child(2){ background:var(--blue); }
.pipeline-box:nth-child(3){ background:var(--green); }
.pipeline-box:nth-child(4){ background:var(--amber); }
.pipeline-box:nth-child(5){ background:var(--navy); }
.pipeline-box:nth-child(6){ background:var(--red); }

.pipeline-box:hover {
  transform:scale(1.04);
  box-shadow:0 8px 16px rgba(0,0,0,0.12);
}

.pipeline-box .count {
  font-size:18px;
  font-weight:800;
  margin-top:2px;
  color:#fff;
}



/* ---------- Tables ---------- */
.table {
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}

.table thead th {
  background:var(--navy);
  color:#fff;
  padding:14px;
  font-size:14px;
  font-weight:600;
}

.table tbody tr:hover {
  background:#eef3ff;
}

.table td {
  padding:14px 12px;
  border-bottom:1px solid #eef2f7;
  font-size:14px;
}


/* Full-width container for desktop */
.table-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Full table stretch */
.table-wrapper table {
    width: 100% !important;
    border-collapse: collapse;
}

/* Optional: force cells to behave consistently */
.table-wrapper th,
.table-wrapper td {
    white-space: nowrap;
    padding: 10px 12px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    display: block;
}

.table-scroll table {
    min-width: 700px; /* ensures horizontal scroll appears */
}


/* ---------- Card Sections ---------- */
.card-section {
  background:#fff;
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
  border-left:6px solid var(--gold);
}

.card-section .title {
  font-size:18px;
  font-weight:700;
  color:var(--navy);
}

/* ---------- Layout Flex ---------- */
.flex-row {
  display:flex;
  gap:20px;
}

.flex-2 { flex:2; }
.flex-1 { flex:1; }

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .flex-row { flex-direction:column; }
  .flex-1, .flex-2 { flex:auto; }
}


/* ------------------------------------------
   BUTTON SYSTEM — Corporate (A2 Style)
-------------------------------------------*/

.btn {
    display: inline-block;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: 0.15s ease-in-out;
    user-select: none;
    line-height: 1.3;
}

/* Primary Action */
.btn-primary {
    background: #1b3b73;   /* corporate navy */
    color: #fff;
    border-color: #1b3b73;
}
.btn-primary:hover {
    background: #0e2654;
    border-color: #0e2654;
}

/* Outline Button */
.btn-outline {
    background: #fff;
    color: #1b3b73;
    border-color: #1b3b73;
}
.btn-outline:hover {
    background: #1b3b73;
    color: #fff;
}

/* Info Button (optional for neutral highlights) */
.btn-info {
    background: #eef3fb;
    color: #1b3b73;
    border-color: #ccd7ee;
}
.btn-info:hover {
    background: #dbe6fa;
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination {
    display: block !important;
    margin-top: 15px !important;
}
.pagination .btn {
    margin: 2px;
}


/* ---------------------------------------------
   FIX: SHOW PAGINATION IN DASHBOARD TABLES
----------------------------------------------*/
.pagination {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-top: 18px !important;
    gap: 6px;
}

.pagination .btn,
.pagination a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 5px;
    text-decoration: none;
    border: 1px solid #1b3b73;
    color: #1b3b73;
    background: #fff;
}

/* Active page button */
.pagination .btn-primary,
.pagination a.btn-primary {
    background: #1b3b73 !important;
    color: #fff !important;
}

/* Outline page button */
.pagination .btn-outline,
.pagination a.btn-outline {
    background: #fff !important;
    color: #1b3b73 !important;
}

/* Hover */
.pagination .btn:hover,
.pagination a:hover {
    background: #1b3b73;
    color: #fff;
}


<style>
.table-responsive-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-wrap table {
    min-width: 700px; /* ensures scroll instead of shrink */
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 10px 0;
    color: #003366;
}

.bg-danger { background:#d9534f !important; color:#fff !important; }
.bg-warning { background:#ffcc00 !important; color:#000 !important; }
.bg-primary { background:#004aad !important; color:#fff !important; }

.pipeline-box {
    padding:6px 10px;
    border-radius:8px;
    font-size:14px;
    display:inline-block;
}
</style>
