:root {
  --pms-primary: #0d9488;
  --pms-primary-dark: #047857;
  --pms-primary-deep: #065f5b;
  --pms-secondary: #22c55e;
  --pms-accent: #2dd4bf;
  --pms-mint: #d1fae5;
  --pms-mint-soft: #ecfdf5;
  --pms-surface: #ffffff;
  --pms-background: #f3faf8;
  --pms-ink: #12312d;
  --pms-muted: #64817c;
  --pms-border: #dcece8;
  --pms-gradient: linear-gradient(135deg, #047857 0%, #0d9488 52%, #2dd4bf 100%);
  --pms-gradient-soft: linear-gradient(135deg, rgba(4, 120, 87, 0.12), rgba(45, 212, 191, 0.08));
  --pms-shadow: 0 18px 45px rgba(6, 95, 91, 0.12);
}

body {
  color: var(--pms-ink);
  background: var(--pms-background);
}

a {
  color: var(--pms-primary);
}

a:hover {
  color: var(--pms-primary-dark);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1;
}

.brand-lockup:hover {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.brand-mark-sm {
  width: 38px;
  height: 38px;
}

/* Pesantren Management System theme */
.pms-auth {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 15%, rgba(45, 212, 191, 0.2), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(34, 197, 94, 0.14), transparent 30%),
    #f3faf8;
}

.pms-auth .section,
.pms-auth .auth-page {
  min-height: 100vh;
}

.auth-page {
  display: flex;
  align-items: center;
  padding: 42px 20px;
}

.auth-shell {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: 30px;
  background: var(--pms-surface);
  box-shadow: 0 30px 80px rgba(6, 78, 73, 0.16);
}

.auth-showcase {
  position: relative;
  min-height: 650px;
  padding: 58px !important;
  overflow: hidden;
  color: #fff;
  background: var(--pms-gradient);
}

.auth-showcase::before,
.auth-showcase::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.auth-showcase::before {
  width: 330px;
  height: 330px;
  right: -170px;
  top: -110px;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.04), 0 0 0 96px rgba(255, 255, 255, 0.03);
}

.auth-showcase::after {
  width: 230px;
  height: 230px;
  left: -125px;
  bottom: -95px;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.04);
}

.auth-showcase-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 534px;
  flex-direction: column;
}

.auth-showcase .brand-lockup {
  color: #fff;
}

.auth-showcase-copy {
  margin: auto 0;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.auth-showcase h1 {
  max-width: 460px;
  margin-bottom: 18px;
  color: #fff;
  font-size: 42px;
  line-height: 1.13;
  letter-spacing: -1.5px;
}

.auth-showcase p {
  max-width: 450px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.75;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-point {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.auth-showcase-footnote {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.auth-form-panel {
  display: flex;
  min-height: 650px;
  align-items: center;
  padding: 58px 64px !important;
  background: #fff;
}

.auth-form-content {
  width: 100%;
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 34px;
  color: var(--pms-ink);
}

.auth-form-label {
  margin-bottom: 8px;
  color: var(--pms-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-form-content h2 {
  margin-bottom: 10px;
  color: var(--pms-ink);
  font-size: 30px;
  letter-spacing: -0.7px;
}

.auth-form-intro {
  margin-bottom: 34px;
  color: var(--pms-muted);
  line-height: 1.7;
}

.pms-auth .form-group > label {
  color: #254842;
  font-size: 12px;
  font-weight: 800;
}

.pms-auth .form-control {
  height: 52px !important;
  border: 1px solid var(--pms-border);
  border-radius: 13px;
  background: #fbfefd;
  color: var(--pms-ink);
  font-size: 14px;
  box-shadow: none;
}

.pms-auth .form-control:focus {
  border-color: var(--pms-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.11) !important;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 9px;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pms-primary);
  cursor: pointer;
}

.auth-submit {
  height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 13px;
  background: var(--pms-gradient) !important;
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.24) !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.auth-submit:hover,
.auth-submit:focus,
.auth-submit:active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #036b50 0%, #0b8178 55%, #20bda9 100%) !important;
  box-shadow: 0 15px 28px rgba(13, 148, 136, 0.3) !important;
}

.auth-copyright {
  margin-top: 34px;
  color: #809791;
  font-size: 12px;
  text-align: center;
}

.auth-copyright strong {
  color: var(--pms-primary-deep);
}

/* Application shell */
.pms-app {
  overflow-x: hidden;
  background: var(--pms-background);
}

.pms-app .navbar-bg {
  height: 86px;
  background: var(--pms-gradient) !important;
  box-shadow: 0 10px 28px rgba(6, 95, 91, 0.18);
}

.pms-app .main-navbar {
  left: 220px;
  right: 0;
  height: 60px;
  padding-right: 22px;
  padding-left: 22px;
  box-shadow: none;
}

.pms-app .main-navbar .nav-link.nav-link-lg i {
  font-size: 17px;
}

.pms-app .main-navbar .nav-link-user {
  font-size: 13px;
}

.pms-app .main-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

.pms-app .main-navbar .nav-link:hover {
  color: #fff;
}

.pms-app .main-sidebar {
  width: 220px;
  border-right: 1px solid rgba(13, 148, 136, 0.08);
  box-shadow: 8px 0 32px rgba(18, 49, 45, 0.06);
}

.pms-app.sidebar-gone .main-sidebar {
  left: -220px;
}

.pms-app .main-sidebar .sidebar-brand {
  height: 60px;
  line-height: normal;
}

.pms-app .main-sidebar .sidebar-brand a {
  justify-content: center;
  height: 100%;
  color: var(--pms-ink);
  text-transform: none;
}

.pms-app .main-sidebar .sidebar-brand .brand-lockup {
  gap: 7px;
  padding: 0 10px;
  font-size: 13.5px;
  letter-spacing: -0.35px;
  white-space: normal;
}

.pms-app .main-sidebar .sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.pms-app .main-sidebar .sidebar-brand-sm a {
  display: flex;
}

.pms-app .sidebar-menu .menu-header {
  padding: 2px 12px;
  color: #8aa09b;
  font-size: 9px;
  letter-spacing: 1.2px;
}

.pms-app .sidebar-menu .menu-header:not(:first-child) {
  margin-top: 6px;
}

.pms-app .main-sidebar .sidebar-menu li a {
  height: 40px;
  padding: 0 13px;
  width: auto;
  margin: 2px 10px;
  border-radius: 10px;
  color: #57716c;
  font-size: 13px;
}

.pms-app .main-sidebar .sidebar-menu li a i {
  width: 20px;
  margin-right: 11px;
  font-size: 13px;
}

.pms-app .main-sidebar .sidebar-menu li ul.dropdown-menu li a {
  height: 30px;
  padding-left: 45px;
  font-size: 12px;
}

.pms-app .main-sidebar .sidebar-menu li a:hover {
  background: var(--pms-mint-soft);
  color: var(--pms-primary-dark);
}

.pms-app .main-sidebar .sidebar-menu li.active > a,
.pms-app .main-sidebar .sidebar-menu li ul.dropdown-menu li.active > a {
  color: var(--pms-primary-dark);
  font-weight: 800;
}

.pms-app:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a {
  padding-left: 13px;
  background: var(--pms-gradient-soft);
}

.pms-app:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a::before {
  left: auto;
  right: 0;
  height: 20px;
  border-radius: 5px 0 0 5px;
  background: var(--pms-gradient);
}

.pms-app.sidebar-mini .main-sidebar .sidebar-menu > li.active > a {
  background: var(--pms-gradient);
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.25);
}

.pms-app .main-content {
  padding-top: 72px;
  padding-right: 24px;
  padding-left: 244px;
}

.pms-app .section > *:first-child {
  margin-top: 0;
}

.pms-app .main-wrapper-1 .section .section-header {
  min-height: 56px;
  margin: 0 0 18px;
  padding: 12px 20px;
  border: 1px solid rgba(13, 148, 136, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(18, 49, 45, 0.055);
}

.pms-app .section-header h1 {
  color: var(--pms-ink);
  font-size: 20px;
  letter-spacing: -0.4px;
}

.pms-app .section-header h1::after {
  display: block;
  width: 30px;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--pms-gradient);
  content: "";
}

.pms-app .card {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(13, 148, 136, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18, 49, 45, 0.055);
}

.pms-app .card.card-primary {
  border-top: 3px solid var(--pms-primary);
}

.pms-app .card-statistic-1,
.pms-app .card-statistic-2 {
  display: flex;
  min-height: 74px;
  align-items: center;
  flex-direction: row;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pms-app .dashboard-grid {
  margin-right: -8px;
  margin-left: -8px;
}

.pms-app .dashboard-grid > [class*="col-"] {
  padding-right: 8px;
  padding-left: 8px;
}

.pms-app .card-statistic-1 .card-wrap,
.pms-app .card-statistic-2 .card-wrap {
  min-width: 0;
  flex: 1;
  padding: 0 12px 0 2px;
}

.pms-app .card-statistic-1 .card-header,
.pms-app .card-statistic-2 .card-header {
  padding: 0;
}

.pms-app .card-statistic-1 .card-header h4,
.pms-app .card-statistic-2 .card-header h4 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.25px;
}

.pms-app .card-statistic-1 .card-body,
.pms-app .card-statistic-2 .card-body {
  padding: 3px 0 0;
  color: #25335f;
  font-size: 18px;
  line-height: 1.2;
}

.pms-app .card-statistic-2 .card-body h5 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pms-app .card-statistic-1:hover,
.pms-app .card-statistic-2:hover {
  transform: translateY(-3px);
  box-shadow: var(--pms-shadow);
}

.pms-app .card-statistic-1 .card-icon,
.pms-app .card-statistic-2 .card-icon,
.bg-primary-2 {
  width: 56px;
  height: 56px;
  margin: 9px 10px 9px 9px;
  flex: 0 0 56px;
  float: none;
  border-radius: 13px !important;
  background: var(--pms-gradient) !important;
  box-shadow: 0 7px 16px rgba(13, 148, 136, 0.18);
  line-height: 56px;
}

.pms-app .card-statistic-1 .card-icon .fas,
.pms-app .card-statistic-1 .card-icon .far,
.pms-app .card-statistic-2 .card-icon .fas,
.pms-app .card-statistic-2 .card-icon .far {
  font-size: 18px;
}

.btn-primary,
.btn-primary.disabled {
  border-color: transparent !important;
  background: var(--pms-gradient) !important;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.2) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border-color: transparent !important;
  background: linear-gradient(135deg, #036b50, #0b8178 55%, #20bda9) !important;
}

.bg-primary {
  background: var(--pms-gradient) !important;
}

.text-primary,
.text-primary-all *,
.text-primary-all *::before,
.text-primary-all *::after {
  color: var(--pms-primary) !important;
}

.form-control:focus,
.custom-select:focus,
.custom-file-input:focus + .custom-file-label,
.select2-container.select2-container--focus .select2-selection--single,
.select2-container.select2-container--focus .select2-selection--multiple {
  border-color: var(--pms-primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
}

.page-item.active .page-link,
.select2-container--default .select2-results__option--highlighted[aria-selected],
a.dropdown-item:focus,
a.dropdown-item:active,
a.dropdown-item.active {
  border-color: var(--pms-primary);
  background: var(--pms-gradient) !important;
}

.page-item .page-link {
  color: var(--pms-primary);
}

.pms-app .table thead th {
  border-bottom-color: var(--pms-border);
  background: var(--pms-mint-soft);
  color: #355b54;
}

.pms-app .main-footer {
  margin-top: 16px;
  padding: 14px 24px 14px 244px;
  border-top: 1px solid var(--pms-border);
  background: transparent;
  color: #78908b;
  font-size: 12px;
}

.pms-app .main-footer strong {
  color: var(--pms-primary-deep);
}

.pms-error {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, rgba(45, 212, 191, 0.18), transparent 36%), var(--pms-background);
}

.pms-error .page-error {
  padding: 48px 28px;
  border: 1px solid var(--pms-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--pms-shadow);
}

.pms-error .page-error h1 {
  background: var(--pms-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 991.98px) {
  .auth-showcase {
    display: none;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 52px !important;
  }

  .auth-mobile-brand {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .pms-app .main-navbar {
    left: 5px;
  }

  .pms-app .main-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .pms-app .main-footer {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 575.98px) {
  .auth-page {
    padding: 18px;
  }

  .auth-shell {
    border-radius: 22px;
  }

  .auth-form-panel {
    padding: 38px 26px !important;
  }

  .auth-form-content h2 {
    font-size: 26px;
  }

  .pms-app .main-content {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 68px;
  }

  .pms-app .main-wrapper-1 .section .section-header {
    margin-right: 0 !important;
    margin-bottom: 14px !important;
    margin-left: 0 !important;
    min-height: 52px;
    padding: 10px 15px;
  }

  .pms-app .main-footer {
    margin-top: 12px;
    padding: 12px 16px;
  }

  .pms-app .main-footer .footer-left,
  .pms-app .main-footer .footer-right {
    float: none;
    text-align: center;
  }

  .pms-app .main-footer .footer-right {
    margin-top: 4px;
  }
}
