* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 98%;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #263238;
}

body {
    min-height: 100vh;
}

.cakama-app {
    min-height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #223378;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: width .25s ease;
    z-index: 1000;
}

.brand {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: white;
    color: #123b2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: 20px;
}

.brand-text small {
    font-size: 10px;
    opacity: .8;
    line-height: 1.3;
}


/* MENU */

.sidebar-menu {
    padding: 15px 10px 30px;
}

.menu-section {
    font-size: 10px;
    font-weight: bold;
    opacity: .55;
    margin: 18px 10px 8px;
    letter-spacing: .7px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin-bottom: 3px;
    color: rgba(255,255,255,.88);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: .2s;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,.10);
    color: white;
}


/* CONTENT */

.main-content {
    width: calc(100% - 260px);
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left .25s ease,
                width .25s ease;
}


/* TOPBAR */

.topbar {
    height: 70px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}

.topbar > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-info strong {
    font-size: 13px;
}

.user-info small {
    font-size: 11px;
    color: #777;
}


/* CONTENT */

.page-content {
    padding: 25px;
    min-height: calc(100vh - 120px);
}

.footer {
    min-height: 50px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px;
    font-size: 11px;
    color: #777;
}


/* MOBILE */

@media (max-width: 768px) {

    .sidebar {
        width: 230px;
        transform: translateX(-100%);
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        padding: 0 15px;
    }

    .page-content {
        padding: 15px;
    }

    .footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

}
.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.welcome-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 25px;
}

.welcome-card p {
    color: #667085;
    line-height: 1.6;
}

/* =====================================================
   KEGIATAN
   ===================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  color: #172351;
}

.page-header p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}


/* RINGKASAN */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.summary-label {
  font-size: 13px;
  color: #667085;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 25px;
  font-weight: bold;
  color: #172351;
}


/* FILTER */

.filter-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 1.5fr 1fr;
  gap: 15px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #475467;
  margin-bottom: 6px;
}

.form-control,
.form-select {
  width: 100%;
  height: 40px;
  padding: 8px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: white;
  color: #263238;
  font-size: 13px;
  outline: none;
}

.form-control:focus,
.form-select:focus {
  border-color: #172351;
  box-shadow: 0 0 0 2px rgba(23,35,81,.08);
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* BUTTON */

.btn-cakama {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.btn-primary {
  background: #172351;
  color: white;
}

.btn-primary:hover {
  background: #101a3d;
  color: white;
}

.btn-secondary {
  background: white;
  color: #475467;
  border-color: #d0d5dd;
}

.btn-secondary:hover {
  background: #f8f9fa;
}
.btn-succes {
  background: rgb(22, 102, 0);
  color: #cad7eb;
  border-color: #d0d5dd;
}

.btn-succes:hover {
  background: #5aad5a;
  color: rgb(1, 3, 1);
}
.btn-danger {
    border: 1px solid #dc2626 !important;
    background: #fff !important;
    color: #dc2626 !important;
}

.btn-danger:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
}
/* TABLE */

.table-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.cakama-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cakama-table th {
  background: #f8f9fb;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #eaecf0;
  white-space: nowrap;
}

.cakama-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #eaecf0;
  vertical-align: middle;
}

.cakama-table tbody tr:hover {
  background: #fafbfc;
}

.table-number {
  width: 45px;
  color: #667085;
  text-align: center;
}

.table-main {
  font-weight: 600;
  color: #172351;
}

.table-code {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #98a2b3;
}

.table-sub {
  color: #344054;
}

.text-muted {
  color: #98a2b3;
}

.text-right {
  text-align: right;
  white-space: nowrap;
}


/* STATUS */

.status-badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-rencana {
  background: #eef2f6;
  color: #475467;
}

.status-siap {
  background: #e8f4fd;
  color: #1769aa;
}

.status-berjalan {
  background: #fff4d6;
  color: #9a6700;
}

.status-selesai {
  background: #e8f7ee;
  color: #18794e;
}

.status-dibatalkan {
  background: #fdecec;
  color: #b42318;
}


/* EMPTY */

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #667085;
}

.empty-state-icon {
  font-size: 35px;
  margin-bottom: 10px;
}

.empty-state-title {
  font-weight: 600;
  margin-bottom: 5px;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-actions {
    grid-column: 1 / -1;
  }

}

@media (max-width: 768px) {

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    grid-column: auto;
  }

  .cakama-table {
    min-width: 950px;
  }

}
/* =====================================================
   DETAIL KEGIATAN
   ===================================================== */

.detail-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.detail-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eaecf0;
}

.detail-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #172351;
  line-height: 1.4;
}

.detail-card-code {
  margin-top: 4px;
  font-size: 12px;
  color: #98a2b3;
}

.detail-card-heading {
  font-size: 16px;
  font-weight: 700;
  color: #172351;
  margin-bottom: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 30px;
}

.detail-item {
  min-width: 0;
}

.detail-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.detail-value {
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
}

.detail-value small {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 11px;
}


/* DETAIL PELAKSANAAN */

.detail-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
}

.detail-text-full {
  grid-column: 1 / -1;
}

.detail-text {
  color: #344054;
  font-size: 14px;
  line-height: 1.7;
  min-height: 25px;
}


/* RINGKASAN 4 KOLOM */

.summary-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* HEADER TABEL */

.table-card-header {
  padding: 20px 22px;
  border-bottom: 1px solid #eaecf0;
}

.table-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #172351;
}

.table-card-subtitle {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 12px;
}


/* SUMBER DANA */

.fund-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
}

.fund-item:last-child {
  margin-bottom: 0;
}

.fund-item span {
  color: #475467;
}

.fund-item strong {
  color: #172351;
  white-space: nowrap;
}


/* RESPONSIVE DETAIL */

@media (max-width: 1100px) {

  .summary-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 768px) {

  .detail-card {
    padding: 17px;
  }

  .detail-card-header {
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .detail-text-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .detail-text-full {
    grid-column: auto;
  }

  .summary-grid-4 {
    grid-template-columns: 1fr;
  }

}
