/* ============================================================
   Pintu UNJANI SSO — App-specific overrides for Modernize theme
   ============================================================ */

/* ============================================================
   Green Theme — satu sumber warna: #24b47f
   ------------------------------------------------------------
   Primary   #24b47f  HSL(153,72%,42%) — semua elemen primary
   Hover     #1aa265  HSL(153,72%,37%) — hover button/link
   Active    #178c57  HSL(153,72%,32%) — active/pressed
   Link      #158452  HSL(153,72%,30%) — teks link (WCAG AA 4.71:1 ✓)
   Bg-subtle #e8f7f1  — latar badge/chip
   Border    #bfe3d3  — border ringan
   Text dark #10603c  — teks di atas bg-subtle (WCAG AAA 7.61:1 ✓)
   ============================================================ */

/* ---- Select2 + Bootstrap 5 compatibility ---- */
/* KEY: Arrow adalah position:absolute — harus relatif terhadap selection, bukan container */
.select2-container--default .select2-selection--single {
  position: relative !important;
  height: 38px !important;
  padding: 0 !important;
  background-color: #fff !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0.375rem !important;
  box-shadow: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  display: block !important;
  padding: 0 2.25rem 0 0.75rem !important;
  line-height: 36px !important;
  color: #212529 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #6c757d !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0.5rem !important;
  height: auto !important;
  width: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  position: static !important;
  margin: 0 !important;
  border-color: #6c757d transparent transparent transparent !important;
  border-style: solid !important;
  border-width: 5px 4px 0 4px !important;
  width: 0 !important;
  height: 0 !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #24b47f !important;
  box-shadow: 0 0 0 0.25rem rgba(36, 180, 127, 0.18) !important;
  outline: 0 !important;
}
.select2-container--default.select2-container--disabled .select2-selection--single {
  background-color: #e9ecef !important;
  cursor: not-allowed;
}
.select2-dropdown {
  border-color: #dee2e6 !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #24b47f !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: #dee2e6 !important;
  border-radius: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* ---- CSS custom properties ---- */
[data-bs-theme=light][data-color-theme=Green_Theme]:root,
[data-bs-theme=dark][data-color-theme=Green_Theme]:root {
  --bs-primary:               #24b47f;
  --bs-primary-rgb:           36, 180, 127;
  --bs-light-primary:         rgba(36, 180, 127, 0.12);
  --bs-primary-bg-subtle:     #e8f7f1;
  --bs-primary-border-subtle: #bfe3d3;
  --bs-primary-text-emphasis: #10603c;
  --bs-link-color:            #158452;
  --bs-link-hover-color:      #178c57;
  --bs-link-color-rgb:        21, 132, 82;
  --bs-body-bg:               #eef0f4;
  --bs-body-bg-rgb:           238, 240, 244;
}

/* ---- Content area background ---- */
body {
  background-color: #eef0f4 !important;
}
#main-wrapper,
.page-wrapper,
.body-wrapper {
  background-color: #eef0f4 !important;
}

/* ---- Sidebar, topbar, card & profile dropdown tetap putih ---- */
.left-sidebar,
.topbar,
.card,
.dropdown-menu.content-dd {
  background: #fff !important;
  background-color: #fff !important;
}

.dropdown-menu.content-dd .dropdown-item:hover {
  background-color: #f5f7fa !important;
}

/* ---- Table body rows: putih bersih ---- */
.table > tbody > tr > td,
.table > tbody > tr {
  --bs-table-bg: #fff;
  --bs-table-striped-bg: #fff;
  --bs-table-hover-bg: #f5f7fa;
  background-color: #fff !important;
}

/* ---- Buttons: seragam dengan --bs-primary (#24b47f) ---- */
/* Selector cocokkan specificity theme: [data-bs-theme][data-color-theme]:root .btn-primary */
[data-bs-theme=light][data-color-theme=Green_Theme]:root .btn-primary,
[data-bs-theme=dark][data-color-theme=Green_Theme]:root .btn-primary {
  --bs-btn-color:                #fff;
  --bs-btn-bg:                   #24b47f;
  --bs-btn-border-color:         #24b47f;
  --bs-btn-hover-color:          #fff;
  --bs-btn-hover-bg:             #1aa265;
  --bs-btn-hover-border-color:   #1aa265;
  --bs-btn-active-color:         #fff;
  --bs-btn-active-bg:            #178c57;
  --bs-btn-active-border-color:  #178c57;
  --bs-btn-disabled-bg:          #24b47f;
  --bs-btn-disabled-border-color:#24b47f;
}

[data-bs-theme=light][data-color-theme=Green_Theme]:root .btn-outline-primary,
[data-bs-theme=dark][data-color-theme=Green_Theme]:root .btn-outline-primary {
  --bs-btn-color:               #24b47f;
  --bs-btn-border-color:        #24b47f;
  --bs-btn-hover-bg:            #24b47f;
  --bs-btn-hover-border-color:  #24b47f;
  --bs-btn-hover-color:         #fff;
  --bs-btn-active-bg:           #1aa265;
  --bs-btn-active-border-color: #1aa265;
  --bs-btn-active-color:        #fff;
}

/* ---- text-primary & bg-primary: seragam ---- */
[data-bs-theme=light][data-color-theme=Green_Theme]:root .text-primary,
[data-bs-theme=dark][data-color-theme=Green_Theme]:root .text-primary {
  color: #24b47f !important;
}

[data-bs-theme=light][data-color-theme=Green_Theme]:root .bg-primary,
[data-bs-theme=dark][data-color-theme=Green_Theme]:root .bg-primary {
  background-color: #24b47f !important;
}


/* ---- Status pills ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}
.status-pill.status-allowed {
  background: #d1fae5;
  color: #065f46;
}
.status-pill.status-restricted {
  background: #fee2e2;
  color: #991b1b;
}
.status-pill.status-pending {
  background: #fef9c3;
  color: #854d0e;
}

/* ---- Role badge ---- */
.app-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 2px 8px;
  background: var(--bs-primary-bg-subtle, #e8f7f1);
  color: #10603c; /* WCAG AAA 7.61:1 on #e8f7f1 ✓ */
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---- Admin data tables ---- */
.admin-data-card {
  overflow: hidden;
  border: 1px solid #dfe7f0 !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.admin-data-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.admin-data-card__title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #172033;
  font-size: 0.95rem;
  font-weight: 800;
}

.admin-data-card__title i {
  color: #24b47f;
  font-size: 1.15rem;
}

.admin-data-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid #dfe7f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #526074;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-data-table-wrap {
  background: #fff;
}

.admin-data-table {
  --bs-table-bg: #fff;
  --bs-table-hover-bg: #f8fdfb;
  min-width: 860px;
  margin-bottom: 0;
}

.admin-data-table thead th {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid #dfe7f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-data-table tbody td {
  padding: 0.92rem 1rem;
  border-bottom: 1px solid #edf2f7;
  color: #243146;
  vertical-align: middle;
}

.admin-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-data-table tbody tr:hover td {
  background: #f8fdfb !important;
}

.admin-data-table--compact thead th {
  padding-top: 0.68rem;
  padding-bottom: 0.68rem;
}

.admin-data-table--compact tbody td {
  padding-top: 0.74rem;
  padding-bottom: 0.74rem;
}

.admin-data-table .admin-cell-number {
  width: 4.5rem;
  color: #748094;
  font-family: var(--font-mono, "Consolas", monospace);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-cell-main {
  display: block;
  color: #172033;
  font-weight: 800;
  line-height: 1.3;
}

.admin-cell-subtext {
  display: block;
  margin-top: 0.22rem;
  color: #66758f;
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-code-chip {
  display: inline-block;
  max-width: min(34rem, 44vw);
  overflow: hidden;
  padding: 0.24rem 0.48rem;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #26354c;
  font-family: var(--font-mono, "Consolas", monospace);
  font-size: 0.76rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-value-muted {
  color: #748094;
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-data-table .status-pill,
.admin-data-table .app-role-badge {
  white-space: nowrap;
}

.admin-data-table .oauth-action-stack {
  gap: 0.4rem;
}

.admin-data-table .btn-sm {
  min-height: 2rem;
  padding: 0.38rem 0.62rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-row-menu {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe7f0;
  border-radius: 6px;
  background: #fff;
  color: #526074;
}

.admin-row-menu:hover,
.admin-row-menu:focus-visible {
  border-color: rgba(36, 180, 127, 0.28);
  background: #eefaf5;
  color: #178c57;
}

.admin-empty-row {
  padding: 2.5rem 1rem !important;
  color: #66758f !important;
  text-align: center;
}

.admin-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-top: 1px solid #edf2f7;
  background: #fff;
}

.admin-table-footer__text {
  color: #66758f;
  font-size: 0.82rem;
}

.admin-table-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Dashboard filter pills ---- */
.dashboard-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.15rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #dce4ee;
  border-radius: 999px;
  background: #fff;
  color: #31404a;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.dashboard-filter-pill:hover,
.dashboard-filter-pill:focus-visible {
  background: #eefaf5;
  border-color: rgba(36, 180, 127, 0.36);
  color: #178c57;
}
.dashboard-filter-pill.is-active {
  background: #24b47f;
  border-color: #24b47f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(36, 180, 127, 0.18);
}
.dashboard-filter-pill strong {
  min-width: 1.45rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #eef2f6;
  color: #31404a;
  font-size: 0.76rem;
  line-height: 1.4;
  text-align: center;
}
.dashboard-filter-pill.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ---- Dashboard app launcher ---- */
.dashboard-app-grid > [data-app-card][hidden] {
  display: none !important;
}

.dashboard-app-card {
  position: relative;
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.dashboard-app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #24b47f;
}
.dashboard-app-card:hover,
.dashboard-app-card:focus-within {
  border-color: #b8c5d6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.dashboard-app-card--restricted::before {
  background: #c53c4f;
}
.dashboard-app-card--missing-url::before {
  background: #64748b;
}

.app-icon-badge {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f7f1;
  color: #24b47f;
}

.dashboard-app-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.dashboard-app-identity {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 0.7rem;
}

.dashboard-app-card .app-icon-badge {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 2.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 180, 127, 0.16);
  border-radius: 8px;
  background: #e8f7f1;
  color: #178c57;
  font-size: 1.08rem;
}
.dashboard-app-card--restricted .app-icon-badge {
  border-color: rgba(197, 60, 79, 0.16);
  background: #fdecef;
  color: #c53c4f;
}
.dashboard-app-card--missing-url .app-icon-badge {
  border-color: #dce4ee;
  background: #f1f5f9;
  color: #64748b;
}

.dashboard-app-card__title {
  min-width: 0;
  flex: 1 1 auto;
}
.dashboard-app-card__title h6 {
  overflow: hidden;
  margin: 0;
  color: #172033;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-app-card__title span {
  display: block;
  margin-top: 0.16rem;
  color: #66758f;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-access-badge {
  display: inline-flex;
  max-width: 8.75rem;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
}
.app-access-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-access-badge i {
  flex-shrink: 0;
  font-size: 0.86rem;
}
.app-access-badge--allowed {
  background: #e8f7f1;
  color: #10603c;
}
.app-access-badge--restricted {
  background: #fdecef;
  color: #973446;
}

.dashboard-app-card__description {
  display: -webkit-box;
  min-height: 2.55rem;
  margin: 0.85rem 0 0;
  overflow: hidden;
  color: #4d5971;
  font-size: 0.84rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-app-meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e4ebf3;
  border-radius: 6px;
  background: #f8fafc;
  color: #4c5a6f;
  font-size: 0.75rem;
  font-weight: 700;
}
.dashboard-app-meta-row i {
  flex-shrink: 0;
  color: #2563eb;
  font-size: 0.95rem;
}
.dashboard-app-meta-row span {
  min-width: 0;
}
.dashboard-app-meta-row--muted {
  color: #758195;
}
.dashboard-app-meta-row--muted i {
  color: #64748b;
}

.app-access-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #f3c5cc;
  border-left: 3px solid #c53c4f;
  border-radius: 6px;
  background: #fff6f7;
  color: #973446;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
}
.app-access-warning i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.9rem;
}

.dashboard-app-card__footer {
  margin-top: auto;
  padding-top: 0.95rem;
}
.dashboard-app-action {
  display: inline-flex;
  width: 100%;
  min-height: 2.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.dashboard-app-action:not(:disabled) {
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .dashboard-app-card {
    min-height: auto;
    padding: 0.9rem;
  }

  .app-access-badge {
    max-width: 7.5rem;
  }
}

/* ---- OAuth secret card ---- */
.oauth-secret-card {
  border: 1px solid var(--bs-border-color);
  border-left: 4px solid var(--bs-warning);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--bs-warning-bg-subtle);
  margin-bottom: 1.5rem;
}

/* ---- Admin action button stacks ---- */
.oauth-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---- Profile avatar initial ---- */
.profile-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bs-primary, #24b47f);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}
.profile-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Mobile sidebar z-index ---- */
@media (max-width: 1299.98px) {
  .left-sidebar {
    z-index: 1050;
  }
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  font-size: 28px;
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
}

.spinner.center {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
}

.spinner .spinner-blade {
  position: absolute;
  left: 0.4629em;
  bottom: 0;
  width: 0.074em;
  height: 0.2777em;
  border-radius: 0.0555em;
  background-color: transparent;
  -webkit-transform-origin: center -0.2222em;
  -ms-transform-origin: center -0.2222em;
  transform-origin: center -0.2222em;
  animation: spinner-fade9234 1s infinite linear;
}

.spinner .spinner-blade:nth-child(1) {
  -webkit-animation-delay: 0s;
  animation-delay: 0s;
  -webkit-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
}

.spinner .spinner-blade:nth-child(2) {
  -webkit-animation-delay: 0.083s;
  animation-delay: 0.083s;
  -webkit-transform: rotate(30deg);
  -ms-transform: rotate(30deg);
  transform: rotate(30deg);
}

.spinner .spinner-blade:nth-child(3) {
  -webkit-animation-delay: 0.166s;
  animation-delay: 0.166s;
  -webkit-transform: rotate(60deg);
  -ms-transform: rotate(60deg);
  transform: rotate(60deg);
}

.spinner .spinner-blade:nth-child(4) {
  -webkit-animation-delay: 0.249s;
  animation-delay: 0.249s;
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}

.spinner .spinner-blade:nth-child(5) {
  -webkit-animation-delay: 0.332s;
  animation-delay: 0.332s;
  -webkit-transform: rotate(120deg);
  -ms-transform: rotate(120deg);
  transform: rotate(120deg);
}

.spinner .spinner-blade:nth-child(6) {
  -webkit-animation-delay: 0.415s;
  animation-delay: 0.415s;
  -webkit-transform: rotate(150deg);
  -ms-transform: rotate(150deg);
  transform: rotate(150deg);
}

.spinner .spinner-blade:nth-child(7) {
  -webkit-animation-delay: 0.498s;
  animation-delay: 0.498s;
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.spinner .spinner-blade:nth-child(8) {
  -webkit-animation-delay: 0.581s;
  animation-delay: 0.581s;
  -webkit-transform: rotate(210deg);
  -ms-transform: rotate(210deg);
  transform: rotate(210deg);
}

.spinner .spinner-blade:nth-child(9) {
  -webkit-animation-delay: 0.664s;
  animation-delay: 0.664s;
  -webkit-transform: rotate(240deg);
  -ms-transform: rotate(240deg);
  transform: rotate(240deg);
}

.spinner .spinner-blade:nth-child(10) {
  -webkit-animation-delay: 0.747s;
  animation-delay: 0.747s;
  -webkit-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  transform: rotate(270deg);
}

.spinner .spinner-blade:nth-child(11) {
  -webkit-animation-delay: 0.83s;
  animation-delay: 0.83s;
  -webkit-transform: rotate(300deg);
  -ms-transform: rotate(300deg);
  transform: rotate(300deg);
}

.spinner .spinner-blade:nth-child(12) {
  -webkit-animation-delay: 0.913s;
  animation-delay: 0.913s;
  -webkit-transform: rotate(330deg);
  -ms-transform: rotate(330deg);
  transform: rotate(330deg);
}

@keyframes spinner-fade9234 {
  0% {
    background-color: #69717d;
  }

  100% {
    background-color: transparent;
  }
}

/* ---- Sidebar nav icon size ---- */
.left-sidebar .sidebar-nav .sidebar-link i {
  font-size: 45px;
}

/* ---- Sidebar brand logo text ---- */
.left-sidebar .brand-logo .text-primary {
  white-space: nowrap;
  color: var(--bs-primary, #24b47f) !important;
}

/* ---- SweetAlert2 button styling ---- */
.app-swal-actions {
  gap: 0.75rem !important;
}

.app-swal-confirm,
.app-swal-cancel {
  min-width: 8rem;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.app-swal-confirm {
  color: #fff;
  background: #24b47f;
  border-color: #24b47f;
  box-shadow: 0 4px 14px rgba(36, 180, 127, 0.3);
}

.app-swal-confirm:hover,
.app-swal-confirm:focus-visible {
  color: #fff;
  background: #1aa265;
  border-color: #1aa265;
  box-shadow: 0 6px 18px rgba(26, 162, 101, 0.35);
}

.app-swal-cancel {
  color: #4a5568;
  background: #f4f6f8;
  border-color: #dde3ea;
}

.app-swal-cancel:hover,
.app-swal-cancel:focus-visible {
  background: #e8edf2;
  border-color: #c8d0da;
}

/* ---- Flash partial: keep visually-hidden bridge for SweetAlert ---- */
[data-swal-source] { display: none; }

/* ---- Login redesign ---- */
.login-scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 1.5rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(94, 163, 197, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 252, 254, 0.88));
}

.login-scene::before,
.login-scene::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(42vw, 540px);
  pointer-events: none;
  opacity: 0.78;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(234, 239, 243, 0.82)),
    repeating-linear-gradient(
      90deg,
      rgba(182, 192, 201, 0.18) 0 10px,
      rgba(255, 255, 255, 0) 10px 32px
    );
  box-shadow: inset 0 0 0 1px rgba(207, 215, 222, 0.22);
}

.login-scene::before {
  left: -3.5rem;
  clip-path: polygon(0 0, 84% 0, 100% 100%, 0 100%);
}

.login-scene::after {
  right: -3.5rem;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
}

.login-scene__glow {
  position: absolute;
  inset: auto 50% 10% auto;
  width: min(72vw, 980px);
  height: min(58vw, 760px);
  transform: translateX(50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.5) 38%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.login-card {
  width: 100%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(208, 214, 219, 0.85);
  box-shadow: 0 24px 56px rgba(112, 126, 139, 0.22), 0 4px 12px rgba(112, 126, 139, 0.08);
  padding: 2rem 2rem 1.8rem;
  backdrop-filter: blur(10px);
}

.login-card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-card__logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(33, 95, 56, 0.12));
}

.login-card__header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.login-card__header h1 {
  margin: 0;
  color: #253238;
  font-size: clamp(1.7rem, 3vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card__header p {
  margin: 0.45rem auto 0;
  max-width: 28ch;
  color: #64727b;
  font-size: 0.97rem;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-form__group {
  display: grid;
  gap: 0.45rem;
}

.login-form__label {
  margin-bottom: 0;
  color: #2e383f;
  font-size: 0.95rem;
  font-weight: 700;
}

.login-form__control {
  min-height: 3rem;
  border-radius: 10px;
  border: 1px solid #cbd4da;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-form__control::placeholder {
  color: #8d99a1;
}

.login-form__control:hover {
  border-color: #afbcc4;
}

.login-form__control:focus {
  border-color: #24b47f;
  box-shadow: 0 0 0 0.25rem rgba(36, 180, 127, 0.18), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-form__password-group .login-form__control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login-form__password-toggle {
  min-width: 3rem;
  border: 1px solid #cbd4da;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #ffffff;
  color: #6c7a82;
}

.login-form__password-toggle:hover {
  background: #f5f8fa;
  color: #3b4c55;
}

.login-form__password-toggle:focus-visible {
  outline: 3px solid rgba(63, 141, 149, 0.2);
  outline-offset: 1px;
}

.login-form__capslock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #9a6517;
  background: #fff4dd;
  border: 1px solid #f0ddb0;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  line-height: 1.35;
}

.login-form__captcha {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  overflow: hidden;
  padding: 0.15rem 0 0.05rem;
}

.login-form__captcha .g-recaptcha {
  max-width: 100%;
}

.login-form__captcha .g-recaptcha > div {
  margin: 0;
}

.login-submit {
  min-height: 3.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #24b47f 0%, #1aa265 100%);
  box-shadow: 0 12px 24px rgba(36, 180, 127, 0.28);
  font-size: 1rem;
  font-weight: 700;
}

.login-submit:hover,
.login-submit:focus {
  background: linear-gradient(135deg, #1aa265 0%, #178c57 100%);
  box-shadow: 0 16px 28px rgba(36, 180, 127, 0.32);
  transform: translateY(-1px);
}

.login-submit:disabled {
  transform: none;
  box-shadow: none;
  background: linear-gradient(135deg, #7dd4ab 0%, #6dc49c 100%);
}

.login-scene__footer {
  margin: 0;
  text-align: center;
  color: #5f6d75;
  font-size: 0.92rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
}

/* ---- Sidebar global style (berlaku di semua halaman) ---- */
.left-sidebar {
  border-right: 1px solid #dfe4ea !important;
  box-shadow: 6px 0 24px rgba(15, 23, 42, 0.04) !important;
}

.left-sidebar .sidebar-link,
.left-sidebar .nav-small-cap,
.left-sidebar .nav-small-cap-icon,
.left-sidebar .sidebar-link i {
  color: #31404a !important;
}

.left-sidebar .sidebar-link:hover {
  background: #f3f5f7 !important;
  color: #24b47f !important;
}

.left-sidebar .sidebar-link:hover i {
  color: #24b47f !important;
}

/* ---- Sidebar active: ikon dan teks putih (konsisten semua halaman) ---- */
[data-color-theme=Green_Theme]:root .sidebar-nav ul .sidebar-item > .sidebar-link.active,
[data-color-theme=Green_Theme]:root .sidebar-nav ul .sidebar-item.selected > .sidebar-link {
  background-color: #24b47f !important;
  color: #fff !important;
}

[data-color-theme=Green_Theme]:root .sidebar-nav ul .sidebar-item > .sidebar-link.active i,
[data-color-theme=Green_Theme]:root .sidebar-nav ul .sidebar-item.selected > .sidebar-link i {
  color: #fff !important;
}

@media (max-width: 767px) {
  .admin-data-card__header,
  .admin-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-data-table {
    min-width: 780px;
  }

  .admin-data-table thead th,
  .admin-data-table tbody td {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .admin-code-chip {
    max-width: 18rem;
  }

  .admin-table-footer__actions,
  .admin-table-footer__actions .btn {
    width: 100%;
  }

  .admin-table-footer__actions .btn {
    justify-content: center;
  }

  .login-scene {
    padding-top: 1.5rem;
  }

  .login-scene::before,
  .login-scene::after {
    width: 42vw;
    opacity: 0.48;
  }

  .login-card {
    padding: 1.5rem 1.15rem 1.3rem;
    border-radius: 18px;
  }

  .login-card__logo {
    width: 74px;
    height: 74px;
  }

  .login-card__header h1 {
    font-size: 1.7rem;
  }

  .login-card__header p,
  .login-scene__footer {
    font-size: 0.88rem;
  }
}
