@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');


:root {
  /* Brand (keep consistent with login theme) */
  --brand-50:  #f4f5ff;
  --brand-100: #eceeff;
  --brand-200: #dfe3ff;
  --brand-300: #c6ccff;
  --brand-400: #9aa5ff;
  --brand-500: #6c78ff;
  --brand-600: #1c449c;   /* primary */
  --brand-700: #4a4fd0;
  --brand-800: #3c41a6;
  --brand-900: #2e337e;

  --bg: #f7f8fc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e8ebf3;

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.10);

  --radius: 14px;
  --radius-lg: 18px;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}

a { text-decoration: none; }
.text-muted-2 { color: var(--muted) !important; }

/* Buttons */
.btn-brand {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.btn-brand:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-soft {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-soft:hover { background: var(--brand-50); }

.btn-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  color: var(--text);
}
.btn-icon:hover { background: var(--brand-50); }

/* Layout */
.app-shell { min-height: 100vh; }
.app-body {
  display: flex;
  min-height: calc(100vh - 70px);
}
.app-content {
  flex: 1;
  padding-left: 0;
}

/* Topbar */
.app-topbar {
  height: 70px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: relative;
    z-index: 1000; /* Ensure the header sits above the page content */
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;    margin-right:100px;
}.app-brand img{height:45px;}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-text { line-height: 1.05; }
.brand-text small { display:block; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* Search */
.app-search {
  position: relative;
  width: min(520px, 46vw);
}
.app-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.app-search .form-control {
  padding-left: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  height: 44px;
}
.app-search .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(90,95,231,0.15);
  border-color: rgba(90,95,231,0.45);
}

/* User button */
.btn-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.btn-user:hover { background: var(--brand-50); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  color: var(--brand-700);
}

/* Sidebar container */
.app-sidebar {  padding: 0; }
.app-offcanvas {  background: var(--bg); }

.app-sidebar .panel-card {max-width:240px; min-width:240px;}

/* Sidebar shell */
/* Sidebar shell */
.sidebar-shell {
  /* Use viewport height minus your Topbar (70px) and some margin (32px) = 102px */
  height: calc(100vh - 70px); 
  position: sticky;
  top: 70px; /* Offset it so it starts BELOW the topbar, not at the very top of screen */
  
  /* ✅ ENABLE SCROLLING */
  overflow-y: auto; 
  overflow-x: hidden;
  
  /* Optional: Make scrollbar look nicer */
  scrollbar-width: thin;
  padding-bottom: 20px; /* Space at bottom so last item isn't cut off */
}

/* Single panel sidebar */
/* Single panel sidebar */
.sidebar-panel--single {
  border-radius: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  padding: 14px;
  
  /* ✅ CHANGED from 100vh to 100% so it fits the shell properly */
  min-height: 100%; 
}

/* Brand inside sidebar */
.panel-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--text);
}
.panel-brand .brand-mark{
  width:40px;height:40px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: var(--brand-600);
  color:#fff;
  box-shadow: var(--shadow-sm);
}
.panel-brand .brand-text{ line-height: 1.05; }
.panel-brand .brand-text small{ display:block; color: var(--muted); font-weight: 500; margin-top: 2px; }



/* Panel header */
.panel-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px 6px 14px 6px;
  border-bottom: 1px solid var(--border);
}

/* Menu */
.panel-section{ padding: 14px 6px 0 6px; }
.section-label{
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.menu-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  color: var(--text);
  margin-bottom: 8px;
}
.menu-link i{ color: var(--muted); }
.menu-link:hover{ background: var(--brand-50); }
.menu-link.active{
  background: var(--brand-100);
  color: var(--brand-800);
}
.menu-link.active i{ color: var(--brand-700); }

/* Collapsed sidebar (desktop) */
[data-sidebar].is-collapsed .brand-text,
[data-sidebar].is-collapsed .section-label,
[data-sidebar].is-collapsed .menu-text,
[data-sidebar].is-collapsed .panel-card{
  display:none !important;
}
[data-sidebar].is-collapsed .sidebar-panel--single{
  padding: 12px;
}
[data-sidebar].is-collapsed .menu-link{
  justify-content: center;
}
[data-sidebar].is-collapsed .menu-link i{
  font-size: 1.15rem;
}
[data-sidebar].is-collapsed .panel-head{
  justify-content: center;
}
[data-sidebar].is-collapsed .sidebar-toggle{
  position:absolute;
  right: 10px;
  top: 10px;
}


/* Content cards (use these classes everywhere) */
.card-elevated {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
 
}


.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  background: var(--brand-100);
  color: var(--brand-700);
}

/* Badges */
.badge-soft {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 600;
}

/* Responsive: sidebar becomes offcanvas */
@media (max-width: 991.98px) {
  .app-body { min-height: calc(100vh - 70px); }
  .app-content { padding-left: 0; }
}



/* =========================
   AUTH (PRO UI)
   ========================= */
   
   body,html {  font-family: "Instrument Sans", sans-serif;}
.auth-page {
  background: #f5f7fb;
}

.auth-shell {
  min-height: 100vh;
}

.auth-left {
  background: #ffffff;
}
.btn.btn-outline-secondary {
	border-color: #dee2e6;
}
.auth-left-inner {
  width: 100%;
  max-width: 440px;
  padding: 28px 22px;
}

.auth-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6d5efc 0%, #4c9ffe 100%);
  box-shadow: 0 18px 30px rgba(109, 94, 252, 0.25);
  color: #fff;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: #111827;
  margin-top: 14px;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: #6b7280;
  font-size: .95rem;
  margin-bottom: 18px;
}

.auth-card-clean {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}

.auth-card-clean .card-body {
  padding: 18px;
}

.auth-form .form-control {
  border-radius: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.auth-form .form-floating > label {
  color: #6b7280;
}

.auth-link {
  color: #1c449c;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-size: .9rem;
  margin: 16px 0 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(16,24,40,.10);
  flex: 1;
}

.btn-auth-primary {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  background: #1c449c;
  border-color: #1c449c;
  box-shadow: 0 18px 32px rgba(91, 94, 252, 0.22);
  color: #fff;
}.text-primary {	--bs-text-opacity: 1;	color: rgb(28, 68, 156) !important;}.btn-primary {	--bs-btn-color: #fff;	--bs-btn-bg: #1c449c;	--bs-btn-border-color: #1c449c;	--bs-btn-hover-color: #fff;	--bs-btn-hover-bg: #0b5ed7;	--bs-btn-hover-border-color: #0a58ca;	--bs-btn-focus-shadow-rgb: 49,132,253;	--bs-btn-active-color: #fff;	--bs-btn-active-bg: #0a58ca;	--bs-btn-active-border-color: #0a53be;	--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);	--bs-btn-disabled-color: #fff;	--bs-btn-disabled-bg: #0d6efd;	--bs-btn-disabled-border-color: #0d6efd;}

.btn-auth-primary:hover {
  background: #5A8AC5;
  border-color: #5A8AC5;
  color:#fff;
}

.btn-auth-outline {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  border: 1px solid rgba(16,24,40,.12);
}

.auth-right {
  background: radial-gradient(1200px 500px at 50% 20%, rgba(109, 94, 252, 0.16), rgba(245, 247, 251, 0)) ,
              radial-gradient(900px 400px at 60% 70%, rgba(76, 159, 254, 0.14), rgba(245, 247, 251, 0));
}

.auth-right-inner {
  width: 100%;
  max-width: 680px;
  padding: 48px 40px;
  text-align: center;
}

.auth-hero-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto 18px;
}

.auth-hero-title {
  font-size: 2.35rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 6px;
}

.auth-hero-text {
  color: #6b7280;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.auth-footer-note {
  color: #6b7280;
  font-size: .9rem;
}



/* =========================
   Dashboard polish
   ========================= */

.page-icon{
  width: 42px; height: 42px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--brand-100, #fff);
}

.btn-soft{
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}

.card-kpi .kpi-top{
  display:flex; align-items:center; gap:12px;
}
.card-kpi .kpi-icon{
  width: 44px; height: 44px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.card-kpi .kpi-label{
  font-size: .85rem;
  color: var(--muted-2, rgba(255,255,255,.65));
}
.card-kpi .kpi-value{
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.card-kpi .kpi-foot{
  margin-top: 14px;
  display:flex; align-items:center; justify-content:space-between;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px;
}

.action-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.action-tile{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: inherit;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.action-tile:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.14);
}
.action-ic{
  width: 42px; height: 42px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.action-title{ font-weight: 700; }
.action-sub{ font-size:.85rem; color: var(--muted-2, rgba(255,255,255,.65)); }

.table-modern thead th{
  font-size:.8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2, rgba(255,255,255,.65));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.table-modern td{
  vertical-align: middle;
  border-top: 1px solid rgba(255,255,255,.06);
}
.badge-status{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);
  font-weight: 600;
}

.form-hint{
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted-2, rgba(255,255,255,.65));
}
.auth-logo img {max-width:175px;}



/* Align DataTables Search to the right and style it */
.dataTables_filter {
    text-align: right;
    padding: 15px 15px 0;
}
.dataTables_length {
	padding: 15px 15px 0;
}
.dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px 10px;
}
.dataTables_info {
    padding: 15px;
    font-size: 0.875rem;
    color: #6c757d;
}
.dataTables_paginate {
    padding: 10px 15px 15px;
}
/* Fix table header alignment */
table.dataTable thead th {
    border-bottom: 1px solid #dee2e6 !important;
}

.active > .page-link, .page-link.active {
	z-index: 3;
	color: var(--bs-pagination-active-color);
	background-color: #1c449c;
	border-color: #1c449c;
}


.badge.bg-info.bg-opacity-10.text-info.cpa {
	text-transform: uppercase;
}