/* =========================================================
   RESET & GLOBAL
========================================================= */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
    margin: 0;
    background: #f2f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   LAYOUT CORE
========================================================= */
.main-content {
    flex: 1;
    display: block;
}

/* =========================================================
   BUTTON
========================================================= */
.btn {
    display: inline-flex;      
    align-items: center;
    width: fit-content;
    padding: 12px 14px;
    background: #005baa;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: .2s ease;
    text-decoration: none;
    gap: 12px;                 
}


.btn-group {
    display: flex;
    flex-wrap: wrap;       
    gap: 12px;
}

.btn:hover { background: #004a8c; }

.btn-outline {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #2563eb;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    background: white;
}

.btn-outline:hover {
    background: #eef2ff;
}

/* =========================================================
   CARD
========================================================= */
.card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    overflow: auto;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
    background: #003b73;
    color: #fff;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: clamp(4px, 3vw, 12px);
    white-space: nowrap;
}

.nav-right a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.nav-right a:hover,
.nav-right a.active {
    text-decoration: underline;
}

/* =========================================================
   LOGIN PAGE
========================================================= */
.login-wrapper {
    flex: 1;
    display: flex;
    min-height: 100vh;
    justify-content: flex-end;
    background: url('img/login-bg.jpg') no-repeat left center;
    background-size: contain;
    background-color: #ffffff;
}

.login-branding {
    flex: 1;
    padding: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-branding img {
    position: fixed;
    top: 20px;
    right: 50px;
    width: 200px;
    z-index: 9;
}

.login-panel {
    width: 40%;
    min-width: 420px;
    background: rgba(255,255,255,.97);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

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

.login-box h2 { margin-bottom: 20px; }

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ccd4dd;
    border-radius: 6px;
}

.login-box input:focus {
    border-color: #005baa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,91,170,.15);
}

/* Login Responsive */
@media (max-width: 800px) {
    .login-wrapper {
        justify-content: center;
        align-items: center;
        background-size: 160%;
    }

    .login-panel {
        width: 90%;
        min-width: unset;
        background: rgba(255,255,255,.9);
    }

    .login-branding {
        position: absolute;
        top: 20px;
        right: 220px;
        width: 180px;
        z-index: 9;
    }
}

/* =========================================================
   ROLE PAGE
========================================================= */
.role-wrapper {
    flex: 1;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.role-card {
    background: white;
    align-items: center;
    text-align: center;
    width: 360px;
    padding: 34px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.role-card h2 {
    margin-bottom: 22px;
    color: #003b73;
}

.role-card a {
    padding: 13px;
    border-radius: 8px;
    background: linear-gradient(135deg, #005baa, #003b73);
    color: white;
    text-decoration: none;
    margin-bottom: 14px;
    font-weight: 600;
    gap: 18px;
}

.role-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

/* =========================================================
   TABLE & DETAIL
========================================================= */

/* === Responsive table wrapper (mobile friendly) === */
.table-wrap{
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap > table{
    min-width: 900px;
}


/* === Generic table container (dashboard etc.) === */
.table{ width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.detail-container {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    text-align: center;
}

th {
    background: #f3f6fa;
    font-weight: 600;
}

/* Fix input columns */
.card table th:nth-child(2),
.card table th:nth-child(3),
.card table th:nth-child(4),
.card table td:nth-child(2),
.card table td:nth-child(3),
.card table td:nth-child(4) {
    min-width: 110px;
}

.card table input[type="number"],
.card table select {
    min-width: 100px;
}

/* Upload sejajar di detail */
.card table td form[enctype="multipart/form-data"] {
    display: inline-block;
    align-items: center;
    gap: 8px;
}

.card table td form[enctype="multipart/form-data"] input[type="file"] {
    max-width: 65%;
}

/* File upload di halaman detail */
.card table td form[enctype="multipart/form-data"] {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

/* Paksa file input melebar penuh */
.card table td form[enctype="multipart/form-data"] input[type="file"] {
    width: 100%;
    min-width: 220px;
}


/* =========================================================
   FORM & INFO BLOCK
========================================================= */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
}

textarea { min-height: 90px; }

form { display: grid; gap: 10px; }

.info-block {
    display: grid;
    grid-template-columns: 180px 1fr;
    row-gap: 6px;
}



/* ======== FIX SPACING H3 DALAM FORM ======== */
.card form h3 {
    margin: 12px 0 0 0;   /* hapus margin bawah, sisakan sedikit atas */
}

/* kecilkan jarak grid HANYA setelah h3 */
.card form h3 + * {
    margin-top: -6px;
}

.section-full {
    grid-column: 1 / 3;
}

.btn-success {
    background: #16a34a;          /* hijau */
}

.btn-success:hover {
    background: #15803d;          /* hijau lebih gelap */
}

.btn.danger  { background:#dc2626; }
.btn.warning { background:#f59e0b; color:#000; }


/* ===== PEMBAYARAN HIGHLIGHT ===== */
.pembayaran-box {
    background: #f0f7ff;          /* biru muda lembut */
    border: 1px solid #cfe3ff;
    border-left: 6px solid #2563eb;
    padding: 16px 20px;
    margin: 25px 0;
}

.pembayaran-row {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.pembayaran-item {
    width: 48%;
    text-align: center;
    font-size: 11.5pt;
}

.pembayaran-item .nominal {
    margin-top: 6px;
    font-size: 14pt;
    font-weight: bold;
    color: #1e3a8a;
}


/* ===============================
   TIGHT SPACING (detail pages)
   =============================== */

.card h2 {
  margin-bottom: 12px !important;
}

.hr-soft,
hr.hr-soft {
  margin: 10px 0 !important;
  opacity: .6;
}

.tabs {
  margin-bottom: 10px !important;
}

.tab-spacer {
  height: 10px !important;
}

.tab-content {
  padding-top: 12px !important;
  margin-top: 0 !important;
}

.grid-2,
.sum-grid {
  margin-top: 0 !important;
  gap: 12px !important;
}

.box {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

/* stepper states */
.step.current {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #14532d !important;
}
.step.current.reject {
  background: #fee2e2 !important;
  border-color: #fecaca !important;
  color: #7f1d1d !important;
}
.step.done {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}


.sticky-head{
  position: sticky;
  top: 0;                 /* kalau navbar fixed, naikin jadi top: 60px; */
  z-index: 50;
  background: #fff;
  padding-top: 10px;
  padding-bottom: 8px;
}

/* opsional biar ada garis halus saat sticky */
.sticky-head:after{
  content:"";
  display:block;
  height:1px;
  background:#e5e7eb;
  margin-top:10px;
}


/* === Mobile: allow horizontal scroll on wide tables === */
@media (max-width: 768px){
  /* subtable: enable horizontal scroll on phones */
  table.subtable{display:block;max-width:100%;overflow-x:auto !important;-webkit-overflow-scrolling:touch;}
  table.subtable th, table.subtable td{white-space:nowrap;}

  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .detail-container{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .card{overflow-x:auto;-webkit-overflow-scrolling:touch;}
}
