#wsl-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: sans-serif;
}

.wsl-login-box {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: auto; 
    min-width: 300px;
    max-width: 95vw; 
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#wsl-input {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    margin-bottom: 25px;
    border: 2px solid #fff;
    background: #fff;
    color: #333;
    border-radius: 5px;
    box-sizing: border-box;
}

#wsl-message {
    margin-top: 15px;
    color: #ff6666;
    font-weight: bold;
    min-height: 20px;
}

/* --- CONTAINER UTAMA --- */
.wsl-kb-container {
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
}

/* =========================================
   MODE PIN: HYBRID LAYOUT
   ========================================= */
.wsl-kb-container.mode-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--wsl-pin-mw, 300px);
    max-width: 100%;
}

/* BAGIAN 1: Grid Angka (1-9, 0) */
.wsl-pin-grid {
    display: grid;
    grid-template-columns: repeat(3, var(--wsl-pin-w, 80px));
    grid-auto-rows: var(--wsl-pin-h, 80px);
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px; /* Jarak ke tombol action */
}

/* Style khusus angka 0 agar ada di tengah baris ke-4 */
.wsl-key.pin-zero {
    grid-column: 2; /* Kolom tengah */
}

/* BAGIAN 2: Tombol Action (DEL, ENTER) di Baris Bawah */
.wsl-pin-actions {
    display: flex;
    width: 100%;
    /* Hitung lebar agar sama dengan grid di atas (3 tombol + 2 gap) */
    /* Atau biarkan full width container */
    max-width: calc( (var(--wsl-pin-w, 80px) * 3) + 20px ); 
    gap: 10px;
}

/* Tombol Action di PIN Mode agar lebar (Fill Space) */
.wsl-pin-actions .wsl-key {
    flex-grow: 1; /* Mengisi sisa ruang 50:50 */
    height: var(--wsl-pin-h, 80px); /* Tinggi sama dengan angka */
    /* Font size tombol action direset agar besar dan jelas */
    font-size: calc(var(--wsl-pin-fs, 24px) * 0.7) !important; 
    text-transform: uppercase;
    width: auto; /* Reset width fix */
}

/* Font Size Angka PIN */
.mode-pin .wsl-pin-grid .wsl-key {
    font-size: var(--wsl-pin-fs, 24px) !important;
}

/* =========================================
   MODE PASSWORD: STRICT FLEX
   ========================================= */
.wsl-kb-container.mode-pass {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: var(--wsl-pass-mw, 1000px);
    max-width: 100%;
}

.mode-pass .wsl-key {
    font-size: var(--wsl-pass-fs, 16px) !important;
    width: var(--wsl-pass-w, 50px);
    height: var(--wsl-pass-h, 50px);
    flex-shrink: 0; 
}

.wsl-break {
    flex-basis: 100%;
    height: 0;
}

/* =========================================
   STYLING TOMBOL UMUM
   ========================================= */
.wsl-key {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    user-select: none;
    box-shadow: 0 2px 0 #222;
    transition: background 0.1s, transform 0.1s;
    box-sizing: border-box;
    line-height: 1;
}

.wsl-key:active, .wsl-key.active {
    background: #666;
    transform: translateY(2px);
    box-shadow: none;
}

.wsl-key.action-submit {
    background: var(--wsl-btn-color, #0073aa);
    border-color: var(--wsl-btn-color, #0073aa);
}
.wsl-key.action-delete {
    background: #d63638;
    border-color: #a0181a;
}

/* Tombol Wide di Password Mode */
.mode-pass .wsl-key.wide {
    width: auto;
    min-width: calc(var(--wsl-pass-w, 50px) * 1.5);
    padding: 0 15px;
    flex-grow: 1;
}