:root {
  --tosca: #00a896;
  --tosca-dark: #027a70;
  --soft: #f4fbfa;
  --line: #e8f3f1;
  --text: #1f2937;

  --siguwa-navy: #071a3a;
  --siguwa-blue: #0b4ea2;
  --siguwa-blue-2: #0e75d9;
  --siguwa-sky: #eaf5ff;
  --siguwa-gold: #f4c542;
  --siguwa-ink: #102033;
  --siguwa-muted: #65758b;
  --siguwa-border: #dbe8f5;
  --siguwa-card: #ffffff;
}

/* ================================================================
   GLOBAL
   ================================================================ */

body {
  background: linear-gradient(180deg, #f3f8ff 0%, #eef4fb 100%);
  color: var(--siguwa-ink);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--siguwa-blue-2);
  box-shadow: 0 0 0 .2rem rgba(14, 117, 217, .14);
}

.btn-tosca {
  background: linear-gradient(135deg, var(--siguwa-blue), var(--siguwa-blue-2));
  border: 0;
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 78, 162, .24);
}

.btn-tosca:hover {
  background: linear-gradient(135deg, #083d81, #0b66c4);
  color: #fff;
  transform: translateY(-1px);
}

.avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f4ef;
  color: #198754;
  font-size: 1.2rem;
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */

.login-page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(120deg, rgba(3, 20, 48, .82), rgba(7, 72, 142, .64)),
    url('../img/login_slide_1.png');
  background-size: cover;
  background-position: center;
  animation: siguwaLoginSlides 18s infinite ease-in-out;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 15%, rgba(244, 197, 66, .28), transparent 24%),
    radial-gradient(circle at 78% 20%, rgba(14, 117, 217, .32), transparent 28%),
    linear-gradient(90deg, rgba(1, 10, 27, .72), rgba(1, 10, 27, .18));
  z-index: 0;
}

.login-page::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 210px;
  background: linear-gradient(0deg, rgba(2, 12, 30, .75), transparent);
  z-index: 0;
}

.login-page .container {
  position: relative;
  z-index: 1;
}

.auth-card {
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(2, 12, 30, .38);
  backdrop-filter: blur(12px);
  overflow: hidden;
  max-width: 430px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* FIX UTAMA: batasi semua logo/gambar di area login */
.login-page .auth-card img,
.login-page .login-logo,
.login-page .auth-logo,
.login-page .brand-logo {
  width: 112px !important;
  height: 112px !important;
  max-width: 112px !important;
  max-height: 112px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 14px auto !important;
}

.login-logo-wrap {
  width: 126px;
  height: 126px;
  border-radius: 28px;
  background: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 14px 38px rgba(7, 26, 58, .18);
  border: 1px solid rgba(11, 78, 162, .12);
}

/* Jika logo berada di dalam wrapper */
.login-logo-wrap img,
.login-logo-wrap .login-logo {
  width: 104px !important;
  height: 104px !important;
  max-width: 104px !important;
  max-height: 104px !important;
  margin: 0 auto !important;
}

.auth-card h1,
.auth-card h2,
.auth-card h3,
.auth-card h4,
.auth-card h5 {
  color: var(--siguwa-navy);
}

@keyframes siguwaLoginSlides {
  0%, 28% {
    background-image:
      linear-gradient(120deg, rgba(3, 20, 48, .82), rgba(7, 72, 142, .64)),
      url('../img/login_slide_1.png');
  }

  34%, 61% {
    background-image:
      linear-gradient(120deg, rgba(3, 20, 48, .82), rgba(7, 72, 142, .64)),
      url('../img/login_slide_2.png');
  }

  67%, 94% {
    background-image:
      linear-gradient(120deg, rgba(3, 20, 48, .82), rgba(7, 72, 142, .64)),
      url('../img/login_slide_3.png');
  }

  100% {
    background-image:
      linear-gradient(120deg, rgba(3, 20, 48, .82), rgba(7, 72, 142, .64)),
      url('../img/login_slide_1.png');
  }
}

/* ================================================================
   DASHBOARD TOPBAR
   ================================================================ */

.dashboard-topbar {
  background: linear-gradient(135deg, var(--siguwa-navy), var(--siguwa-blue)) !important;
  border-bottom: 1px solid rgba(244, 197, 66, .24);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff !important;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.dashboard-brand-title {
  display: block;
  font-size: 1rem;
  letter-spacing: .02em;
}

.dashboard-brand-subtitle {
  display: block;
  font-size: .76rem;
  font-weight: 500;
  color: #cfe7ff;
  margin-top: 2px;
}

.dashboard-user {
  color: #dbeeff;
  font-weight: 600;
}

.dashboard-menu-btn {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
}

.dashboard-menu-btn:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.dashboard-logout-btn {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
}

.dashboard-logout-btn:hover {
  background: #fff;
  color: var(--siguwa-blue);
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.sidebar,
.dashboard-offcanvas {
  background: linear-gradient(180deg, #061733 0%, #082c63 52%, #073d83 100%) !important;
  color: #fff;
  box-shadow: 10px 0 30px rgba(7, 26, 58, .12);
}

.sidebar {
  min-height: 100vh;
}

.sidebar-brand-panel {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  flex: 0 0 auto;
}

.sidebar-brand-panel h5 {
  color: #fff;
  font-weight: 800;
  font-size: .98rem;
}

.sidebar-brand-panel small {
  color: #b8d7ff;
  font-size: .72rem;
}

.sidebar a {
  color: #d6e9ff;
  text-decoration: none;
  display: block;
  padding: .75rem 1rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  margin-bottom: .25rem;
  font-weight: 600;
}

.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
  border-color: rgba(244, 197, 66, .25);
  color: #fff;
  box-shadow: inset 4px 0 0 var(--siguwa-gold);
}

.sidebar a i {
  color: #a9d5ff;
}

.sidebar a.active i,
.sidebar a:hover i {
  color: var(--siguwa-gold);
}

/* ================================================================
   PAGE, CARD, TABLE
   ================================================================ */

.page-shell {
  background: linear-gradient(180deg, #f4f8ff 0%, #eef4fb 100%);
  min-height: calc(100vh - 64px);
}

main.mobile-padding {
  position: relative;
}

.mobile-padding {
  padding: 1rem;
}

.mobile-padding h1,
.mobile-padding .h3 {
  color: var(--siguwa-navy);
  letter-spacing: -.02em;
}

.mobile-padding > p.text-muted,
.mobile-padding .text-muted {
  color: var(--siguwa-muted) !important;
}

.stat-card {
  border: 1px solid var(--siguwa-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 38px rgba(11, 78, 162, .08) !important;
  background: linear-gradient(180deg, #fff 0%, #fafdff 100%);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--siguwa-blue), var(--siguwa-gold));
  margin: -1rem -1rem 1rem;
}

.stat-card h3 {
  color: var(--siguwa-navy);
  font-weight: 800;
}

.stat-card .bi.fs-2,
.stat-card i.fs-2 {
  color: var(--siguwa-blue-2) !important;
}

.card {
  border: 1px solid var(--siguwa-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 16px 40px rgba(7, 26, 58, .07) !important;
}

.card-header {
  background: linear-gradient(180deg, #fff 0%, #f6fbff 100%) !important;
  border-bottom: 1px solid var(--siguwa-border) !important;
  border-radius: 22px 22px 0 0 !important;
  color: var(--siguwa-navy);
}

.table thead th {
  background: #e9f4ff !important;
  color: #0a4287 !important;
  border-bottom: 1px solid #cfe4fa !important;
}

.table-hover tbody tr:hover {
  background: #f2f8ff;
}

.badge-soft {
  background: #e7fbf8;
  color: #0f766e;
}

.badge.text-bg-success,
.badge.bg-success {
  background: linear-gradient(135deg, #0b7d57, #18a779) !important;
}

.badge.text-bg-danger,
.badge.bg-danger {
  background: linear-gradient(135deg, #b42337, #e03b52) !important;
}

.badge.text-bg-info,
.badge.bg-info {
  background: linear-gradient(135deg, #0b75bb, #1ba6e8) !important;
  color: #fff !important;
}

.alert-info {
  background: #eaf5ff;
  border-left: 5px solid var(--siguwa-blue-2);
  color: #123d69;
}

.alert-warning {
  border-left: 5px solid #f4c542;
}

.alert-danger {
  border-left: 5px solid #dc3545;
}

/* ================================================================
   CALENDAR
   ================================================================ */

.calendar-table th,
.calendar-table td {
  vertical-align: top;
}

.calendar-table td {
  transition: background .15s ease, transform .15s ease;
}

.calendar-table td:hover {
  transform: translateY(-1px);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (min-width: 992px) {
  .mobile-padding {
    padding: 2rem;
  }
}

@media (max-width: 991.98px) {
  .dashboard-brand-subtitle {
    display: none;
  }

  .dashboard-logo {
    width: 38px;
    height: 38px;
  }

  .page-shell {
    min-height: 100vh;
  }

  .sidebar {
    min-height: auto;
  }

  .offcanvas .sidebar {
    min-height: 100%;
    box-shadow: none;
  }

  .mobile-padding {
    padding: 1.25rem !important;
  }

  .auth-card {
    max-width: 92vw;
  }

  .login-page .auth-card img,
  .login-page .login-logo,
  .login-page .auth-logo,
  .login-page .brand-logo {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
  }

  .login-logo-wrap {
    width: 112px;
    height: 112px;
  }

  .login-logo-wrap img,
  .login-logo-wrap .login-logo {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
  }
}
/* ================================================================
   FORCE FIX LOGO DASHBOARD & LOGIN
   ================================================================ */

/* Topbar dashboard logo wrapper */
.dashboard-topbar .dashboard-logo-box {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 4px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22) !important;
    flex: 0 0 46px !important;
}

/* Logo image inside dashboard topbar */
.dashboard-topbar .dashboard-logo-box img.dashboard-logo,
.dashboard-topbar img.dashboard-logo {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Login logo wrapper */
.login-logo-box,
.login-logo-wrap {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    margin: 0 auto 16px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-radius: 28px !important;
    box-shadow: 0 14px 38px rgba(7, 26, 58, .18) !important;
    overflow: hidden !important;
}

/* Login logo image */
.login-logo-box img,
.login-logo-wrap img,
.login-page .auth-card img.login-logo,
.login-page .auth-card img.login-logo-img,
.login-page .auth-card img.auth-logo {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Jangan biarkan brand melebar karena logo */
.dashboard-brand {
    max-width: 70vw;
    overflow: hidden;
}

.dashboard-brand-copy {
    min-width: 0;
}

.dashboard-brand-title,
.dashboard-brand-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}