* {
    box-sizing: border-box;
}
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef1f5;
    color: #1c2430;
}
body {
    overflow: hidden;
}
/* =========================
   TOPBAR
========================= */
.topbar {
    height: 64px;
    background: #18202a;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 16px;
    position: relative;
    z-index: 1000;
}
.logo {
    font-size: 21px;
    font-weight: bold;
    white-space: nowrap;
}
.toolbar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
button,
select,
input,
textarea {
    font: inherit;
}
button,
select {
    border: none;
    border-radius: 7px;
    padding: 8px 11px;
    background: white;
    color: #18202a;
    cursor: pointer;
}
button:hover {
    background: #e9edf2;
}
.separator {
    width: 1px;
    height: 28px;
    background: #56606d;
    margin: 0 3px;
}
/* =========================
   MAIN
========================= */
main {
    height: calc(100vh - 88px);
    display: grid;
    grid-template-columns: 290px 1fr;
}
/* =========================
   SIDEBAR
========================= */
.sidebar {
    background: white;
    border-right: 1px solid #d5dae0;
    padding: 15px;
    overflow-y: auto;
}
.sidebar section {
    margin-bottom: 22px;
}
.sidebar h2 {
    font-size: 16px;
    margin: 0 0 10px;
}
#studentSearch {
    width: 100%;
    padding: 9px;
    border: 1px solid #cbd1d8;
    border-radius: 7px;
    margin-bottom: 8px;
}
.file-row {
    margin-bottom: 10px;
}
.file-button {
    display: block;
    text-align: center;
    background: #edf1f5;
    border-radius: 7px;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
}
.file-button:hover {
    background: #dfe5eb;
}
.student {
    padding: 8px 10px;
    margin: 4px 0;
    background: #f1f3f6;
    border-radius: 7px;
    font-size: 14px;
    cursor: pointer;
}
.student:hover {
    background: #dfe7f0;
}
.student.assigned {
    opacity: 0.45;
}
.student.group {
    border-left: 4px solid #6659d9;
}
.student-group {
    font-size: 11px;
    color: #686f78;
    margin-left: 5px;
}
textarea {
    width: 100%;
    min-height: 75px;
    resize: vertical;
    border: 1px solid #cbd1d8;
    border-radius: 7px;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 10px;
}
.full-button {
    width: 100%;
}
.help {
    background: #f4f6f8;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
}
.help p {
    margin: 5px 0;
}
/* =========================
   WORKSPACE
========================= */
.workspace {
    overflow: auto;
    padding: 25px;
}
#classroom {
    position: relative;
    width: 1100px;
    height: 700px;
    margin: 0 auto;
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.025) 1px,
            transparent 1px
        );
    background-size: 25px 25px;
    background-color: #f7f4ea;
    border: 8px solid #bcb3a1;
    border-radius: 8px;
    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
/* =========================
   BLACKBOARD
========================= */
.blackboard {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    height: 45px;
    background: #333d38;
    color: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    letter-spacing: 2px;
}
/* =========================
   OBJECTS
========================= */
.object {
    position: absolute;
    touch-action: none;
    user-select: none;
    cursor: move;
    transform-origin: center center;
}
.table {
    background: #c69a6b;
    border: 2px solid #8d6543;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60442d;
    font-weight: bold;
}
.teacher-desk {
    background: #68727d;
    color: white;
    border: 2px solid #4d555d;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
/* =========================
   SEATS
========================= */
.seat {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #56616d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s;
}
.seat:hover {
    transform: scale(1.15);
}
.seat.filled {
    background: #dbeafe;
    border-color: #3478d4;
}
.seat.top-left {
    left: 10px;
    top: -16px;
}
.seat.top-right {
    right: 10px;
    top: -16px;
}
.seat.bottom-left {
    left: 10px;
    bottom: -16px;
}
.seat.bottom-right {
    right: 10px;
    bottom: -16px;
}
/* =========================
   OBJECT BUTTONS
========================= */
.object-button {
    position: absolute;
    width: 21px;
    height: 21px;
    padding: 0;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.rotate-button {
    left: -9px;
    top: -9px;
    background: #4267c8;
}
.delete-button {
    right: -9px;
    top: -9px;
    background: #d74747;
}
.object-button:hover {
    color: white;
    filter: brightness(1.1);
}
/* =========================
   FOOTER
========================= */
footer {
    height: 24px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #18202a;
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    z-index: 2000;
}
/* =========================
   MOBILE
========================= */
@media (max-width: 900px) {
    body {
        overflow: auto;
    }
    .topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
    }
    main {
        height: auto;
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-right: none;
        border-bottom: 1px solid #d5dae0;
    }
    .workspace {
        overflow: auto;
        padding: 15px;
    }
    #classroom {
        margin: 0;
    }
}
