* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f6f8;
    color: #202124;
}


header {
    background: #202124;
    color: white;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.current-time {
    margin-top: 6px;
    color: #d0d0d0;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}


nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 14px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

nav a:hover {
    text-decoration: underline;
}


main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}


.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.page-heading h2 {
    margin-bottom: 4px;
}

.page-heading p {
    margin-top: 0;
    color: #666;
}


.panel,
.event-card,
.empty {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;

    box-shadow:
        0 1px 3px
        rgba(0, 0, 0, 0.12);
}


.event-card {
    display: grid;

    grid-template-columns:
        180px
        1fr
        auto;

    gap: 20px;
    align-items: center;
}

.event-time {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.event-time span {
    color: #888;
}

.course {
    font-size: 1.15rem;
    margin-top: 3px;
}

.event-type {
    color: #666;
    margin-top: 3px;
}

.device-list {
    margin-top: 8px;
    color: #555;
}

.device-list span {
    display: inline-block;
    background: #eef1f5;
    border-radius: 6px;
    padding: 3px 7px;
    margin-left: 4px;
}

.warning-text {
    color: #a33;
    font-weight: 600;
    margin-top: 8px;
}


.student-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.student-title h3 {
    margin-top: 0;
}


label {
    display: block;
    font-weight: 600;
    margin-bottom: 18px;
}


input[type="text"],
input[type="date"],
textarea {
    width: 100%;
    margin-top: 7px;
    padding: 10px;

    border: 1px solid #bbb;
    border-radius: 6px;

    font: inherit;
}

textarea {
    resize: vertical;
    min-height: 400px;
}


fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    padding: 15px;
}


.device-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    font-weight: normal;
}

.device-checkbox small {
    display: block;
    color: #777;
}


button,
.button {
    border: 0;
    border-radius: 6px;

    padding: 10px 16px;

    background: #333;
    color: white;

    font: inherit;
    font-weight: 600;

    cursor: pointer;
    text-decoration: none;
}

button:hover,
.button:hover {
    opacity: 0.9;
}

button.enabled {
    background: #287b43;
}

button.disabled {
    background: #777;
}


.notice {
    background: #fff6d8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 18px;
}


.flash {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 18px;
}

.flash.success {
    background: #dff2e4;
}

.flash.warning {
    background: #fff1c9;
}

.flash.error {
    background: #f5dddd;
}


.device-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(300px, 1fr)
        );

    gap: 18px;
}

.device-details {
    color: #666;
    margin-bottom: 18px;
}

.uuid {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-top: 5px;
}

.test-form input {
    margin-bottom: 10px;
}

.toggle {
    font-weight: normal;
}


@media (max-width: 700px) {

    .event-card {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-title {
        flex-direction: column;
    }
}
