:root {
  --green-dark: #064e3b;
  --green-main: #10b981;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.link-clean,
.link-clean:hover,
.link-clean:focus,
.link-clean:active,
.link-clean:visited {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(180deg, #f7faf9 0%, #f1f5f9 100%);
}

.sidebar {
  width: 280px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--green-dark) 0%, #0b6b52 100%);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.35rem;
}

.sidebar-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: #052e16;
  background: #34d399;
}

.sidebar-link.active {
  color: #052e16;
  background: #a7f3d0;
  font-weight: 600;
}

.sidebar-sub {
  margin-left: 0.75rem;
  padding-left: 0.95rem;
  font-size: 0.95rem;
}

.sidebar-toggle {
  justify-content: space-between;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-toggle-icon {
  transition: transform 0.2s ease;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-toggle-icon {
  transform: rotate(180deg);
}

#pengaturanMenu {
  margin-top: 0.2rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.main-content {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brand-wrap {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.55rem 0.55rem;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  margin-bottom: 0.8rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}

.brand-wrap:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.brand-wrap:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.brand-wrap img {
  height: 140px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease;
}

.brand-wrap:hover img {
  transform: scale(1.05);
}

.brand-wrap .small {
  display: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  opacity: 0.85;
}

.brand-wrap .h5 {
  display: none;
  font-size: 1.1rem;
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.topbar {
  padding: 0.9rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
}

.topbar-left {
  text-align: left;
}

.topbar-center {
  text-align: center;
}

.topbar-right {
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

.profile-toggle {
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.card {
  border-radius: 0.95rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(circle at top, #d1fae5, #f1f5f9 52%);
}

.login-box {
  width: 100%;
  max-width: 450px;
}

.inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline > * {
  width: auto;
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    text-align: center !important;
  }
  
  .topbar-left,
  .topbar-center,
  .topbar-right {
    text-align: center !important;
  }
  
  .topbar-right {
    justify-content: center;
  }

  .main-content {
    padding: 1rem;
  }
}

.landing-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top, #d1fae5, #f1f5f9 52%);
}

.landing-blur {
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  pointer-events: none;
  z-index: 0;
}

.landing-blur.one {
  width: 280px;
  height: 280px;
  left: -70px;
  top: -60px;
  background: rgba(16, 185, 129, 0.32);
}

.landing-blur.two {
  width: 280px;
  height: 280px;
  right: -70px;
  bottom: -60px;
  background: rgba(6, 78, 59, 0.24);
}

.landing-topbar,
.landing-shell main {
  position: relative;
  z-index: 1;
}

.landing-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.landing-brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-kemenag-static {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  color: #ffffff;
  background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
  text-decoration: none;
  padding: 0.58rem 0.8rem;
  border-radius: 1rem;
  border: 0;
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.landing-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(6, 78, 59, 0.34);
  filter: saturate(1.08);
}

.landing-brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.landing-brand .logo-tracer {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(6, 78, 59, 0.22));
}

.landing-brand-copy {
  position: relative;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.025em;
  text-align: left;
  text-wrap: balance;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 4px 12px rgba(6, 78, 59, 0.15);
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(6, 78, 59, 0.2);
}

.landing-login-btn {
  border-radius: 999px;
  border: 1px solid rgba(6, 78, 59, 0.12);
  padding-inline: 1rem;
  font-weight: 600;
  color: #14532d;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.landing-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #047857;
  font-weight: 700;
}

.landing-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.18;
  color: #052e16;
  margin-bottom: 0.7rem;
}

.landing-subtitle {
  color: #334155;
  font-size: 1rem;
  max-width: 60ch;
}

.landing-upload {
  border-radius: 0.95rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.landing-intro {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 0.5rem;
}

.landing-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.landing-flow span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid #d1fae5;
  background: #f0fdf4;
  color: #065f46;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.62rem;
}

.file-picker-ui {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.5rem;
  background: #ffffff;
}

.file-name-label {
  flex: 1;
  min-width: 0;
  color: #64748b;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-name-label.has-file {
  color: #0f172a;
  font-weight: 600;
}

.landing-rules-slider {
  border-radius: 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.rule-slide-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.85rem 0.9rem;
  min-height: 190px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rule-slide-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.rule-slide-title {
  font-weight: 700;
  color: #064e3b;
  margin-bottom: 0.55rem;
}

.landing-rules-slider .carousel-indicators [data-bs-target] {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #94a3b8;
}

.landing-rules-slider .carousel-indicators .active {
  background-color: #059669;
}

.landing-quick-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.landing-quick-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #14532d;
  background: #f0fdf4;
  border: 1px solid #d1fae5;
  text-align: center;
}

.landing-upload-btn {
  background: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  min-height: 42px;
  border-radius: 0.65rem;
  transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.2s ease;
}

.landing-upload-btn:hover {
  color: #fff;
  filter: brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(5, 150, 105, 0.2);
}

.landing-upload-btn:active {
  transform: translateY(0);
}

.upload-progress-area {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.95rem;
  padding: 0.95rem 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.upload-progress-area.is-visible,
.upload-progress-area.is-complete {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.upload-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.upload-progress-title {
  font-weight: 700;
  color: #064e3b;
  line-height: 1.2;
}

.upload-progress-hint {
  color: #475569;
  font-size: 0.9rem;
}

.upload-progress-value {
  font-weight: 700;
  color: #047857;
  font-size: 0.9rem;
}

.upload-progress-bar-wrap {
  height: 0.62rem;
  border-radius: 999px;
  background: #dcfce7;
}

.upload-progress-bar {
  background: linear-gradient(90deg, #059669 0%, #10b981 45%, #34d399 100%);
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.upload-progress-steps {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.upload-progress-steps span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  transition: all 0.22s ease;
}

.upload-progress-steps span.active {
  border-color: #6ee7b7;
  background: #ecfdf5;
  color: #065f46;
}

.upload-progress-steps span.done {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
}

.upload-toast-wrap {
  width: min(94vw, 420px);
}

.upload-success-toast {
  box-shadow: 0 16px 36px rgba(6, 78, 59, 0.3);
}

.landing-checklist-compact {
  padding-left: 1rem;
  color: #334155;
  font-size: 0.9rem;
}

.landing-checklist-compact li {
  margin-bottom: 0.35rem;
}

.landing-footer {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.landing-footer-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #064e3b;
  letter-spacing: 0.02em;
}

.landing-footer-desc {
  margin-top: 0.2rem;
  color: #475569;
  font-size: 0.83rem;
}

.landing-footer-tagline {
  margin-top: 0.15rem;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 600;
}

.landing-footer-dev {
  padding-top: 0.85rem;
  margin-top: 0.65rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.landing-reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  .landing-quick-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-slide-card {
    min-height: 170px;
  }
}

@media (max-width: 575.98px) {
  .landing-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-login-btn {
    width: 100%;
  }

  .logo-kemenag-static {
    width: 56px;
    height: 56px;
  }

  .landing-brand .logo-tracer {
    width: 74px;
    height: 74px;
  }

  .landing-brand-copy {
    font-size: 0.82rem;
    line-height: 1.25;
    padding: 0.38rem 0.55rem;
    letter-spacing: 0.02em;
  }

  .upload-progress-head {
    flex-direction: column;
  }

  .landing-quick-meta {
    grid-template-columns: 1fr;
  }

  .landing-flow {
    gap: 0.4rem;
  }

  .landing-flow span {
    width: 100%;
    justify-content: center;
  }

  .file-picker-ui {
    flex-direction: column;
    align-items: stretch;
    padding: 0.45rem;
    gap: 0.45rem;
  }

  .landing-title {
    font-size: 1.3rem;
    line-height: 1.22;
  }

  .landing-subtitle {
    font-size: 0.9rem;
  }

  .rule-slide-card {
    min-height: 152px;
    padding: 0.7rem 0.75rem;
  }

  .landing-checklist-compact {
    font-size: 0.84rem;
    padding-left: 0.9rem;
  }

  .landing-footer-desc,
  .landing-footer-tagline {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-reveal,
  .landing-upload-btn,
  .rule-slide-card {
    transition: none !important;
  }

  .landing-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Center form styling */
.bg-info-light {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(13, 110, 253, 0.04) 100%) !important;
  border-color: rgba(13, 110, 253, 0.2) !important;
}

.landing-upload .card-body {
  background: rgba(255, 255, 255, 0.95);
}
