/* THE LEARNING CLUB
   Visual Design System 2027 */

/* Base colour palette */

:root {
    --background: #FAF8F3;
    --surface: #FFFFFF;
    --primary: #526B58;
    --primary-soft: #E4EBE1;
    --accent: #91A58B;
    --text: #343B38;
    --muted: #68716C;
    --border: #E2E5DF;
    --success: #48754F;
    --error: #A34D4D;
    --radius: 18px;
}

/* Secondary 1 - Dusty Blue */

body[data-theme="S1"] {
    --background: #F4F7FB;
    --primary: #344E70;
    --primary-soft: #E5EDF7;
    --accent: #7898BF;
    --border: #D7E2F0;
}

/* Primary 4 - Lavender Purple */

body[data-theme="P4"] {
    --background: #FAF7FC;
    --primary: #695181;
    --primary-soft: #EDE5F5;
    --accent: #AB91CB;
    --border: #E2D7EF;
}

/* Kindergarten 2 - Butter Yellow */

body[data-theme="K2"] {
    --background: #FFFAEB;
    --primary: #84662E;
    --primary-soft: #FFF4D5;
    --accent: #E8C96C;
    --border: #EFE2BB;
}

/* Parent - Sage Green */

body[data-theme="parent"] {
    --background: #FAF8F3;
    --primary: #526B58;
    --primary-soft: #E4EBE1;
    --accent: #91A58B;
    --border: #DCE3D8;
}

/* General layout */

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

h1, h2, h3 {
    color: var(--primary);
    line-height: 1.3;
    font-weight: 600;
}

p {
    margin: 8px 0 16px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

/* Login page */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.05);
}

.brand {
    text-align: center;
}

.brand-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--muted);
}

.brand h1 {
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: 500;
    margin: 12px 0;
}

.brand p {
    color: var(--muted);
}

.pastel-rainbow {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 26px 0;
}

.pastel-rainbow span {
    width: 30px;
    height: 6px;
    border-radius: 10px;
}

.pastel-rainbow span:nth-child(1) {
    background: #F5CDD0;
}

.pastel-rainbow span:nth-child(2) {
    background: #F9DFC2;
}

.pastel-rainbow span:nth-child(3) {
    background: #F6E59C;
}

.pastel-rainbow span:nth-child(4) {
    background: #D2E6CB;
}

.pastel-rainbow span:nth-child(5) {
    background: #CADFF0;
}

.pastel-rainbow span:nth-child(6) {
    background: #DED0ED;
}

/* Forms and buttons */

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

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

button {
    min-height: 46px;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

button:hover:not(:disabled) {
    filter: brightness(0.94);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

#login-button {
    width: 100%;
    margin-top: 24px;
}

#login-message {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

footer {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 24px;
}

/* Dashboard */

#dashboard {
    max-width: 1200px;
    margin: auto;
    padding: 32px;
}

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

.dashboard-header h1 {
    font-family: Georgia, serif;
    margin: 0;
}

#dashboard-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

#dashboard-navigation button {
    background: var(--primary-soft);
    color: var(--primary);
}

#dashboard-navigation button.active {
    background: var(--primary);
    color: white;
}

/* Learning cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.hero {
    background: var(--primary-soft);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
}

.card-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.caption {
    color: var(--muted);
    font-size: 14px;
}

.progress-track {
    height: 9px;
    background: var(--primary-soft);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 20px;
}

/* Learning activities */

.question {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.answer-option {
    display: block;
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    text-align: left;
    margin: 10px 0;
}

.answer-option.selected {
    background: var(--primary-soft);
    border: 2px solid var(--primary);
}

.feedback-correct {
    background: #E9F3E7;
    color: var(--success);
    padding: 16px;
    border-radius: 12px;
}

.feedback-retry {
    background: #FFF3DD;
    color: #795A29;
    padding: 16px;
    border-radius: 12px;
}

/* Realistic educational photographs */

.picture-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.picture-option {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    padding: 10px;
    border-radius: 18px;
}

.picture-option img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #FAF9F6;
}

.picture-option.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* K2 guided learning */

body[data-theme="K2"] {
    font-size: 19px;
}

body[data-theme="K2"] button {
    min-height: 60px;
    font-size: 18px;
}

body[data-theme="K2"] .question {
    padding: 28px;
}

body[data-theme="K2"] .picture-option {
    min-height: 140px;
}

body[data-theme="K2"] .hero {
    border-top: 6px solid transparent;
    border-image: linear-gradient(
        to right,
        #F5CDD0,
        #F9DFC2,
        #F6E59C,
        #D2E6CB,
        #CADFF0,
        #DED0ED
    ) 1;
}

/* Parent reporting */

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.report-table th {
    background: var(--primary-soft);
    color: var(--primary);
}

.table-scroll {
    overflow-x: auto;
}

/* iPad and smaller screens */

@media (max-width: 768px) {
    #dashboard {
        padding: 20px;
    }

    .login-card {
        padding: 28px;
    }

    .hero {
        padding: 24px;
    }

    .card-grid {
        grid-template-columns:
            repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Mobile layout */

@media (max-width: 480px) {
    .login-page {
        padding: 16px;
    }

    .login-card {
        padding: 24px;
    }

    .brand h1 {
        font-size: 28px;
    }

    #dashboard {
        padding: 16px;
    }

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

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