/* ==========================================================================
   Onboarding Platform — Frontend Styles
   Uses CSS custom properties for easy brand theming.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens (override these in your Breakdance theme or child CSS)
   -------------------------------------------------------------------------- */
:root {
    --obp-color-primary:        #2563EB;
    --obp-color-primary-dark:   #1D4ED8;
    --obp-color-primary-light:  #EFF6FF;
    --obp-color-success:        #16A34A;
    --obp-color-success-light:  #F0FDF4;
    --obp-color-danger:         #DC2626;
    --obp-color-danger-light:   #FEF2F2;
    --obp-color-warning:        #D97706;
    --obp-color-warning-light:  #FFFBEB;
    --obp-color-text:           #111827;
    --obp-color-text-muted:     #6B7280;
    --obp-color-border:         #E5E7EB;
    --obp-color-bg:             #F9FAFB;
    --obp-color-white:          #FFFFFF;

    --obp-radius-sm:    6px;
    --obp-radius-md:    10px;
    --obp-radius-lg:    16px;
    --obp-radius-full:  9999px;

    --obp-shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --obp-shadow-md:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --obp-shadow-focus: 0 0 0 3px rgba(37,99,235,.25);

    --obp-font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --obp-transition:   150ms ease;
    --obp-max-width:    720px;
}

/* --------------------------------------------------------------------------
   2. Shared utilities
   -------------------------------------------------------------------------- */
.obp-notice {
    padding: 14px 18px;
    border-radius: var(--obp-radius-md);
    font-family: var(--obp-font-sans);
    font-size: 15px;
    margin-block: 1rem;
}
.obp-notice--warning { background: var(--obp-color-warning-light); color: var(--obp-color-warning); }
.obp-notice--error   { background: var(--obp-color-danger-light);  color: var(--obp-color-danger);  }
.obp-notice--info    { background: var(--obp-color-primary-light); color: var(--obp-color-primary); }

.obp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--obp-radius-md);
    font-family: var(--obp-font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background var(--obp-transition), color var(--obp-transition), border-color var(--obp-transition), box-shadow var(--obp-transition);
    line-height: 1.4;
}
.obp-btn:focus-visible       { outline: none; box-shadow: var(--obp-shadow-focus); }
.obp-btn--primary            { background: var(--obp-color-primary); color: var(--obp-color-white); }
.obp-btn--primary:hover      { background: var(--obp-color-primary-dark); }
.obp-btn--secondary          { background: var(--obp-color-white); color: var(--obp-color-primary); border-color: var(--obp-color-primary); }
.obp-btn--secondary:hover    { background: var(--obp-color-primary-light); }
.obp-btn--ghost              { background: transparent; color: var(--obp-color-text-muted); border-color: var(--obp-color-border); }
.obp-btn--ghost:hover        { background: var(--obp-color-bg); color: var(--obp-color-text); }
.obp-btn:disabled            { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------------------
   3. Quiz wrapper
   -------------------------------------------------------------------------- */
.obp-quiz {
    font-family: var(--obp-font-sans);
    color: var(--obp-color-text);
    max-width: var(--obp-max-width);
    margin: 0 auto;
    position: relative;
}

/* --------------------------------------------------------------------------
   4. Screens
   -------------------------------------------------------------------------- */
.obp-quiz__screen            { display: none; }
.obp-quiz__screen.is-active  { display: block; }

/* --- Intro screen --- */
.obp-quiz__screen--intro {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--obp-shadow-md);
}
.obp-quiz__title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--obp-color-text);
}
.obp-quiz__intro-text {
    font-size: 16px;
    color: var(--obp-color-text-muted);
    line-height: 1.65;
    margin-bottom: 28px;
}
.obp-quiz__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}
.obp-quiz__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--obp-color-text-muted);
    font-weight: 500;
}
.obp-quiz__start-btn { padding: 13px 36px; font-size: 16px; }

/* --- Already passed notice --- */
.obp-quiz__passed-notice {
    background: var(--obp-color-success-light);
    border: 1px solid #bbf7d0;
    border-radius: var(--obp-radius-lg);
    padding: 36px;
    text-align: center;
    margin-bottom: 24px;
}
.obp-quiz__passed-icon {
    width: 52px; height: 52px;
    background: var(--obp-color-success);
    color: var(--obp-color-white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   5. Questions screen
   -------------------------------------------------------------------------- */
.obp-quiz__screen--questions {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    box-shadow: var(--obp-shadow-md);
    overflow: hidden;
}

/* Header */
.obp-quiz__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--obp-color-border);
    background: var(--obp-color-bg);
}
.obp-quiz__progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--obp-color-text-muted);
}
.obp-quiz__timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--obp-color-text-muted);
    transition: color var(--obp-transition);
}
.obp-quiz__timer.is-urgent       { color: var(--obp-color-danger); }
.obp-quiz__timer.is-urgent svg   { stroke: var(--obp-color-danger); }

/* Progress bar */
.obp-quiz__progress-bar {
    height: 4px;
    background: var(--obp-color-border);
}
.obp-quiz__progress-fill {
    height: 100%;
    background: var(--obp-color-primary);
    transition: width 300ms ease;
    border-radius: 0 var(--obp-radius-full) var(--obp-radius-full) 0;
}

/* Questions */
.obp-quiz__questions { padding: 32px 32px 0; }

.obp-quiz__question              { display: none; }
.obp-quiz__question.is-active    { display: block; }

.obp-quiz__question-type {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--obp-color-primary);
    background: var(--obp-color-primary-light);
    padding: 3px 10px;
    border-radius: var(--obp-radius-full);
    margin-bottom: 12px;
}
.obp-quiz__question-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* Answers */
.obp-quiz__answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.obp-quiz__answer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    cursor: pointer;
    transition: border-color var(--obp-transition), background var(--obp-transition), box-shadow var(--obp-transition);
    user-select: none;
}
.obp-quiz__answer:hover { border-color: var(--obp-color-primary); background: var(--obp-color-primary-light); }
.obp-quiz__answer.is-selected { border-color: var(--obp-color-primary); background: var(--obp-color-primary-light); box-shadow: var(--obp-shadow-focus); }

.obp-quiz__answer input[type=radio],
.obp-quiz__answer input[type=checkbox] { display: none; }

.obp-quiz__answer-indicator {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 2px solid var(--obp-color-border);
    border-radius: 50%;
    background: var(--obp-color-white);
    transition: border-color var(--obp-transition), background var(--obp-transition);
    position: relative;
}
/* Checkbox variant */
.obp-quiz__answer input[type=checkbox] ~ .obp-quiz__answer-indicator { border-radius: 5px; }

.obp-quiz__answer.is-selected .obp-quiz__answer-indicator {
    border-color: var(--obp-color-primary);
    background: var(--obp-color-primary);
}
.obp-quiz__answer.is-selected .obp-quiz__answer-indicator::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 7l4 4 6-6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
}

.obp-quiz__answer-text { font-size: 15px; font-weight: 500; }

/* Explanation */
.obp-quiz__explanation {
    margin-top: 8px;
    padding: 14px 18px;
    background: #fffbeb;
    border-left: 3px solid var(--obp-color-warning);
    border-radius: 0 var(--obp-radius-sm) var(--obp-radius-sm) 0;
    font-size: 14px;
    color: var(--obp-color-text-muted);
    line-height: 1.6;
}

/* Navigation */
.obp-quiz__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px 28px;
    border-top: 1px solid var(--obp-color-border);
    margin-top: 8px;
    gap: 12px;
}
.obp-quiz__submit-btn { margin-left: auto; }

/* --------------------------------------------------------------------------
   6. Results screen
   -------------------------------------------------------------------------- */
.obp-quiz__screen--results {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    box-shadow: var(--obp-shadow-md);
    padding: 48px 40px;
    text-align: center;
}
.obp-quiz__result-icon  { font-size: 48px; margin-bottom: 16px; }
.obp-quiz__result-title { font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.obp-quiz__result-message { color: var(--obp-color-text-muted); font-size: 16px; margin-bottom: 28px; }

/* Score ring */
.obp-quiz__score-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}
.obp-quiz__score-ring-bg   { stroke: var(--obp-color-border); }
.obp-quiz__score-ring-fill { stroke: var(--obp-color-primary); transition: stroke-dashoffset 800ms cubic-bezier(.4,0,.2,1); }
.obp-quiz.is-passed .obp-quiz__score-ring-fill { stroke: var(--obp-color-success); }
.obp-quiz.is-failed .obp-quiz__score-ring-fill { stroke: var(--obp-color-danger);  }

.obp-quiz__score-number {
    position: absolute;
    font-size: 22px;
    font-weight: 700;
    color: var(--obp-color-text);
}
.obp-quiz__result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   7. Loading overlay
   -------------------------------------------------------------------------- */
.obp-quiz__loading {
    display: none; /* hidden by default; JS uses removeAttribute('hidden') + this is overridden */
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--obp-radius-lg);
    z-index: 10;
}
.obp-quiz__spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--obp-color-border);
    border-top-color: var(--obp-color-primary);
    border-radius: 50%;
    animation: obp-spin 700ms linear infinite;
}
@keyframes obp-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   8. Dashboard — My Quizzes
   -------------------------------------------------------------------------- */
.obp-dashboard {
    font-family: var(--obp-font-sans);
    color: var(--obp-color-text);
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.obp-dashboard__header { margin-bottom: 28px; }
.obp-dashboard__welcome h1,
.obp-dashboard__welcome-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--obp-color-text);
}
.obp-dashboard__welcome p,
.obp-dashboard__welcome-sub {
    font-size: 16px;
    color: var(--obp-color-text-muted);
    margin: 0;
}

/* Progress card */
.obp-dashboard__progress-card {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    padding: 24px 28px;
    margin-bottom: 36px;
    box-shadow: var(--obp-shadow-sm);
}
.obp-dashboard__progress-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.obp-dashboard__progress-label   { font-size: 14px; font-weight: 600; color: var(--obp-color-text-muted); }
.obp-dashboard__progress-fraction { font-size: 14px; font-weight: 700; color: var(--obp-color-text); }

.obp-progress-bar {
    height: 8px;
    background: var(--obp-color-border);
    border-radius: var(--obp-radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}
.obp-progress-bar__fill {
    height: 100%;
    background: var(--obp-color-primary);
    border-radius: var(--obp-radius-full);
    transition: width 600ms ease;
}
.obp-dashboard__progress-pct { font-size: 13px; color: var(--obp-color-text-muted); text-align: right; }

.obp-dashboard__complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--obp-color-success);
    color: var(--obp-color-white);
    padding: 6px 16px;
    border-radius: var(--obp-radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
}

/* Groups */
.obp-dashboard__group { margin-bottom: 36px; }
.obp-dashboard__group-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--obp-color-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--obp-color-border);
}

/* Quiz grid */
.obp-quiz-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
    gap: 14px;
}

/* Quiz card */
.obp-quiz-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--obp-color-white);
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    padding: 18px 20px;
    text-decoration: none;
    color: var(--obp-color-text);
    transition: border-color var(--obp-transition), box-shadow var(--obp-transition), transform var(--obp-transition);
    position: relative;
    box-shadow: var(--obp-shadow-sm);
}
.obp-quiz-card:hover   { border-color: var(--obp-color-primary); box-shadow: var(--obp-shadow-md); transform: translateY(-1px); }
.obp-quiz-card:focus   { outline: none; box-shadow: var(--obp-shadow-focus); }

.obp-quiz-card.is-passed    { border-color: #bbf7d0; background: #f0fdf4; }
.obp-quiz-card.is-attempted { border-color: #fde68a; }

/* Status dot */
.obp-quiz-card__status-dot {
    position: absolute;
    top: 16px; right: 16px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--obp-color-border);
}
.obp-quiz-card.is-passed    .obp-quiz-card__status-dot { background: var(--obp-color-success); }
.obp-quiz-card.is-attempted .obp-quiz-card__status-dot { background: var(--obp-color-warning); }

.obp-quiz-card__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    padding-right: 20px; /* room for status dot */
    line-height: 1.4;
}
.obp-quiz-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: var(--obp-color-text-muted);
}
.obp-quiz-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.obp-quiz-card__score {
    font-size: 14px;
    font-weight: 700;
    color: var(--obp-color-text-muted);
}
.obp-quiz-card__arrow {
    stroke: var(--obp-color-text-muted);
    transition: transform var(--obp-transition), stroke var(--obp-transition);
}
.obp-quiz-card:hover .obp-quiz-card__arrow { transform: translateX(3px); stroke: var(--obp-color-primary); }

/* Badges */
.obp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--obp-radius-full);
    font-size: 12px;
    font-weight: 700;
}
.obp-badge--passed   { background: var(--obp-color-success-light); color: var(--obp-color-success); }
.obp-badge--failed   { background: var(--obp-color-danger-light);  color: var(--obp-color-danger);  }
.obp-badge--pending  { background: var(--obp-color-bg);            color: var(--obp-color-text-muted); border: 1px solid var(--obp-color-border); }

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */
@media ( max-width: 600px ) {
    .obp-quiz__screen--intro,
    .obp-quiz__screen--results { padding: 28px 20px; }
    .obp-quiz__questions        { padding: 20px 16px 0; }
    .obp-quiz__nav              { padding: 16px 16px 20px; flex-wrap: wrap; }
    .obp-quiz-grid              { grid-template-columns: 1fr; }
    .obp-dashboard__progress-card { padding: 18px; }
}

/* ==========================================================================
   Auth — Split-screen login
   ========================================================================== */

/* The shortcode wrapper fills the viewport and breaks out of any
   page content padding Breakdance adds */
.obp-auth--split {
    display: flex;
    min-height: 100vh;
    font-family: var(--obp-font-sans);
    /* Negative margin trick to break out of typical content containers */
    margin-left:  calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

/* ---- Left panel (form) ---- */
.obp-auth__left {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--obp-color-white);
    overflow-y: auto;
}

/* ---- Right panel (image) ---- */
.obp-auth__image {
    flex: 0 0 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: sticky;
    top: 0;
    height: 100vh;
}

/* ---- Card inside the left panel ---- */
.obp-auth__card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

.obp-auth__logo {
    margin-bottom: 32px;
}
.obp-auth__logo-img {
    max-height: 48px;
    width: auto;
}
.obp-auth__logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--obp-color-primary);
}

.obp-auth__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--obp-color-text);
    margin: 0 0 8px;
}
.obp-auth__subtitle {
    font-size: 15px;
    color: var(--obp-color-text-muted);
    margin: 0 0 28px;
}

.obp-auth__notice {
    margin-bottom: 20px;
    font-size: 14px;
}

.obp-auth__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.obp-auth__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.obp-auth__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.obp-auth__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--obp-color-text);
}

.obp-auth__forgot {
    font-size: 13px;
    color: var(--obp-color-primary);
    text-decoration: none;
}
.obp-auth__forgot:hover { text-decoration: underline; }

.obp-auth__input-wrap { position: relative; }

.obp-auth__input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    font-size: 15px;
    font-family: var(--obp-font-sans);
    color: var(--obp-color-text);
    background: var(--obp-color-white);
    transition: border-color var(--obp-transition), box-shadow var(--obp-transition);
    box-sizing: border-box;
    -webkit-appearance: none;
}
.obp-auth__input:focus {
    outline: none;
    border-color: var(--obp-color-primary);
    box-shadow: var(--obp-shadow-focus);
}
.obp-auth__input-wrap .obp-auth__input { padding-right: 44px; }

.obp-auth__toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--obp-color-text-muted);
    display: flex;
    align-items: center;
}
.obp-auth__toggle-pw:hover { color: var(--obp-color-text); }

.obp-auth__submit {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
}

/* No image — center the card like before */
.obp-auth--split:not(.has-image) .obp-auth__left {
    flex: 1;
    background: var(--obp-color-bg);
}
.obp-auth--split:not(.has-image) .obp-auth__card {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    box-shadow: var(--obp-shadow-md);
    padding: 44px 40px;
}

/* Mobile — stack vertically, image becomes a banner at top */
@media ( max-width: 768px ) {
    .obp-auth--split {
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .obp-auth__image {
        flex: 0 0 240px;
        height: 240px;
        position: relative;
        width: 100%;
    }
    .obp-auth__left {
        flex: 1;
        padding: 36px 24px;
    }
}


/* ==========================================================================
   Video lesson
   ========================================================================== */

.obp-video {
    max-width: var(--obp-max-width);
    margin: 0 auto 28px;
}

.obp-video__embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: var(--obp-radius-lg);
    overflow: hidden;
    box-shadow: var(--obp-shadow-md);
}

.obp-video__embed iframe,
.obp-video__embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.obp-video__caption {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--obp-color-text-muted);
    text-align: center;
    font-style: italic;
}

/* Quiz card type badge */
.obp-quiz-card__type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--obp-color-text-muted);
    background: var(--obp-color-bg);
    border: 1px solid var(--obp-color-border);
    padding: 2px 7px;
    border-radius: var(--obp-radius-full);
}
.obp-quiz-card__type-badge--quiz {
    /* same style, just a different icon */
}

/* ==========================================================================
   Top navigation bar — [obp_nav]
   ========================================================================== */

.obp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 24px;
    background: var(--obp-color-white);
    border-bottom: 1px solid var(--obp-color-border);
    font-family: var(--obp-font-sans);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

.obp-nav__left {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
}

.obp-nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.obp-nav__logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--obp-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.obp-nav__logo-img {
    max-height: 32px;
    width: auto;
}

.obp-nav__logo-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--obp-color-text);
    white-space: nowrap;
}

.obp-nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.obp-nav__link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: var(--obp-radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--obp-color-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--obp-transition), color var(--obp-transition);
    border: none;
    background: none;
    cursor: pointer;
}

.obp-nav__link svg {
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity var(--obp-transition);
}

.obp-nav__link:hover {
    background: var(--obp-color-bg);
    color: var(--obp-color-text);
}
.obp-nav__link:hover svg { opacity: 1; }

.obp-nav__link.is-active {
    background: var(--obp-color-bg);
    color: var(--obp-color-text);
}
.obp-nav__link.is-active svg { opacity: 1; }

/* Right side */
.obp-nav__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Progress pill */
.obp-nav__progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--obp-color-bg);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-full);
}

.obp-nav__progress-label {
    font-size: 12px;
    color: var(--obp-color-text-muted);
    white-space: nowrap;
}

.obp-nav__progress-bar {
    width: 72px;
    height: 5px;
    background: var(--obp-color-border);
    border-radius: var(--obp-radius-full);
    overflow: hidden;
}

.obp-nav__progress-fill {
    height: 100%;
    background: var(--obp-color-primary);
    border-radius: var(--obp-radius-full);
    transition: width 600ms ease;
}

.obp-nav__progress-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--obp-color-text);
    min-width: 28px;
}

/* User */
.obp-nav__user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px;
    border-radius: var(--obp-radius-md);
    cursor: default;
    text-decoration: none;
    color: inherit;
    transition: background var(--obp-transition);
}
a.obp-nav__user {
    cursor: pointer;
}
a.obp-nav__user:hover {
    background: var(--obp-color-bg);
}

.obp-nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--obp-color-primary-light);
    color: var(--obp-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--obp-color-border);
}

.obp-nav__user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.obp-nav__user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--obp-color-text);
    white-space: nowrap;
}

.obp-nav__user-role {
    font-size: 11px;
    color: var(--obp-color-text-muted);
    white-space: nowrap;
}

/* Sign out */
.obp-nav__logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--obp-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--obp-color-text-muted);
    text-decoration: none;
    border: 1px solid var(--obp-color-border);
    background: none;
    cursor: pointer;
    font-family: var(--obp-font-sans);
    white-space: nowrap;
    transition: background var(--obp-transition), color var(--obp-transition);
}

.obp-nav__logout:hover {
    background: var(--obp-color-bg);
    color: var(--obp-color-text);
}

/* Responsive — hide secondary items on small screens */
@media ( max-width: 700px ) {
    .obp-nav__progress  { display: none; }
    .obp-nav__user-info { display: none; }
    .obp-nav__logout span { display: none; }
    .obp-nav            { padding: 0 16px; }
}

@media ( max-width: 480px ) {
    .obp-nav__links .obp-nav__link span { display: none; }
    .obp-nav__link { padding: 6px 10px; }
}

/* ==========================================================================
   Welcome banner
   ========================================================================== */

.obp-welcome-banner {
    border-radius: var(--obp-radius-lg);
    background: linear-gradient(135deg, #1e3a5f 0%, var(--obp-color-primary) 100%);
    padding: 28px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.obp-welcome-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.obp-welcome-banner__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}
.obp-welcome-banner__icon {
    font-size: 36px;
    flex-shrink: 0;
}
.obp-welcome-banner__text { flex: 1; }
.obp-welcome-banner__title {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}
.obp-welcome-banner__progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.obp-welcome-banner__bar {
    flex: 1;
    max-width: 240px;
    height: 7px;
    background: rgba(255,255,255,.25);
    border-radius: var(--obp-radius-full);
    overflow: hidden;
}
.obp-welcome-banner__bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: var(--obp-radius-full);
    transition: width 600ms ease;
}
.obp-welcome-banner__fraction {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
}

/* ==========================================================================
   Category banner
   ========================================================================== */

.obp-module-group { margin-bottom: 40px; }

.obp-cat-banner {
    border-radius: var(--obp-radius-lg);
    background: var(--obp-color-primary);
    padding: 0;
    margin-bottom: 20px;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.obp-cat-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,.65) 0%, rgba(0,0,0,.2) 100%);
}
.obp-cat-banner__content {
    position: relative;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.obp-cat-banner__top { display: flex; align-items: flex-start; }
.obp-cat-banner__title {
    font-size: 24px;
    font-weight: 500;
    color: var(--obp-color-text);
    margin: 0 0 4px;
    text-shadow: none;
}
.obp-cat-banner.has-image .obp-cat-banner__title {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.obp-cat-banner__desc {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.obp-cat-banner__progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.obp-cat-banner__bar {
    flex: 1;
    max-width: 280px;
    height: 7px;
    background: rgba(255,255,255,.3);
    border-radius: var(--obp-radius-full);
    overflow: hidden;
}
.obp-cat-banner__bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: var(--obp-radius-full);
    transition: width 600ms ease;
}
.obp-cat-banner__fraction {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    white-space: nowrap;
}

/* No background image fallback */
.obp-cat-banner:not(.has-image) .obp-cat-banner__overlay { display: none; }
.obp-cat-banner:not(.has-image) { background: var(--obp-color-bg); border: 1px solid var(--obp-color-border); }
.obp-cat-banner:not(.has-image) .obp-cat-banner__desc  { color: var(--obp-color-text-muted); text-shadow: none; }
.obp-cat-banner:not(.has-image) .obp-cat-banner__bar   { background: var(--obp-color-border); }
.obp-cat-banner:not(.has-image) .obp-cat-banner__fraction { color: var(--obp-color-text-muted); }

/* ==========================================================================
   Module cards (Lovable-style)
   ========================================================================== */

.obp-module-grid {
    display: grid;
    grid-template-columns: repeat( 4, 1fr );
    gap: 16px;
}

.obp-module-card {
    background: var(--obp-color-white);
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--obp-color-text);
    display: flex;
    flex-direction: column;
    transition: border-color var(--obp-transition), box-shadow var(--obp-transition), transform var(--obp-transition);
    box-shadow: var(--obp-shadow-sm);
}
.obp-module-card:hover {
    border-color: var(--obp-color-primary);
    box-shadow: var(--obp-shadow-md);
    transform: translateY(-2px);
}
.obp-module-card--passed { border-color: #86efac; }
.obp-module-card--passed:hover { border-color: var(--obp-color-success); }

/* Thumbnail */
.obp-module-card__thumb {
    position: relative;
    width: 100%;
    padding-top: 56%;
    background: var(--obp-color-bg);
    overflow: hidden;
    flex-shrink: 0;
}
.obp-module-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.obp-module-card__thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--obp-color-text-muted);
}

/* Overlay badges */
.obp-module-card__num {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.obp-module-card__time {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.obp-module-card__check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
}
.obp-module-card__check svg {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    padding: 8px;
    stroke: #fff;
    backdrop-filter: blur(2px);
}

/* Card body */
.obp-module-card__body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.obp-module-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--obp-color-text);
    margin: 0;
    line-height: 1.4;
}
.obp-module-card__desc {
    font-size: 13px;
    color: var(--obp-color-text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.obp-module-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--obp-color-border);
}
.obp-module-card__status {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.obp-module-card__status--passed { color: var(--obp-color-success); }
.obp-module-card__status--failed { color: var(--obp-color-danger); }
.obp-module-card__action {
    font-size: 13px;
    color: var(--obp-color-text-muted);
}
.obp-module-card__cta {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: var(--obp-radius-md);
}

@media ( max-width: 900px ) {
    .obp-module-grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 600px ) {
    .obp-module-grid { grid-template-columns: 1fr 1fr; }
    .obp-welcome-banner { padding: 20px; }
}
@media ( max-width: 400px ) {
    .obp-module-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Profile page — [obp_profile]
   ========================================================================== */

.obp-profile {
    font-family: var(--obp-font-sans);
    max-width: 680px;
    margin: 0 auto;
    color: var(--obp-color-text);
}

/* Top card */
.obp-profile__card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--obp-shadow-sm);
}
.obp-profile__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--obp-color-primary-light);
    color: var(--obp-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--obp-color-border);
}
.obp-profile__identity { flex: 1; }
.obp-profile__name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}
.obp-profile__email {
    font-size: 14px;
    color: var(--obp-color-text-muted);
    margin: 0 0 8px;
}
.obp-profile__complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--obp-color-success-light);
    color: var(--obp-color-success);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--obp-radius-full);
}

/* Sections */
.obp-profile__body { display: flex; flex-direction: column; gap: 20px; }
.obp-profile__section {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    padding: 24px 28px;
    box-shadow: var(--obp-shadow-sm);
}
.obp-profile__section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--obp-color-text);
    margin: 0 0 16px;
}

/* Fields */
.obp-profile__fields { display: flex; flex-direction: column; gap: 0; }
.obp-profile__field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--obp-color-border);
    font-size: 14px;
}
.obp-profile__field:last-child { border-bottom: none; }
.obp-profile__field-label { color: var(--obp-color-text-muted); }
.obp-profile__field-value { font-weight: 600; }

/* Progress summary */
.obp-profile__progress-summary {
    display: flex;
    align-items: center;
    gap: 24px;
}
.obp-profile__progress-ring {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.obp-profile__progress-pct {
    position: absolute;
    font-size: 15px;
    font-weight: 700;
    color: var(--obp-color-text);
}
.obp-profile__progress-fraction { font-size: 16px; margin: 0 0 6px; }
.obp-profile__progress-note { font-size: 14px; color: var(--obp-color-text-muted); margin: 0; }
.obp-profile__progress-note--success { color: var(--obp-color-success); }

/* Module list */
.obp-profile__module-list { display: flex; flex-direction: column; gap: 0; }
.obp-profile__module {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--obp-color-border);
    font-size: 14px;
}
.obp-profile__module:last-child { border-bottom: none; }
.obp-profile__module-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--obp-color-bg);
    border: 1px solid var(--obp-color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--obp-color-text-muted);
}
.obp-profile__module--passed .obp-profile__module-num {
    background: var(--obp-color-success-light);
    border-color: #86efac;
    color: var(--obp-color-success);
}
.obp-profile__module-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.obp-profile__module-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.obp-profile__module-type { font-size: 12px; color: var(--obp-color-text-muted); }
.obp-profile__module-result {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.obp-profile__module-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--obp-radius-full);
}
.obp-profile__module-badge--passed  { background: var(--obp-color-success-light); color: var(--obp-color-success); }
.obp-profile__module-badge--failed  { background: var(--obp-color-danger-light);  color: var(--obp-color-danger); }
.obp-profile__module-badge--pending { background: var(--obp-color-bg); color: var(--obp-color-text-muted); border: 1px solid var(--obp-color-border); }
.obp-profile__module-score { font-size: 13px; font-weight: 700; color: var(--obp-color-text-muted); }
.obp-profile__module-date  { font-size: 12px; color: var(--obp-color-text-muted); }
.obp-profile__module-link  {
    font-size: 13px;
    font-weight: 600;
    color: var(--obp-color-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.obp-profile__module-link:hover { text-decoration: underline; }

@media ( max-width: 600px ) {
    .obp-profile__card    { flex-direction: column; text-align: center; padding: 24px 20px; }
    .obp-profile__section { padding: 20px; }
    .obp-profile__module  { flex-wrap: wrap; }
    .obp-profile__module-result { flex-wrap: wrap; }
    .obp-profile__progress-summary { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   Answer feedback — shown when "Show Correct Answer" is enabled in settings
   ========================================================================== */

.obp-quiz__answer.is-correct {
    border-color: var(--obp-color-success) !important;
    background: var(--obp-color-success-light) !important;
}
.obp-quiz__answer.is-correct .obp-quiz__answer-indicator {
    border-color: var(--obp-color-success) !important;
    background: var(--obp-color-success) !important;
}

.obp-quiz__answer.is-incorrect {
    border-color: var(--obp-color-danger) !important;
    background: var(--obp-color-danger-light) !important;
}
.obp-quiz__answer.is-incorrect .obp-quiz__answer-indicator {
    border-color: var(--obp-color-danger) !important;
    background: var(--obp-color-danger) !important;
}

/* Checkmark for correct, X for incorrect */
.obp-quiz__answer.is-correct .obp-quiz__answer-indicator::after {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 7l4 4 6-6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.obp-quiz__answer.is-incorrect .obp-quiz__answer-indicator::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3l8 8M11 3l-8 8' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

/* Dim unselected answers once feedback is shown */
.obp-quiz__answers:has(.is-correct) .obp-quiz__answer:not(.is-correct):not(.is-incorrect):not(.is-selected) {
    opacity: 0.5;
}

/* Disabled answer labels — prevent pointer events after answering */
.obp-quiz__answer:has(input:disabled) {
    cursor: default;
    pointer-events: none;
}

/* ==========================================================================
   Manager dashboard — [obp_manager_dashboard]
   ========================================================================== */

.obp-mgr {
    font-family: var(--obp-font-sans);
    color: var(--obp-color-text);
    max-width: 1100px;
    margin: 0 auto;
}

.obp-mgr__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.obp-mgr__title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    margin: 0;
}
.obp-mgr__title-sections {
    font-size: 16px;
    font-weight: 400;
    color: var(--obp-color-text-muted);
}

/* Stats */
.obp-mgr__stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.obp-mgr__stat {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    padding: 16px 24px;
    min-width: 130px;
    box-shadow: var(--obp-shadow-sm);
}
.obp-mgr__stat-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}
.obp-mgr__stat-label {
    font-size: 13px;
    color: var(--obp-color-text-muted);
    margin-top: 4px;
}

/* Form */
.obp-mgr__form-wrap {
    margin-bottom: 28px;
}
.obp-mgr__form-card {
    background: var(--obp-color-white);
    border: 1px solid var(--obp-color-border);
    border-radius: var(--obp-radius-lg);
    box-shadow: var(--obp-shadow-md);
    overflow: hidden;
}
.obp-mgr__form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--obp-color-border);
    background: var(--obp-color-bg);
}
.obp-mgr__form-header h2 { margin: 0; font-size: 16px; }
.obp-mgr__form-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--obp-color-text-muted);
    line-height: 1;
    padding: 4px;
}
.obp-mgr__form {
    padding: 24px;
}
.obp-mgr__form-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
    gap: 16px;
    margin-bottom: 20px;
}
.obp-mgr__form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.obp-mgr__form-field--full {
    grid-column: 1 / -1;
}
.obp-mgr__form-field label:not(.obp-mgr__checkbox-label) {
    font-size: 13px;
    font-weight: 600;
    color: var(--obp-color-text);
}
.obp-mgr__form-field input[type=text],
.obp-mgr__form-field input[type=email],
.obp-mgr__form-field input[type=date],
.obp-mgr__form-field select {
    padding: 9px 12px;
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    font-size: 14px;
    font-family: var(--obp-font-sans);
    color: var(--obp-color-text);
    background: var(--obp-color-white);
    transition: border-color var(--obp-transition), box-shadow var(--obp-transition);
}
.obp-mgr__form-field input:focus,
.obp-mgr__form-field select:focus {
    outline: none;
    border-color: var(--obp-color-primary);
    box-shadow: var(--obp-shadow-focus);
}
.obp-mgr__checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.obp-mgr__checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    cursor: pointer;
}
.obp-mgr__form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Filters */
.obp-mgr__filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}
.obp-mgr__search {
    padding: 8px 12px;
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    font-size: 14px;
    font-family: var(--obp-font-sans);
    min-width: 220px;
}
.obp-mgr__search:focus {
    outline: none;
    border-color: var(--obp-color-primary);
    box-shadow: var(--obp-shadow-focus);
}
.obp-mgr__select {
    padding: 8px 12px;
    border: 1.5px solid var(--obp-color-border);
    border-radius: var(--obp-radius-md);
    font-size: 14px;
    font-family: var(--obp-font-sans);
    background: var(--obp-color-white);
}

/* Table */
.obp-mgr__table-wrap {
    overflow-x: auto;
    border-radius: var(--obp-radius-lg);
    border: 1px solid var(--obp-color-border);
    box-shadow: var(--obp-shadow-sm);
}
.obp-mgr__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--obp-color-white);
    font-family: var(--obp-font-sans);
}
.obp-mgr__table th {
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--obp-color-text-muted);
    background: var(--obp-color-bg);
    border-bottom: 1px solid var(--obp-color-border);
    text-align: left;
    white-space: nowrap;
}
.obp-mgr__table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--obp-color-border);
    font-size: 14px;
    vertical-align: middle;
}
.obp-mgr__table tr:last-child td { border-bottom: none; }
.obp-mgr__table tr:hover td { background: var(--obp-color-bg); }

.obp-mgr__td-name strong { display: block; font-weight: 600; }
.obp-mgr__td-name span   { font-size: 12px; color: var(--obp-color-text-muted); }

.obp-mgr__prog-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}
.obp-mgr__prog-bar {
    flex: 1;
    height: 6px;
    background: var(--obp-color-border);
    border-radius: var(--obp-radius-full);
    overflow: hidden;
}
.obp-mgr__prog-fill {
    height: 100%;
    background: var(--obp-color-primary);
    border-radius: var(--obp-radius-full);
}
.obp-mgr__prog-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--obp-color-text-muted);
    white-space: nowrap;
}

.obp-mgr__badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--obp-radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.obp-mgr__td-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.obp-mgr__td-actions .obp-btn {
    padding: 5px 12px;
    font-size: 12px;
    white-space: nowrap;
}

/* Modal */
.obp-mgr__modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.obp-mgr__modal[hidden] { display: none; }
.obp-mgr__modal-box {
    background: var(--obp-color-white);
    border-radius: var(--obp-radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.obp-mgr__modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--obp-color-border);
    flex-shrink: 0;
}
.obp-mgr__modal-title { margin: 0; font-size: 17px; }
.obp-mgr__modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--obp-color-text-muted);
    line-height: 1;
    padding: 4px;
}
.obp-mgr__modal-body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
}

@media ( max-width: 640px ) {
    .obp-mgr__stats { gap: 10px; }
    .obp-mgr__stat  { padding: 12px 16px; min-width: 100px; }
    .obp-mgr__form-grid { grid-template-columns: 1fr; }
    .obp-mgr__td-actions { flex-direction: column; gap: 4px; }
}
