/* SIPROSKI overrides for SNEAT: spacing, contrast, readability */

/* Base readability */
body {
  color: #1f324a;
  font-weight: 400;
}

.text-muted,
.text-muted.small,
.small.text-muted {
  color: #3f5878 !important;
  opacity: 1 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.fw-semibold {
  color: #2b3a50;
}

/* Topbar spacing + clarity */
.layout-navbar.navbar-detached {
  margin: 0.9rem 1.2rem 0 !important;
  border-radius: 0.85rem !important;
  min-height: 70px;
  padding: 0.6rem 1rem;
  box-shadow: 0 6px 18px rgba(67, 89, 113, 0.08);
}

/* Force topbar width to match content area edge-to-edge in layout-page */
.layout-content-navbar .layout-page .layout-navbar.navbar-detached,
.layout-navbar-fixed .layout-content-navbar .layout-page .layout-navbar.navbar-detached {
  width: calc(100% - 2.4rem) !important;
  max-width: none !important;
}

.layout-navbar .nav-item .fw-semibold {
  font-size: 1.05rem;
  color: #425466;
}

/* Content spacing */
.container-p-y {
  padding-top: 1.1rem !important;
  padding-bottom: 1.4rem !important;
}

.page-header {
  margin-bottom: 1.1rem;
}

/* Sidebar readability */
.layout-menu .sip-brand {
  min-height: 84px;
  padding: 1rem 1rem 0.9rem;
  display: flex;
  align-items: center;
}

.layout-menu .sip-brand-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.layout-menu .sip-brand .app-brand-logo {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layout-menu .sip-brand .app-brand-logo i {
  font-size: 1.38rem !important;
}

.layout-menu .sip-brand-text {
  font-size: 1.22rem;
  font-weight: 800 !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #2b3a50;
  line-height: 1;
}

.layout-menu .menu-link {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.layout-menu .menu-link div,
.layout-menu .menu-link {
  color: #566a7f;
}

.layout-menu .menu-item.active > .menu-link,
.layout-menu .menu-item.active > .menu-link div {
  color: #696cff !important;
}

.layout-menu .menu-header {
  color: #7a8ca5 !important;
}

/* Card polish */
.card {
  border: 1px solid #e9edf4;
  box-shadow: 0 4px 12px rgba(67, 89, 113, 0.06);
}

.card .card-title,
.card h5,
.card h6 {
  color: #22364f;
}

.card p,
.card div,
.card span,
.card td,
.card th {
  color: inherit;
}

/* Dashboard KPI cards */
.stat-card .stat-label {
  font-size: 1.05rem;
  font-weight: 500;
  color: #3b4f69;
}

.stat-card .stat-value {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: #2b3a50;
}

.stat-card .stat-sub {
  font-size: 1.02rem;
  color: #4f6581;
}

.stat-card .stat-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.02rem;
  background: rgba(79, 124, 255, 0.14);
  color: #3f68d8;
}

.stat-card .stat-icon.is-primary {
  background: rgba(79, 124, 255, 0.14);
  color: #3f68d8;
}

.stat-card .stat-icon.is-warning {
  background: rgba(232, 163, 41, 0.18);
  color: #a86f09;
}

.stat-card .stat-icon.is-success {
  background: rgba(69, 185, 124, 0.16);
  color: #2f8f61;
}

.stat-card .stat-icon.is-info {
  background: rgba(87, 124, 170, 0.16);
  color: #3d5776;
}

.stat-card .stat-icon.is-dark {
  background: rgba(51, 74, 114, 0.14);
  color: #334a72;
}

/* Buttons and badges */
.btn {
  font-weight: 500;
}

.app-action-buttons {
  gap: 0.6rem !important;
}

.app-action-buttons .btn {
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.app-action-buttons .btn.btn-sm {
  min-height: 36px;
  padding: 0.45rem 0.8rem;
}

.app-action-buttons .btn i {
  font-size: 0.95rem;
  line-height: 1;
}

/* Reusable action button sizing across modules */
.btn-sip-action {
  min-height: 40px;
  padding: 0.52rem 0.95rem;
  border-radius: 0.58rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-sip-action i {
  font-size: 0.9rem;
  line-height: 1;
}

.btn-sip-action-sm {
  min-height: 32px;
  padding: 0.34rem 0.62rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  font-weight: 500;
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-sip-action-sm i {
  font-size: 0.82rem;
  line-height: 1;
}

/* Uniform small action buttons in module content (Detail, Tracking, Lihat Semua) */
.content-wrapper .btn.btn-sm {
  min-height: 32px;
  padding: 0.34rem 0.62rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  font-weight: 500;
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
}

.content-wrapper .btn.btn-sm i {
  font-size: 0.82rem;
  line-height: 1;
}

/* Dense table action zone */
.content-wrapper .table td .d-flex.gap-2 {
  gap: 0.42rem !important;
}

.content-wrapper .table .form-select-sm {
  min-height: 32px;
  padding-top: 0.24rem;
  padding-bottom: 0.24rem;
  font-size: 0.84rem;
}

.badge {
  font-weight: 600;
}

/* Improve readability for success/warning/info notifications and outline buttons */
.alert-success {
  background-color: #e8f5e9 !important;
  border-color: #b7dfbb !important;
  color: #1f5e2f !important;
}

.alert-danger {
  color: #7a1f2d !important;
}

.alert-warning {
  color: #6b4a08 !important;
}

.alert-info {
  color: #134a6e !important;
}

.btn-outline-success {
  color: #2d8f35 !important;
  border-color: #66c26c !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  color: #ffffff !important;
  background-color: #2d8f35 !important;
  border-color: #2d8f35 !important;
}

/* Toast contrast fix */
.toast.bg-success {
  background-color: #2f9e44 !important;
  color: #ffffff !important;
}

.toast.bg-danger {
  background-color: #c0392b !important;
  color: #ffffff !important;
}

.toast.bg-warning {
  background-color: #f0b429 !important;
  color: #2f2a1e !important;
}

.toast.bg-info {
  background-color: #2f80c6 !important;
  color: #ffffff !important;
}

.toast .toast-body {
  font-weight: 500;
  line-height: 1.35;
}

.toast .btn-close {
  opacity: 0.9;
}

/* Table text contrast */
.table > :not(caption) > * > * {
  color: #2d435f;
}

.table thead th {
  color: #3f5878;
  font-weight: 600;
}

/* Modern clean table style (SaaS-like) */
.table-modern {
  border-collapse: collapse;
}

.table-modern thead th {
  background: transparent;
  border-top: 0;
  border-bottom: 1px solid #d9e3f0 !important;
  color: #5f7390;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.table-modern tbody td {
  border-top: 0 !important;
  border-bottom: 1px solid #e6edf7 !important;
  padding: 1rem;
  vertical-align: middle;
  color: #2d435f;
}

.table-modern tbody tr:last-child td {
  border-bottom: 0 !important;
}

.table-modern.table-hover tbody tr:hover {
  background: #f8fbff;
}

.table-dosen-dashboard td .btn {
  min-height: 34px;
}

/* Session area contrast */
.accordion-item {
  border-color: #dbe4f2;
  background-color: #fff;
}

.accordion-button {
  color: #24405f;
  background: #f8fbff;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  color: #1f3f63;
  background: #f0f6ff;
}

.form-label {
  color: #3a5372;
  font-weight: 600;
}

.form-text {
  color: #4d6686 !important;
}

/* Timeline refresh (global + tracking custom) */
.timeline,
.siproski-timeline {
  position: relative;
}

/* Legacy tracking timeline layout (moved from inline view styles) */
.siproski-timeline {
  padding-left: 2.25rem;
}

.siproski-timeline::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0.25rem;
  bottom: 0.25rem;
}

.siproski-timeline-item {
  position: relative;
  padding: 0.25rem 0 1.25rem;
}

.siproski-timeline-dot {
  position: absolute;
  left: 0.625rem;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 3px solid #fff;
}

/* Keep round status icon perfectly centered and clean */
.siproski-track-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 2.3rem;
  box-shadow: 0 2px 8px rgba(52, 66, 90, 0.16);
}

.siproski-track-icon i {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
  transform: translateY(-0.5px);
}

.timeline::before,
.siproski-timeline::before {
  background: linear-gradient(180deg, #d5def2 0%, #c8d5ee 100%) !important;
  width: 3px !important;
  border-radius: 99px;
}

.timeline-item .timeline-card {
  border: 1px solid #e2e8f5;
  box-shadow: 0 4px 14px rgba(67, 89, 113, 0.07);
}

.timeline-item .timeline-card .card-body {
  color: #2f4056;
}

.timeline-dot,
.siproski-timeline-dot {
  box-shadow: 0 0 0 3px #eef2fb !important;
}

.timeline .badge,
.siproski-timeline .badge {
  font-weight: 700;
}

.timeline small.text-muted,
.timeline .text-muted.small,
.siproski-timeline small.text-muted,
.siproski-timeline .text-muted.small {
  color: #5a7090 !important;
}

.timeline .text-body,
.siproski-timeline .mt-2,
.siproski-timeline .mt-2 * {
  color: #34495f !important;
}

/* Timeline status palette (consistent on all timeline variants) */
.timeline,
.siproski-timeline {
  --st-primary: #4f7cff;      /* SUBMITTED */
  --st-warning: #e8a329;      /* NEED_REVISION */
  --st-success: #45b97c;      /* APPROVED */
  --st-dark: #334a72;         /* FINAL_APPROVED */
  --st-secondary: #6b7a90;    /* REVISION_SUBMITTED / DRAFT */
}

.timeline .bg-primary,
.siproski-timeline .bg-primary {
  background-color: var(--st-primary) !important;
}

.timeline .bg-warning,
.siproski-timeline .bg-warning {
  background-color: var(--st-warning) !important;
}

.timeline .bg-success,
.siproski-timeline .bg-success {
  background-color: var(--st-success) !important;
}

.timeline .bg-dark,
.siproski-timeline .bg-dark {
  background-color: var(--st-dark) !important;
}

.timeline .bg-secondary,
.siproski-timeline .bg-secondary {
  background-color: var(--st-secondary) !important;
}

.timeline .text-primary,
.siproski-timeline .text-primary {
  color: var(--st-primary) !important;
}

.timeline .text-warning,
.siproski-timeline .text-warning {
  color: #b97800 !important;
}

.timeline .text-success,
.siproski-timeline .text-success {
  color: #2d8f5e !important;
}

.timeline .text-dark,
.siproski-timeline .text-dark {
  color: var(--st-dark) !important;
}

.timeline .text-secondary,
.siproski-timeline .text-secondary {
  color: #55667d !important;
}

.timeline .badge.bg-primary,
.timeline .badge.bg-warning,
.timeline .badge.bg-success,
.timeline .badge.bg-dark,
.timeline .badge.bg-secondary,
.siproski-timeline .badge.bg-primary,
.siproski-timeline .badge.bg-warning,
.siproski-timeline .badge.bg-success,
.siproski-timeline .badge.bg-dark,
.siproski-timeline .badge.bg-secondary {
  color: #fff !important;
  border: 0;
}

/* Global status badge palette (tables/lists/cards) */
.badge.bg-primary { background-color: #4f7cff !important; color: #fff !important; }
.badge.bg-warning { background-color: #e8a329 !important; color: #fff !important; }
.badge.bg-success { background-color: #45b97c !important; color: #fff !important; }
.badge.bg-dark { background-color: #334a72 !important; color: #fff !important; }
.badge.bg-secondary { background-color: #6b7a90 !important; color: #fff !important; }

/* Keep text-bg status badges consistent with timeline palette */
.badge.text-bg-primary { background-color: #4f7cff !important; color: #fff !important; }
.badge.text-bg-warning { background-color: #e8a329 !important; color: #fff !important; }
.badge.text-bg-success { background-color: #45b97c !important; color: #fff !important; }
.badge.text-bg-dark { background-color: #334a72 !important; color: #fff !important; }
.badge.text-bg-secondary { background-color: #6b7a90 !important; color: #fff !important; }

/* Auth page polish */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f6f8fb;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  width: 100%;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 8px 24px rgba(31, 50, 74, 0.08) !important;
}

.auth-card .card-body {
  padding: 28px;
}

.brand-title {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #2b3a50;
  font-size: 2rem;
}

.brand-subtitle {
  color: rgba(44, 62, 80, 0.65);
  font-size: 0.95rem;
}

.auth-title {
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #23364f;
}

.auth-subtitle {
  color: rgba(44, 62, 80, 0.65);
}

.auth-card .form-label {
  font-size: 0.78rem;
  letter-spacing: 0.35px;
}

.auth-card .form-control,
.auth-card .form-select {
  border-radius: 12px;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
}

.auth-card .btn-primary {
  width: 100%;
  border-radius: 12px;
  min-height: 44px;
  font-weight: 800;
}

.auth-footer {
  color: #4b6281;
}

.auth-footer .auth-wa {
  color: #1f3f63;
  font-weight: 700;
  text-decoration: none;
}

.auth-footer .auth-wa:hover {
  text-decoration: underline;
}

/* Remove auth ornaments/dots on login/register */
.authentication-wrapper::before,
.authentication-wrapper::after,
.authentication-inner::before,
.authentication-inner::after,
.authentication-wrapper .authentication-bg::before,
.authentication-wrapper .authentication-bg::after {
  display: none !important;
  content: none !important;
}

/* Mobile tightening */
@media (max-width: 991.98px) {
  .layout-navbar.navbar-detached {
    margin: 0.7rem 0.8rem 0 !important;
    min-height: 62px;
    padding: 0.5rem 0.75rem;
  }

  .layout-content-navbar .layout-page .layout-navbar.navbar-detached,
  .layout-navbar-fixed .layout-content-navbar .layout-page .layout-navbar.navbar-detached {
    width: calc(100% - 1.6rem) !important;
  }

  .container-p-y {
    padding-top: 0.9rem !important;
  }

  .app-action-buttons {
    width: 100%;
  }

  .app-action-buttons .btn {
    width: 100%;
  }

  .layout-menu .sip-brand {
    min-height: 72px;
    padding: 0.85rem 0.85rem 0.75rem;
  }

  .layout-menu .sip-brand-text {
    font-size: 1.08rem;
  }

  .auth-wrap {
    padding: 16px;
    align-items: flex-start;
  }

  .auth-card .card-body {
    padding: 22px 18px;
  }
}
