/* ===================================================================
   BE TRAINING — design system
   -------------------------------------------------------------------
   Palette: orange (action), blue (information), ink (structure),
   paper + white (surface). Nothing else carries meaning.

   The rule this file follows everywhere: ORANGE MEANS DO SOMETHING.
   If a control is orange, pressing it moves the learner forward. Blue
   is for things that inform but don't ask. Keeping those two apart is
   what stops a busy page from turning into confetti.

   Signature device: the "spine bead" — a short rounded bar pinned to
   the left edge of every card and panel, colour-coded to that card's
   state, which extends to full height on hover. One device, used
   consistently, instead of six different border treatments.

   Type: Plus Jakarta Sans (display) / Inter (body) / IBM Plex Mono (data)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    /* --- Ink: a blue-black, so "black" and "blue" share a root --- */
    --ink: #0a1626;
    --ink-soft: #14243a;
    --ink-border: #24384f;
    --ink-text-dim: #8ea3bd;

    /* --- Blue: structure, information, focus --- */
    --blue: #1b4fd8;
    --blue-dark: #133ba6;
    --blue-bright: #3e74ff;
    --blue-soft: #e9f0ff;

    /* --- Orange: action. The only colour that means "do something" --- */
    --orange: #f2610c;
    --orange-dark: #c74b05;
    --orange-soft: #fff0e4;

    /* --- Surfaces: warm paper, clean white cards --- */
    --paper: #faf6f3;
    --paper-deep: #f1ebe5;
    --white: #ffffff;

    --text: #0f1b2d;
    --muted: #6a7688;
    --line: #ebe4dd;
    --line-strong: #ddd3c9;

    --success: #0f7a52;
    --success-soft: #e4f6ee;
    --danger: #c0362c;
    --danger-soft: #fceae7;
    --violet: #6d28d9;
    --violet-soft: #f2ecff;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    /* Warm-tinted shadows so cards sit on the paper rather than float
       above it in a cold grey haze. */
    --shadow-sm: 0 1px 2px rgba(36, 24, 16, 0.05), 0 1px 3px rgba(36, 24, 16, 0.04);
    --shadow-md: 0 12px 28px -12px rgba(36, 24, 16, 0.22), 0 2px 6px rgba(36, 24, 16, 0.05);
    --shadow-lg: 0 24px 56px -20px rgba(36, 24, 16, 0.28);
    --shadow-ink: 0 20px 48px -16px rgba(10, 22, 38, 0.5);

    --font-display: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------------------------------------------------------------
   Brand mark — the "ascending path": three bars climbing, the last
   one orange because the next step is always the one you act on.
   --------------------------------------------------------------- */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.brand-lockup .brand-wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--white);
    line-height: 1.1;
}

.brand-lockup .brand-wordmark small {
    display: block;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-text-dim);
    margin-top: 0.25rem;
}

/* ---------------------------------------------------------------
   Buttons
   Orange = go forward. Ink = a secondary route. Outline = an exit.
   --------------------------------------------------------------- */
button {
    font-family: var(--font-body);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.68rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
                transform 0.12s var(--ease), color 0.18s var(--ease),
                box-shadow 0.18s var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

/* The primary route through the app is orange, matching the one
   action a learner is meant to take on any given screen. */
.btn-primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 6px 16px -8px rgba(242, 97, 12, 0.75);
}

.btn-primary:hover {
    background: var(--orange-dark);
    box-shadow: 0 8px 20px -8px rgba(242, 97, 12, 0.85);
}

/* The loud variant: "Submit for marking", "Retry", "Start again". Same
   orange, because it means the same thing, but a touch bigger and
   carrying a light rim so it still reads as a raised button when it
   sits on the dark player bar rather than on a white card. */
.btn-accent {
    background: var(--orange);
    color: var(--white);
    padding: 0.72rem 1.4rem;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 18px -8px rgba(242, 97, 12, 0.9);
}

.btn-accent:hover {
    background: var(--orange-dark);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline {
    background: var(--white);
    color: var(--text);
    border-color: var(--line-strong);
}

.btn-outline:hover {
    border-color: var(--ink);
    background: var(--paper);
}

.btn-outline:disabled {
    color: var(--muted);
    background: var(--paper-deep);
    border-color: transparent;
    cursor: default;
}

/* Ghost buttons for use on the dark topbar */
.logout-btn,
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: 1px solid var(--ink-border);
    background: transparent;
    color: var(--ink-text-dim);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s var(--ease);
}

.logout-btn:hover,
.nav-link:hover {
    border-color: var(--orange);
    color: var(--white);
}

.nav-link {
    border-color: transparent;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover {
    background: var(--orange);
    color: var(--white);
}

/* ---------------------------------------------------------------
   App shell topbar (admin / builder / learner)
   --------------------------------------------------------------- */
.app-topbar {
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

/* A hairline of orange along the foot of the bar: the app's one
   permanent piece of colour, and the thing that ties every screen
   back to the brand. */
.app-topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 22%, var(--blue) 22%, var(--blue) 34%, var(--ink-border) 34%);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar-user {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding-right: 0.75rem;
    margin-right: 0.35rem;
    border-right: 1px solid var(--ink-border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--ink-text-dim);
}

@media (min-width: 640px) {
    .topbar-user {
        display: flex;
    }
}

/* ---------------------------------------------------------------
   Page shell / layout
   --------------------------------------------------------------- */
.admin-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.75rem 5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Eyebrows carry a bead of their own, so the label reads as a tag on
   the heading rather than as a stray line of small caps. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--orange-dark);
    margin-bottom: 0.55rem;
}

.eyebrow::before {
    content: "";
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--orange);
    flex-shrink: 0;
}

.eyebrow.eyebrow--orange {
    color: var(--orange-dark);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text);
    line-height: 1.1;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.subtitle {
    color: var(--muted);
    font-size: 0.94rem;
    margin: 0.2rem 0 0;
    line-height: 1.55;
}

/* ---------------------------------------------------------------
   Messages
   --------------------------------------------------------------- */
.error-msg,
.success-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
}

.error-msg {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(192, 54, 44, 0.2);
}

.success-msg {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(15, 122, 82, 0.2);
}

/* ---------------------------------------------------------------
   Login / auth split screen
   --------------------------------------------------------------- */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 880px) {
    .auth-shell {
        grid-template-columns: 1.05fr 1fr;
    }
}

.auth-visual {
    background: var(--ink);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

/* The bar field is the hero here — it's the brand mark at full size,
   and it says "ascending path" better than any headline. So it gets a
   scrim rather than competition: ink fading up from the floor, which
   keeps the bars legible as shapes while the copy sits cleanly on top
   of them. No decorative glows; the artwork is the decoration. */
.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, var(--ink) 4%, rgba(10, 22, 38, 0.86) 34%, rgba(10, 22, 38, 0.1) 100%);
    pointer-events: none;
}

.auth-visual .brand-lockup {
    position: relative;
    z-index: 3;
}

/* Orange at full strength disappears into a dark ground, so the
   eyebrow here is lifted to a tint that still reads as the same
   colour family as the button on the other side of the split. */
.auth-visual .eyebrow {
    color: #ffb283;
}

.auth-visual .auth-copy {
    position: relative;
    z-index: 3;
    max-width: 420px;
    margin-top: auto;
}

.auth-visual .auth-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0 0 0.9rem;
}

.auth-visual .auth-copy p {
    color: var(--ink-text-dim);
    font-size: 0.96rem;
    line-height: 1.6;
    margin: 0;
}

.auth-visual .path-field {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.85;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: var(--paper);
}

.login-card {
    background: var(--white);
    padding: 2.75rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}

.login-card .eyebrow {
    color: var(--orange-dark);
}

.login-card h1 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}

.login-card .subtitle {
    margin-bottom: 1.85rem;
}

.login-card label {
    display: block;
    margin-top: 1.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text);
}

.login-card input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    margin-top: 0.45rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
                box-shadow 0.18s var(--ease);
}

.login-card input:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(242, 97, 12, 0.12);
}

.login-card button[type="submit"] {
    width: 100%;
    margin-top: 1.9rem;
    padding: 0.9rem;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: -0.005em;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(242, 97, 12, 0.8);
    transition: background 0.18s var(--ease), transform 0.12s var(--ease),
                box-shadow 0.18s var(--ease);
}

.login-card button[type="submit"]:hover {
    background: var(--orange-dark);
    box-shadow: 0 10px 26px -8px rgba(242, 97, 12, 0.9);
}

.login-card button[type="submit"]:active {
    transform: translateY(1px);
}

/* ---------------------------------------------------------------
   Panels / cards — the spine bead
   --------------------------------------------------------------- */
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.panel:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

.panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.75rem;
    width: 3px;
    height: 30px;
    border-radius: 0 3px 3px 0;
    background: var(--blue);
    transition: height 0.35s var(--ease);
}

.panel:hover::before {
    height: calc(100% - 3.5rem);
}

.panel--orange::before {
    background: var(--orange);
}

.panel h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.panel p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
    margin: 0;
}

/* ---------------------------------------------------------------
   Forms
   --------------------------------------------------------------- */
.inline-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form input,
.inline-form select {
    padding: 0.62rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--paper);
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
                box-shadow 0.18s var(--ease);
}

.inline-form input:focus,
.inline-form select:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(242, 97, 12, 0.12);
}

.inline-form button {
    padding: 0.65rem 1.2rem;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.18s var(--ease);
}

.inline-form button:hover {
    background: var(--orange-dark);
}

/* Resetting a password is housekeeping, not the main action on the
   page — it gets ink, so the orange stays meaningful. */
.reset-form button {
    background: var(--ink);
}

.reset-form button:hover {
    background: var(--ink-soft);
}

/* ---------------------------------------------------------------
   Tables
   --------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.85rem;
}

.data-table th {
    text-align: left;
    padding: 0.7rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1.5px solid var(--line-strong);
    white-space: nowrap;
}

.data-table td {
    text-align: left;
    padding: 0.8rem 0.6rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s var(--ease);
}

.data-table tbody tr:hover {
    background: var(--paper);
}

.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.65rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--blue-soft);
    color: var(--blue-dark);
}

/* ---------------------------------------------------------------
   Page counter / builder toolbar — dark "studio" surface
   --------------------------------------------------------------- */
.page-count-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ink);
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.85rem;
    font-size: 0.84rem;
    color: var(--white);
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.page-count-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-count-actions .toolbar-divider {
    height: 20px;
    background: var(--ink-border);
}

.page-tab-btn {
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--ink-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.page-tab-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.22);
}

#saveBtn {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

#saveBtn:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: var(--white);
}

/* ---------------------------------------------------------------
   Stacked pages (Word-style continuous flow)
   --------------------------------------------------------------- */
.pages-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.page-label {
    font-size: 0.68rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------------------------------------------------------------
   Builder toolbar
   --------------------------------------------------------------- */
.builder-toolbar {
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--white);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.builder-toolbar button,
.builder-toolbar select {
    padding: 0.5rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.87rem;
    font-family: var(--font-body);
    background: var(--white);
    color: var(--text);
    transition: all 0.18s var(--ease);
}

.builder-toolbar button:hover {
    border-color: var(--orange);
    color: var(--orange-dark);
}

#addTextBtn,
#addPhotoBtn,
#addVideoBtn {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
    font-weight: 600;
}

#addTextBtn:hover,
#addPhotoBtn:hover,
#addVideoBtn:hover {
    background: var(--ink-soft);
    border-color: var(--ink-soft);
    color: var(--orange);
}

.toolbar-divider {
    width: 1px;
    height: 26px;
    background: var(--line);
    margin: 0 0.3rem;
}

.color-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--muted);
}

.color-label input[type="color"] {
    width: 32px;
    height: 28px;
    padding: 0;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

/* ---------------------------------------------------------------
   Builder canvas
   --------------------------------------------------------------- */
.builder-canvas {
    background: var(--white);
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius-md);
    height: 500px;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    transition: border-color 0.18s var(--ease);
}

.builder-canvas:focus-within {
    border-color: var(--orange);
}

.builder-canvas:empty:before {
    content: attr(data-placeholder);
    color: #a99f95;
    font-size: 0.92rem;
}

.canvas-element {
    position: absolute;
    padding: 0.6rem 0.85rem;
    background: var(--orange-soft);
    border: 1.5px solid var(--orange);
    border-radius: var(--radius-sm);
    cursor: move;
    box-sizing: border-box;
    font-size: 0.95rem;
    resize: both;
    overflow: auto;
    min-width: 80px;
    min-height: 30px;
}

.canvas-element.dragging {
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}

/* --- Photo / video boxes --- */
.media-element {
    padding: 6px;
    background: var(--paper);
    border-color: var(--blue);
}

.media-content {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 5px;
    background: var(--ink);
}

/* ---------------------------------------------------------------
   Status badges (learner modules / certificates)
   Uppercase mono in a soft-tinted pill — the same shape everywhere,
   so status is read by colour, not by re-reading the words.
   --------------------------------------------------------------- */
.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill--muted {
    background: var(--paper-deep);
    color: var(--muted);
}

.status-pill--progress {
    background: var(--blue-soft);
    color: var(--blue-dark);
}

.status-pill--passed {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill--retake {
    background: var(--orange-soft);
    color: var(--orange-dark);
}

/* ---------------------------------------------------------------
   Certificate "sticker" motif
   --------------------------------------------------------------- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.1rem;
}

.cert-sticker {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
    color: var(--white);
    background: conic-gradient(from 200deg, var(--blue), var(--orange), var(--blue));
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.6rem;
}

/* ---------------------------------------------------------------
   Empty state — an invitation to act, not a shrug
   --------------------------------------------------------------- */
.empty-state {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
    background: var(--paper);
}

/* ---------------------------------------------------------------
   Multiple choice element
   --------------------------------------------------------------- */
.mc-element {
    background: var(--white);
    border-color: var(--blue);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mc-question {
    font-weight: 600;
    font-size: 0.92rem;
    outline: none;
    border-bottom: 1px dashed transparent;
}

.mc-question:focus {
    border-bottom-color: var(--blue);
}

.mc-options {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mc-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
}

.mc-option input[type="radio"] {
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--orange);
}

.mc-option-text {
    flex: 1;
    outline: none;
    border-bottom: 1px dashed transparent;
}

.mc-option-text:focus {
    border-bottom-color: var(--blue);
}

.mc-remove-option,
.dropdown-remove-option {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

.mc-add-option,
.dropdown-add-option {
    align-self: flex-start;
    background: var(--blue-soft);
    color: var(--blue-dark);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.32rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.mc-add-option:hover,
.dropdown-add-option:hover {
    background: var(--blue);
    color: var(--white);
}

/* ---------------------------------------------------------------
   Dropdown element
   --------------------------------------------------------------- */
.dropdown-element {
    background: var(--white);
    border-color: var(--orange);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-label {
    font-weight: 600;
    font-size: 0.92rem;
    outline: none;
    border-bottom: 1px dashed transparent;
}

.dropdown-label:focus {
    border-bottom-color: var(--orange);
}

.dropdown-options {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dropdown-option-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    background: var(--paper);
    border-radius: 6px;
    padding: 0.28rem 0.55rem;
}

.dropdown-option-text {
    flex: 1;
    outline: none;
}

.dropdown-note {
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0;
}

/* ---------------------------------------------------------------
   Export bar
   --------------------------------------------------------------- */
.export-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-right: 0.2rem;
}
