/* ============================================================
 * Custom CSS — Beego Master Project
 * File ini adalah satu-satunya custom CSS yang diizinkan.
 * Untuk page normal (layout _base.html), WAJIB pakai Metronic classes.
 * Custom CSS hanya untuk halaman STANDALONE (login, dll).
 * ============================================================ */

/* ============================================================
 * Auth / Login Page
 * ============================================================ */
.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #071437;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo-img {
    display: block;
    width: auto;
    height: 120px;
    max-width: 100%;
    margin: 0 auto 12px;
    object-fit: contain;
}
.login-logo .brand {
    font-size: 26px;
    font-weight: 800;
    color: #071437;
    text-decoration: none;
}
.login-logo p {
    font-size: 13px;
    color: #99A1B7;
    margin: 6px 0 0;
}
.login-title {
    text-align: center;
    margin-bottom: 24px;
}
.login-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #071437;
    margin: 0 0 4px;
}
.login-title p {
    font-size: 13px;
    color: #99A1B7;
    margin: 0;
}
.login-input {
    position: relative;
    margin-bottom: 16px;
}
.login-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #B5B5C3;
    font-size: 18px;
}
.login-input input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid #E1E3EA;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border .2s;
    background: #FAFAFA;
    box-sizing: border-box;
}
.login-input input:focus {
    border-color: #1B84FF;
    background: #fff;
}
.login-input input::placeholder {
    color: #B5B5C3;
}
.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #071437;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.login-btn:hover { background: #1B2559; }
.login-btn:active { transform: scale(.99); }
.login-btn.loading { opacity: .7; pointer-events: none; }
.login-error {
    background: #FFF5F8;
    border: 1px solid #F1416C;
    color: #F1416C;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}
.login-success {
    background: #E8FFF3;
    border: 1px solid #17C653;
    color: #0BB746;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #99A1B7;
}
.login-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 12px;
}
.login-links a { color: #B5B5C3; text-decoration: none; }
.login-links a:hover { color: #1B84FF; }
.login-copy {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: #B5B5C3;
}

/* ============================================================
 * Sidebar Layout (Halaman Standalone dengan sidebar)
 * ============================================================ */
.billing-sidebar { width: 250px; min-height: 100vh; position: fixed; left: 0; top: 0; z-index: 50; }
.billing-main { margin-left: 250px; min-height: 100vh; }
@media (max-width: 991px) {
    .billing-sidebar { display: none !important; }
    .billing-sidebar.show { display: flex !important; }
    .billing-main { margin-left: 0; }
}

/* ============================================================
 * Dokumen PTUN - detail admin
 * ============================================================ */
.ptun-code-display {
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
}
#cat-filters .cat-filter.active {
    color: #fff;
}
#tbl-docs .doc-row td {
    vertical-align: middle;
}
.doc-filename-truncate {
    max-width: 280px;
}
.mw-300px {
    max-width: 300px;
}

/* ============================================================
 * PTUN publik (gate + timeline warga)
 * ============================================================ */
.ptun-pub-body {
    margin: 0;
    min-height: 100vh;
    background: #f5f8fa;
}
.ptun-pub-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}
.ptun-pub-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eff2f5;
    padding: 12px 0;
    overflow: visible;
}
.ptun-pub-logo-wrap {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e1e3ea;
}
.ptun-pub-logo {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.ptun-pub-main {
    padding-top: 20px;
    padding-bottom: 24px;
}
.ptun-pub-feature {
    transition: box-shadow .15s ease, transform .15s ease;
}
.ptun-pub-feature:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.08) !important;
}
.ptun-pub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ptun-chip.active {
    color: #fff;
}
.sticky-stage {
    position: sticky;
    top: 96px;
    z-index: 50;
    background: #f5f8fa;
    padding: 6px 0;
}
.ptun-stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1B84FF;
    flex-shrink: 0;
}
.ptun-doc-row {
    display: flex;
    align-items: stretch;
    background: #fff;
}
.ptun-doc-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 14px 12px 14px 16px;
    color: inherit;
}
.ptun-doc-main:hover {
    background: #f9f9f9;
}
.ptun-doc-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    flex-shrink: 0;
    border-left: 1px solid #eff2f5;
    border-radius: 0 !important;
}
.ptun-btn-open {
    white-space: nowrap;
}
@media (max-width: 575px) {
    .ptun-btn-open {
        padding-left: 10px;
        padding-right: 10px;
    }
    .ptun-pub-logo-wrap {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }
    .ptun-pub-logo {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
    }
}

/* Gate: logo brand boleh lebih besar, tetap dibatasi */
.ptun-gate-card {
    max-width: 460px;
}
.ptun-gate-logo-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ptun-gate-logo {
    width: 100% !important;
    height: 100% !important;
    max-width: 96px !important;
    max-height: 96px !important;
    object-fit: contain !important;
    margin: 0 !important;
}
.ptun-gate-brand {
    font-size: 18px !important;
    margin-top: 8px;
}
.ptun-gate-case {
    text-align: center;
    background: #f5f8fa;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.ptun-code-input {
    letter-spacing: 0.25em;
}
.ptun-gate-footer {
    margin-top: 24px;
}
