* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    Inter,
    Arial,
    sans-serif;

  background: #f4f6f9;
  color: #1f2937;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =====================================================
   LOGIN
===================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  box-shadow:
    0 10px 40px
    rgba(0, 0, 0, 0.08);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo h1 {
  margin: 0;
  font-size: 24px;
}

.login-logo p {
  color: #6b7280;
  margin: 8px 0 0;
}

.login-logo-image {
  width: 105px;
  height: 105px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
}

.form-control:focus {
  border-color: #2563eb;
}

.btn {
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #1f2937;
}

.btn-primary {
  background: #2563eb;
}

.btn-success {
  background: #059669;
}

.btn-danger {
  background: #dc2626;
}

.btn-secondary {
  background: #6b7280;
}

.btn-block {
  width: 100%;
}

.alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
}


/* =====================================================
   APP
===================================================== */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #111827;
  color: #ffffff;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 22px;
  border-bottom:
    1px solid
    rgba(255,255,255,.08);
}

.sidebar-brand strong {
  display: block;
  font-size: 17px;
}

.sidebar-brand span {
  font-size: 12px;
  opacity: .65;
}

.sidebar-menu {
  padding: 14px;
}

.menu-label {
  font-size: 11px;
  opacity: .5;
  padding: 12px 10px 6px;
}

.menu-item {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.menu-item:hover,
.menu-item.active {
  background:
    rgba(255,255,255,.10);
  color: #ffffff;
}

.main {
  flex: 1;
  margin-left: 260px;
}

.topbar {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-user {
  font-size: 13px;
}

.content {
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
}

.page-header p {
  margin: 5px 0 0;
  color: #6b7280;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow:
    0 2px 10px
    rgba(0,0,0,.04);
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar .search {
  flex: 1;
  min-width: 240px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f9fafb;
  font-size: 12px;
  color: #4b5563;
}

td {
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 6px;
}

.actions .btn {
  min-height: auto;
  padding: 7px 10px;
  font-size: 12px;
}

.pagination {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* =====================================================
   MODAL
===================================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  padding: 24px;
  border-radius: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0,1fr));
  gap: 16px;
}

.form-full {
  grid-column: 1 / -1;
}

.modal-footer {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


@media(max-width:800px) {

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

}

/* =====================================================
   SISFO UNIFIED LAYOUT
===================================================== */

:root {
  --sisfo-primary: #0065a8;
  --sisfo-primary-deep: #07466f;
  --sisfo-background: #f3f7fb;
  --sisfo-text: #243746;
  --sisfo-text-soft: #738696;
  --sisfo-border: #dfe8ef;
  --sisfo-sidebar-width: 260px;
}


body {
  background: var(--sisfo-background);
}


.app-shell {
  min-height: 100vh;
}


.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;

  display: flex;
  flex-direction: column;

  width: var(--sisfo-sidebar-width);
  height: 100vh;

  color: var(--sisfo-text);
  background: #ffffff;

  border-right:
    1px solid #dce6ee;
}


.sidebar-header {
  position: relative;

  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 88px;
  padding: 16px;

  border-bottom:
    1px solid #edf2f6;
}


.sidebar-logo {
  display: flex;

  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: #ffffff;

  border:
    1px solid #dae6ee;

  border-radius: 50%;
}


.sidebar-logo img {
  width: 116%;
  height: 116%;
  object-fit: contain;
}


.sidebar-brand {
  min-width: 0;
}


.sidebar-brand strong {
  display: block;

  color:
    var(--sisfo-primary-deep);

  font-size: 15px;
  font-weight: 900;
}


.sidebar-brand span {
  display: block;

  margin-top: 3px;

  color:
    var(--sisfo-text-soft);

  font-size: 10px;
}


.sidebar-navigation {
  flex: 1;

  overflow-y: auto;

  padding:
    12px 9px 20px;
}


.nav-section {
  margin:
    19px 10px 8px;

  color: #94a5b4;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 1px;
}


.nav-item {
  display: flex;

  min-height: 45px;

  align-items: center;

  gap: 10px;

  margin-bottom: 3px;

  padding:
    9px 11px;

  color: #36566e;

  border-radius: 9px;

  font-size: 13px;
  font-weight: 700;
}


.nav-item:hover {
  color:
    var(--sisfo-primary);

  background:
    #f2f8fc;
}


.nav-item.active {
  color:
    var(--sisfo-primary);

  background:
    #e7f3fc;
}


.nav-icon {
  display: flex;

  width: 29px;
  height: 29px;

  flex: 0 0 29px;

  align-items: center;
  justify-content: center;

  color:
    var(--sisfo-primary);

  background:
    #edf6fc;

  border-radius: 7px;

  font-size: 11px;
  font-weight: 900;
}


.sidebar-account {
  display: flex;

  min-height: 76px;

  align-items: center;

  gap: 10px;

  padding:
    13px 15px;

  background:
    #f8fbfd;

  border-top:
    1px solid #e5edf3;
}


.user-avatar {
  display: flex;

  width: 40px;
  height: 40px;

  flex: 0 0 40px;

  align-items: center;
  justify-content: center;

  color:
    var(--sisfo-primary);

  background:
    #e7f3fc;

  border-radius: 50%;

  font-size: 12px;
  font-weight: 900;
}


.sidebar-account-info {
  min-width: 0;
}


.sidebar-account-info strong,
.header-account-info strong {
  display: block;

  color:
    var(--sisfo-text);

  font-size: 12px;
}


.sidebar-account-info span,
.header-account-info span {
  display: block;

  margin-top: 3px;

  color:
    var(--sisfo-text-soft);

  font-size: 10px;

  text-transform:
    uppercase;
}


.main-shell {
  display: flex;

  min-height: 100vh;

  margin-left:
    var(--sisfo-sidebar-width);

  flex-direction: column;
}


.global-header {
  position: sticky;
  top: 0;
  z-index: 90;

  display: flex;

  min-height: 84px;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding:
    14px
    clamp(18px, 2vw, 34px);

  background:
    rgba(255,255,255,.97);

  border-bottom:
    1px solid var(--sisfo-border);

  backdrop-filter:
    blur(10px);
}


.header-left,
.header-right,
.header-account {
  display: flex;
  align-items: center;
}


.header-left {
  min-width: 0;
  gap: 13px;
}


.header-right {
  gap: 14px;
}


.page-heading h1 {
  margin: 0;

  color:
    var(--sisfo-primary-deep);

  font-size:
    clamp(24px, 1.8vw, 30px);
}


.page-heading p {
  margin:
    5px 0 0;

  color:
    var(--sisfo-text-soft);

  font-size: 12px;
}


.header-date {
  color:
    var(--sisfo-text-soft);

  font-size: 10px;
  font-weight: 700;

  text-align: right;
}


.header-account {
  gap: 10px;
}


.logout-button {
  min-height: 40px;

  padding:
    8px 14px;

  color: #b42318;

  background:
    #ffffff;

  border:
    1px solid #f0c6c2;

  border-radius: 8px;

  font-weight: 800;
}


.global-content {
  flex: 1;

  width: 100%;

  padding:
    clamp(18px,1.6vw,30px)
    clamp(18px,2vw,38px)
    36px;
}


.global-footer {
  display: flex;

  min-height: 42px;

  align-items: center;
  justify-content: space-between;

  padding:
    10px
    clamp(18px,2vw,34px);

  color: #8193a2;

  background: #ffffff;

  border-top:
    1px solid #e2eaf0;

  font-size: 10px;
}


.sidebar-toggle,
.sidebar-close {
  display: none;
}


.sidebar-overlay {
  display: none;
}


@media (max-width: 1024px) {

  .sidebar {
    width: 270px;

    transform:
      translateX(-100%);

    transition:
      transform .2s ease;
  }


  .sidebar.open {
    transform:
      translateX(0);
  }


  .main-shell {
    margin-left: 0;
  }


  .sidebar-toggle {
    display: flex;

    width: 39px;
    height: 39px;

    align-items: center;
    justify-content: center;

    color:
      var(--sisfo-primary);

    background:
      #eaf4fc;

    border: 0;
    border-radius: 9px;
  }


  .sidebar-close {
    position: absolute;

    top: 16px;
    right: 10px;

    display: flex;

    width: 31px;
    height: 31px;

    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;
  }


  .sidebar-overlay.active {
    position: fixed;
    inset: 0;

    z-index: 110;

    display: block;

    background:
      rgba(5,30,49,.52);
  }

}


@media (max-width: 640px) {

  .global-header {
    min-height: 72px;

    padding:
      12px 15px;
  }


  .page-heading h1 {
    font-size: 19px;
  }


  .page-heading p,
  .header-account,
  .header-date {
    display: none;
  }


  .global-content {
    padding: 15px;
  }


  .global-footer {
    align-items: flex-start;

    flex-direction: column;

    gap: 4px;

    padding:
      10px 15px;
  }

}

/* =====================================================
   DATA PAGE
===================================================== */

.peserta-page {
  width: 100%;
}


.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 18px;
}


.page-toolbar-search {
  width: 100%;
  max-width: 520px;
}


.page-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}


.form-control {
  width: 100%;
  height: 44px;

  padding: 0 14px;

  color: #243746;
  background: #ffffff;

  border:
    1px solid #d9e4ec;

  border-radius: 9px;

  outline: none;

  font-family: inherit;
  font-size: 13px;

  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}


.form-control:focus {
  border-color: #1685c2;

  box-shadow:
    0 0 0 3px
    rgba(22, 133, 194, .10);
}


.button {
  display: inline-flex;

  min-height: 42px;

  align-items: center;
  justify-content: center;

  padding: 8px 15px;

  border:
    1px solid transparent;

  border-radius: 8px;

  cursor: pointer;

  font-family: inherit;
  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
}


.button-primary {
  color: #ffffff;

  background:
    #0065a8;

  border-color:
    #0065a8;
}


.button-primary:hover {
  background:
    #075789;
}


.button-secondary {
  color:
    #47677e;

  background:
    #ffffff;

  border-color:
    #d8e4ec;
}


.button-secondary:hover:not(:disabled) {
  color:
    #0065a8;

  background:
    #f2f8fc;
}


.button:disabled {
  cursor:
    not-allowed;

  opacity: .45;
}


/* =====================================================
   DATA CARD
===================================================== */

.data-card {
  overflow: hidden;

  background:
    #ffffff;

  border:
    1px solid #dfe8ef;

  border-radius:
    12px;

  box-shadow:
    0 3px 14px
    rgba(21, 50, 71, .04);
}


.data-card-header {
  display: flex;

  min-height: 72px;

  align-items: center;
  justify-content: space-between;

  padding:
    16px 20px;

  border-bottom:
    1px solid #edf2f6;
}


.data-card-header h2 {
  margin: 0;

  color:
    #24475f;

  font-size:
    16px;

  font-weight:
    900;
}


.data-card-header p {
  margin:
    5px 0 0;

  color:
    #8394a1;

  font-size:
    11px;
}


/* =====================================================
   TABLE
===================================================== */

.table-responsive {
  width: 100%;

  overflow-x: auto;
}


.data-table {
  width: 100%;

  border-collapse:
    collapse;

  font-size:
    12px;
}


.data-table th {
  padding:
    12px 14px;

  color:
    #698091;

  background:
    #f8fafc;

  border-bottom:
    1px solid #e5edf3;

  font-size:
    10px;

  font-weight:
    900;

  letter-spacing:
    .3px;

  text-align:
    left;

  text-transform:
    uppercase;

  white-space:
    nowrap;
}


.data-table td {
  padding:
    13px 14px;

  color:
    #405c70;

  border-bottom:
    1px solid #edf2f6;

  vertical-align:
    middle;
}


.data-table tbody tr:hover {
  background:
    #fbfdff;
}


.data-table tbody tr:last-child td {
  border-bottom: 0;
}


.table-number {
  width: 60px;

  text-align:
    center !important;
}


.table-action {
  width: 140px;

  text-align:
    center !important;
}


.participant-name strong {
  display: block;

  color:
    #24475f;

  font-size:
    12px;
}


.participant-name small {
  display: block;

  margin-top:
    4px;

  color:
    #92a1ad;

  font-size:
    9px;
}


.contact-cell span {
  display: block;
}


.contact-cell small {
  display: block;

  margin-top:
    4px;

  color:
    #8194a3;

  font-size:
    10px;
}


.table-message {
  padding:
    35px 20px !important;

  color:
    #8193a2 !important;

  text-align:
    center !important;
}


.table-error {
  color:
    #b42318 !important;

  background:
    #fff8f7;
}


.table-loading {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 9px;
}


.mini-spinner {
  width: 16px;
  height: 16px;

  border:
    2px solid #dce9f2;

  border-top-color:
    #0065a8;

  border-radius:
    50%;

  animation:
    miniSpin .7s linear infinite;
}


@keyframes miniSpin {

  to {
    transform:
      rotate(360deg);
  }

}


/* =====================================================
   TABLE ACTION
===================================================== */

.table-action-buttons {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 6px;
}


.action-button {
  min-height:
    30px;

  padding:
    5px 9px;

  background:
    #ffffff;

  border:
    1px solid #dce6ed;

  border-radius:
    6px;

  cursor:
    pointer;

  font-family:
    inherit;

  font-size:
    10px;

  font-weight:
    800;
}


.action-detail {
  color:
    #0065a8;
}


.action-detail:hover {
  background:
    #edf7fd;
}


.action-edit {
  color:
    #9a6700;
}


.action-edit:hover {
  background:
    #fff9e8;
}


/* =====================================================
   PAGINATION
===================================================== */

.data-card-footer {
  display: flex;

  min-height:
    64px;

  align-items: center;
  justify-content: space-between;

  gap:
    15px;

  padding:
    12px 20px;

  background:
    #fbfcfd;

  border-top:
    1px solid #e9eff4;
}


.pagination-info {
  color:
    #7c909f;

  font-size:
    10px;
}


.pagination-actions {
  display: flex;

  align-items: center;

  gap:
    10px;
}


.pagination-page {
  min-width:
    100px;

  color:
    #597386;

  font-size:
    10px;

  font-weight:
    800;

  text-align:
    center;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {

  .page-toolbar {
    align-items:
      stretch;

    flex-direction:
      column;
  }


  .page-toolbar-search {
    max-width:
      none;
  }


  .page-toolbar-actions .button {
    width:
      100%;
  }


  .data-card-footer {
    align-items:
      stretch;

    flex-direction:
      column;
  }


  .pagination-actions {
    justify-content:
      space-between;
  }


  .header-right .logout-button {
    padding:
      7px 10px;
  }

}