/* GenAI Unplugged Academy — Student Portal */

:root {
    --teal: #367e83;
    --teal-dark: #2a5f63;
    --teal-light: #4a9da3;
    --teal-pale: #e8f3f4;
    --cream: #faf9f5;
    --yellow: #ffde59;
    --yellow-dark: #e5c74f;
    --charcoal: #2a2a2a;
    --gray: #6b6b6b;
    --gray-light: #9a9a9a;
    --border: #e5e2d8;
    --bg: var(--cream);
    --white: #ffffff;
    --danger: #c0392b;
    --success: #2a8f5e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--charcoal);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); }
.btn-accent { background: var(--yellow); color: var(--charcoal); }
.btn-accent:hover:not(:disabled) { background: var(--yellow-dark); }
.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ── Login screen ────────────────────────────────────── */
.auth-container {
    max-width: 500px;
    margin: 64px auto 32px;
    padding: 40px 32px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(42, 42, 42, 0.06);
    text-align: center;
}
.auth-brand-link { display: inline-block; margin-bottom: 20px; }
.auth-brand-icon { width: 56px; height: 56px; transition: transform 0.2s ease; }
.auth-brand-icon:hover { transform: scale(1.05); }
.auth-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0 0 12px;
}
.auth-container h1 span {
    background: linear-gradient(180deg, transparent 60%, var(--yellow) 60%);
    padding: 0 4px;
    color: var(--charcoal);
}
.auth-container .subtitle {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 28px;
}
.auth-container input[type="email"] {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 14px;
    transition: border-color 0.15s ease;
}
.auth-container input[type="email"]:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-pale);
}
.form-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.form-message.success {
    background: #e8f7ef;
    color: var(--success);
    border: 1px solid #b7e3c8;
}
.form-message.error {
    background: #fdecea;
    color: var(--danger);
    border: 1px solid #f5c6c2;
}
.auth-consent {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gray-light);
    text-align: center;
}
.auth-consent a { color: var(--gray); text-decoration: underline; }

.auth-footer { margin-top: 24px; font-size: 14px; color: var(--gray); }

/* ── "Not enrolled yet?" invitation on the login screen ── */
.auth-invite {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.auth-invite-eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 8px;
}
.auth-invite-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray);
    margin: 0 0 16px;
}

.auth-legal { margin-top: 20px; font-size: 11px; color: var(--gray-light); }
.auth-legal a { color: var(--gray-light); text-decoration: underline; }

/* ── Substack membership banner (login view) — boxed, a bit wider than the card ── */
.substack-banner {
    max-width: 620px;
    margin: 8px auto 48px;
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(42, 42, 42, 0.08);
}
.substack-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 26px;
    flex-wrap: wrap;
}
.substack-copy { flex: 1; min-width: 240px; text-align: left; }
.substack-eyebrow {
    display: block;
    margin: 0 0 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--yellow);
}
.substack-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.95;
}
.substack-cta { flex-shrink: 0; white-space: nowrap; }

/* ── Header ──────────────────────────────────────────── */
.app-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--charcoal);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}
.header-brand img { width: 32px; height: 32px; }
.header-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--gray);
}

/* ── Layout ──────────────────────────────────────────── */
.dashboard {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    gap: 24px;
}

.hero-card {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: white;
    border-radius: 16px;
    padding: 32px;
}
.hero-card .eyebrow {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    opacity: 0.8;
    margin: 0 0 6px;
}
.hero-card h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}
.hero-card .hero-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 620px;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(42, 42, 42, 0.04);
}
.card-header { margin-bottom: 20px; }
.card-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0 0 6px;
}
.muted { color: var(--gray); font-size: 14px; }
.back-btn { margin-bottom: 16px; }

/* ── Cohort cards ────────────────────────────────────── */
.cohorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.cohort-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(42, 42, 42, 0.04);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.cohort-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(42, 42, 42, 0.08);
    border-color: var(--teal);
}
.cohort-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0;
}
.cohort-card .cohort-meta { margin: 0; font-size: 13px; color: var(--gray); }
.cohort-card .cohort-cta {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--teal);
}

/* ── Certificate card + badge ────────────────────────── */
.cohort-badge {
    align-self: flex-start;
    margin-top: 2px;
    padding: 3px 10px;
    background: var(--yellow);
    color: var(--charcoal);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.cert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: white;
    border-radius: 16px;
    padding: 20px 24px;
}
.cert-info { display: flex; align-items: center; gap: 14px; }
.cert-emoji { font-size: 30px; line-height: 1; }
.cert-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 17px;
}
.cert-sub {
    margin: 2px 0 0;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
    opacity: 0.8;
}
.cert-card .btn-primary { background: var(--yellow); color: var(--charcoal); }
.cert-card .btn-primary:hover { background: var(--yellow-dark); }

/* ── Sessions ────────────────────────────────────────── */
.sessions-list {
    display: grid;
    gap: 24px;
}
.session-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(42, 42, 42, 0.04);
}
.session-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.session-head h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0;
}
.session-actions { display: flex; gap: 8px; flex-shrink: 0; }
.session-actions .btn { white-space: nowrap; }
@media (max-width: 520px) {
    .session-head { flex-direction: column; align-items: flex-start; }
}
.video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.pending-note {
    padding: 24px;
    background: var(--cream);
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
}
.session-desc {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray);
}
.resource-list {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.resource-link {
    display: inline-block;
    padding: 8px 14px;
    background: var(--teal-pale);
    color: var(--teal-dark);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.resource-link:hover { text-decoration: none; background: #d9ecee; }

/* ── Cookie banner ──────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(42,42,42,0.12);
    padding: 16px 20px;
    z-index: 1000;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-inner p {
    margin: 0;
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    flex: 1;
    min-width: 240px;
}
