/* =========================================================
   KEYBOARD TEST
========================================================= */

.keyboard-workspace{
    padding:40px 0;
}

.keyboard-panel{

    background:linear-gradient(145deg,#0b1220,#111827);

    border:1px solid rgba(255,255,255,.08);

    border-radius:16px;

    padding:24px;

    overflow-x:auto;

}

/* =========================================================
   COMPLETE KEYBOARD
========================================================= */

.keyboard-layout{

    display:flex;

    justify-content:center;

    width:100%;

    overflow-x:auto;

    padding:16px 0;

}

.keyboard-container{

    max-width:1600px;

}

.keyboard-shell{

    display:inline-flex;

    justify-content:center;

    align-items:flex-start;

    padding:22px;

    border-radius:18px;

    background:#0f172a;

    border:1px solid rgba(255,255,255,.08);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        0 10px 30px rgba(0,0,0,.35);

}

.keyboard{

    display:flex;
    align-items:flex-start;
    gap:24px;

}

/* MAIN */

.keyboard-main{

    display:flex;
    flex-direction:column;
    gap:6px;

}

.keyboard-main-row{

    display:flex;
    gap:6px;

}

/* NAVIGATION */

.keyboard-navigation{

    display:flex;
    flex-direction:column;
    gap:6px;

}

.keyboard-nav-row{

    display:grid;
    grid-template-columns:repeat(3,48px);
    grid-auto-rows:48px;
    gap:6px;
    min-height:48px;

}

/* NUMPAD */

.keyboard-numpad{

    display:grid;

    grid-template-columns:repeat(4,48px);

    grid-template-rows:repeat(6,48px);

    gap:6px;

}
/* =========================================================
   KEYS
========================================================= */

.keyboard-key{

    width:48px;

    height:48px;

    display:flex;

    justify-content:center;

    align-items:center;

    flex:0 0 auto;

    border-radius:8px;

    background:#1f2937;

    border:1px solid #374151;

    color:#fff;

    font-size:13px;

    user-select:none;

    transition:.15s;

}

.keyboard-key:hover{

    background:#2b3648;

}

.keyboard-key.active{

    background:#2563eb;

    color:#fff;

    transform:translateY(2px);

}

.keyboard-key.tested{

    background:#16a34a;

}

.keyboard-key.stuck{

    background:#dc2626;

}

#key-NumLock{
    grid-column:1;
    grid-row:2;
}

#key-NumpadDivide{
    grid-column:2;
    grid-row:2;
}

#key-NumpadMultiply{
    grid-column:3;
    grid-row:2;
}

#key-NumpadSubtract{
    grid-column:4;
    grid-row:2;
}

#key-Numpad7{
    grid-column:1;
    grid-row:3;
}

#key-Numpad8{
    grid-column:2;
    grid-row:3;
}

#key-Numpad9{
    grid-column:3;
    grid-row:3;
}

#key-NumpadAdd{
    grid-column:4;
    grid-row:3 / span 2;
}

#key-Numpad4{
    grid-column:1;
    grid-row:4;
}

#key-Numpad5{
    grid-column:2;
    grid-row:4;
}

#key-Numpad6{
    grid-column:3;
    grid-row:4;
}

#key-Numpad1{
    grid-column:1;
    grid-row:5;
}

#key-Numpad2{
    grid-column:2;
    grid-row:5;
}

#key-Numpad3{
    grid-column:3;
    grid-row:5;
}

#key-NumpadEnter{
    grid-column:4;
    grid-row:5 / span 2;
}

#key-Numpad0{
    grid-column:1 / span 2;
    grid-row:6;
}

#key-NumpadDecimal{
    grid-column:3;
    grid-row:6;
}
/* =========================================================
   WIDTHS
========================================================= */

.w125{ width:60px; }

.w150{ width:72px; }

.w175{ width:84px; }

.w200{ width:96px; }

.w225{ width:108px; }

.w275{ width:132px; }

.w300{ width:144px; }

.w400{ width:192px; }

.w600{ width:288px; }

/* =========================================================
   NUMPAD
========================================================= */

.double-height{

    height:102px;

}

.double-width{

    width:102px;

}

/* =========================================================
   DASHBOARD
========================================================= */

.keyboard-dashboard{

    margin-top:40px;

}

.keyboard-dashboard .container{
    max-width:1800px;
}

.hero-card{

    background:#111827;

    border:1px solid rgba(255,255,255,.08);

    border-radius:14px;

    padding:20px;

}

/* =========================================================
   STATUS
========================================================= */

.status-item:last-child{

    border-bottom:none;

}

.log-item{

    padding:2px 0;

}

/* =========================================================
   STATS
========================================================= */

.stats-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));

    gap:14px;

}

.stat-card{

    background:#1f2937;

    border-radius:10px;

    padding:14px;

    text-align:center;

}

.stat-card strong{

    display:block;

    margin-bottom:8px;

}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1200px){

    .keyboard-panel{

        overflow-x:auto;

    }

}

@media(max-width:900px){

    .keyboard-dashboard{

        grid-template-columns:1fr;

    }

}

/* =========================================================
   KEYBOARD DASHBOARD
========================================================= */

.keyboard-dashboard,
.keyboard-statistics{

    margin-top:40px;

}

.dashboard-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:24px;
    align-items:stretch;
    width:100%;
}

.dashboard-card{

    background:linear-gradient(
        145deg,
        #111827,
        #0f172a
    );

    border:1px solid rgba(255,255,255,.08);

    border-radius:18px;

    padding:24px;

    box-shadow:
        0 12px 35px rgba(0,0,0,.35);
    height:100%;
    display:flex;
    flex-direction:column;
    width:100%;
    min-width:0;
    min-height:0;      /* important */

}

/* =========================================================
   CARD HEADER
========================================================= */

.dashboard-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

}

.dashboard-title h2{

    margin:0;

    font-size:22px;

    color:#fff;

}

.dashboard-badge{

    background:#2563eb;

    color:#fff;

    padding:6px 12px;

    border-radius:999px;

    font-size:12px;

    font-weight:600;

    letter-spacing:.5px;

    text-transform:uppercase;

}

/* =========================================================
   STATUS GRID
========================================================= */

.status-grid{

    display:grid;

    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:14px;

}

.status-item{

    background:#1f2937;

    border:1px solid rgba(255,255,255,.06);

    border-radius:12px;

    padding:16px;

    display:flex;

    flex-direction:column;

    gap:8px;

    transition:.2s;

}

.status-item:hover{

    transform:translateY(-2px);

    border-color:#2563eb;

}

.status-item strong{

    font-size:13px;

    font-weight:600;

    color:#9ca3af;

    text-transform:uppercase;

    letter-spacing:.5px;

}

.status-item span{

    font-size:24px;

    font-weight:700;

    color:#fff;

}

/* =========================================================
   STATISTICS GRID
========================================================= */

.stat-card{

    background:#1f2937;

    border:1px solid rgba(255,255,255,.06);

    border-radius:14px;

    padding:22px;

    text-align:center;

    transition:.2s;

}

.stat-card:hover{

    transform:translateY(-3px);

    border-color:#2563eb;

}

.stat-card strong{

    display:block;

    font-size:13px;

    color:#9ca3af;

    margin-bottom:12px;

    text-transform:uppercase;

    letter-spacing:.5px;

}

.stat-card span{

    font-size:28px;

    font-weight:700;

    color:#fff;

}

/* =========================================================
   EVENT LOG
========================================================= */

.event-log{
    background:#0b1220;
    border:1px solid rgba(255,255,255,.05);
    border-radius:14px;

    flex:1;
    min-height:0;

    overflow-y:auto;
    overflow-x:hidden;

    padding:14px;
    font-family:Consolas, monospace;
}

.log-placeholder{

    color:#6b7280;

    text-align:center;

    padding-top:140px;

    font-size:14px;

}

.log-item{

    display:flex;

    align-items:center;

    gap:10px;

    padding:10px 12px;

    border-radius:8px;

    margin-bottom:6px;

    color:#d1d5db;

    background:#111827;

    border-left:3px solid #2563eb;

    transition:.15s;

}

.log-item:hover{

    background:#1f2937;

}

/* Scrollbar */

.event-log::-webkit-scrollbar{

    width:10px;

}

.event-log::-webkit-scrollbar-thumb{

    background:#374151;

    border-radius:10px;

}

.event-log::-webkit-scrollbar-track{

    background:transparent;

}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:1200px){

    .dashboard-grid{

        grid-template-columns:1fr;

    }

}

@media (max-width:768px){

    .status-grid{

        grid-template-columns:1fr;

    }

    .stats-grid{

        grid-template-columns:repeat(2,1fr);

    }

}

@media (max-width:520px){

    .stats-grid{

        grid-template-columns:1fr;

    }

}

/* =========================================================
   LOG ITEM
========================================================= */

.log-time{

    color:#60a5fa;

    font-weight:600;

    min-width:70px;

    flex-shrink:0;

}

.log-message{

    color:#e5e7eb;

    word-break:break-word;

}

/* =========================================================
   STATUS COLORS
========================================================= */

.status-item:first-child span{

    color:#22c55e;

}

.status-item:nth-child(2) span{

    color:#60a5fa;

}

.status-item:nth-child(3) span{

    color:#fbbf24;

}

.status-item:nth-child(4) span{

    color:#c084fc;

}

.status-item:nth-child(5) span{

    color:#34d399;

}

.status-item:nth-child(6) span{

    color:#fb7185;

}

/* =========================================================
   STAT COLORS
========================================================= */

.stat-card:nth-child(1) span{

    color:#60a5fa;

}

.stat-card:nth-child(2) span{

    color:#34d399;

}

.stat-card:nth-child(3) span{

    color:#fbbf24;

}

.stat-card:nth-child(4) span{

    color:#fb7185;

}

.stat-card:nth-child(5) span{

    color:#c084fc;

}

.stat-card:nth-child(6) span{

    color:#22c55e;

}

.dashboard-left{
    display:flex;
    flex-direction:column;
    gap:32px;
}

.dashboard-section{
    display:flex;
    flex-direction:column;
}

.dashboard-card:last-child{
    height:700px;    /* choose any value you like */
}