/* =========================================================
   NPS Console Theme — kybll
   Loaded after style.css; overrides visuals only.
   ========================================================= */

:root {
  --brand-1: #4f46e5;
  --brand-2: #0ea5e9;
  --brand-3: #06b6d4;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e6ebf3;
  --side-1: #0b1220;
  --side-2: #16233a;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px -18px rgba(15, 23, 42, .45);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-1); }
a:hover, a:focus { color: #4338ca; text-decoration: none; }

.gray-bg { background: var(--bg); }

/* ---------------- Sidebar ---------------- */
.navbar-static-side {
  background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 55%, var(--side-1) 100%);
  box-shadow: 2px 0 28px rgba(8, 15, 30, .18);
}

.navbar-static-side .nav { padding: 10px 0 24px; }

.nav-header {
  background: transparent !important;
  padding: 18px 18px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .9);
}

.brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.2;
}

.brand-sub {
  color: #7d8ba5;
  font-size: 11px;
  margin-top: 2px;
}

.profile-element {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.profile-element > span > i {
  color: #9fb0c9;
  font-size: 20px !important;
  vertical-align: middle;
}

.profile-element .block { color: #e8eef8; font-size: 13px; }
.profile-element .text-muted { color: #7d8ba5 !important; font-size: 11px; }

.nav.metismenu > li > a {
  position: relative;
  color: #9aa9c0;
  font-weight: 600;
  font-size: 13px;
  padding: 11px 14px;
  margin: 3px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav.metismenu > li > a > i {
  width: 18px;
  text-align: center;
  opacity: .9;
}

.nav.metismenu > li > a:hover,
.nav.metismenu > li > a:focus {
  background: rgba(255, 255, 255, .06) !important;
  color: #eaf0fa;
}

.nav.metismenu > li.active > a,
.nav.metismenu > li.active > a:hover,
.nav.metismenu > li.active > a:focus {
  background: linear-gradient(100deg, rgba(79, 70, 229, .95), rgba(14, 165, 233, .82)) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px -12px rgba(56, 130, 246, .95);
}

.nav.metismenu > li.active > a::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: .85;
}

.nav.metismenu > li { position: relative; }

#side-menu.nav > li.active,
#side-menu.nav > li {
  border-left: none !important;
  background: transparent !important;
}

.sidebar-collapse { max-height: 100vh; overflow-y: auto; overflow-x: hidden; }
.sidebar-collapse::-webkit-scrollbar { width: 6px; }
.sidebar-collapse::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border: none; }

body.mini-navbar .nav-header { padding: 12px 0 !important; }
body.mini-navbar .brand { justify-content: center; }
body.mini-navbar .brand-text,
body.mini-navbar .profile-element { display: none; }
body.mini-navbar .nav.metismenu > li > a { justify-content: center; margin: 4px 10px; padding: 11px 0; }
body.mini-navbar .nav.metismenu > li > a > i { width: auto; }
body.mini-navbar .nav.metismenu > li.active > a::after { display: none; }

.logo-element {
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------------- Top bar ---------------- */
.navbar-fixed-top {
  background: rgba(255, 255, 255, .86) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.navbar-top-links { display: flex; align-items: center; }

.navbar-top-links > li { display: inline-flex; align-items: center; }

.navbar-top-links > li > a,
.navbar-top-links > li > span {
  color: var(--muted);
  font-size: 13px;
}

.navbar-top-links > li > a:hover { color: var(--brand-1); background: transparent !important; }

.navbar-top-links > li > a > i { margin-right: 6px; }

.welcome-message { color: var(--muted); font-size: 13px; }
.welcome-message a { font-weight: 700; color: var(--ink-2); }

.minimalize-styl-2 {
  margin: 12px 8px 12px 18px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f1f5fb !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-2) !important;
  box-shadow: none !important;
}

.minimalize-styl-2:hover { background: #e8eefb !important; color: var(--brand-1) !important; }

.topbar-title {
  display: inline-block;
  vertical-align: middle;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .2px;
}

#languagemenu {
  background: #f1f5fb !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-2) !important;
  border-radius: 10px;
  box-shadow: none !important;
  font-size: 12px;
  padding: 7px 10px;
}

#languagemenu:hover { background: #e8eefb !important; }

.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .35);
  padding: 6px;
  margin-top: 8px;
}

.dropdown-menu > li > a {
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.dropdown-menu > li > a:hover { background: #f1f5fb; color: var(--brand-1); }

/* ---------------- Content shell ---------------- */
#page-wrapper { background: var(--bg); }

.wrapper-content {
  padding: 22px 24px 40px;
  max-width: 1680px;
  margin: 0 auto;
}

.wrapper-content .row { margin-left: -10px; margin-right: -10px; }
.wrapper-content .row > [class*="col-"] { padding-left: 10px; padding-right: 10px; }

/* ---------------- Cards ---------------- */
.ibox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow .22s ease, transform .22s ease;
}

.ibox:hover { box-shadow: var(--shadow-md); }

.ibox-title {
  background: var(--card);
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  min-height: 0;
  border-radius: 0;
}

.ibox-title h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .2px;
  margin: 0;
}

.ibox-content {
  background: var(--card);
  border: none;
  padding: 16px 18px 18px;
  color: var(--ink-2);
}

.ibox-content.no-padding { padding: 0; }

.ibox-tools > a {
  color: var(--muted-2);
  padding: 3px 5px;
  border-radius: 6px;
}

.ibox-tools > a:hover { color: var(--brand-1); background: #f1f5fb; }

/* Stat cards on dashboard */
.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  opacity: .9;
}

.stat-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .95);
}

.stat-icon.c2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); box-shadow: 0 10px 22px -12px rgba(14, 165, 233, .95); }
.stat-icon.c3 { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 10px 22px -12px rgba(16, 185, 129, .95); }
.stat-icon.c4 { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 10px 22px -12px rgba(245, 158, 11, .95); }

.stat-body { min-width: 0; }

.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-size: 25px;
  font-weight: 750;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* ---------------- Lists / progress ---------------- */
.list-group-item {
  border-color: var(--line);
  padding: 11px 18px;
  background: transparent;
  transition: background .16s ease;
}

.list-group-item:hover { background: #f8fafd; }

.list-group-item strong { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.list-group-item .text-right strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.progress {
  height: 6px;
  border-radius: 999px;
  background: #eef2f8;
  box-shadow: none;
  margin-bottom: 0;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  box-shadow: none;
  border-radius: 999px;
  transition: width .5s ease, background .3s ease;
}

.progress-bar.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-bar.danger { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ---------------- Buttons ---------------- */
.btn {
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  border: none;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .95);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active {
  background: linear-gradient(120deg, #4338ca, #0284c7);
  border: none;
}

.btn-white {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.btn-white:hover { background: #f8fafd; color: var(--brand-1); border-color: #d8e2f0; }

.btn-outline {
  background: #fff;
  border-width: 1px;
  border-style: solid;
  box-shadow: none;
}

.btn-outline.btn-primary { color: var(--brand-1); border-color: #cfd8ff; }
.btn-outline.btn-primary:hover { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }
.btn-outline.btn-success { color: #059669; border-color: #b7e9d5; }
.btn-outline.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-outline.btn-info { color: #0284c7; border-color: #bfe3f8; }
.btn-outline.btn-info:hover { background: #0284c7; border-color: #0284c7; color: #fff; }
.btn-outline.btn-warning { color: #d97706; border-color: #fbe0b8; }
.btn-outline.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-outline.btn-danger { color: #dc2626; border-color: #fbd0d0; }
.btn-outline.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.btn-group > .btn { margin: 0 2px; }

/* ---------------- Tables ---------------- */
.bootstrap-table { border-radius: 12px; }

.fixed-table-toolbar { padding: 0 0 12px; }

.fixed-table-toolbar .search input,
.fixed-table-toolbar .columns input {
  border-radius: 9px;
  border: 1px solid var(--line);
  box-shadow: none;
  height: 34px;
  font-size: 13px;
}

.fixed-table-toolbar .search input:focus {
  border-color: #b9c6ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.table > thead > tr > th {
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 11px 10px;
  white-space: nowrap;
}

.table > tbody > tr > td {
  border-top: 1px solid #f0f4fa;
  padding: 11px 10px;
  font-size: 13px;
  color: var(--ink-2);
  vertical-align: middle;
}

.table-hover > tbody > tr:hover { background: #f8fafd; }

.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfdff; }

.fixed-table-pagination { padding-top: 12px; }

.pagination > li > a,
.pagination > li > span {
  border-color: var(--line);
  color: var(--ink-2);
  border-radius: 8px !important;
  margin: 0 2px;
  font-size: 12.5px;
}

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span {
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  border-color: transparent;
}

.detail-view { background: #f8fafd !important; }
.detail-view td { padding: 14px 18px !important; }

code {
  background: #0f172a;
  color: #a5f3fc;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

/* ---------------- Badges / labels ---------------- */
.badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}

.badge-primary, .label-primary { background: #dcfce7; color: #15803d; }
.badge-badge { background: #f1f5f9; color: #64748b; }

/* ---------------- Forms ---------------- */
.form-control {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: none;
  height: 40px;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control:focus {
  border-color: #b9c6ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

select.form-control { height: 40px; }

.form-group label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.help-block { font-size: 12px; color: var(--muted); }

/* ---------------- Footer ---------------- */
.footer.fixed, .footer {
  background: transparent;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
  padding: 14px 24px;
}

.footer strong { color: var(--muted); font-weight: 600; }
.footer a { color: var(--brand-1); }

/* ---------------- Login ---------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: radial-gradient(1200px 600px at 10% 0%, #eef2ff 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 100%, #e0f2fe 0%, transparent 55%),
    var(--bg);
}

.login-shell {
  width: 100%;
  max-width: 1120px;
  margin: auto;
  padding: 28px 20px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: stretch;
}

.login-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 38px 36px;
  color: #eaf1ff;
  background: linear-gradient(150deg, #0b1220 0%, #1b2a4a 45%, #0b3a5c 100%);
  box-shadow: 0 30px 60px -34px rgba(8, 20, 40, .85);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: .55;
  pointer-events: none;
}

.login-hero::before {
  width: 320px;
  height: 320px;
  right: -110px;
  top: -110px;
  background: radial-gradient(circle, rgba(79, 70, 229, .85), transparent 65%);
}

.login-hero::after {
  width: 300px;
  height: 300px;
  left: -120px;
  bottom: -130px;
  background: radial-gradient(circle, rgba(14, 165, 233, .7), transparent 65%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-bottom: 26px;
}

.login-brand .brand-logo { width: 44px; height: 44px; flex-basis: 44px; font-size: 19px; }

.login-brand-name { font-size: 17px; font-weight: 750; color: #fff; letter-spacing: .4px; }
.login-brand-sub { font-size: 12px; color: #8fa3c2; margin-top: 2px; }

.login-hero h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.35;
  color: #fff;
  letter-spacing: .3px;
}

.login-features {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.login-features li {
  position: relative;
  padding-left: 24px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c7d5ea;
}

.login-features li::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 11px;
  color: #38bdf8;
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 34px;
  box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .55);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card h4 {
  font-size: 21px;
  font-weight: 750;
  margin: 0 0 6px;
  color: var(--ink);
}

.login-card .login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.login-card .form-group { margin-bottom: 16px; }

.login-card .form-control {
  height: 46px;
  background: #f8fafd;
  border-color: #e8eef7;
}

.login-card .form-control:focus { background: #fff; }

.login-card .btn-primary {
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 11px;
}

.login-topbar {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 5;
}

.login-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.login-footer strong { color: var(--muted); font-weight: 600; }

@media (max-width: 991px) {
  .login-shell { grid-template-columns: 1fr; max-width: 520px; }
  .login-hero { padding: 26px 24px; }
  .login-hero h3 { font-size: 20px; }
  .login-features { grid-template-columns: 1fr; }
  .login-card { padding: 28px 24px; }
}

@media (max-width: 767px) {
  .wrapper-content { padding: 16px 12px 32px; }
  .topbar-title { display: none; }
  .welcome-message { display: none; }
  .stat-value { font-size: 21px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }
