
/* ==========================================================================
   TEACHER.CSS
   Teacher dashboard, quizzes, assignments, grading and related pages
   ========================================================================== */


/* ==========================================================================
   TEACHER DASHBOARD
   ========================================================================== */

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.teacher-stat {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 25px rgba(15, 23, 42, .06);
    display: flex;
    align-items: center;
    gap: 15px;
}

.teacher-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    font-size: 22px;
}

.teacher-stat span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 4px;
}

.teacher-stat strong {
    display: block;
    font-size: 25px;
    color: #0f172a;
}

.teacher-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 25px rgba(15, 23, 42, .06);
}

.teacher-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.teacher-section-header h2 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.teacher-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.teacher-button:hover {
    background: #1d4ed8;
}


/* ==========================================================================
   SCHOOL CREATION
   ========================================================================== */

.school-create-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 25px rgba(15, 23, 42, .06);
    margin-bottom: 25px;
}

.school-create-box h2 {
    margin: 0 0 7px;
    color: #0f172a;
}

.school-create-box p {
    margin: 0 0 20px;
    color: #64748b;
}

.school-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.school-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.school-form-group.full {
    grid-column: 1 / -1;
}

.school-form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.school-form-group input,
.school-form-group textarea,
.school-form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
}

.school-form-group input:focus,
.school-form-group textarea:focus,
.school-form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.school-form-group textarea {
    min-height: 100px;
    resize: vertical;
}


/* ==========================================================================
   SCHOOL INFORMATION
   ========================================================================== */

.school-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.school-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.school-info-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.school-info-value {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.school-code {
    color: #2563eb;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
}

.school-code-help {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.school-code-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.school-code-notice strong {
    display: block;
    margin-bottom: 4px;
}

.school-code-notice span {
    display: block;
}


/* ==========================================================================
   SCHOOL MESSAGES
   ========================================================================== */

.school-message {
    padding: 14px 17px;
    border-radius: 9px;
    margin-bottom: 20px;
    font-weight: 600;
}

.school-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.school-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ==========================================================================
   TEACHER TABLE
   ========================================================================== */

.teacher-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.teacher-table th {
    text-align: left;
    padding: 14px 15px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #e5e7eb;
}

.teacher-table td {
    padding: 15px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.teacher-table tr:last-child td {
    border-bottom: none;
}


/* ==========================================================================
   STATUS
   ========================================================================== */

.status,
.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-closed {
    background: #fee2e2;
    color: #991b1b;
}

.status-submitted {
    background: #e0f2fe;
    color: #0369a1;
}

.status-graded {
    background: #dcfce7;
    color: #166534;
}

.status-late {
    background: #fee2e2;
    color: #b91c1c;
}

.status-default {
    background: #f3f4f6;
    color: #374151;
}


/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 60px 25px;
    color: #6b7280;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #374151;
}

.empty-state p {
    margin: 0;
    color: #6b7280;
}

.empty-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}


/* ==========================================================================
   WELCOME
   ========================================================================== */

.welcome-school {
    color: #64748b;
    font-size: 14px;
}


/* ==========================================================================
   TEACHER QUIZ LIST
   ========================================================================== */

.quiz-page {
    width: 100%;
}

.page-heading {
    margin-bottom: 25px;
}

.page-heading h1 {
    margin: 0 0 7px;
    font-size: 30px;
    color: #0f172a;
}

.page-heading p {
    margin: 0;
    color: #64748b;
}

.create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 17px;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.create-button:hover {
    background: #1d4ed8;
}

.page-message {
    padding: 14px 17px;
    border-radius: 9px;
    margin-bottom: 20px;
    font-weight: 600;
}

.page-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.page-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.quiz-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.quiz-stat {
    background: #ffffff;
    border-radius: 13px;
    padding: 19px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, .05);
}

.quiz-stat-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.quiz-stat span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 5px;
}

.quiz-stat strong {
    display: block;
    font-size: 27px;
    color: #0f172a;
}

.quiz-section {
    margin-bottom: 25px;
}

.quiz-list {
    display: grid;
    gap: 17px;
}

.quiz-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 21px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(15, 23, 42, .08);
}

.quiz-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.quiz-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: #0f172a;
}

.quiz-description {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 15px 0;
}

.quiz-meta-item {
    background: #f3f4f6;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: #374151;
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.quiz-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 7px;
    text-decoration: none;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.action-view {
    background: #e0f2fe;
    color: #0369a1;
}

.action-edit {
    background: #eef2ff;
    color: #4338ca;
}

.action-status {
    background: #fef3c7;
    color: #92400e;
}

.action-delete {
    background: #fee2e2;
    color: #991b1b;
}

.quiz-action:hover {
    opacity: .88;
}


/* ==========================================================================
   SHARED TEACHER FORM COMPONENTS
   ========================================================================== */

.container {
    width: min(1250px, 94%);
    margin: 30px auto;
}

.page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.create-page {
    max-width: 1200px;
    margin: 0 auto;
}

.edit-page {
    width: 100%;
}

.page {
    max-width: 1250px;
    margin: 30px auto;
    padding: 0 20px 60px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.top-bar h1 {
    margin: 0;
    font-size: 28px;
}

.top-bar p {
    margin: 7px 0 0;
    color: #6b7280;
}

.top-actions,
.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.page-header h1 {
    margin: 0 0 7px;
    font-size: 30px;
    color: #0f172a;
}

.page-header p {
    margin: 0;
    color: #64748b;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
}

.page-title p {
    margin: 7px 0 0;
    color: #6b7280;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
}

.back-button:hover {
    background: #dbe1e8;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.button-primary {
    background: #2563eb;
    color: #ffffff;
}

.button-secondary {
    background: #e5e7eb;
    color: #111827;
}

.button-success {
    background: #16a34a;
    color: #ffffff;
}

.button-warning {
    background: #d97706;
    color: #ffffff;
}

.button-danger {
    background: #dc2626;
    color: #ffffff;
}

.button-info {
    background: #0891b2;
    color: #ffffff;
}

.button-purple {
    background: #7c3aed;
    color: #ffffff;
}

.button-small {
    padding: 8px 12px;
    font-size: 13px;
}

.button:hover {
    opacity: .9;
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.card-description {
    color: #6b7280;
    margin-top: 0;
    margin-bottom: 25px;
}

.form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06);
}


/* ==========================================================================
   FORMS
   ========================================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full,
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label,
.card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #334155;
}

.required {
    color: #dc2626;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    color: #111827;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.form-group textarea,
.form-card textarea {
    min-height: 110px;
    resize: vertical;
}

.help-text {
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    gap: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}


/* ==========================================================================
   FORM MESSAGES / ALERTS
   ========================================================================== */

.message {
    padding: 14px 17px;
    border-radius: 9px;
    margin-bottom: 20px;
    font-weight: 600;
}

.message.success,
.message-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.message.error,
.message-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-message {
    padding: 14px 17px;
    border-radius: 11px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
    font-weight: 600;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert {
    padding: 15px 18px;
    border-radius: 9px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error ul {
    margin: 0;
    padding-left: 20px;
}

.alert-error li + li {
    margin-top: 5px;
}

.errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 25px;
}

.errors ul {
    margin: 0;
    padding-left: 20px;
}

.errors li {
    margin-bottom: 5px;
}

.errors li:last-child {
    margin-bottom: 0;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 25px;
    line-height: 1.6;
}


/* ==========================================================================
   QUIZ / QUESTION MANAGEMENT
   ========================================================================== */

.quiz-info {
    margin-bottom: 20px;
}

.quiz-info h1 {
    margin: 0 0 8px;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.add-card,
.question-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06);
}

.add-card h2,
.question-card h3 {
    margin-top: 0;
}

.answers-box {
    margin-top: 15px;
}

.answer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.answer-row input[type="text"] {
    flex: 1;
}

.answer-row input[type="radio"],
.answer-radio,
.correct-radio {
    width: 18px !important;
    height: 18px;
    margin: 0;
    box-shadow: none !important;
}

.question-header,
.question-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.question-number {
    font-size: 16px;
    font-weight: 800;
    color: #2563eb;
}

.question-text {
    font-size: 17px;
    font-weight: 700;
    margin: 12px 0 15px;
    white-space: pre-wrap;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 15px;
}

.question-type {
    font-size: 12px;
    font-weight: 700;
    background: #eef2ff;
    color: #3730a3;
    padding: 5px 9px;
    border-radius: 20px;
}

.question-marks {
    font-size: 13px;
    color: #6b7280;
}

.question-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.answer-display {
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.explanation {
    margin-top: 15px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 7px;
    font-size: 14px;
    color: #4b5563;
}

.edit-box {
    display: none;
    background: #f9fafb;
    border-radius: 10px;
    padding: 18px;
    margin-top: 15px;
}

.edit-box.active {
    display: block;
}

.answer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.answer-item {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    margin-bottom: 7px;
}

.answer-item.correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.correct-label {
    font-size: 12px;
    font-weight: 800;
    color: #15803d;
    margin-left: 8px;
}


/* ==========================================================================
   QUIZ CREATION
   ========================================================================== */

.form-section {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 22px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06);
}

.form-section-header {
    margin-bottom: 20px;
}

.form-section-header h2 {
    margin: 0 0 5px;
    font-size: 19px;
    color: #0f172a;
}

.form-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.quiz-target-box {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 20px;
}

.quiz-target-box h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 16px;
}

.quiz-target-box p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.school-display {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.school-display-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
}

.school-display-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}

.school-display-value {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.school-code-small {
    color: #2563eb;
    letter-spacing: 1px;
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.remove-question {
    border: none;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 9px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 700;
}

.answers-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 20px 0 10px;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    outline: none;
}

.answer-input:focus {
    border-color: #2563eb;
}

.add-question {
    width: 100%;
    padding: 14px;
    border: 2px dashed #bfdbfe;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
}

.add-question:hover {
    background: #dbeafe;
}

.no-school-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.no-school-box h3 {
    margin: 0 0 7px;
}

.no-school-box p {
    margin: 0 0 15px;
    line-height: 1.6;
}


/* ==========================================================================
   ASSIGNMENT CREATE / EDIT
   ========================================================================== */

.assignment-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .06);
}

.info-item,
.info-box {
    background: #f9fafb;
    border-radius: 9px;
    padding: 15px;
}

.info-item small,
.info-label {
    display: block;
    color: #6b7280;
    margin-bottom: 5px;
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

.info-item strong,
.info-value {
    color: #111827;
    font-weight: 700;
}

.assignment-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}

.assignment-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.assignment-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.assignment-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.assignment-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.answer-section {
    display: none;
}

.answer-section.active {
    display: block;
}


/* ==========================================================================
   ASSIGNMENT LIST
   ========================================================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, .05);
}

.stat-card small {
    display: block;
    color: #6b7280;
    margin-bottom: 7px;
}

.stat-card strong {
    font-size: 28px;
}

.stat-number {
    display: block;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
}

.assignment-title {
    margin: 0 0 8px;
    font-size: 21px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 15px 0;
}

.meta-item {
    background: #f3f4f6;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13px;
}

.closed-note {
    color: #6b7280;
    font-size: 13px;
    padding: 9px 12px;
    background: #f9fafb;
    border-radius: 7px;
}


/* ==========================================================================
   FILTERS
   ========================================================================== */

.filter-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-card strong {
    font-size: 15px;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-button,
.clear-filter {
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 7px;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-button:hover,
.clear-filter:hover {
    background: #f8fafc;
}

.filter-button.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.results-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}


/* ==========================================================================
   TABLE / SUBMISSIONS
   ========================================================================== */

.table-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
}

.table-card th {
    text-align: left;
    background: #f8fafc;
    padding: 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.table-card td {
    padding: 16px 15px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.table-card tr:last-child td {
    border-bottom: none;
}

.student-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.student-email {
    font-size: 12px;
    color: #6b7280;
}

.score {
    font-weight: 700;
}

.score-percentage {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}

.grade-button {
    display: inline-block;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 7px;
    background: #111827;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
}

.grade-button:hover {
    opacity: .9;
}


/* ==========================================================================
   ASSIGNMENT GRADING
   ========================================================================== */

.score-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.score-number {
    font-size: 36px;
    font-weight: 800;
    color: #2563eb;
}

.score-percent {
    font-size: 14px;
    color: #64748b;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.option.selected {
    border-color: #93c5fd;
    background: #eff6ff;
}

.option.correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.option.wrong {
    border-color: #fca5a5;
    background: #fef2f2;
}

.option-label {
    font-weight: 600;
}

.answer-status {
    margin-top: 10px;
    font-weight: 700;
}

.answer-correct {
    color: #166534;
}

.answer-wrong {
    color: #991b1b;
}

.theory-answer {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    padding: 15px;
    line-height: 1.6;
}

.grading-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin-top: 18px;
}

.grading-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 15px;
}

.grading-row label {
    padding-top: 10px;
}

.marks-input {
    max-width: 150px;
}

.comment-input {
    min-height: 100px;
}

.readonly-mark {
    padding: 12px 14px;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 700;
}

.teacher-note {
    margin-top: 15px;
    padding: 13px 15px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 9px;
    line-height: 1.6;
}

.overall-comment {
    margin-top: 20px;
}

.overall-comment label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.overall-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    resize: vertical;
}

.submit-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.submit-button {
    border: none;
    border-radius: 9px;
    padding: 12px 20px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.submit-button:hover {
    background: #15803d;
}


/* ==========================================================================
   SPECIAL CREATE PAGE
   ========================================================================== */

.form-actions .button {
    min-height: 42px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {

    .teacher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-info-grid,
    .assignment-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .school-info {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 850px) {

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-filter-form {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 700px) {

    .page-header,
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid,
    .school-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full,
    .form-group.full-width,
    .school-form-group.full {
        grid-column: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .school-display,
    .assignment-info-grid,
    .assignment-info {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .button,
    .button {
        width: 100%;
        text-align: center;
    }

    .assignment-header,
    .quiz-card-top {
        flex-direction: column;
    }

    .card,
    .form-card,
    .form-section,
    .assignment-card,
    .add-card,
    .question-card {
        padding: 20px;
    }

    .grading-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .grading-row label {
        padding-top: 0;
    }

    .question-actions {
        flex-direction: column;
    }

    .question-actions form,
    .question-actions button,
    .question-actions .button {
        width: 100%;
    }

    .filter-button,
    .clear-filter {
        min-height: 45px;
    }

    .results-filter-form {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 650px) {

    .page {
        padding: 20px 12px 50px;
    }

    .page-container {
        padding: 20px 12px 50px;
    }

    .top-bar h1 {
        font-size: 23px;
    }

    .page-header h1,
    .page-heading h1 {
        font-size: 25px;
    }

    .student-name {
        font-size: 21px;
    }

    .card {
        padding: 18px;
    }
}


@media (max-width: 550px) {

    .stats,
    .results-stats {
        grid-template-columns: 1fr;
    }

    .top-actions {
        width: 100%;
    }

    .top-actions .button {
        flex: 1;
        text-align: center;
    }

    .actions,
    .quiz-actions {
        flex-direction: column;
    }

    .actions .button,
    .actions form,
    .actions form button,
    .quiz-actions .quiz-action {
        width: 100%;
    }

    .assignment-header {
        flex-direction: column;
    }
}


@media (max-width: 500px) {

    .assignment-card {
        padding: 18px;
    }

    .page-title h1 {
        font-size: 23px;
    }

    .question-actions {
        flex-direction: column;
    }

    .question-actions form,
    .question-actions button,
    .question-actions .button {
        width: 100%;
    }
}


/* =========================================================
   ATOMSPLAY - TEACHER STUDENTS PAGE
========================================================= */

/* =========================================================
   DASHBOARD HEADER
========================================================= */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.welcome-small {
    margin: 0 0 6px;
    font-size: 14px;
    color: #64748b;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 30px;
    color: #0f172a;
}

.welcome-school {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
}


/* =========================================================
   MINI PROFILE
========================================================= */

.profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
}

.profile-mini strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
}

.profile-mini small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}


/* =========================================================
   STUDENTS PAGE HEADER
========================================================= */

.students-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.students-header h1 {
    margin: 0 0 7px;
    font-size: 27px;
    color: #0f172a;
}

.students-header p {
    margin: 0;
    color: #64748b;
}

.students-count {
    background: #2563eb;
    color: #ffffff;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   ASSIGNMENT MESSAGE
========================================================= */

.assignment-message {
    padding: 14px 17px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.5;
}

.assignment-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.assignment-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* =========================================================
   NO CLASSES NOTICE
========================================================= */

.no-classes-notice {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}


/* =========================================================
   SEARCH
========================================================= */

.student-search {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.student-search form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.student-search input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.student-search input[type="text"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.search-button,
.clear-button {
    border: none;
    padding: 12px 17px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.search-button {
    background: #2563eb;
    color: #ffffff;
}

.search-button:hover {
    background: #1d4ed8;
}

.clear-button {
    background: #f1f5f9;
    color: #334155;
}

.clear-button:hover {
    background: #e2e8f0;
}


/* =========================================================
   STUDENTS CARD
========================================================= */

.students-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.students-table-wrapper {
    width: 100%;
    overflow-x: auto;
}


/* =========================================================
   TABLE
========================================================= */

.students-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

.students-table thead {
    background: #f8fafc;
}

.students-table th {
    padding: 15px;
    text-align: left;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.students-table td {
    padding: 15px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    font-size: 14px;
}

.students-table tbody tr:last-child td {
    border-bottom: none;
}

.students-table tbody tr:hover {
    background: #f8fafc;
}


/* =========================================================
   STUDENT DETAILS
========================================================= */

.student-name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.student-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    overflow: hidden;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-name strong {
    display: block;
    color: #0f172a;
    margin-bottom: 3px;
}

.student-name small {
    display: block;
    color: #64748b;
    font-size: 12px;
}


/* =========================================================
   CLASS
========================================================= */

.class-name {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.class-not-assigned {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   ASSIGN CLASS FORM
========================================================= */

.assign-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}

.class-select {
    flex: 1;
    min-width: 150px;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.class-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.assign-button {
    border: none;
    background: #16a34a;
    color: #ffffff;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.assign-button:hover {
    background: #15803d;
}


/* =========================================================
   STATUS
========================================================= */

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-suspended {
    background: #fee2e2;
    color: #991b1b;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    text-align: center;
    padding: 60px 25px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.empty-state h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 23px;
}

.empty-state p {
    max-width: 550px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.teacher-button {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    padding: 11px 17px;
    border-radius: 9px;
    font-weight: 700;
}

.teacher-button:hover {
    background: #1d4ed8;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .main-content {
        padding: 25px 20px;
    }

}


@media (max-width: 700px) {

    .main-content {
        padding: 20px 14px 40px;
    }

    .dashboard-header {
        align-items: flex-start;
    }

    .dashboard-header h1 {
        font-size: 25px;
    }

    .students-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .students-header h1 {
        font-size: 23px;
    }

    .students-count {
        width: 100%;
        text-align: center;
    }

    .profile-mini {
        width: 100%;
    }

    .student-search form {
        flex-direction: column;
        align-items: stretch;
    }

    .student-search input[type="text"] {
        width: 100%;
        min-width: 0;
    }

    .search-button,
    .clear-button {
        width: 100%;
        text-align: center;
    }

}


@media (max-width: 450px) {

    .main-content {
        padding: 15px 10px 35px;
    }

    .students-header h1 {
        font-size: 21px;
    }

    .student-search {
        padding: 14px;
    }

    .empty-state {
        padding: 40px 18px;
    }

    .empty-state h2 {
        font-size: 20px;
    }

}


/* =========================================================
   ATOMSPLAY - TEACHER RESULTS PAGE
========================================================= */

/* =========================
   PAGE TITLE
========================= */

.results-title {
    margin: 25px 0 20px;
}

.results-title h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.results-title p {
    margin: 0;
    font-size: 15px;
    color: #6b7280;
}


/* =========================
   RESULT STATISTICS
========================= */

.results-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.result-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.result-stat-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.result-stat-card strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}


/* =========================
   FILTER SECTION
========================= */

.results-filters {
    margin-bottom: 25px;
}

.results-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.results-filter-form input,
.results-filter-form select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.results-filter-form input {
    flex: 1;
    min-width: 220px;
}

.results-filter-form select {
    min-width: 190px;
}

.results-filter-form input:focus,
.results-filter-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.results-filter-form input::placeholder {
    color: #9ca3af;
}


/* =========================
   FILTER BUTTON
========================= */

.filter-button {
    height: 46px;
    padding: 0 20px;
    border: none;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.filter-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}


/* =========================
   CLEAR FILTER
========================= */

.clear-filter {
    height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #ffffff;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.clear-filter:hover {
    background: #f3f4f6;
    color: #111827;
}


/* =========================
   RESULTS CARD
========================= */

.results-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}


/* =========================
   TABLE WRAPPER
========================= */

.results-table-wrapper {
    width: 100%;
    overflow-x: auto;
}


/* =========================
   RESULTS TABLE
========================= */

.results-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
}

.results-table thead {
    background: #f8fafc;
}

.results-table th {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.results-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 14px;
    vertical-align: middle;
}

.results-table tbody tr {
    transition: background 0.2s ease;
}

.results-table tbody tr:hover {
    background: #f8fafc;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   STUDENT CELL
========================= */

.student-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.student-cell strong {
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
}

.student-cell small {
    color: #9ca3af;
    font-size: 12px;
}


/* =========================
   QUIZ TITLE
========================= */

.results-table td strong {
    color: #1f2937;
}


/* =========================
   PERCENTAGE BADGES
========================= */

.percentage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 65px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.percentage-good {
    background: #dcfce7;
    color: #15803d;
}

.percentage-average {
    background: #fef3c7;
    color: #b45309;
}

.percentage-low {
    background: #fee2e2;
    color: #dc2626;
}


/* =========================
   EMPTY STATE
========================= */

.results-card .empty-state {
    padding: 60px 25px;
    text-align: center;
}

.results-card .empty-state-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 50%;
    font-size: 30px;
}

.results-card .empty-state h2 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #1f2937;
}

.results-card .empty-state p {
    max-width: 450px;
    margin: 0 auto;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 1100px) {

    .results-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 768px) {

    .results-title {
        margin-top: 20px;
    }

    .results-title h1 {
        font-size: 24px;
    }

    .results-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .result-stat-card {
        padding: 16px;
    }

    .result-stat-card strong {
        font-size: 23px;
    }

    .results-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .results-filter-form input,
    .results-filter-form select,
    .filter-button,
    .clear-filter {
        width: 100%;
        min-width: 0;
    }

    .results-table {
        min-width: 850px;
    }

    .results-table th,
    .results-table td {
        padding: 13px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .results-stats {
        grid-template-columns: 1fr;
    }

    .results-title h1 {
        font-size: 22px;
    }

    .result-stat-card {
        padding: 18px;
    }

    .results-card .empty-state {
        padding: 45px 18px;
    }

}




/* Assignment Info Summary Grid */
.assignment-info {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.assignment-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.info-box {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Flash Messages */
.message {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.message.success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.message.error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border-color: var(--error-border);
}

/* Main Cards & Form Layouts */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
  flex: 1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.375rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

/* Inputs, Textareas, Selects */
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Question Type Conditional Section */
.answer-section {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

.answer-section.active {
  display: block;
  opacity: 1;
}

/* Form Buttons */
button, 
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

button[type="submit"],
.btn-primary {
  background-color: var(--primary);
  color: white;
}

button[type="submit"]:hover,
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Assignment Submit Card */

.assignment-submit-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;

    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;

    box-shadow: var(--shadow-sm);
}

.assignment-submit-area h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.assignment-submit-area p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.assignment-submit-area .button {
    flex-shrink: 0;
    white-space: nowrap;
}


/* Submit Button */

.button-success {
    background-color: #16a34a;
    color: #ffffff;
}

.button-success:hover {
    background-color: #15803d;
    box-shadow: var(--shadow-md);
}


/* Mobile */

@media (max-width: 768px) {

    .assignment-submit-area {
        flex-direction: column;
        align-items: stretch;
    }

    .assignment-submit-area .button {
        width: 100%;
    }

}