/* 1. KUNCI SCROLLBAR AGAR LEBAR LAYAR TIDAK PERNAH BERGESER KE SAMPING */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* 2. CONTAINER UTAMA TERKUNCI SERAGAM 680px */
.bla-public-portal {
    width: 100% !important;
    max-width: 680px !important;
    margin: 30px auto !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box !important;
}

/* KARTU HEADER ATAS */
.bla-portal-header-card {
    width: 100% !important;
    max-width: 680px !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    margin: 0 0 20px 0 !important;
    box-sizing: border-box !important;
}

.bla-student-welcome {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bla-welcome-icon {
    font-size: 34px;
    background: #f1f5f9;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.bla-portal-title {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
}

.bla-portal-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.bla-cycle-selector-wrap {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bla-cycle-label {
    font-weight: 700;
    font-size: 13px;
    color: #334155;
}

.bla-cycle-select {
    flex: 1;
    min-width: 260px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
}

.bla-cycle-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.bla-no-data-box {
    margin-top: 15px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
}

.bla-guest-box {
    text-align: center;
    padding: 10px 0;
}

.bla-btn-login {
    display: inline-block;
    margin-top: 14px;
    background: linear-gradient(135deg, #FF007F 0%, #FF7A00 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 800;
    font-size: 13.5px;
    padding: 9px 22px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.25);
    transition: transform 0.2s;
}

.bla-divider {
    text-align: center;
    margin: 22px 0 15px;
    position: relative;
}

.bla-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.bla-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.bla-search-bar {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
}

.bla-input-search {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
}

.bla-btn-search {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.bla-portal-msg {
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
}

/* TOOLBAR SERAGAM */
.bla-pub-toolbar {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 0 16px 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box !important;
}

.bla-pub-tabs {
    display: inline-flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 8px;
}

.bla-pub-tabs button {
    border: none;
    background: transparent;
    padding: 8px 18px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

.bla-pub-tabs button.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.bla-pub-tabs button#pub-tab-report.active {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

.bla-pub-actions {
    display: inline-flex;
    gap: 8px;
}

.bla-pub-btn-png {
    background: #059669;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bla-pub-btn-png:hover { opacity: 0.9; }

.bla-pub-btn-print {
    background: linear-gradient(135deg, #FF007F 0%, #FF7A00 100%);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.bla-pub-btn-print:hover { transform: translateY(-1px); }

/* ARSITEKTUR CSS GRID STACK (ANTI-GESER KE SAMPING) */
#bla-pub-doc-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.bla-doc-pane {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    width: 100% !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box !important;
}

.bla-doc-pane.pane-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* KARTU DOKUMEN */
.bla-pub-card-container {
    position: relative;
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    overflow: hidden;
    box-sizing: border-box !important;
}

.bla-pub-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
    width: 230px;
    text-align: center;
}

.bla-pub-watermark img {
    width: 100%;
    filter: grayscale(100%);
}

.bla-pub-card-inner {
    position: relative;
    z-index: 2;
}

/* TIPOGRAFI LOGO DENGAN SPACE-BETWEEN */
.bla-pub-header-row {
    padding: 16px 22px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bla-brand-header-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bla-brand-header-flex img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}

.bla-brand-text-wrap {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
}

.bla-brand-title {
    font-size: 18px;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.1;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.bla-brand-domain {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1;
}

.bla-pub-status-right {
    text-align: right;
}

/* STATUS BADGE LEBIH LEMBUT */
.bla-badge-status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.3px;
}

.bla-badge-lunas {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}

.bla-badge-unpaid {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.bla-badge-kontrol {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    letter-spacing: 0.5px;
}

/* JUDUL DOKUMEN LEBIH SEMI-BOLD & PROPORSIONAL */
.bla-doc-type-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 3px;
    letter-spacing: 0.2px;
}

.bla-doc-inv-label {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
}

.bla-pub-meta-box {
    padding: 12px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.bla-meta-table {
    width: 100%;
    border-collapse: collapse;
}

.bla-meta-table td {
    vertical-align: top;
    padding: 0;
}

.bla-meta-student-col {
    width: 55%;
}

.bla-meta-info-col {
    width: 45%;
}

.bla-info-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #FF7A00;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    line-height: 1.6;
}

.bla-pub-body-wrap {
    padding: 16px 22px 14px;
}

.bla-pub-item-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.bla-pub-item-table th {
    padding-bottom: 6px;
    color: #64748b;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 10.5px;
}

.bla-pub-item-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.bla-pub-total-row td {
    padding: 10px 0 2px;
    border-top: 2px solid #e2e8f0;
}

/* KOTAK REKENING BANK: RATA KIRI SEJAJAR PAS DENGAN TEKS BANK DI BAWAHNYA */
.bla-bank-account-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3.5px solid #059669;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 10px 0 6px 0;
    box-sizing: border-box;
}
.bla-bank-card-header {
    font-size: 9.5px;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 3px 0;
    padding: 0;
    line-height: 1.2;
}
.bla-bank-card-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: #0f172a;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 11px;
}
.bla-acc-mono {
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #0f172a;
}

.bla-terbilang-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 7px 12px;
    margin: 8px 0 10px;
    font-size: 11px;
}

.bla-stamp-box {
    margin: 3px auto;
    width: 110px;
    border: 1px dashed #d97706;
    border-radius: 4px;
    padding: 2px 4px;
    background: rgba(217,119,6,0.03);
}

.bla-stamp-box.paid {
    border-color: #FF7A00;
    background: rgba(255,122,0,0.03);
}

.bla-stamp-box.green {
    border-color: #059669;
    width: 120px;
    background: rgba(5,150,105,0.03);
}

.bla-stats-flex {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.bla-stats-flex > div {
    flex: 1;
    border-right: 1px solid #e2e8f0;
}

.bla-stats-flex > div:last-child {
    border-right: none;
}

.bla-stats-label {
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
}

.bla-stats-val {
    font-size: 14px;
    font-weight: 800;
}

.bla-teacher-eval-box {
    margin-top: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #059669;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11px;
    color: #14532d;
    line-height: 1.45;
}