* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Authentication */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: white;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.auth-card p {
    color: #6b7280;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.primary-button {
    width: 100%;
    border: none;
    background: #2563eb;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    padding: 10px 15px;
    border-radius: 8px;
}

.error-message {
    color: #dc2626;
    margin-top: 12px;
}

.success-message {
    color: #16a34a;
    margin-top: 12px;
}

/* Layout */

.topbar {
    background: #111827;
    color: white;
    padding: 15px 25px;
}

.topbar-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    margin: 0;
    font-size: 21px;
}

.dashboard {
    max-width: 1200px;
    margin: auto;
    padding: 30px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
    margin: 0;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.lesson-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.lesson-card-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
}

.lesson-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.lesson-card p {
    color: #4b5563;
}

.duration {
    white-space: nowrap;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 7px 10px;
    border-radius: 20px;
    height: fit-content;
}

.view-button {
    margin-top: 10px;
}

.full-plan h2 {
    margin-top: 25px;
}

.plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #4b5563;
}

.full-plan h3 {
    margin-top: 28px;
}

.full-plan p {
    line-height: 1.7;
    white-space: pre-wrap;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin-top: 25px;
}

@media (max-width: 700px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .topbar {
        padding: 15px;
    }

    .lesson-card-header {
        flex-direction: column;
    }

    .auth-card {
        padding: 25px;
    }
}


/* ==================================================
   SCHEME OF WORK TABLE
   ================================================== */

.scheme-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}


.scheme-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    background: white;
}


.scheme-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    border: 1px solid #ddd;
    white-space: nowrap;
}


.scheme-table td {
    padding: 14px 12px;
    vertical-align: top;
    border: 1px solid #ddd;
    line-height: 1.5;
}


.scheme-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}


.scheme-week {
    width: 80px;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}


.scheme-topic {
    min-width: 180px;
}


.scheme-table td:nth-child(3) {
    min-width: 260px;
}


.scheme-table td:nth-child(4) {
    min-width: 280px;
}


.scheme-table td:nth-child(5) {
    min-width: 220px;
}


.scheme-table td:nth-child(6) {
    min-width: 220px;
}


.scheme-list {
    margin: 0;
    padding-left: 20px;
}


.scheme-list li {
    margin-bottom: 6px;
}


.scheme-table-heading {
    margin-top: 30px;
}


.scheme-overview {
    line-height: 1.7;
    margin-bottom: 20px;
}


.old-scheme-text {
    line-height: 1.7;
    white-space: normal;
}



/* ==================================================
   SYLLABUS LIBRARY
   ================================================== */

#syllabusFile {
    display: block;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 18px;
}

#syllabusTextPreview {
    width: 100%;
    min-height: 350px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.syllabus-meta {
    margin-bottom: 24px;
}

.syllabus-meta p {
    margin: 8px 0;
}



/* ==================================================
   ASSESSMENT PAPER
   ================================================== */

.assessment-paper {
    margin-top: 24px;
}

.assessment-answer-section {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 2px solid #ddd;
}

.assessment-section-heading {
    margin-top: 20px;
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.assessment-content {
    line-height: 1.7;
}

.assessment-question {
    margin-bottom: 20px;
    font-weight: 500;
}

.assessment-line {
    margin: 5px 0;
}

.assessment-space {
    height: 8px;
}

@media print {

    .assessment-answer-section {
        page-break-before: always;
    }

    .secondary,
    .view-button,
    .ai-button {
        display: none !important;
    }
}
