/* ═══════════════════════════════════════════════════════════════════════════
   Chemdaq Course System — Stylesheet (chemdaq.com Brand Match)
   Orange: #e8471e | Teal: #2a9d8f | Navy: #1a3a5c | Light bg: #f4f7f9
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

.cdaq-wrap *,
.cdaq-wrap *::before,
.cdaq-wrap *::after { box-sizing: border-box; }

.cdaq-wrap {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #444;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ── Buttons ── */
.cdaq-btn-primary {
    display: inline-block;
    background: #e8471e;
    color: #fff !important;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 14px 28px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s;
    width: 100%;
    text-align: center;
    line-height: 1.4;
}
.cdaq-btn-primary:hover:not(:disabled):not(.cdaq-btn-disabled) { background: #c93a16; color: #fff !important; }
.cdaq-btn-primary:disabled,
.cdaq-btn-primary.cdaq-btn-disabled { background: #b0bec5; cursor: not-allowed; pointer-events: none; color: #fff !important; }

.cdaq-btn-download {
    display: inline-block;
    background: #e8471e;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 3px;
    text-decoration: none !important;
    margin-top: 10px;
    transition: background .2s;
}
.cdaq-btn-download:hover { background: #c93a16; color: #fff !important; }
.cdaq-inline-download { color: #e8471e; font-weight: 700; text-decoration: underline; }

/* ── Form Fields ── */
.cdaq-field { margin-bottom: 14px; }
.cdaq-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #1a3a5c; }
.cdaq-field input,
.cdaq-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cdd4db;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.cdaq-field input:focus,
.cdaq-field select:focus { outline: none; border-color: #2a9d8f; box-shadow: 0 0 0 3px rgba(42,157,143,.12); }
.cdaq-field small { display: block; margin-top: 4px; font-size: 12px; color: #888; }
.cdaq-req { color: #e8471e; }
.cdaq-optional { color: #aaa; font-weight: 400; }

/* ── Alerts ── */
.cdaq-error { background: #fff3f0; border: 1px solid #e8471e; color: #c93a16; padding: 10px 14px; border-radius: 3px; font-size: 13px; margin-bottom: 12px; }
.cdaq-success { background: #edfaf8; border: 1px solid #2a9d8f; color: #1a7a6e; padding: 12px 16px; border-radius: 3px; font-size: 14px; margin-bottom: 12px; }

/* ══════════════════════════════════════
   REGISTRATION PAGE
   ══════════════════════════════════════ */
#cdaq-registration { padding-top: 40px; }

.cdaq-reg-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 56px;
    align-items: start;
}
@media (max-width: 960px) { .cdaq-reg-layout { grid-template-columns: 1fr; gap: 36px; } }

.cdaq-reg-headline { font-size: 26px; font-weight: 800; line-height: 1.25; color: #1a3a5c; margin: 0 0 18px; }
.cdaq-reg-info p { font-size: 15px; line-height: 1.65; color: #555; margin-bottom: 14px; }

.cdaq-bullets { margin: 0 0 18px 20px; padding: 0; }
.cdaq-bullets li { margin-bottom: 10px; line-height: 1.6; font-size: 15px; color: #555; }
.cdaq-bullets li::marker { color: #e8471e; }

.cdaq-divider { border: none; border-top: 1px solid #e0e5ea; margin: 22px 0; }
.cdaq-ce-note, .cdaq-consent-note { font-size: 13px; color: #777; line-height: 1.6; margin-bottom: 8px; }

.cdaq-speaker h3 { font-size: 20px; font-weight: 700; color: #1a3a5c; margin: 24px 0 14px; }
.cdaq-speaker-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.cdaq-speaker-photo {
    width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
    background: #1a3a5c; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border: 3px solid #2a9d8f;
}
.cdaq-speaker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdaq-speaker-initials { color: #fff; font-weight: 800; font-size: 22px; }
.cdaq-speaker-details { font-size: 14px; line-height: 1.55; color: #333; }
.cdaq-speaker-details strong { color: #1a3a5c; font-size: 15px; }
.cdaq-speaker-bio { font-size: 13px; color: #666; line-height: 1.65; }

/* Form card */
.cdaq-reg-form-wrap {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(26,58,92,.1);
    position: sticky;
    top: 24px;
}
.cdaq-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.cdaq-tab {
    padding: 15px 12px;
    background: #f4f7f9;
    border: none;
    border-bottom: 3px solid #dce3ea;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Open Sans', sans-serif;
    color: #888;
    letter-spacing: .03em;
    transition: all .15s;
}
.cdaq-tab.active { background: #fff; color: #1a3a5c; border-bottom-color: #e8471e; }
.cdaq-tab:hover:not(.active) { color: #1a3a5c; background: #edf1f5; }
.cdaq-tab-panel { padding: 24px; }
.cdaq-tab-panel > p { font-size: 14px; color: #666; margin-bottom: 18px; }

/* ══════════════════════════════════════
   COURSE PAGE
   ══════════════════════════════════════ */
#cdaq-course { padding-top: 32px; }

.cdaq-course-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid #e0e5ea; }
.cdaq-course-header h1 { font-size: 22px; font-weight: 800; color: #1a3a5c; margin: 0 0 6px; line-height: 1.3; }
.cdaq-course-meta { font-size: 13px; color: #2a9d8f; font-weight: 600; margin: 0; }

.cdaq-course-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 860px) { .cdaq-course-layout { grid-template-columns: 1fr; } }

.cdaq-video-wrap {
    background: #0d1b2a;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 6px 28px rgba(26,58,92,.18);
}
.cdaq-video-wrap video { width: 100%; height: 100%; display: block; }
.cdaq-video-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #aac;
    padding: 24px; text-align: center; gap: 12px; font-size: 14px;
}
.cdaq-video-placeholder code { background: #1a2e42; padding: 8px 14px; border-radius: 3px; font-size: 12px; word-break: break-all; color: #7ecdc8; }

.cdaq-course-sidebar { display: flex; flex-direction: column; gap: 18px; }

.cdaq-progress-card {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(26,58,92,.07);
}
.cdaq-progress-card h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #1a3a5c; margin: 0 0 14px; }
.cdaq-progress-bar-wrap { height: 8px; background: #e0e8ee; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.cdaq-progress-bar { height: 100%; background: linear-gradient(90deg, #2a9d8f, #1a7a6e); border-radius: 999px; transition: width .5s ease; }
.cdaq-progress-text { font-size: 13px; font-weight: 700; color: #2a9d8f; margin: 0 0 4px; }
.cdaq-progress-note { font-size: 12px; color: #aaa; margin: 4px 0 0; }
.cdaq-progress-complete { font-size: 13px; color: #2a9d8f; font-weight: 700; margin: 6px 0 0; }

.cdaq-continue-wrap { display: flex; flex-direction: column; gap: 6px; }
.cdaq-btn-continue { font-size: 14px; padding: 15px; }
.cdaq-continue-hint { font-size: 12px; color: #aaa; text-align: center; margin: 0; }

.cdaq-course-details {
    background: #f4f7f9;
    border-radius: 4px;
    border-left: 4px solid #2a9d8f;
    padding: 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.65;
}
.cdaq-course-details h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #1a3a5c; margin: 0 0 10px; }
.cdaq-course-details hr { border: none; border-top: 1px solid #dce3ea; margin: 12px 0; }

/* ══════════════════════════════════════
   CERTIFICATE PAGE
   ══════════════════════════════════════ */
#cdaq-certificate-page { padding-top: 40px; }

.cdaq-cert-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 860px) { .cdaq-cert-layout { grid-template-columns: 1fr; gap: 28px; } }

.cdaq-cert-left { text-align: center; }
.cdaq-cert-badge { display: block; font-size: 64px; margin-bottom: 16px; line-height: 1; }
.cdaq-cert-left h1 { font-size: 26px; font-weight: 800; color: #1a3a5c; margin: 0 0 12px; }
.cdaq-cert-subhead { font-size: 15px; color: #666; line-height: 1.6; margin-bottom: 24px; }
.cdaq-cert-course-info {
    background: #f4f7f9;
    border-radius: 4px;
    border-left: 4px solid #e8471e;
    padding: 16px 18px;
    text-align: left;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #555;
}
.cdaq-cert-course-info p { margin: 0 0 8px; }
.cdaq-cert-course-info p:last-child { margin: 0; }
.cdaq-back-link { font-size: 13px; color: #2a9d8f; text-decoration: underline; font-weight: 600; }
.cdaq-back-link:hover { color: #1a7a6e; }

.cdaq-cert-form-card {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(26,58,92,.08);
}
.cdaq-cert-form-card h2 { font-size: 22px; font-weight: 800; color: #1a3a5c; margin: 0 0 8px; }
.cdaq-cert-instructions { font-size: 14px; color: #777; margin-bottom: 24px; line-height: 1.55; }

.cdaq-cert-preview {
    background: #f4f7f9;
    border-left: 4px solid #1a3a5c;
    border-radius: 0 4px 4px 0;
    padding: 14px 18px;
    margin: 4px 0 22px;
}
.cdaq-preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #aaa; margin: 0 0 4px; font-weight: 700; }
.cdaq-preview-name { font-size: 19px; font-weight: 700; color: #1a3a5c; font-style: italic; margin: 0; }

.cdaq-email-note { font-size: 12px; color: #999; text-align: center; margin: 14px 0 0; line-height: 1.5; }
.cdaq-existing-cert { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e0e5ea; text-align: center; }
.cdaq-existing-cert p { font-size: 13px; color: #2a9d8f; font-weight: 600; margin-bottom: 6px; }

@media (max-width: 600px) {
    .cdaq-cert-form-card { padding: 24px 18px; }
    .cdaq-wrap { padding: 0 16px 48px; }
}

/* ── Logout link ── */
.cdaq-logout-link {
    color: #aaa;
    font-size: 12px;
    font-weight: 400;
    text-decoration: underline;
}
.cdaq-logout-link:hover { color: #e8471e; }

/* ── Fix button text visibility ── */
.cdaq-btn-primary,
.cdaq-btn-primary:visited,
button.cdaq-btn-primary {
    color: #fff !important;
}

/* ── Theme override fix for buttons ── */
#cdaq-registration .cdaq-btn-primary,
#cdaq-course .cdaq-btn-primary,
#cdaq-certificate-page .cdaq-btn-primary,
.cdaq-tab-panel .cdaq-btn-primary,
.cdaq-tab-panel button.cdaq-btn-primary {
    color: #ffffff !important;
    background-color: #e8471e !important;
    border: none !important;
    font-family: 'Open Sans', sans-serif !important;
    opacity: 1 !important;
}
#cdaq-registration .cdaq-btn-primary:hover,
#cdaq-course .cdaq-btn-primary:hover,
#cdaq-certificate-page .cdaq-btn-primary:hover {
    background-color: #c93a16 !important;
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SITE LAYOUT (header/footer shared across all pages)
   ══════════════════════════════════════════════════════════════════════════════ */
body.cdaq-page { margin: 0; padding: 0; background: #f4f7f9; }
.cdaq-site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.cdaq-header { background: #fff; border-bottom: 1px solid #e0e5ea; padding: 0 24px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(26,58,92,.06); }
.cdaq-header-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.cdaq-header-inner a img, .cdaq-header-inner a { text-decoration: none; }
.cdaq-site-name { font-size: 18px; font-weight: 800; color: #1a3a5c; }
.cdaq-header-user { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.cdaq-header-sep { color: #ddd; }
.cdaq-back-to-courses { font-size: 13px; color: #2a9d8f; font-weight: 600; text-decoration: none; }
.cdaq-back-to-courses:hover { color: #1a7a6e; }
.cdaq-logout-link { font-size: 12px; color: #aaa; text-decoration: underline; }
.cdaq-logout-link:hover { color: #e8471e; }

.cdaq-main { flex: 1; padding: 32px 0 60px; }
.cdaq-footer { background: #1a3a5c; color: rgba(255,255,255,.6); text-align: center; padding: 16px; font-size: 12px; }
.cdaq-footer p { margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   COURSE LIBRARY GRID
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-courses-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.cdaq-courses-hero { text-align: center; margin-bottom: 40px; }
.cdaq-courses-hero h1 { font-size: 32px; font-weight: 800; color: #1a3a5c; margin: 0 0 8px; }
.cdaq-courses-hero p { font-size: 16px; color: #777; margin: 0; }

.cdaq-courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 1100px) { .cdaq-courses-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 760px)  { .cdaq-courses-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .cdaq-courses-grid { grid-template-columns: 1fr; } }

.cdaq-course-card {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 10px rgba(26,58,92,.06);
}
.cdaq-course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(26,58,92,.13); text-decoration: none; color: inherit; }

.cdaq-card-thumb {
    height: 160px;
    background: linear-gradient(135deg, #1a3a5c, #2a9d8f);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cdaq-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cdaq-card-thumb-placeholder { font-size: 48px; opacity: .5; }
.cdaq-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .04em;
}
.cdaq-badge-new      { background: rgba(255,255,255,.9); color: #1a3a5c; }
.cdaq-badge-progress { background: #e8471e; color: #fff; }
.cdaq-badge-complete { background: #2a9d8f; color: #fff; }

.cdaq-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cdaq-card-body h3 { font-size: 14px; font-weight: 700; color: #1a3a5c; margin: 0; line-height: 1.4; }
.cdaq-card-speaker { font-size: 12px; color: #888; margin: 0; }
.cdaq-card-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.cdaq-card-meta span { font-size: 11px; color: #666; }
.cdaq-card-progress { height: 4px; background: #e0e8ee; border-radius: 999px; overflow: hidden; margin-top: auto; }
.cdaq-card-progress-bar { height: 100%; background: #e8471e; border-radius: 999px; }

.cdaq-no-courses { text-align: center; padding: 60px 20px; color: #888; }

/* ══════════════════════════════════════════════════════════════════════════════
   LANDING PAGE EXTRAS
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-course-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.cdaq-meta-badge { background: #f0f3fa; color: #1a3a5c; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 3px; }
.cdaq-course-description { font-size: 15px; line-height: 1.65; color: #555; }
.cdaq-additional-info { background: #f4f7f9; border-radius: 4px; padding: 16px 18px; font-size: 14px; color: #555; line-height: 1.65; margin-top: 16px; }

/* ══════════════════════════════════════════════════════════════════════════════
   QUIZ SECTION
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-quiz-section { margin-top: 28px; }
.cdaq-quiz-card {
    background: #fff;
    border: 2px solid #1a3a5c;
    border-radius: 8px;
    padding: 28px 32px;
}
.cdaq-quiz-title { font-size: 20px; font-weight: 800; color: #1a3a5c; margin: 0 0 8px; }
.cdaq-quiz-intro { font-size: 14px; color: #666; margin: 0 0 24px; }

.cdaq-quiz-question { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #edf1f5; }
.cdaq-quiz-question:last-of-type { border-bottom: none; }
.cdaq-question-text { font-size: 15px; font-weight: 600; color: #1a3a5c; margin: 0 0 12px; }
.cdaq-quiz-options { display: flex; flex-direction: column; gap: 10px; }

.cdaq-quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .15s, background .15s;
}
.cdaq-quiz-option:hover { border-color: #2a9d8f; background: #f0faf9; }
.cdaq-quiz-option input[type=radio] { accent-color: #e8471e; }
.cdaq-quiz-option input:checked + span { font-weight: 600; color: #1a3a5c; }

.cdaq-quiz-passed-msg { text-align: center; padding: 20px; }
.cdaq-quiz-passed-msg h3 { color: #2a9d8f; font-size: 22px; margin-bottom: 8px; }

.cdaq-quiz-fail { padding: 16px; background: #fff3f0; border-radius: 6px; border: 1px solid #e8471e; }
.cdaq-quiz-fail p { margin: 0 0 8px; font-size: 14px; }
.cdaq-quiz-fail p:last-child { margin: 0; }

.cdaq-quiz-locked { padding: 16px; background: #fff8f0; border-radius: 6px; border: 1px solid #f0a050; }
.cdaq-quiz-fail-msg { color: #c93a16; font-weight: 600; }

.cdaq-quiz-status-card {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(26,58,92,.07);
}
.cdaq-quiz-status-card h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #1a3a5c; margin: 0 0 8px; }
.cdaq-quiz-score-note { font-size: 12px; color: #e8471e; margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   COMMENTS / Q&A SECTION
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-comments-section { margin-top: 32px; padding-top: 28px; border-top: 2px solid #e0e5ea; }
.cdaq-comments-section h3 { font-size: 18px; font-weight: 700; color: #1a3a5c; margin: 0 0 20px; }

.cdaq-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cdd4db;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    resize: vertical;
    transition: border-color .15s, box-shadow .15s;
}
.cdaq-textarea:focus { outline: none; border-color: #2a9d8f; box-shadow: 0 0 0 3px rgba(42,157,143,.12); }

.cdaq-btn-secondary {
    display: inline-block;
    background: #fff;
    color: #1a3a5c !important;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 10px 22px;
    border: 2px solid #1a3a5c;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s, color .15s;
    margin-top: 8px;
}
.cdaq-btn-secondary:hover { background: #1a3a5c; color: #fff !important; }

.cdaq-comments-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.cdaq-comment {
    background: #fff;
    border: 1px solid #e0e5ea;
    border-radius: 6px;
    padding: 16px 18px;
}
.cdaq-comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cdaq-comment-author { font-weight: 700; color: #1a3a5c; font-size: 14px; }
.cdaq-comment-time { font-size: 12px; color: #aaa; }
.cdaq-comment-body { font-size: 14px; color: #444; line-height: 1.6; }
.cdaq-no-comments { color: #aaa; font-size: 14px; text-align: center; padding: 20px 0; }

.cdaq-replies { margin-top: 12px; padding-left: 16px; border-left: 3px solid #2a9d8f; }
.cdaq-reply { padding: 10px 14px; background: #f0faf9; border-radius: 4px; margin-bottom: 8px; }
.cdaq-reply-label { font-weight: 700; color: #2a9d8f; font-size: 13px; margin-right: 6px; }

/* Video section layout on watch page */
.cdaq-video-section { min-width: 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   ADMIN EXTRAS
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-badge { background: #e8471e; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: 4px; }
.cdaq-stat-alert { border-color: #e8471e !important; }
.cdaq-stat-alert .cdaq-stat-number { color: #e8471e; }

.cdaq-question-block {
    border: 1px solid #dce3ea;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 16px;
    background: #fafbfc;
}
.cdaq-qblock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cdaq-remove-question {
    background: none;
    border: none;
    color: #c93a16;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
}
.cdaq-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.cdaq-correct-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #2a9d8f;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
}

/* ── User bar & topbar (replaces custom header) ── */
.cdaq-user-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e0e5ea;
    margin-bottom: 24px;
}
.cdaq-course-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid #e0e5ea;
    margin-bottom: 24px;
}
.cdaq-user-greeting { color: #666; }

/* ══════════════════════════════════════════════════════════════════════════════
   COURSE LIBRARY — VISUAL POLISH
   ══════════════════════════════════════════════════════════════════════════════ */

/* Wrap with proper padding */
.cdaq-courses-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 32px 80px;
}

/* Hero */
.cdaq-courses-hero {
    text-align: center;
    margin-bottom: 48px;
}
.cdaq-courses-hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: #1a3a5c;
    margin: 0 0 10px;
    letter-spacing: -.02em;
}
.cdaq-courses-hero p {
    font-size: 17px;
    color: #888;
    margin: 0;
}

/* Grid — centered when few cards */
.cdaq-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    justify-content: center;
}

/* Card */
.cdaq-course-card {
    background: #fff;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 2px 12px rgba(26,58,92,.07);
    max-width: 340px;
    width: 100%;
    justify-self: center;
}
.cdaq-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(26,58,92,.14);
    border-color: #2a9d8f;
    color: inherit;
    text-decoration: none !important;
}

/* Thumb — fixed 200px height, object-fit cover */
.cdaq-card-thumb {
    height: 200px;
    background: linear-gradient(145deg, #1a3a5c 0%, #2a9d8f 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.cdaq-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .3s ease;
}
.cdaq-course-card:hover .cdaq-card-thumb img {
    transform: scale(1.04);
}
.cdaq-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    opacity: .5;
}

/* Badge */
.cdaq-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: .04em;
    backdrop-filter: blur(4px);
}
.cdaq-badge-new      { background: rgba(255,255,255,.92); color: #1a3a5c; }
.cdaq-badge-progress { background: #e8471e; color: #fff; }
.cdaq-badge-complete { background: #2a9d8f; color: #fff; }

/* Card body */
.cdaq-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cdaq-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0;
    line-height: 1.4;
}
.cdaq-card-speaker {
    font-size: 12px;
    color: #888;
    margin: 0;
}
.cdaq-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #f0f3f7;
}
.cdaq-card-meta span {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.cdaq-card-progress {
    height: 4px;
    background: #e8eef4;
    border-radius: 999px;
    overflow: hidden;
    margin-top: auto;
    margin-bottom: -4px;
}
.cdaq-card-progress-bar {
    height: 100%;
    background: #e8471e;
    border-radius: 999px;
}

/* User bar */
.cdaq-user-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 8px 32px;
    font-size: 13px;
    color: #888;
    background: #fff;
    border-bottom: 1px solid #edf1f5;
    max-width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════════════════════════ */
.cdaq-login-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}
.cdaq-login-layout {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}
.cdaq-login-card {
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 12px;
    padding: 40px 40px 32px;
    box-shadow: 0 4px 28px rgba(26,58,92,.09);
}
.cdaq-login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.cdaq-login-logo h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1a3a5c;
    margin: 0 0 8px;
}
.cdaq-login-logo p {
    font-size: 14px;
    color: #888;
    margin: 0;
    line-height: 1.55;
}
.cdaq-login-register-link {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin: 20px 0 0;
}
.cdaq-login-register-link a {
    color: #2a9d8f;
    font-weight: 600;
    text-decoration: none;
}
.cdaq-login-register-link a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .cdaq-login-card { padding: 28px 20px 24px; }
}

/* ── Force button text visible everywhere ── */
.cdaq-wrap .cdaq-btn-primary,
.cdaq-wrap button.cdaq-btn-primary,
.cdaq-login-card .cdaq-btn-primary,
.cdaq-login-card button.cdaq-btn-primary {
    color: #ffffff !important;
    background-color: #e8471e !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #ffffff !important;
}
.cdaq-wrap .cdaq-btn-primary:hover,
.cdaq-login-card .cdaq-btn-primary:hover {
    background-color: #c93a16 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Already a member link */
.cdaq-already-member {
    margin: 14px 0 0;
    font-size: 14px;
    color: #888;
}
.cdaq-already-member a {
    color: #2a9d8f;
    font-weight: 600;
    text-decoration: none;
}
.cdaq-already-member a:hover { text-decoration: underline; }
