:root {
    --red: #ffcccc;
    --yellow: #fff3b0;
    --light-green: #ccffcc;
    --green: #66cc66;
    --diamond: linear-gradient(135deg, #e0f7fa, #b2ebf2, #80deea, #4dd0e1);
    --border: #aaa;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 20px;
    background: #f9f9f9;
    color: #333;
}

h1 {
    text-align: center;
    color: #2c3e50;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forms {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f0f4f8;
    border-radius: 6px;
}

.form-block {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex: 1 1 250px;
}

.form-block h3 {
    margin-top: 0;
    color: #34495e;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.form-row label {
    min-width: 80px;
    font-weight: 600;
}

.form-row input,
.form-row select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1 1 150px;
}

button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: #2980b9;
}

button.danger {
    background: #e74c3c;
}

button.danger:hover {
    background: #c0392b;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 800px;
    background: white;
}

th,
td {
    border: 1px solid var(--border);
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

th {
    background: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.subject-name {
    font-weight: 600;
    text-align: left;
    min-width: 120px;
    background: #ecf0f1;
}

.subject-type {
    font-size: 0.8em;
    color: #555;
    margin-left: 5px;
}

.work-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Добавлен разделитель между работами в одной ячейке */
.work-cell + .work-cell {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
}

.work-name {
    font-weight: 600;
    font-size: 0.9em;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

/* Статусы работы */
.work-name.status-none {
    background-color: #e8f0fe; /* исходный светло-голубой */
}

.work-name.status-in_progress {
    background-color: #ffe066; /* жёлтый */
}

.work-name.status-completed {
    background-color: #66cc66; /* зелёный */
    color: white;
}

.work-name:hover {
    opacity: 0.85;
}

.work-inputs {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.work-inputs input {
    width: 70px;
    padding: 3px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
}

.result-cell {
    font-weight: bold;
    min-width: 100px;
    background: #f8f9fa;
}

.result-score {
    font-size: 1.1em;
}

.result-percent {
    font-size: 0.85em;
    color: #555;
}

.color-red { background-color: var(--red) !important; }
.color-yellow { background-color: var(--yellow) !important; }
.color-light-green { background-color: var(--light-green) !important; }
.color-green { background-color: var(--green) !important; }
.color-diamond { background: var(--diamond) !important; }

.empty-cell {
    background: #fafafa;
    color: #bbb;
}

.delete-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 4px;
}

.delete-btn:hover {
    color: #c0392b;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-card {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}