:root {
  --sp-bg-dark: #020617;
  --sp-blue: #0f172a;
  --sp-blue-soft: #1e293b;
  --sp-green: #10b981;
  --sp-white: #ffffff;
  --sp-text-muted: #94a3b8;
  --sp-surface: #f8fafc;
  --sp-shadow: 0 12px 32px rgba(2, 6, 23, 0.16);
  --sp-radius: 16px;
}

body.system-app {
  background: linear-gradient(140deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 100%);
  color: var(--sp-blue);
  font-family: "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}

.system-topbar {
  background: linear-gradient(90deg, var(--sp-blue) 0%, var(--sp-blue-soft) 100%);
  color: var(--sp-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.28);
}

.system-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-top-left img {
  height: 48px;
  background: var(--sp-white);
  border-radius: 8px;
  padding: 4px;
}

.system-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-white);
}

.system-launcher {
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--sp-blue);
  background: var(--sp-white);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-menu {
  display: none;
  position: absolute;
  top: 70px;
  right: 20px;
  width: 270px;
  border-radius: 12px;
  background: var(--sp-white);
  box-shadow: var(--sp-shadow);
  padding: 14px;
  z-index: 2000;
}

.app-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sp-blue);
  text-decoration: none;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.app-menu a:hover {
  background: #e2e8f0;
}

.card-system {
  border: 0;
  border-radius: var(--sp-radius);
  background: var(--sp-white);
  box-shadow: var(--sp-shadow);
}

.btn-primary-system {
  background: var(--sp-green);
  border: 1px solid var(--sp-green);
  color: var(--sp-white);
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary-system:hover {
  background: #059669;
  border-color: #059669;
  color: var(--sp-white);
}

.btn-outline-system {
  border: 1px solid var(--sp-blue);
  color: var(--sp-blue);
  border-radius: 10px;
}

.btn-outline-system:hover {
  background: var(--sp-blue);
  color: var(--sp-white);
}

.table-system {
  border-radius: 12px;
  overflow: hidden;
}

.table-system thead th {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-system .modal-content {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--sp-shadow);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.kpi-card {
  border-radius: 12px;
  background: var(--sp-white);
  border: 1px solid #e2e8f0;
  padding: 14px;
}

.kpi-label {
  color: #475569;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sp-blue);
}

.system-footer {
  background: linear-gradient(90deg, var(--sp-blue) 0%, var(--sp-blue-soft) 100%);
  color: var(--sp-white);
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  margin-top: 26px;
}

body.login-page {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.72)),
    url("../img/login-bg.jpg") center center / cover no-repeat fixed;
  color: var(--sp-white);
}

.login-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.login-glass {
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: var(--sp-shadow);
  padding: 24px;
}

.login-glass .form-label,
.login-glass .text-muted {
  color: #dbeafe !important;
}

.login-glass .form-control {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cbd5e1;
}

.section-shell {
  max-width: 1024px;
  margin: 20px auto;
  padding: 0 12px;
}

@media (max-width: 768px) {
  .system-title {
    font-size: 0.92rem;
  }

  .system-top-left img {
    height: 40px;
  }
}
