/* ============================================================
   Workshop 2 — "2 Hours. 32 Students. One Dashboard."
   AU School of Education
   ============================================================ */

:root {
    --au-coral: #F74E53;
    --au-teal: #26C0BB;
    --au-deep: #1A4D5C;
    --au-cream: #FFF8F0;
    --ink: #1F2933;
    --ink-soft: #52606D;
    --line: #E4E7EB;
    --bg: #FAFBFC;
    --warn: #F0B429;
    --good: #2D8B6F;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--bg);
    margin: 0;
    line-height: 1.6;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: flex;
    gap: 4px;
    background: rgba(26, 77, 92, 0.95);
    padding: 4px;
    border-radius: 20px;
}
.lang-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}
.lang-btn.active { background: #fff; color: var(--au-deep); }

/* ---------- Top nav ---------- */
.workshop-nav {
    background: var(--au-deep);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.workshop-nav .brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-au {
    background: var(--au-coral);
    color: #fff;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.brand-title { font-weight: 600; font-size: 1rem; }

.nav-progress {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-chip {
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.16);
    transition: background 0.15s, transform 0.15s, color 0.15s;
    white-space: nowrap;
}
.nav-chip:hover {
    background: rgba(255,255,255,0.28);
    color: #fff;
    transform: translateY(-1px);
}
.nav-chip.done {
    background: var(--au-teal);
    color: #fff;
    border-color: transparent;
}
.nav-chip.current {
    background: var(--au-coral);
    color: #fff;
    border-color: transparent;
}
.nav-chip.cert {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    border-style: dashed;
}
.nav-chip.cert:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.nav-chip.cert.unlocked {
    background: #f4c430;
    color: #2a2a2a;
    border-color: transparent;
    border-style: solid;
}
.nav-chip.cert.unlocked:hover {
    background: #f7d24a;
    color: #1a1a1a;
}
.nav-chip.cert i { margin-right: 4px; }
@media (max-width: 768px) {
    .nav-chip { min-width: 32px; padding: 0 8px; font-size: 0.75rem; }
}

/* ---------- Top-nav certificate pill (always visible) ---------- */
.nav-cert-pill {
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.nav-cert-pill.ready {
    background: linear-gradient(135deg, #f6c945, #e0a90c);
    color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(224, 169, 12, 0.4);
}
.nav-cert-pill.ready:hover {
    transform: translateY(-1px);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(224, 169, 12, 0.55);
}
.nav-cert-pill.locked {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.25);
    border-style: dashed;
}
.nav-cert-pill.locked:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.nav-cert-pill .nav-cert-count {
    background: rgba(0,0,0,0.18);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.nav-cert-pill.ready .nav-cert-count {
    background: rgba(0,0,0,0.15);
    color: inherit;
}
@media (max-width: 768px) {
    .nav-cert-pill { padding: 6px 12px; font-size: 0.78rem; margin-left: 8px; }
    .nav-cert-pill span:not(.nav-cert-count) { display: none; }
    .nav-cert-pill i { font-size: 1.05em; }
}

/* ---------- Hero ---------- */
.hero { padding: 80px 0 60px; }
.eyebrow {
    color: var(--au-coral);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
}
.hero-line-1, .hero-line-2, .hero-line-3 {
    display: block;
}
.hero-line-2 { color: var(--au-teal); }
.hero-line-3 { color: var(--au-coral); }
.hero-sub {
    font-size: 1.25rem;
    color: var(--ink-soft);
    max-width: 540px;
    margin-bottom: 32px;
}
.hero-cta .btn-primary {
    background: var(--au-coral);
    border-color: var(--au-coral);
    padding: 12px 28px;
    font-weight: 600;
}
.hero-cta .btn-primary:hover {
    background: #e03e43;
    border-color: #e03e43;
}
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    color: var(--ink-soft);
}
.hero-stats strong {
    color: var(--ink);
    font-size: 1.5rem;
    display: block;
}

/* Hero card teaser */
.hero-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow: hidden;
}
.hero-card-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.hero-card-row-header {
    background: var(--au-deep);
    color: #fff;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}
.hero-card-row-footer {
    background: var(--au-cream);
    color: var(--au-coral);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    border-radius: 0 0 8px 8px;
}
.hero-card-row.dim { background: #FFF5F5; }
.hero-card-row:last-child { border-bottom: none; }

/* ---------- Module overview ---------- */
.modules-overview { padding: 60px 0; background: #fff; }
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}
.module-card {
    display: block;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
    height: 100%;
}
.module-card:hover {
    border-color: var(--au-teal);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    color: var(--ink);
}
.module-card.done {
    border-color: var(--good);
    background: #F0F9F4;
}
.module-num {
    font-size: 0.85rem;
    color: var(--au-coral);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.module-card-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.module-card-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }
.module-badge {
    display: inline-block;
    margin-top: 12px;
    background: var(--good);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ---------- Module page ---------- */
.module-container { max-width: 760px; padding: 40px 16px; }
.module-header { margin-bottom: 32px; }
.module-eyebrow {
    color: var(--au-coral);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.module-title { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }

.step-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}
.step-card h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 16px; }
.step-card p { font-size: 1.1rem; color: var(--ink); margin-bottom: 16px; }
.step-card .emphasis {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--au-deep);
    padding: 12px 16px;
    background: var(--au-cream);
    border-left: 4px solid var(--au-coral);
    border-radius: 4px;
}
.step-card .btn-primary {
    background: var(--au-coral);
    border-color: var(--au-coral);
    padding: 10px 24px;
    font-weight: 600;
}
.step-card .btn-primary:hover { background: #e03e43; border-color: #e03e43; }

.story-card { background: linear-gradient(135deg, #FFF 0%, var(--au-cream) 100%); }

/* ---------- Student reveal card ---------- */
.student-reveal { animation: fadeInUp 0.6s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal-card {
    background: var(--au-deep);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}
.reveal-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--au-cream);
}
.reveal-period {
    font-size: 1rem;
    color: var(--au-teal);
    margin-bottom: 16px;
}
.reveal-card hr { border-color: rgba(255,255,255,0.2); }
.reveal-row { text-align: left; padding: 4px 0; }

/* ---------- Gradebook table ---------- */
.gradebook-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    max-height: 400px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.gradebook-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}
.gradebook-table th {
    background: var(--au-deep);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    position: sticky;
    top: 0;
    white-space: nowrap;
    font-weight: 600;
}
.gradebook-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.gradebook-table .row-highlight {
    background: #FFE9CC;
    font-weight: 600;
}
.gradebook-table .row-highlight td { color: var(--au-deep); }
.gradebook-table td.missing {
    background: #FFF5F5;
    color: var(--au-coral);
    font-weight: 600;
    text-align: center;
}

/* ---------- Pivot tables (Module 3) ---------- */
.pivot-result {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 24px 0;
    overflow: hidden;
}
.pivot-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.pivot-row:last-child { border-bottom: none; }
.pivot-header {
    background: var(--au-deep);
    color: #fff;
    font-weight: 600;
}
.pivot-row.pivot-low {
    background: #FFF5F5;
    color: var(--au-coral);
    font-weight: 600;
}
.pivot-row.pivot-high {
    background: #F0F9F4;
    color: var(--good);
    font-weight: 600;
}
.reveal-box {
    background: var(--au-cream);
    border-left: 4px solid var(--au-coral);
    padding: 20px 24px;
    border-radius: 4px;
}
.reveal-box h3 { color: var(--au-deep); margin-top: 0; }

/* ---------- Hero certificate pill ---------- */
.cert-pill-row {
    display: flex;
    align-items: center;
}
.cert-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    border: 1.5px solid transparent;
}
.cert-pill i { font-size: 1.05em; }

.cert-pill-ready {
    background: linear-gradient(135deg, #f6c945, #e0a90c);
    color: #2a2a2a;
    box-shadow: 0 2px 10px rgba(224, 169, 12, 0.35);
}
.cert-pill-ready:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(224, 169, 12, 0.5);
    color: #1a1a1a;
}

.cert-pill-locked {
    background: rgba(0,0,0,0.04);
    color: #6c757d;
    border-color: rgba(0,0,0,0.12);
    border-style: dashed;
}
.cert-pill-locked:hover {
    background: rgba(0,0,0,0.08);
    color: #2a2a2a;
}

/* ---------- Google Sheets walkthrough ---------- */
.sheets-howto {
    background: #f7fafc;
    border-left: 4px solid var(--au-teal, #26C0BB);
    border-radius: 4px;
    padding: 16px 16px 16px 40px;
    margin: 16px 0;
    line-height: 1.65;
}
.sheets-howto li { margin-bottom: 8px; }
.sheets-howto code {
    background: #e8eef2;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.92em;
}
.self-attest {
    background: #fff8e6;
    border: 1px solid #f0d97a;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 20px;
}
.self-attest label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}
.self-attest input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--au-coral, #F74E53);
}

/* ---------- Approach cards (Module 2) ---------- */
.approach-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.approach-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--au-teal);
}
.approach-card h4 { margin-top: 8px; font-size: 1.05rem; }
.approach-card p { font-size: 0.95rem; margin-bottom: 0; }
.approach-num {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: var(--au-deep);
    color: #fff;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
}

/* ---------- Chart containers (Module 4) ---------- */
.chart-container {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.chart-small canvas { max-height: 250px; }

/* ---------- Dashboard (Module 5) ---------- */
.dashboard {
    display: grid;
    grid-template-columns: 220px 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    margin: 24px 0;
}
.kpi-tile {
    background: var(--au-deep);
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    grid-row: span 1;
}
.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}
.kpi-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--au-cream);
    line-height: 1;
    margin: 8px 0;
}
.kpi-sub { font-size: 0.85rem; opacity: 0.8; }
.dash-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}
.dash-panel h4 { font-size: 1rem; margin-bottom: 12px; color: var(--au-deep); font-weight: 600; }
.watch-list-panel {
    grid-column: 1 / -1;
}
.watch-list {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}
.watch-list th {
    background: var(--bg);
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--line);
}
.watch-list td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}
.watch-list .watch-reasons {
    color: var(--au-coral);
    font-weight: 500;
}
@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
}

/* ---------- Phone call (Module 6) ---------- */
.phone-call-prompt {
    background: var(--au-cream);
    border-left: 4px solid var(--au-coral);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
}
.phone-textarea {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 16px;
    border: 2px solid var(--line);
    border-radius: 8px;
    min-height: 140px;
}
.phone-textarea:focus {
    border-color: var(--au-teal);
    outline: none;
}
.char-count {
    text-align: right;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-top: 4px;
}
.cta-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Quick question / quiz ---------- */
.quick-question { margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--line); }
.quick-question h3 { font-size: 1.2rem; font-weight: 600; }
.options label {
    display: block;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.options label:hover { background: #F0F4F8; }
.options input { margin-right: 12px; }

.quiz-question { margin-bottom: 24px; }
.quiz-question .q-text { font-weight: 600; margin-bottom: 12px; }
.quiz-result {
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
}
.quiz-result.pass { background: #F0F9F4; color: var(--good); }
.quiz-result.fail { background: #FFF5F5; color: var(--au-coral); }

/* ---------- Module complete card ---------- */
.module-complete-card { text-align: center; }
.complete-icon {
    font-size: 4rem;
    color: var(--good);
    margin-bottom: 16px;
}

/* ---------- Student sidebar ---------- */
.student-sidebar {
    position: fixed;
    right: 0;
    top: 100px;
    width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-right: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 4px 16px rgba(0,0,0,0.06);
    z-index: 90;
    transition: transform 0.3s;
}
.student-sidebar.collapsed { transform: translateX(220px); }
.student-sidebar-header {
    background: var(--au-deep);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.btn-collapse {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}
.student-sidebar-body { padding: 16px; }
.student-name { font-size: 1.2rem; font-weight: 700; color: var(--au-deep); margin-bottom: 8px; }
.student-meta { font-size: 0.85rem; color: var(--ink-soft); }
.student-meta div { margin-bottom: 4px; }

@media (max-width: 992px) {
    .student-sidebar { display: none !important; }
}

/* ---------- AI tutor ---------- */
.tutor-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--au-coral);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 200;
}
.tutor-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 200;
}
.tutor-header {
    background: var(--au-deep);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tutor-sub { font-size: 0.8rem; opacity: 0.8; }
.btn-close-tutor { background: transparent; border: none; color: #fff; cursor: pointer; }
.tutor-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tutor-msg {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
}
.tutor-msg.user { background: var(--au-teal); color: #fff; align-self: flex-end; }
.tutor-msg.assistant { background: #F0F4F8; align-self: flex-start; }
.tutor-input {
    border-top: 1px solid var(--line);
    padding: 12px;
    display: flex;
    gap: 8px;
}
.tutor-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    outline: none;
}
.tutor-input button {
    background: var(--au-coral);
    color: #fff;
    border: none;
    width: 36px;
    border-radius: 18px;
    cursor: pointer;
}

/* ---------- Certificate (PDF preview pattern, matches Titanic) ---------- */
.certificate-preview-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
}
.certificate-preview {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}
.cert-meta {
    font-size: 0.95rem;
}
.cert-meta div { margin-bottom: 4px; }

@media (max-width: 768px) {
    .certificate-preview { height: 480px; }
}

/* ---------- Footer ---------- */
.workshop-footer {
    padding: 40px 0;
    background: var(--au-deep);
    color: #fff;
}
.btn-link-reset {
    background: transparent;
    border: none;
    color: var(--au-coral);
    cursor: pointer;
    text-decoration: underline;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .module-title { font-size: 1.8rem; }
    .tutor-panel { right: 12px; bottom: 12px; width: calc(100vw - 24px); height: 70vh; }
    .tutor-fab { bottom: 12px; right: 12px; }
    .lang-toggle { top: auto; bottom: 80px; }
}
