:root {
    --background: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f9fafc;
    --text: #172033;
    --muted: #667085;
    --line: #d8e0ea;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --danger: #b42318;
    --shadow: 0 18px 60px rgba(23, 32, 51, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    min-height: 100vh;
    padding: 20px 14px 40px;
}

.workspace {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(2.1rem, 7vw, 4.4rem);
    line-height: 1;
}

h2 {
    margin-bottom: 16px;
}

.summary,
.muted {
    color: var(--muted);
}

.summary {
    max-width: 58ch;
    margin-bottom: 0;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
    cursor: pointer;
}

button:hover {
    background: var(--accent-dark);
}

.button-secondary {
    color: var(--text);
    background: #eef2f6;
}

.button-secondary:hover {
    background: #e3e9f0;
}

.text-button {
    width: auto;
    min-height: auto;
    margin-bottom: 16px;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.tabs button {
    color: var(--text);
    background: #e9eef5;
}

.tabs button.active {
    color: #ffffff;
    background: var(--accent);
}

.notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--accent-dark);
    background: #e8f7f3;
    font-weight: 800;
}

.notice.error {
    color: var(--danger);
    background: #fff0f0;
}

.dashboard {
    display: grid;
    gap: 12px;
}

.student-row,
.panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.student-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) 2fr;
    overflow: hidden;
}

.student-name {
    display: grid;
    align-content: center;
    justify-items: start;
    min-height: 88px;
    padding: 16px;
    border-radius: 0;
    color: var(--text);
    background: var(--surface-soft);
    text-align: left;
}

.student-name:hover {
    background: #eef5f4;
}

.student-name span {
    font-size: 1.18rem;
}

.student-name small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
    padding: 12px;
}

.action-button {
    min-height: 64px;
    background: var(--action-color);
}

.action-button:hover {
    filter: brightness(0.92);
    background: var(--action-color);
}

.manager-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 16px;
}

.panel {
    padding: 18px;
}

.form-panel {
    display: grid;
    gap: 10px;
}

label {
    color: var(--muted);
    font-weight: 900;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
    outline: none;
}

input[type="color"] {
    padding: 4px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.button-row button {
    flex: 1;
}

.list-panel {
    display: grid;
    gap: 10px;
    align-content: start;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 0 14px;
    color: var(--text);
    background: #f7f9fc;
    text-align: left;
}

.list-item:hover {
    color: #ffffff;
    background: var(--accent);
}

.list-item small {
    color: var(--muted);
}

.list-item:hover small {
    color: #dff7f2;
}

.log-list {
    display: grid;
    gap: 10px;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.log-item p {
    margin-bottom: 0;
    color: var(--muted);
}

.log-dot {
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border-radius: 999px;
    flex: 0 0 14px;
}

.empty-state {
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 760px) {
    .topbar,
    .student-row,
    .manager-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        display: grid;
    }

    .tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .student-name {
        min-height: 74px;
    }

    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    button {
        width: 100%;
    }
}
