/* saharaventuresLMS — Sahara Ventures brand */
:root {
    --primary: #e73d2a;
    --primary-hover: #d8420d;
    --dark: #111111;
    --text: #757575;
    --text-dark: #000000;
    --bg: #f5f5f5;
    --white: #ffffff;
    --border: #e8e8e8;
    --success: #2e7d32;
    --error: #c62828;
    --warning: #f57c00;
    --font-sans: 'Montserrat', sans-serif;
    --font-serif: 'Lora', serif;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 62.5%; scroll-behavior: smooth; overflow-x: clip; }
body {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    overflow-x: clip;
    max-width: 100vw;
}
h1, h2, h3, h4, h5, .btn, .subhead, .brand, .main-nav, .stat-num {
    font-family: var(--font-sans);
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }

.container { width: 92%; max-width: 1140px; margin: 0 auto; }
.center { text-align: center; }
.muted { color: #828282; }
.lead { font-size: 2rem; max-width: 720px; }
.lead.center { margin: 0 auto 2rem; }
.link-light { color: rgba(255,255,255,.9); }

/* Header */
.site-header {
    background: var(--dark);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 210;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
body.nav-drawer-mode .header-inner {
    gap: 1rem;
    flex-wrap: nowrap;
}
body.nav-drawer-mode .brand {
    flex-shrink: 1;
    min-width: 0;
}
body.nav-drawer-mode .brand-text strong {
    font-size: 1.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}
.brand:hover { color: var(--white); opacity: .9; }
.brand-logo {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.footer-logo {
    height: 36px;
    width: auto;
    max-width: 140px;
    margin-bottom: 1rem;
}
.auth-logo {
    text-align: center;
    margin-bottom: 1.6rem;
}
.auth-logo-img {
    height: 56px;
    width: auto;
    max-width: 200px;
}
.hero-logo {
    margin-bottom: 2rem;
}
.hero-logo-img {
    height: 72px;
    width: auto;
    max-width: 240px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.5rem; letter-spacing: .02em; }
.brand-text small { font-size: 1rem; opacity: .65; font-weight: 400; }
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    font-size: 1.3rem;
    font-weight: 500;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}
.main-nav a { color: rgba(255,255,255,.85); }
.main-nav a:hover { color: var(--white); }
.nav-user { color: rgba(255,255,255,.5); font-size: 1.2rem; white-space: nowrap; }

.nav-drawer-body {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}
.nav-drawer-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.header-toolbar {
    display: none;
    align-items: center;
    gap: 1.2rem;
    margin-left: auto;
    margin-right: .5rem;
}
.header-quick-link {
    color: rgba(255,255,255,.85);
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    white-space: nowrap;
}
.header-quick-link:hover { color: #fff; }
.header-signout {
    margin-right: 0;
    white-space: nowrap;
}
.nav-section-label {
    display: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.45);
    margin: 1rem 0 .35rem;
}
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: 0;
    color: rgba(255,255,255,.85);
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}
.nav-dropdown-toggle::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: rgba(255,255,255,.7);
    margin-top: 4px;
}
.nav-dropdown-toggle:hover { color: #fff; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    min-width: 210px;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: .4rem 0;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
    z-index: 300;
}
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: .65rem 1.1rem;
    font-size: 1.25rem;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

/* Logged-in users: menu drawer on all screen sizes */
body.nav-drawer-mode .nav-toggle { display: flex; }
body.nav-drawer-mode .header-toolbar { display: flex; }
body.nav-drawer-mode .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 92vw);
    height: 100vh;
    height: 100dvh;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4.5rem 0 0;
    background: var(--dark);
    transform: translateX(100%);
    transition: transform .28s ease;
    overflow: hidden;
    z-index: 200;
    box-shadow: -6px 0 28px rgba(0,0,0,.25);
}
body.nav-drawer-mode .main-nav.is-open { transform: translateX(0); }
body.nav-drawer-mode .nav-drawer-body {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1.25rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}
body.nav-drawer-mode .nav-drawer-body > a,
body.nav-drawer-mode .nav-section-links a {
    display: block;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 1.35rem;
    color: rgba(255,255,255,.92) !important;
    white-space: normal;
}
body.nav-drawer-mode .nav-drawer-body > a:hover,
body.nav-drawer-mode .nav-section-links a:hover { color: #fff !important; }
body.nav-drawer-mode .main-nav .lang-switch {
    display: flex;
    gap: .5rem;
    margin: 0 1.25rem .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
}
body.nav-drawer-mode .main-nav .lang-switch a {
    flex: 1;
    text-align: center;
    padding: .5rem .75rem;
    border-radius: 6px;
    color: rgba(255,255,255,.7) !important;
    background: rgba(255,255,255,.06);
}
body.nav-drawer-mode .main-nav .lang-switch a.active {
    background: var(--primary);
    color: #fff !important;
}
body.nav-drawer-mode .nav-notify,
body.nav-drawer-mode .nav-chat {
    display: flex;
    align-items: center;
    gap: .5rem;
}
body.nav-drawer-mode .nav-section { margin-top: .25rem; }
body.nav-drawer-mode .nav-section-label {
    display: block;
    margin-top: .75rem;
}
body.nav-drawer-mode .nav-dropdown-toggle { display: none; }
body.nav-drawer-mode .nav-dropdown-menu {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
}
body.nav-drawer-mode .nav-dropdown-menu a { padding-left: .5rem; }
body.nav-drawer-mode .nav-drawer-footer {
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .65rem;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.12);
    background: var(--dark);
}
body.nav-drawer-mode .nav-drawer-footer .nav-user {
    font-size: 1.2rem;
    color: rgba(255,255,255,.5) !important;
    text-align: center;
}
body.nav-drawer-mode .nav-signout {
    width: 100%;
    text-align: center;
    border-color: rgba(255,255,255,.45);
    color: #fff !important;
}
body.nav-drawer-mode .nav-signout:hover {
    background: #fff;
    color: var(--dark) !important;
}

@media (max-width: 600px) {
    body.nav-drawer-mode .header-quick-link,
    body.nav-drawer-mode .header-toolbar .header-signout { display: none; }
}

@media (min-width: 601px) {
    body.nav-drawer-mode .nav-drawer-footer .nav-signout { display: none; }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1px;
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 150;
}
.nav-backdrop.is-visible { display: block; }
body.nav-open { overflow: hidden; }

.site-header .lang-switch a { color: rgba(255,255,255,.55); }
.site-header .lang-switch a.active { color: #fff; font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 1.2rem 2.4rem;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all .25s ease;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white) !important;
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--white) !important;
}
.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary) !important;
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white) !important;
}
.btn-stroke-light {
    background: transparent;
    border-color: var(--white);
    color: var(--white) !important;
    margin-right: 1rem;
}
.btn-stroke-light:hover {
    background: var(--white);
    color: var(--dark) !important;
}
.btn-sm { padding: .6rem 1.2rem; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; margin-top: .8rem; }
.btn-lg { padding: 1.4rem 2.8rem; font-size: 1.3rem; }

/* Typography */
.subhead {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .25rem;
    color: var(--primary);
    margin: 0 0 .6rem;
}
.subhead-light { color: rgba(255,255,255,.75); }
h1 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: 1.2; color: var(--text-dark); margin: 0 0 1rem; font-weight: 500; }
h2 { font-size: clamp(2.2rem, 3.5vw, 3.6rem); color: var(--text-dark); margin: 0 0 1rem; font-weight: 500; }
h3 { font-size: 2rem; color: var(--text-dark); margin: 0 0 .8rem; }
h4 { font-size: 1.6rem; margin: 0 0 .8rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header.light h2 { color: var(--white); }

/* Hero */
.hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    background: var(--dark) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23111" width="1200" height="800"/><circle cx="200" cy="200" r="300" fill="%23e73d2a" opacity="0.08"/></svg>') center/cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.85));
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 8rem 0 6rem;
    color: var(--white);
}
.hero h1 { color: var(--white); }
.hero-lead { font-size: 1.8rem; max-width: 600px; color: rgba(255,255,255,.8); }
.hero-actions { margin-top: 3rem; }

.page-hero-sm {
    background: var(--white);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}
.section-red-band {
    background: var(--primary);
    color: var(--white);
}
.section-red-band h1,
.section-red-band .subhead-light { color: var(--white); }
.section-red-band .subhead { color: rgba(255,255,255,.7); }

/* Sections */
.section { padding: 6rem 0; }
.section-red { background: var(--primary); color: #f1f1f1; }
.section-red .lead.light,
.section-red p { color: #f1f1f1; }
.section-red h2 { color: var(--white); }
.section-light { background: var(--bg); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: center;
}
.stat-num {
    display: block;
    font-size: 4.4rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.stat-label {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-top: 1rem;
    display: block;
}

.card-grid {
    display: grid;
    gap: 2rem;
}
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
    background: var(--white);
    padding: 3.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card h3 a { color: inherit; }
.card-meta { font-size: 1.3rem; color: #828282; margin: 1rem 0; }
.session-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Session list */
.session-list { display: flex; flex-direction: column; gap: .8rem; }
.session-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 1.2rem;
    align-items: center;
    background: var(--white);
    padding: 1.4rem 2rem;
    border-radius: var(--radius);
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform .15s;
}
.session-row:hover { transform: translateY(-2px); color: inherit; }
.session-code { font-weight: 700; color: var(--primary); font-family: var(--font-sans); }
.session-title { font-family: var(--font-sans); font-weight: 500; color: var(--text-dark); }
.session-dur { font-size: 1.3rem; color: #828282; }
.session-code-lg { color: var(--primary); margin-right: .5rem; }
.session-meta-row { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

.week-block { margin-bottom: 4rem; }
.week-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

/* Badges */
.badge {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    padding: .4rem 1rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge-masterclass { background: #fff3e0; color: #e65100; }
.badge-working { background: #e3f2fd; color: #1565c0; }
.badge-clinic { background: #f3e5f5; color: #7b1fa2; }
.badge-panel { background: #e8f5e9; color: #2e7d32; }
.badge-default { background: #eee; color: #333; }

.status {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: capitalize;
    padding: .3rem .8rem;
    border-radius: 4px;
}
.status-pending { background: #fff8e1; color: #f57f17; }
.status-approved { background: #e8f5e9; color: var(--success); }
.status-revision { background: #ffebee; color: var(--error); }

/* Progress */
.progress-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 2rem;
    align-items: center;
    background: var(--white);
    padding: 2.4rem 3.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
}
.progress-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--p, 0) * 1%), #eee 0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-ring::before {
    content: '';
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    position: absolute;
}
.progress-value {
    position: relative;
    z-index: 1;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary);
}
.progress-panel .progress-ring { position: relative; --p: 0; }
.progress-panel .progress-ring[data-percent] {
    background: conic-gradient(var(--primary) calc(attr(data-percent number) * 1%), #eee 0);
}

/* Layout */
.layout-two-col {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
}
.info-box {
    background: var(--white);
    padding: 2.4rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.deliverable-text { font-size: 1.8rem; color: var(--text-dark); font-weight: 600; }
.feedback-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Forms */
.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}
.auth-card {
    background: var(--white);
    padding: 4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
}
.form label {
    display: block;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.6rem;
    color: var(--text-dark);
}
.form input,
.form select,
.form textarea {
    display: block;
    width: 100%;
    margin-top: .6rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1.5rem;
    font-family: var(--font-serif);
}
.auth-footer { text-align: center; margin-top: 2rem; font-size: 1.4rem; }
.card-form { background: var(--white); padding: 3rem; border-radius: var(--radius); box-shadow: var(--shadow); }

.profile-photo-block {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border, #e8e8e8);
}

.profile-photo-preview {
    flex-shrink: 0;
}

.profile-photo-img,
.profile-photo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: block;
}

.profile-photo-img {
    object-fit: cover;
    border: 2px solid #eee;
}

.profile-photo-placeholder {
    background: linear-gradient(145deg, #e73d2a, #c62828);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-fields {
    flex: 1;
    min-width: 0;
}

@media (max-width: 540px) {
    .profile-photo-block {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Alerts */
.alert {
    padding: 1.2rem 1.6rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    font-family: var(--font-sans);
    font-size: 1.4rem;
}
.alert-success { background: #e8f5e9; color: var(--success); }
.alert-error { background: #ffebee; color: var(--error); }

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table th,
.data-table td {
    padding: 1.2rem 1.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 1.4rem;
}
.data-table th {
    font-family: var(--font-sans);
    background: #fafafa;
    font-weight: 600;
}
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    white-space: nowrap;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: 1rem;
}
.setup-steps { margin: 0; padding-left: 1.25rem; line-height: 1.7; }
.setup-steps li { margin-bottom: .5rem; }
.notify-grid { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1rem; }
.mail-log-preview {
    margin: 0;
    padding: 1rem;
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: 8px;
    font-size: 1.15rem;
    line-height: 1.45;
    overflow-x: auto;
    max-height: 220px;
}
.email-status-box { border-left: 4px solid var(--primary); }
.inline-form { display: inline-block; margin-right: .5rem; }
.actions-cell { white-space: nowrap; }
.admin-links { margin-top: 3rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.6);
    padding: 4rem 0 3rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
.site-footer h4 {
    color: var(--white);
    font-family: var(--font-sans);
    margin-bottom: 1rem;
}
.footer-brand h4 { display: none; }
.site-footer a { color: rgba(255,255,255,.75); }

.install-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.install-box {
    background: var(--white);
    padding: 4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 480px;
}

.live-box {
    border-left: 4px solid var(--primary);
}
.mentor-notes-box {
    border-left: 4px solid var(--dark);
}
.mentor-notes-body {
    font-size: 1.6rem;
    color: var(--text-dark);
    line-height: 1.8;
}
.scheduled-badge {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    background: #fff3e0;
    color: #e65100;
    padding: .4rem 1rem;
    border-radius: 4px;
}
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: .8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.checkbox-label input { width: auto; margin: 0; }
fieldset.smtp-fields {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 2rem;
    margin: 1.6rem 0;
}
fieldset.smtp-fields legend {
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0 .8rem;
}
.small { font-size: 1.2rem; }
.checklist-row { margin-bottom: .6rem; }
.calendar-list { display: flex; flex-direction: column; gap: 1rem; }
.calendar-item h3 { margin: .5rem 0; }
.section-title { font-family: var(--font-sans); margin: 2.5rem 0 1rem; }
.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    min-width: 120px;
    display: inline-block;
    vertical-align: middle;
    margin-right: .8rem;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: var(--primary);
}
.data-room-card.status-approved { border-left: 4px solid #2e7d32; }
.data-room-card.status-submitted { border-left: 4px solid #f57f17; }
.data-room-card.status-revision { border-left: 4px solid var(--error); }
.investor-folders { list-style: none; padding: 0; }
.investor-folders li { padding: .4rem 0; border-bottom: 1px solid #eee; }
.page-investor .site-footer { margin-top: 0; }

/* Phase 3: content, quiz, discussion, certificate */
.video-embed-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
}
.video-embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.preread-box { border-left: 4px solid #1565c0; }
.quiz-question {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 2rem;
    margin-bottom: 1.6rem;
}
.quiz-question legend { font-weight: 600; margin-bottom: 1rem; }
.scale-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.scale-label { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.discussion-post {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    margin-bottom: 1.6rem;
}
.discussion-post.mentor-reply { border-left: 4px solid var(--primary); }
.discussion-reply {
    margin: 1rem 0 1rem 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: var(--radius);
}
.reply-form textarea { width: 100%; margin: .8rem 0; }
.req-list { list-style: none; padding: 0; }
.req-list li { padding: .6rem 0; padding-left: 1.8rem; position: relative; }
.req-list li::before { content: '○'; position: absolute; left: 0; color: #999; }
.req-list li.ok::before { content: '✓'; color: #2e7d32; }
.certificate-doc {
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem;
    border: 3px solid var(--primary);
    background: #fff;
    text-align: center;
    font-family: var(--font-serif);
}
.certificate-logo { max-width: 140px; margin-bottom: 1rem; }
.certificate-brand { font-family: var(--font-sans); font-size: 1.2rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.certificate-heading { font-family: var(--font-sans); font-size: 2.4rem; margin: 1.5rem 0; color: var(--dark); }
.certificate-name { font-size: 2.8rem; font-weight: 600; color: var(--primary); margin: 1rem 0; }
.certificate-body { font-size: 1.6rem; line-height: 1.7; max-width: 560px; margin: 0 auto 1.5rem; }
.certificate-id { font-family: var(--font-sans); font-size: 1.1rem; color: var(--muted); }
.certificate-footer { margin-top: 3rem; display: flex; justify-content: space-between; font-family: var(--font-sans); font-size: 1.2rem; border-top: 1px solid #eee; padding-top: 1.5rem; }
.page-certificate .main-content { background: #f5f5f5; }
@media print {
    .site-header, .site-footer, .no-print, .alert { display: none !important; }
    .certificate-doc { border: 2px solid #000; margin: 0; }
}

/* Phase 4: notifications, lang */
.lang-switch { font-size: 1.1rem; margin-right: .8rem; }
.lang-switch a { text-decoration: none; margin: 0 .3rem; padding: .2rem .5rem; }
.nav-notify { position: relative; text-decoration: none; font-size: 1.4rem; margin-right: .6rem; }
.notify-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    font-size: .9rem;
    font-family: var(--font-sans);
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
}
.notification-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.6rem;
    margin-bottom: 1rem;
}
.notification-item.unread { border-left: 4px solid var(--primary); background: #fffaf9; }
.notification-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.notification-actions { margin-top: .8rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.req-list li.ok { color: #2e7d32; }
.legal-content { line-height: 1.8; font-size: 1.5rem; }
.legal-content p { margin-bottom: 1rem; }
.auth-card-wide { max-width: 440px; }
.auth-tabs {
    display: flex;
    gap: 0;
    margin: 1.2rem 0 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: .9rem 1rem;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    background: #fafafa;
}
.auth-tab.active {
    background: var(--primary);
    color: #fff;
}
.auth-intro { margin-bottom: 1.2rem; font-size: 1.4rem; }
.hero-actions .btn-ghost { opacity: .85; }

/* Responsive — guests / logged-out only */
@media (max-width: 1100px) {
    .cols-3, .cols-2, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
    .session-row { grid-template-columns: 1fr; gap: .5rem; }
    .layout-two-col { grid-template-columns: 1fr; }
    .progress-panel { grid-template-columns: 1fr; text-align: center; }

    .header-inner {
        flex-wrap: nowrap;
        gap: 1rem;
    }
    .brand-text small { display: none; }
    .brand-text strong { font-size: 1.35rem; }
    .brand-logo { height: 38px; }

    body:not(.nav-drawer-mode) .nav-toggle { display: flex; }

    body:not(.nav-drawer-mode) .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 92vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 4.5rem 1.25rem 1.25rem;
        background: var(--dark);
        transform: translateX(100%);
        transition: transform .28s ease;
        overflow-y: auto;
        z-index: 200;
        box-shadow: -6px 0 28px rgba(0,0,0,.25);
    }
    body:not(.nav-drawer-mode) .main-nav.is-open { transform: translateX(0); }

    body:not(.nav-drawer-mode) .main-nav > a {
        display: block;
        padding: .75rem 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        font-size: 1.35rem;
        color: rgba(255,255,255,.92) !important;
    }
    body:not(.nav-drawer-mode) .main-nav > .btn-primary {
        margin-top: .75rem;
        text-align: center;
        width: 100%;
    }
}
.nav-chat { position: relative; }

/* Document viewer */
.document-viewer { background: #fff; border: 1px solid var(--border, #ddd); border-radius: 8px; overflow: hidden; min-height: 75vh; box-shadow: var(--shadow); }
.doc-frame { width: 100%; height: 80vh; min-height: 520px; border: 0; display: block; }
.doc-image { max-width: 100%; height: auto; display: block; margin: 0 auto; padding: 1rem; }
.document-viewer-text { padding: 1rem 1.25rem; max-height: 80vh; overflow: auto; }
.doc-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, monospace; font-size: 1.35rem; line-height: 1.55; }
.doc-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.doc-view-section { padding-top: 0; }
.doc-view-toolbar { margin: .5rem 0 0; }
.doc-view-note { margin-top: .75rem; }
body.page-document-view .main-content { padding-bottom: 1rem; }

/* Mentor chat — see public/assets/css/chat.css (loaded on messages page) */

/* AI chat floating bubble */
.ai-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    font-family: var(--font-sans);
}
.ai-chat-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(231, 61, 42, .45);
    transition: transform .2s ease, box-shadow .2s ease, width .25s ease, border-radius .25s ease, padding .25s ease;
    position: relative;
    z-index: 10002;
}
.ai-chat-bubble:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(231, 61, 42, .55);
}
.ai-chat-bubble-label {
    display: none;
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
}
.ai-chat-bubble-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.ai-icon-close { display: none; font-size: 2.8rem; font-weight: 300; margin-top: -2px; }
.ai-chat-widget.is-open .ai-icon-chat { display: none; }
.ai-chat-widget.is-open .ai-icon-close { display: flex; }
.ai-chat-widget.is-open .ai-chat-bubble {
    animation: none;
}
.ai-chat-widget:not(.is-open) .ai-chat-bubble {
    animation: ai-bubble-pulse 2.5s ease-in-out infinite;
}
@keyframes ai-bubble-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(231, 61, 42, .45); }
    50% { box-shadow: 0 6px 32px rgba(231, 61, 42, .65), 0 0 0 8px rgba(231, 61, 42, .12); }
}
.ai-chat-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .25);
    z-index: 9999;
    opacity: 0;
    transition: opacity .25s ease;
}
.ai-chat-backdrop.is-visible {
    display: block;
    opacity: 1;
}
.ai-chat-panel {
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px) scale(.96);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    position: absolute;
    bottom: 76px;
    right: 0;
    width: min(380px, calc(100vw - 48px));
    height: min(520px, calc(100vh - 120px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 10001;
    pointer-events: none;
}
.ai-chat-widget.is-open .ai-chat-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.ai-chat-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.ai-chat-header .muted { color: rgba(255,255,255,.85) !important; }
.ai-chat-close {
    background: rgba(255,255,255,.2);
    border: 0;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ai-chat-close:hover { background: rgba(255,255,255,.35); }
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    background: #fafafa;
    min-height: 0;
}
.ai-welcome-msg {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: 1.4rem;
    color: var(--text);
}
.ai-chat-form {
    padding: .85rem 1rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: .5rem;
    background: #fff;
}
.ai-chat-form textarea {
    resize: none;
    font-family: var(--font-sans);
    font-size: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .65rem .85rem;
}
.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-assistant { justify-content: flex-start; }
.ai-msg-user .ai-msg-body {
    background: var(--primary);
    color: #fff;
    padding: .65rem .9rem;
    border-radius: 14px 14px 4px 14px;
    max-width: 88%;
    font-size: 1.4rem;
    line-height: 1.5;
}
.ai-msg-assistant .ai-msg-body {
    background: #fff;
    border: 1px solid var(--border);
    padding: .65rem .9rem;
    border-radius: 14px 14px 14px 4px;
    max-width: 92%;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--text-dark);
}

@media (max-width: 600px) {
    .ai-chat-widget { right: 16px; bottom: 16px; }
    .ai-chat-panel {
        right: -8px;
        width: calc(100vw - 32px);
        height: min(70vh, 520px);
    }
}

/* Progress ring JS fallback via inline style in dashboard */
.progress-ring[style] { background: var(--ring-bg, #eee); }
