/* ========================================================
   ROBOTIKA UPGRIS - PENGURUS PAGE STYLES
   Page Scoping: .page-pengurus
   ======================================================== */

/* ── Page Hero ── */
    .page-hero {
        padding: 1.75rem 0 0.75rem 0;
    }
    .page-hero-title {
        font-size: clamp(1.6rem, 3.2vw, 2.2rem);
        font-weight: 800;
        font-family: var(--pixel-font);
        color: var(--text-main);
        line-height: 1.35;
        text-shadow: 2px 2px 0px #000;
    }
    .page-hero-desc {
        font-size: 0.95rem;
        color: var(--text-muted);
        max-width: 520px;
        line-height: 1.55;
    }
    .text-gradient {
        color: var(--primary);
        -webkit-text-fill-color: var(--primary);
    }
    .section-badge {
        background: var(--surface);
        color: var(--text-main);
        border: 3px solid var(--border);
        font-size: 0.58rem;
        font-family: var(--pixel-font);
        padding: 0.4em 0.85em;
    }
    .section-sub-label {
        background: var(--surface);
        color: var(--text-main);
        border: 3px solid var(--border);
        font-size: 0.58rem;
        font-family: var(--pixel-font);
        padding: 0.35em 0.85em;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* ── Tier Container Limits (Gap & Proportions) ── */
    .pimpinan-row {
        max-width: 560px;
    }
    .sekretaris-bendahara-wrapper {
        max-width: 1040px;
    }
    .divisi-row {
        max-width: 1060px;
    }

    /* ── Jabatan Tier ── */
    .jabatan-tier {
        position: relative;
        margin-bottom: 2rem !important;
    }
    @media (max-width: 768px) {
        .jabatan-tier {
            margin-bottom: 1.5rem !important;
        }
    }

    /* ── Pengurus Card ── */
    .pengurus-card {
        background: var(--surface);
        border: 4px solid var(--border);
        overflow: hidden;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                    border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
        height: 100%;
        display: flex;
        flex-direction: column;
        cursor: pointer;
        user-select: none;
        max-width: 250px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .pengurus-card:hover,
    .pengurus-card.is-visible:hover {
        transform: translateY(-6px) scale(1.01) !important;
        border-color: var(--primary) !important;
        box-shadow: 4px 4px 0px var(--primary) !important;
    }
    .pengurus-card--featured {
        border-color: var(--primary-dark);
    }

    /* ── Foto ── */
    .pengurus-foto-wrapper {
        width: 100%;
        height: 185px;
        overflow: hidden;
        position: relative;
        background: var(--bg);
        border-bottom: 4px solid var(--border);
    }
    .pengurus-foto-wrapper--lg {
        height: 185px;
    }
    .pengurus-foto {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        filter: grayscale(100%) contrast(1.2);
        transition: filter 0.3s;
    }
    .pengurus-card:hover .pengurus-foto {
        filter: grayscale(0%) contrast(1.1);
    }

    .pengurus-avatar {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.6rem;
        font-family: var(--pixel-font);
        color: var(--text-muted);
    }
    .pengurus-avatar--lg {
        font-size: 2.8rem;
    }

    /* ── Info ── */
    .pengurus-info {
        padding: 0.85rem 0.95rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    .pengurus-info--sm {
        padding: 0.7rem 0.8rem;
        gap: 0.2rem;
    }

    .pengurus-nama {
        font-size: 0.88rem;
        font-family: var(--pixel-font);
        text-transform: uppercase;
        color: var(--text-main);
        margin: 0;
        line-height: 1.3;
        text-shadow: 2px 2px 0px var(--border);
    }
    .pengurus-nama--sm {
        font-size: 0.72rem;
    }

    .pengurus-jabatan {
        display: inline-block;
        margin-top: 0.15rem;
        align-self: flex-start;
        background: var(--primary);
        color: #000;
        font-family: var(--pixel-font);
        font-size: 0.48rem;
        padding: 0.3em 0.65em;
    }
    .pengurus-jabatan--sm {
        font-size: 0.42rem;
        padding: 0.25em 0.55em;
    }

    /* Hint Detail */
    .pengurus-hint {
        margin-top: auto;
        padding-top: 0.25rem;
        font-family: var(--pixel-font);
        font-size: 0.5rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.2rem;
        transition: color 0.2s ease, transform 0.2s ease;
    }
    .pengurus-card:hover .pengurus-hint {
        color: var(--primary);
        transform: translateX(3px);
    }

    /* ── Modal Dialog & Frame (ID Card Theme) ── */
    #modalDetailPengurus {
        z-index: 99999 !important;
    }
    .modal-backdrop.show {
        z-index: 99990 !important;
    }
    .modal-pengurus-dialog {
        max-width: 680px;
        margin: 1.5rem auto;
    }
    .id-card-frame {
        position: relative;
        background: var(--surface);
        border: 4px solid var(--border);
        border-radius: 0;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(250, 204, 21, 0.15);
        color: var(--text-main);
        overflow: hidden;
    }
    [data-theme="light"] .id-card-frame {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 20px rgba(245, 158, 11, 0.2);
    }

    /* Gantungan ID Card / Punch Hole */
    .id-card-lanyard-slot {
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 54px;
        height: 8px;
        background: var(--bg);
        border: 2px solid var(--border);
        border-radius: 4px;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .id-card-lanyard-hole {
        width: 22px;
        height: 3px;
        background: var(--border);
        border-radius: 2px;
    }

    /* Header ID Card */
    .id-card-header {
        background: var(--bg);
        border-bottom: 4px solid var(--border);
        padding: 1.25rem 1.25rem 0.85rem;
        border-radius: 0;
    }
    .id-card-chip-badge {
        width: 34px;
        height: 34px;
        background: var(--primary);
        color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        border: 2px solid var(--primary-dark);
        flex-shrink: 0;
    }
    .id-card-brand {
        font-family: var(--pixel-font);
        font-size: 0.8rem;
        color: var(--primary);
        letter-spacing: 1px;
        line-height: 1.2;
    }
    .id-card-type-label {
        font-family: var(--pixel-font-alt), monospace;
        font-size: 0.85rem;
        color: var(--text-muted);
        letter-spacing: 0.5px;
    }
    .id-card-status-pill {
        background: rgba(34, 197, 94, 0.15);
        border: 2px solid #22c55e;
        color: #22c55e;
        font-family: var(--pixel-font);
        font-size: 0.52rem;
        padding: 0.35em 0.7em;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }
    .id-status-dot {
        width: 7px;
        height: 7px;
        background-color: #22c55e;
        border-radius: 50%;
        box-shadow: 0 0 8px #22c55e;
        animation: pulseGreen 1.5s infinite;
    }
    @keyframes pulseGreen {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.3; transform: scale(0.8); }
    }

    .retro-btn-close {
        background: transparent;
        border: 2px solid var(--border);
        color: var(--text-muted);
        font-family: var(--pixel-font);
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .retro-btn-close:hover {
        background: var(--danger);
        border-color: var(--danger);
        color: #fff;
    }
    .retro-modal-footer {
        background: var(--bg);
        border-top: 4px solid var(--border);
        padding: 0.75rem 1.25rem;
        border-radius: 0;
    }
    .retro-btn-action {
        background: var(--surface);
        border: 2px solid var(--border);
        color: var(--text-main);
        font-family: var(--pixel-font);
        font-size: 0.65rem;
        padding: 0.6em 1.2em;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .retro-btn-action:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--bg);
    }

    /* ── Layout 2 Kolom: Kiri Foto, Kanan Identitas ── */
    .id-card-layout {
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
    }
    .id-card-col-photo {
        width: 185px;
        flex-shrink: 0;
    }
    .id-card-col-info {
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    /* Frame Foto ID Card */
    .id-card-photo-box {
        position: relative;
        width: 170px;
        height: 215px;
        background: var(--bg);
        border: 3px solid var(--border);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        padding: 3px;
    }
    .modal-pengurus-foto-wrapper {
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: var(--bg);
    }
    .modal-pengurus-foto-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
    }
    .modal-pengurus-avatar {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 4.5rem;
        font-family: var(--pixel-font);
        color: var(--text-muted);
        background: var(--bg);
    }

    /* Corner Accents */
    .id-corner-bracket {
        position: absolute;
        width: 9px;
        height: 9px;
        border-color: var(--primary);
        border-style: solid;
        pointer-events: none;
    }
    .id-corner-bracket.top-left { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
    .id-corner-bracket.top-right { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
    .id-corner-bracket.bottom-left { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
    .id-corner-bracket.bottom-right { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

    /* ── Kolom Kanan: Typography & Data Identitas ── */
    .id-field-tag {
        font-family: var(--pixel-font);
        font-size: 0.5rem;
        color: var(--text-muted);
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }
    .id-card-name {
        font-family: var(--pixel-font);
        font-size: 1.2rem;
        color: var(--text-main);
        text-transform: uppercase;
        line-height: 1.35;
        text-shadow: 2px 2px 0px var(--border);
        word-break: break-word;
    }
    .id-card-role-badge {
        background: var(--primary);
        color: #000;
        font-family: var(--pixel-font);
        font-size: 0.62rem;
        padding: 0.4em 0.85em;
        display: inline-block;
        border: 2px solid var(--primary-dark);
        letter-spacing: 0.5px;
    }

    /* Rincian Identitas (Data Sheet) */
    .id-card-data-sheet {
        background: var(--bg);
        border: 2px solid var(--border);
        padding: 0.75rem 0.9rem;
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }
    [data-theme="light"] .id-card-data-sheet {
        background: #f8fafc;
        border-color: #cbd5e1;
    }
    .id-data-entry {
        display: flex;
        align-items: baseline;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    .id-data-label {
        font-family: var(--pixel-font);
        font-size: 0.5rem;
        color: var(--text-muted);
        width: 145px;
        flex-shrink: 0;
        text-transform: uppercase;
    }
    .id-data-sep {
        margin-right: 0.5rem;
        color: var(--text-muted);
        font-weight: bold;
    }
    .id-data-value {
        color: var(--text-main);
        font-weight: 600;
        word-break: break-word;
    }

    /* Moto Hidup Box */
    .id-card-moto-box {
        background: var(--bg);
        border: 2px solid var(--border);
        border-left: 4px solid var(--primary);
        padding: 0.75rem 0.9rem;
        text-align: left;
    }
    [data-theme="light"] .id-card-moto-box {
        background: #f8fafc;
        border-color: #cbd5e1;
        border-left-color: var(--primary);
    }
    .modal-moto-header {
        font-family: var(--pixel-font);
        font-size: 0.55rem;
        color: var(--primary);
    }
    .modal-moto-text {
        font-size: 0.9rem;
        color: var(--text-main);
        line-height: 1.5;
        font-style: italic;
    }

    /* Sosial Media */
    .modal-social-header {
        font-family: var(--pixel-font);
        font-size: 0.55rem;
        color: var(--text-muted);
    }
    .modal-social-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.45em 0.85em;
        font-family: var(--pixel-font);
        font-size: 0.58rem;
        border: 2px solid var(--border);
        background: var(--bg);
        color: var(--text-main);
        text-decoration: none;
        transition: all 0.2s ease;
    }
    .modal-social-btn:hover:not(.is-disabled) {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--surface);
        transform: translateY(-2px);
    }
    .modal-social-btn.is-active {
        border-color: var(--primary);
        color: var(--text-main);
    }
    .modal-social-btn.is-active:hover {
        color: var(--primary);
    }
    .modal-social-btn.is-disabled {
        opacity: 0.55;
        border: 2px dashed var(--border);
        color: var(--text-muted);
        cursor: not-allowed;
        pointer-events: none;
        background: rgba(0, 0, 0, 0.15);
    }
    [data-theme="light"] .modal-social-btn.is-disabled {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

    /* Footer ID Card & Barcode */
    .id-card-footer {
        background: var(--bg);
        border-top: 4px solid var(--border);
        padding: 0.75rem 1.25rem;
        border-radius: 0;
    }
    .id-barcode-lines {
        display: flex;
        gap: 2px;
        height: 22px;
        align-items: stretch;
        padding: 2px 5px;
        background: #ffffff;
        border: 1px solid var(--border);
    }
    .id-barcode-lines span {
        display: inline-block;
        background: #000000;
        width: 2px;
    }
    .id-barcode-lines span:nth-child(2n) { width: 3px; }
    .id-barcode-lines span:nth-child(3n) { width: 1px; }
    .id-barcode-lines span:nth-child(4n) { width: 4px; }
    .id-barcode-text {
        font-family: var(--pixel-font-alt), monospace;
        font-size: 0.95rem;
        color: var(--text-muted);
        letter-spacing: 1px;
    }

    /* ── Responsive Mobile (HP) ── */
    @media (max-width: 767.98px) {
        .page-hero-title { font-size: 1.5rem; }
        .page-hero-desc { font-size: 0.85rem; }

        .section-sub-label {
            font-size: 0.52rem;
            padding: 0.35em 0.7em;
            letter-spacing: 0.5px;
        }

        .pengurus-card {
            border-width: 3px;
            max-width: 240px;
        }

        .pengurus-foto-wrapper { height: 150px; border-bottom-width: 3px; }
        .pengurus-foto-wrapper--lg { height: 150px; border-bottom-width: 3px; }

        .pengurus-avatar { font-size: 2.3rem; }
        .pengurus-avatar--lg { font-size: 2.5rem; }

        .pengurus-info {
            padding: 0.65rem 0.5rem;
            gap: 0.25rem;
        }
        .pengurus-info--sm {
            padding: 0.55rem 0.45rem;
        }

        .pengurus-nama {
            font-size: 0.7rem;
            line-height: 1.35;
            word-break: break-word;
            text-shadow: 1px 1px 0px var(--border);
        }
        .pengurus-nama--sm {
            font-size: 0.6rem;
        }

        .pengurus-jabatan {
            font-size: 0.45rem;
            padding: 0.25em 0.5em;
            line-height: 1.25;
            white-space: normal;
        }
        .pengurus-jabatan--sm {
            font-size: 0.4rem;
            padding: 0.2em 0.4em;
        }

        .pengurus-hint {
            font-size: 0.45rem;
            padding-top: 0.25rem;
        }

        .modal-pengurus-dialog {
            max-width: 95%;
            margin: 0.75rem auto;
        }
        .id-card-header {
            padding: 1rem 0.85rem 0.75rem;
        }
        .id-card-brand {
            font-size: 0.68rem;
        }
        .id-card-type-label {
            font-size: 0.75rem;
        }
        .id-card-chip-badge {
            width: 28px;
            height: 28px;
            font-size: 0.9rem;
        }

        /* Pada mobile sempit, layout tetap kartu nama tetapi disesuaikan agar rapi */
        .id-card-layout {
            flex-direction: column;
            align-items: center;
            gap: 1.15rem;
        }
        .id-card-col-photo {
            width: 100%;
        }
        .id-card-photo-box {
            width: 140px;
            height: 175px;
        }
        .modal-pengurus-avatar {
            font-size: 3.5rem;
        }
        .id-card-col-info {
            width: 100%;
            text-align: left;
        }
        .id-card-name {
            font-size: 1rem;
        }
        .id-card-role-badge {
            font-size: 0.55rem;
        }
        .id-data-entry {
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
        }
        .id-data-label {
            width: 100%;
            font-size: 0.45rem;
        }
        .id-data-sep {
            display: none;
        }
        .id-barcode-wrapper {
            display: none !important;
        }
        .id-card-footer {
            justify-content: flex-end;
        }
    }
