/* ═══════════════════════════════════════════════════════════
   EWB-Helfer Frontend v3.1 — Light Mode, Innovative 2026 Design
   High Contrast · WCAG 2.2 AA · Mobile-First
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Design Tokens ─── */
.ewb-plugin {
    --ewb-bg: #f4f2ee;
    --ewb-surface: #ffffff;
    --ewb-surface-hover: #faf9f7;
    --ewb-surface-raised: #ffffff;
    --ewb-border: #e0ddd7;
    --ewb-border-light: #eae8e3;

    --ewb-text: #1a1a1a;
    --ewb-text-secondary: #4a4a4a;
    --ewb-text-muted: #8c8c8c;

    --ewb-primary: #5b4cdb;
    --ewb-primary-hover: #4a3cc7;
    --ewb-primary-light: #7c6ff0;
    --ewb-primary-bg: #eeecfb;
    --ewb-primary-bg-subtle: #f6f5fd;

    --ewb-accent: #e8590c;
    --ewb-accent-bg: #fff4ed;
    --ewb-accent-hover: #d14e09;

    --ewb-danger: #dc2626;
    --ewb-danger-bg: #fef2f2;
    --ewb-danger-text: #b91c1c;

    --ewb-success: #16a34a;
    --ewb-success-bg: #f0fdf4;

    --ewb-info: #2563eb;
    --ewb-info-bg: #eff6ff;

    /* Sidebar */
    --ewb-sidebar-bg: #ffffff;
    --ewb-sidebar-text: #4a4a4a;
    --ewb-sidebar-active-bg: #5b4cdb;
    --ewb-sidebar-active-text: #ffffff;

    /* Stat card colors */
    --ewb-stat-1: #3b82f6;
    --ewb-stat-1-bg: #eff6ff;
    --ewb-stat-2: #8b5cf6;
    --ewb-stat-2-bg: #f5f3ff;
    --ewb-stat-3: #10b981;
    --ewb-stat-3-bg: #ecfdf5;
    --ewb-stat-4: #f59e0b;
    --ewb-stat-4-bg: #fffbeb;

    /* Shape */
    --ewb-radius: 14px;
    --ewb-radius-sm: 10px;
    --ewb-radius-lg: 20px;
    --ewb-radius-xl: 24px;
    --ewb-radius-pill: 100px;

    /* Shadows */
    --ewb-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --ewb-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --ewb-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.04);
    --ewb-shadow-md: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --ewb-shadow-lg: 0 20px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.05);
    --ewb-shadow-primary: 0 4px 16px rgba(91,76,219,0.3);

    /* Typography */
    --ewb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --ewb-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Segoe UI Mono', monospace;

    /* Motion */
    --ewb-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ewb-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ewb-duration: 0.2s;

    /* Layout */
    --ewb-topbar-h: 60px;
    --ewb-sidebar-w: 260px;
}

/* ─── Scoped Reset ─── */
.ewb-plugin *,
.ewb-plugin *::before,
.ewb-plugin *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ewb-plugin {
    font-family: var(--ewb-font) !important;
    color: var(--ewb-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    background: var(--ewb-bg);
}

.ewb-plugin a { color: var(--ewb-primary); text-decoration: none; transition: color var(--ewb-duration) var(--ewb-ease); }
.ewb-plugin a:hover { color: var(--ewb-primary-hover); }
.ewb-plugin img { max-width: 100%; height: auto; }
.ewb-plugin ul, .ewb-plugin ol { list-style: none; }
.ewb-plugin h1, .ewb-plugin h2, .ewb-plugin h3, .ewb-plugin h4, .ewb-plugin h5, .ewb-plugin h6 { font-family: var(--ewb-font) !important; }
.ewb-plugin p, .ewb-plugin span, .ewb-plugin div, .ewb-plugin label, .ewb-plugin input, .ewb-plugin select, .ewb-plugin textarea, .ewb-plugin button { font-family: var(--ewb-font) !important; }

/* ─── Accessibility: Screen Reader Only ─── */
.ewb-sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ─── Skip Link ─── */
.ewb-skip-link {
    position: absolute; top: -100%; left: 16px; z-index: 10000;
    padding: 12px 24px; background: var(--ewb-primary); color: #fff;
    border-radius: var(--ewb-radius-sm); font-weight: 600; font-size: 14px;
}
.ewb-skip-link:focus {
    top: 16px; color: #fff;
    outline: 3px solid var(--ewb-primary-light); outline-offset: 2px;
}

/* ─── Focus Styles ─── */
.ewb-plugin :focus-visible {
    outline: 2.5px solid var(--ewb-primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.ewb-plugin :focus:not(:focus-visible) { outline: none; }


/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN — Gradient Split
   ═══════════════════════════════════════════════════════════ */
.ewb-login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ewb-bg);
}

.ewb-login-visual {
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #5b4cdb 0%, #7c3aed 40%, #c026d3 100%);
}

.ewb-login-pattern {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.ewb-login-brand {
    position: relative; z-index: 1; text-align: center; color: #fff; padding: 60px;
}
.ewb-logo-icon { width: 80px; height: 80px; margin: 0 auto 28px; color: rgba(255,255,255,0.9); }
.ewb-login-brand h1 {
    font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px;
}
.ewb-login-brand p {
    color: rgba(255,255,255,0.75); font-size: 16px; font-weight: 400;
}

.ewb-login-form-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px; flex: 1;
}

.ewb-login-form { width: 100%; max-width: 400px; }
.ewb-login-form h2 {
    font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px;
    color: var(--ewb-text);
}
.ewb-login-subtitle {
    color: var(--ewb-text-secondary); margin-bottom: 32px; font-size: 15px; line-height: 1.5;
}

@media (min-width: 768px) {
    .ewb-login-container { flex-direction: row; }
    .ewb-login-visual { display: flex; flex: 1; min-height: 100vh; }
    .ewb-login-form-wrap { flex: 1; padding: 60px; }
}


/* ═══════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════ */
.ewb-field { margin-bottom: 18px; }
.ewb-field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--ewb-text); margin-bottom: 6px; letter-spacing: 0.01em;
}
.ewb-required { color: var(--ewb-danger); font-weight: 700; }
.ewb-field-error { display: block; font-size: 12px; color: var(--ewb-danger); margin-top: 5px; min-height: 0; font-weight: 500; }
.ewb-field-error:empty { display: none; }

.ewb-field input,
.ewb-field select,
.ewb-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    border: 2px solid var(--ewb-border);
    border-radius: var(--ewb-radius-sm);
    font-family: var(--ewb-font) !important;
    font-size: 15px;
    color: var(--ewb-text);
    background: var(--ewb-surface);
    transition: border-color var(--ewb-duration) var(--ewb-ease), box-shadow var(--ewb-duration) var(--ewb-ease);
}

.ewb-field input:hover,
.ewb-field select:hover,
.ewb-field textarea:hover {
    border-color: #ccc9c2;
}

.ewb-field input:focus,
.ewb-field select:focus,
.ewb-field textarea:focus {
    border-color: var(--ewb-primary);
    box-shadow: 0 0 0 4px rgba(91,76,219,0.12);
    outline: none;
}

.ewb-field input[aria-invalid="true"],
.ewb-field select[aria-invalid="true"] {
    border-color: var(--ewb-danger);
    box-shadow: 0 0 0 4px rgba(220,38,38,0.1);
}

.ewb-field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.ewb-field input::placeholder,
.ewb-field textarea::placeholder { color: var(--ewb-text-muted); }


/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.ewb-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 10px 22px;
    border: none; border-radius: var(--ewb-radius-sm);
    font-family: var(--ewb-font) !important; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all var(--ewb-duration) var(--ewb-ease);
    line-height: 1.4; white-space: nowrap; text-decoration: none;
    position: relative;
}
.ewb-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ewb-btn-primary {
    background: var(--ewb-primary); color: #fff;
}
.ewb-btn-primary:hover:not(:disabled) {
    background: var(--ewb-primary-hover);
    box-shadow: var(--ewb-shadow-primary);
    transform: translateY(-1px);
    color: #fff;
}

.ewb-btn-accent { background: var(--ewb-accent); color: #fff; }
.ewb-btn-accent:hover:not(:disabled) {
    background: var(--ewb-accent-hover); color: #fff;
    box-shadow: 0 4px 16px rgba(232,89,12,0.3);
    transform: translateY(-1px);
}

.ewb-btn-outline {
    background: var(--ewb-surface); color: var(--ewb-text);
    border: 2px solid var(--ewb-border); min-height: 44px;
}
.ewb-btn-outline:hover:not(:disabled) {
    border-color: var(--ewb-primary); color: var(--ewb-primary);
    background: var(--ewb-primary-bg-subtle);
}

.ewb-btn-ghost {
    background: transparent; color: var(--ewb-text-secondary);
    padding: 10px 16px; min-height: 44px;
}
.ewb-btn-ghost:hover:not(:disabled) {
    color: var(--ewb-text); background: rgba(0,0,0,0.04);
}

.ewb-btn-danger {
    background: transparent; color: var(--ewb-danger);
    border: 2px solid transparent; min-height: 44px; font-weight: 600;
}
.ewb-btn-danger:hover:not(:disabled) { background: var(--ewb-danger-bg); }

.ewb-btn-danger-fill { background: var(--ewb-danger); color: #fff; }
.ewb-btn-danger-fill:hover:not(:disabled) {
    background: #b91c1c; box-shadow: 0 4px 16px rgba(220,38,38,0.3);
    color: #fff;
}

.ewb-btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.ewb-btn-full { width: 100%; justify-content: center; }
.ewb-btn-back { gap: 6px; padding-left: 12px; }

.ewb-btn-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: none; background: transparent;
    border-radius: var(--ewb-radius-sm); color: var(--ewb-text-muted);
    cursor: pointer; transition: all var(--ewb-duration) var(--ewb-ease); flex-shrink: 0;
}
.ewb-btn-icon:hover { background: rgba(0,0,0,0.05); color: var(--ewb-text); }
.ewb-btn-icon svg { width: 20px; height: 20px; }

.ewb-btn-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: ewb-spin 0.6s linear infinite;
}
@keyframes ewb-spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════ */
.ewb-alert {
    padding: 14px 18px; border-radius: var(--ewb-radius-sm);
    font-size: 14px; margin-bottom: 18px; font-weight: 500;
    border-left: 4px solid transparent;
}
.ewb-alert-error {
    background: var(--ewb-danger-bg); color: var(--ewb-danger-text);
    border-left-color: var(--ewb-danger);
}
.ewb-alert-success {
    background: var(--ewb-success-bg); color: var(--ewb-success);
    border-left-color: var(--ewb-success);
}


/* ═══════════════════════════════════════════════════════════
   MOBILE TOP BAR — Light, Clean
   ═══════════════════════════════════════════════════════════ */
.ewb-topbar {
    display: flex; align-items: center; gap: 12px;
    height: var(--ewb-topbar-h); padding: 0 16px;
    background: var(--ewb-surface); color: var(--ewb-text);
    position: sticky; top: 0; z-index: 200;
    border-bottom: 1px solid var(--ewb-border-light);
    box-shadow: var(--ewb-shadow-xs);
}
.ewb-topbar-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 700; flex: 1; color: var(--ewb-text);
    letter-spacing: -0.3px;
}
.ewb-topbar-logo { width: 26px; height: 26px; color: var(--ewb-primary); }
.ewb-topbar-action { color: var(--ewb-text-muted); width: 40px; height: 40px; }
.ewb-topbar-action:hover { color: var(--ewb-text); background: rgba(0,0,0,0.04); }

/* Hamburger — dark lines on light bg */
.ewb-hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 12px 10px;
    border: none; background: none; cursor: pointer;
}
.ewb-hamburger span {
    display: block; width: 22px; height: 2.5px;
    background: var(--ewb-text); border-radius: 2px;
    transition: all 0.3s var(--ewb-ease);
}
.ewb-hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.ewb-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ewb-hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (min-width: 769px) {
    .ewb-topbar { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   SIDEBAR — Light, Modern
   ═══════════════════════════════════════════════════════════ */
.ewb-sidebar-backdrop {
    display: none; position: fixed; inset: 0; z-index: 299;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(4px);
    transition: opacity 0.3s var(--ewb-ease);
}
.ewb-sidebar-backdrop.is-active { display: block; }

.ewb-sidebar {
    background: var(--ewb-sidebar-bg);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--ewb-sidebar-w); z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ewb-ease);
    overflow-y: auto;
    border-right: 1px solid var(--ewb-border-light);
    box-shadow: var(--ewb-shadow);
}
.ewb-sidebar.is-open { transform: translateX(0); }

.ewb-sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 22px 20px; font-size: 18px; font-weight: 800;
    color: var(--ewb-text); letter-spacing: -0.4px;
    border-bottom: 1px solid var(--ewb-border-light);
}
.ewb-sidebar-logo { width: 30px; height: 30px; color: var(--ewb-primary); flex-shrink: 0; }

.ewb-nav { padding: 16px 12px; flex: 1; }
.ewb-nav li { margin-bottom: 4px; }
.ewb-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; border-radius: var(--ewb-radius-sm);
    color: var(--ewb-sidebar-text); font-size: 14px; font-weight: 500;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-nav a svg {
    width: 20px; height: 20px; flex-shrink: 0;
    color: var(--ewb-text-muted);
    transition: color var(--ewb-duration) var(--ewb-ease);
}
.ewb-nav a:hover {
    background: rgba(0,0,0,0.04); color: var(--ewb-text);
}
.ewb-nav a:hover svg { color: var(--ewb-text-secondary); }
.ewb-nav a.active {
    background: var(--ewb-sidebar-active-bg);
    color: var(--ewb-sidebar-active-text);
    font-weight: 600;
    box-shadow: var(--ewb-shadow-primary);
}
.ewb-nav a.active svg { color: var(--ewb-sidebar-active-text); }

.ewb-sidebar-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-top: 1px solid var(--ewb-border-light);
}
.ewb-user-info {
    display: flex; align-items: center; gap: 10px;
    color: var(--ewb-text-secondary); font-size: 13px; font-weight: 500;
}
.ewb-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--ewb-primary), var(--ewb-primary-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0;
}

/* Desktop: static sidebar */
@media (min-width: 769px) {
    .ewb-sidebar-backdrop { display: none !important; }

    .ewb-sidebar {
        position: sticky; top: 0;
        height: 100vh;
        transform: none;
        box-shadow: none;
    }

    #ewb-main-app {
        display: grid;
        grid-template-columns: var(--ewb-sidebar-w) 1fr;
        min-height: 100vh;
    }
}


/* ═══════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.ewb-content {
    padding: 24px 16px;
    overflow-y: auto;
    max-width: 1200px;
    width: 100%;
}

@media (min-width: 769px) {
    .ewb-content { padding: 36px 44px; }
}


/* ═══════════════════════════════════════════════════════════
   PAGE STRUCTURE
   ═══════════════════════════════════════════════════════════ */
.ewb-page-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 28px; flex-wrap: wrap;
}
.ewb-page-header h1 {
    font-size: 24px; font-weight: 800; letter-spacing: -0.5px; flex: 1;
    min-width: 0; color: var(--ewb-text);
}
@media (min-width: 769px) {
    .ewb-page-header h1 { font-size: 30px; letter-spacing: -0.7px; }
}
.ewb-subtitle { color: var(--ewb-text-secondary); font-size: 15px; margin-top: 4px; }


/* ─── Stats Grid — Colored Cards ─── */
.ewb-stats-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 14px; margin-bottom: 36px;
}
@media (min-width: 640px) {
    .ewb-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.ewb-stat-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius);
    padding: 22px;
    transition: all var(--ewb-duration) var(--ewb-ease);
    position: relative;
    overflow: hidden;
}
.ewb-stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; border-radius: var(--ewb-radius) var(--ewb-radius) 0 0;
}
.ewb-stat-card:hover {
    box-shadow: var(--ewb-shadow);
    transform: translateY(-2px);
}

/* Each stat card gets its own color */
.ewb-stat-card:nth-child(1)::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.ewb-stat-card:nth-child(2)::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.ewb-stat-card:nth-child(3)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.ewb-stat-card:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.ewb-stat-card:nth-child(1) .ewb-stat-value { color: var(--ewb-stat-1); }
.ewb-stat-card:nth-child(2) .ewb-stat-value { color: var(--ewb-stat-2); }
.ewb-stat-card:nth-child(3) .ewb-stat-value { color: var(--ewb-stat-3); }
.ewb-stat-card:nth-child(4) .ewb-stat-value { color: var(--ewb-stat-4); }

.ewb-stat-value {
    font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1;
}
.ewb-stat-label {
    font-size: 13px; color: var(--ewb-text-secondary); margin-top: 6px;
    font-weight: 500;
}


/* ─── Sections ─── */
.ewb-section { margin-bottom: 32px; }
.ewb-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.ewb-section-header h2 {
    font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
    color: var(--ewb-text);
}


/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.ewb-card-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) {
    .ewb-card-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
}

.ewb-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 22px;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-card:hover { box-shadow: var(--ewb-shadow); transform: translateY(-1px); }

/* Child cards */
.ewb-child-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 22px;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-child-card:hover {
    box-shadow: var(--ewb-shadow); transform: translateY(-2px);
    border-color: var(--ewb-border);
}
.ewb-child-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ewb-child-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 600; flex-shrink: 0;
}
.ewb-child-avatar.gender-m { background: #dbeafe; color: #1d4ed8; }
.ewb-child-avatar.gender-w { background: #fce7f3; color: #be185d; }
.ewb-child-name { font-size: 17px; font-weight: 700; color: var(--ewb-text); }
.ewb-child-meta {
    font-size: 13px; color: var(--ewb-text-muted);
    display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
    font-weight: 500;
}
.ewb-child-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Assessment cards */
.ewb-assess-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 18px 22px;
    display: flex; flex-direction: column; gap: 12px;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-assess-card:hover {
    box-shadow: var(--ewb-shadow); transform: translateY(-1px);
    border-color: var(--ewb-border);
}
.ewb-assess-card-header { display: flex; align-items: center; gap: 12px; }
.ewb-assess-card-header strong {
    font-size: 16px; flex: 1; min-width: 0; color: var(--ewb-text);
    font-weight: 700;
}
.ewb-assess-card-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 13px; color: var(--ewb-text-muted); font-weight: 500;
}
.ewb-assess-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ewb-assess-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ewb-assess-list { display: flex; flex-direction: column; gap: 10px; }

/* ─── Form Card ─── */
.ewb-form-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius-lg); padding: 28px;
    max-width: 640px;
    box-shadow: var(--ewb-shadow-sm);
}
@media (min-width: 640px) { .ewb-form-card { padding: 36px; } }

.ewb-form-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 480px) { .ewb-form-grid { grid-template-columns: 1fr 1fr; } }
.ewb-field-full { grid-column: 1 / -1; }
.ewb-form-actions {
    display: flex; gap: 10px; margin-top: 28px; padding-top: 22px;
    border-top: 1px solid var(--ewb-border-light);
}


/* ═══════════════════════════════════════════════════════════
   COUNT BADGE
   ═══════════════════════════════════════════════════════════ */
.ewb-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ewb-primary), var(--ewb-primary-light));
    color: #fff;
    font-size: 11px; font-weight: 700; border-radius: var(--ewb-radius-pill);
    min-width: 26px; height: 24px; padding: 0 8px;
}


/* ═══════════════════════════════════════════════════════════
   ASSESSMENT EDITOR
   ═══════════════════════════════════════════════════════════ */
.ewb-editor-header {
    position: sticky; top: 0; background: var(--ewb-bg);
    z-index: 10; padding-bottom: 18px;
    border-bottom: 1px solid var(--ewb-border-light);
    margin-bottom: 24px;
}
.ewb-header-info { flex: 1; min-width: 0; }
.ewb-header-actions { display: flex; gap: 8px; }

.ewb-editor-meta {
    display: flex; gap: 8px; flex-wrap: wrap;
    font-size: 12px; color: var(--ewb-text-secondary); margin-top: 8px;
}
.ewb-editor-meta .ewb-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--ewb-surface); border: 1.5px solid var(--ewb-border);
    border-radius: var(--ewb-radius-pill); padding: 4px 12px; font-size: 12px;
    font-weight: 500;
}
.ewb-editor-meta .ewb-tag-gender-m { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.ewb-editor-meta .ewb-tag-gender-w { border-color: #f9a8d4; color: #be185d; background: #fdf2f8; }

.ewb-editor-layout { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 1024px) {
    .ewb-editor-layout { display: grid; grid-template-columns: 1fr 340px; align-items: start; }
}

.ewb-editor-main {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius-lg); overflow: hidden;
    box-shadow: var(--ewb-shadow-xs);
}

.ewb-editor-toolbar {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--ewb-border-light);
    background: var(--ewb-surface-hover);
}
@media (min-width: 640px) {
    .ewb-editor-toolbar { flex-direction: row; align-items: center; gap: 12px; }
}
.ewb-toolbar-select-wrap { flex: 1; min-width: 0; }
.ewb-toolbar-actions { display: flex; gap: 6px; }

.ewb-select {
    width: 100%; min-height: 44px; padding: 10px 16px;
    border: 2px solid var(--ewb-border); border-radius: var(--ewb-radius-sm);
    font-family: var(--ewb-font) !important; font-size: 14px;
    background: var(--ewb-surface); color: var(--ewb-text);
}
.ewb-select:focus {
    border-color: var(--ewb-primary);
    box-shadow: 0 0 0 4px rgba(91,76,219,0.12);
    outline: none;
}

/* Skills List */
.ewb-fe-skills-list { max-height: 60vh; overflow-y: auto; }
.ewb-fe-skill-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ewb-border-light);
    cursor: pointer;
    transition: background var(--ewb-duration) var(--ewb-ease);
}
.ewb-fe-skill-item:last-child { border-bottom: none; }
.ewb-fe-skill-item:hover { background: var(--ewb-surface-hover); }
.ewb-fe-skill-item.is-checked { background: var(--ewb-primary-bg-subtle); }
.ewb-fe-skill-item.is-active {
    background: var(--ewb-primary-bg);
    outline: 2px solid var(--ewb-primary);
    outline-offset: -2px; border-radius: 6px;
}

.ewb-fe-skill-item input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--ewb-primary); cursor: pointer;
}
.ewb-fe-skill-code {
    font-family: var(--ewb-mono) !important; font-size: 12px; font-weight: 600;
    color: var(--ewb-primary); white-space: nowrap; min-width: 48px; padding-top: 2px;
}
.ewb-fe-skill-text {
    font-size: 13px; line-height: 1.55; color: var(--ewb-text); flex: 1;
}

/* Editor Sidebar */
.ewb-editor-sidebar { position: static; }
@media (min-width: 1024px) { .ewb-editor-sidebar { position: sticky; top: 100px; } }

.ewb-sidebar-section {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 18px; margin-bottom: 14px;
    box-shadow: var(--ewb-shadow-xs);
}
.ewb-sidebar-section h3 {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ewb-text-muted);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

.ewb-preview-card {
    background: var(--ewb-bg); border-radius: var(--ewb-radius-sm);
    padding: 16px; font-size: 14px; line-height: 1.6;
}
.ewb-preview-card .ewb-pv-code {
    font-family: var(--ewb-mono) !important; font-size: 12px; font-weight: 600;
    color: var(--ewb-primary); display: block; margin-bottom: 4px;
}
.ewb-preview-card .ewb-pv-cat {
    font-size: 11px; color: var(--ewb-text-muted); display: block; margin-bottom: 8px;
    font-weight: 500;
}

.ewb-checked-scroll { max-height: 300px; overflow-y: auto; }
.ewb-checked-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 12px; margin-bottom: 4px;
    background: var(--ewb-primary-bg-subtle);
    border-radius: var(--ewb-radius-sm); font-size: 12px;
}
.ewb-checked-pill .code {
    font-family: var(--ewb-mono) !important; font-weight: 600;
    color: var(--ewb-primary); white-space: nowrap;
}
.ewb-checked-pill .text {
    flex: 1; color: var(--ewb-text); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.ewb-checked-pill .remove {
    width: 26px; height: 26px; border: none; background: transparent;
    color: var(--ewb-text-muted); cursor: pointer; font-size: 14px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-checked-pill .remove:hover { background: var(--ewb-danger-bg); color: var(--ewb-danger); }


/* ═══════════════════════════════════════════════════════════
   SKILLS OVERVIEW
   ═══════════════════════════════════════════════════════════ */
.ewb-skills-toolbar { margin-bottom: 22px; }
.ewb-search-wrap { position: relative; max-width: 500px; }
.ewb-search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--ewb-text-muted); pointer-events: none;
}
.ewb-search-input {
    width: 100%; min-height: 48px; padding: 12px 16px 12px 44px;
    border: 2px solid var(--ewb-border); border-radius: var(--ewb-radius);
    font-family: var(--ewb-font) !important; font-size: 15px;
    background: var(--ewb-surface); color: var(--ewb-text);
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-search-input:hover { border-color: #ccc9c2; }
.ewb-search-input:focus {
    border-color: var(--ewb-primary);
    box-shadow: 0 0 0 4px rgba(91,76,219,0.12);
    outline: none;
}

/* Category Grid */
.ewb-skills-cat-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .ewb-skills-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .ewb-skills-cat-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; } }

.ewb-cat-tile {
    display: flex; align-items: center; gap: 14px;
    background: var(--ewb-surface);
    border: 1.5px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 16px 18px;
    cursor: pointer; transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-cat-tile:hover {
    box-shadow: var(--ewb-shadow);
    border-color: var(--ewb-border);
    transform: translateY(-2px);
}
.ewb-cat-tile.active {
    border-color: var(--ewb-primary);
    background: var(--ewb-primary-bg-subtle);
    box-shadow: 0 0 0 3px rgba(91,76,219,0.1);
}
.ewb-cat-tile-letter {
    width: 44px; height: 44px;
    color: #fff; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; flex-shrink: 0;
    transition: transform var(--ewb-duration) var(--ewb-ease);
}
.ewb-cat-tile:hover .ewb-cat-tile-letter { transform: scale(1.05); }
.ewb-cat-tile-name {
    font-weight: 600; font-size: 14px; line-height: 1.3; flex: 1; min-width: 0;
    color: var(--ewb-text);
}
.ewb-cat-tile-count {
    font-size: 12px; color: var(--ewb-text-muted); white-space: nowrap; font-weight: 600;
    background: var(--ewb-bg); padding: 3px 10px; border-radius: var(--ewb-radius-pill);
}

/* Colorful category letter badges — cycling colors */
.ewb-cat-tile:nth-child(7n+1) .ewb-cat-tile-letter { background: linear-gradient(135deg, #6366f1, #818cf8); }
.ewb-cat-tile:nth-child(7n+2) .ewb-cat-tile-letter { background: linear-gradient(135deg, #ec4899, #f472b6); }
.ewb-cat-tile:nth-child(7n+3) .ewb-cat-tile-letter { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.ewb-cat-tile:nth-child(7n+4) .ewb-cat-tile-letter { background: linear-gradient(135deg, #f97316, #fb923c); }
.ewb-cat-tile:nth-child(7n+5) .ewb-cat-tile-letter { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.ewb-cat-tile:nth-child(7n+6) .ewb-cat-tile-letter { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.ewb-cat-tile:nth-child(7n+7) .ewb-cat-tile-letter { background: linear-gradient(135deg, #ef4444, #f87171); }


/* Skill Detail Cards */
.ewb-skill-detail-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px; background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius-sm);
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-skill-detail-card:hover {
    border-color: var(--ewb-border);
    box-shadow: var(--ewb-shadow-xs);
}
.ewb-skill-detail-card .ewb-skill-code {
    font-family: var(--ewb-mono) !important; font-size: 12px; font-weight: 700;
    color: var(--ewb-primary); white-space: nowrap; min-width: 48px; padding-top: 2px;
}
.ewb-skill-detail-card .ewb-skill-text {
    flex: 1; font-size: 13px; line-height: 1.55; color: var(--ewb-text);
}
.ewb-skill-detail-card .ewb-skill-level {
    font-size: 11px; color: var(--ewb-text-secondary);
    background: var(--ewb-bg); border-radius: var(--ewb-radius-pill);
    padding: 3px 10px; white-space: nowrap; font-weight: 600;
}
.ewb-skill-detail-card .ewb-skill-actions {
    display: flex; gap: 4px; flex-shrink: 0;
}
.ewb-skill-detail-card .ewb-skill-actions button {
    width: 34px; height: 34px; border: none; background: transparent;
    border-radius: 8px; cursor: pointer;
    color: var(--ewb-text-muted); display: flex; align-items: center; justify-content: center;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-skill-detail-card .ewb-skill-actions button:hover {
    background: var(--ewb-bg); color: var(--ewb-text);
}
.ewb-skill-detail-card .ewb-skill-actions button.ewb-delete-skill:hover {
    background: var(--ewb-danger-bg); color: var(--ewb-danger);
}

.ewb-skills-detail-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ewb-skills-detail-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.ewb-skills-detail-header h2 {
    font-size: 20px; font-weight: 700; color: var(--ewb-text);
}


/* ═══════════════════════════════════════════════════════════
   EMPTY / LOADING STATES
   ═══════════════════════════════════════════════════════════ */
.ewb-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 56px 24px; color: var(--ewb-text-muted); text-align: center;
}
.ewb-empty-state svg { margin-bottom: 18px; opacity: 0.25; color: var(--ewb-text-muted); }
.ewb-empty-state p { font-size: 15px; max-width: 320px; line-height: 1.5; }
.ewb-muted { color: var(--ewb-text-muted); font-size: 14px; font-style: italic; }

.ewb-loading { position: relative; opacity: 0.5; pointer-events: none; }

/* Skeleton */
.ewb-skeleton {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius);
    position: relative; overflow: hidden;
}
.ewb-skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.03) 50%, transparent 100%);
    animation: ewb-shimmer 1.5s infinite;
}
@keyframes ewb-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.ewb-skeleton-stat { height: 96px; }
.ewb-skeleton-card { height: 170px; }
.ewb-skeleton-list { height: 210px; }


/* ═══════════════════════════════════════════════════════════
   MODAL / DIALOG
   ═══════════════════════════════════════════════════════════ */
.ewb-modal-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: ewb-fadeIn 0.15s var(--ewb-ease);
}
.ewb-modal-backdrop[hidden] { display: none; }

.ewb-modal-dialog {
    background: var(--ewb-surface); border-radius: var(--ewb-radius-xl);
    box-shadow: var(--ewb-shadow-lg);
    width: 100%; max-width: 540px; max-height: 90vh;
    display: flex; flex-direction: column;
    animation: ewb-slideUp 0.25s var(--ewb-ease);
}
.ewb-modal-sm { max-width: 420px; }

.ewb-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 28px 0;
}
.ewb-modal-header h2 {
    font-size: 20px; font-weight: 800; letter-spacing: -0.3px;
    color: var(--ewb-text);
}
.ewb-modal-close {
    width: 38px; height: 38px; border: none; background: transparent;
    border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ewb-text-muted); transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-modal-close:hover { background: rgba(0,0,0,0.05); color: var(--ewb-text); }

.ewb-modal-body { padding: 22px 28px; overflow-y: auto; }
.ewb-modal-body p { font-size: 15px; line-height: 1.6; color: var(--ewb-text-secondary); }
.ewb-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 18px 28px 24px;
}

@keyframes ewb-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ewb-slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.ewb-toast-container {
    position: fixed; bottom: 28px; right: 28px; z-index: 9999;
    display: flex; flex-direction: column-reverse; gap: 10px;
    pointer-events: none;
}
@media (max-width: 480px) {
    .ewb-toast-container { left: 16px; right: 16px; bottom: 16px; }
}

.ewb-toast {
    pointer-events: auto;
    background: var(--ewb-surface); color: var(--ewb-text);
    padding: 14px 22px; border-radius: var(--ewb-radius);
    font-size: 14px; font-weight: 600;
    box-shadow: var(--ewb-shadow-lg);
    border: 1px solid var(--ewb-border-light);
    animation: ewb-slideUp 0.3s var(--ewb-ease);
    transition: opacity 0.3s, transform 0.3s;
    display: flex; align-items: center; gap: 10px;
}
.ewb-toast.success { border-left: 4px solid var(--ewb-success); }
.ewb-toast.error { border-left: 4px solid var(--ewb-danger); }
.ewb-toast.is-leaving { opacity: 0; transform: translateX(40px); }


/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
.ewb-page { animation: ewb-fadeIn 0.3s var(--ewb-ease-out); }

.ewb-child-card,
.ewb-assess-card,
.ewb-cat-tile,
.ewb-skill-detail-card { animation: ewb-cardIn 0.4s var(--ewb-ease-out) both; }

.ewb-child-card:nth-child(2), .ewb-assess-card:nth-child(2), .ewb-cat-tile:nth-child(2) { animation-delay: 0.04s; }
.ewb-child-card:nth-child(3), .ewb-assess-card:nth-child(3), .ewb-cat-tile:nth-child(3) { animation-delay: 0.08s; }
.ewb-child-card:nth-child(4), .ewb-assess-card:nth-child(4), .ewb-cat-tile:nth-child(4) { animation-delay: 0.12s; }
.ewb-child-card:nth-child(5), .ewb-cat-tile:nth-child(5) { animation-delay: 0.16s; }
.ewb-child-card:nth-child(6), .ewb-cat-tile:nth-child(6) { animation-delay: 0.20s; }

@keyframes ewb-cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════
   USER MANAGEMENT (Address Book)
   ═══════════════════════════════════════════════════════════ */
.ewb-user-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 18px 22px;
    display: flex; align-items: center; gap: 16px;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-user-card:hover {
    box-shadow: var(--ewb-shadow); transform: translateY(-1px);
    border-color: var(--ewb-border);
}
.ewb-user-card-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--ewb-primary), var(--ewb-primary-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.ewb-user-card-info { flex: 1; min-width: 0; }
.ewb-user-card-name { font-size: 16px; font-weight: 700; color: var(--ewb-text); }
.ewb-user-card-email {
    font-size: 13px; color: var(--ewb-text-muted); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ewb-user-card-role {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 4px 10px; border-radius: var(--ewb-radius-pill);
    background: var(--ewb-primary-bg); color: var(--ewb-primary);
}
.ewb-user-card-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* User list */
.ewb-users-list { display: flex; flex-direction: column; gap: 10px; }

/* Alpha index sidebar for address book */
.ewb-alpha-index {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px;
}
.ewb-alpha-index a {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: 11px; font-weight: 700; color: var(--ewb-text-muted);
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-alpha-index a:hover { background: var(--ewb-primary-bg); color: var(--ewb-primary); }
.ewb-alpha-index a.active { background: var(--ewb-primary); color: #fff; }

/* Letter Group Header */
.ewb-letter-group {
    font-size: 14px; font-weight: 800; color: var(--ewb-primary);
    padding: 12px 0 6px; border-bottom: 2px solid var(--ewb-primary-bg);
    margin-bottom: 8px; margin-top: 16px;
}
.ewb-letter-group:first-child { margin-top: 0; }


/* ═══════════════════════════════════════════════════════════
   CHILDREN ADDRESS BOOK
   ═══════════════════════════════════════════════════════════ */
.ewb-children-addressbook { display: flex; flex-direction: column; gap: 8px; }

.ewb-child-card-row {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
}
.ewb-child-card-row .ewb-child-card-header {
    display: flex; align-items: center; gap: 14px;
    flex: 1; min-width: 200px; margin-bottom: 0;
}
.ewb-child-info-col { flex: 1; min-width: 0; }
.ewb-child-meta-inline {
    font-size: 12px; color: var(--ewb-text-muted);
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px;
    font-weight: 500;
}
.ewb-child-card-row .ewb-child-actions {
    display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0;
}
@media (max-width: 639px) {
    .ewb-child-card-row {
        flex-direction: column; align-items: stretch;
    }
    .ewb-child-card-row .ewb-child-actions {
        padding-top: 12px; border-top: 1px solid var(--ewb-border-light);
    }
}


/* ═══════════════════════════════════════════════════════════
   LABELS (Erworben-Labels)
   ═══════════════════════════════════════════════════════════ */
.ewb-labels-list { display: flex; flex-direction: column; gap: 10px; }

.ewb-label-card {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius); padding: 18px 22px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: all var(--ewb-duration) var(--ewb-ease);
}
.ewb-label-card:hover {
    box-shadow: var(--ewb-shadow); transform: translateY(-1px);
    border-color: var(--ewb-border);
}

.ewb-label-card-number {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--ewb-accent), #fb923c);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 800; flex-shrink: 0;
}

.ewb-label-card-content { flex: 1; min-width: 0; }
.ewb-label-card-text {
    font-size: 14px; font-weight: 600; color: var(--ewb-text);
    line-height: 1.4; margin-bottom: 6px;
}
.ewb-label-card-meta {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ewb-label-card-meta .ewb-tag {
    display: inline-flex; align-items: center;
    background: var(--ewb-surface-hover); border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius-pill); padding: 3px 10px;
    font-size: 11px; font-weight: 500; color: var(--ewb-text-secondary);
}

.ewb-label-card-actions {
    display: flex; gap: 6px; flex-shrink: 0; align-self: center;
}

@media (max-width: 639px) {
    .ewb-label-card {
        flex-direction: column;
    }
    .ewb-label-card-actions {
        align-self: flex-start; padding-top: 8px;
    }
}

.ewb-label-card { animation: ewb-cardIn 0.4s var(--ewb-ease-out) both; }
.ewb-label-card:nth-child(2) { animation-delay: 0.04s; }
.ewb-label-card:nth-child(3) { animation-delay: 0.08s; }
.ewb-label-card:nth-child(4) { animation-delay: 0.12s; }
.ewb-label-card:nth-child(5) { animation-delay: 0.16s; }


/* ═══════════════════════════════════════════════════════════
   CHILDREN: EXPANDABLE ASSESSMENTS
   ═══════════════════════════════════════════════════════════ */
.ewb-child-card-row { flex-wrap: wrap; }

.ewb-child-toggle-assess {
    display: inline-flex; align-items: center; gap: 4px;
}
.ewb-child-toggle-assess .ewb-chevron-icon {
    transition: transform 0.2s var(--ewb-ease);
}
.ewb-child-toggle-assess[aria-expanded="true"] .ewb-chevron-icon {
    transform: rotate(180deg);
}

.ewb-child-assessments {
    width: 100%;
    border-top: 1px solid var(--ewb-border-light);
    padding: 0;
    margin-top: 14px;
}
.ewb-child-assessments[hidden] { display: none; }

.ewb-child-assess-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ewb-border-light);
    flex-wrap: wrap;
}
.ewb-child-assess-row:last-child { border-bottom: none; }

.ewb-child-assess-info { flex: 1; min-width: 200px; }
.ewb-child-assess-info strong {
    display: block; font-size: 14px; font-weight: 600; color: var(--ewb-text);
}
.ewb-child-assess-meta {
    font-size: 12px; color: var(--ewb-text-muted); margin-top: 2px;
}
.ewb-child-assess-actions {
    display: flex; gap: 6px; flex-shrink: 0;
}
.ewb-child-assess-empty {
    padding: 16px; text-align: center;
    font-size: 13px; color: var(--ewb-text-muted); font-style: italic;
}
.ewb-loading-inline {
    padding: 16px; text-align: center;
    font-size: 13px; color: var(--ewb-text-muted);
}

@media (max-width: 639px) {
    .ewb-child-assess-row {
        flex-direction: column; align-items: stretch;
    }
    .ewb-child-assess-actions {
        margin-top: 8px;
    }
}


/* ═══════════════════════════════════════════════════════════
   ASSESSMENTS: GROUPED BY CHILD
   ═══════════════════════════════════════════════════════════ */
.ewb-assess-group {
    background: var(--ewb-surface);
    border: 1px solid var(--ewb-border-light);
    border-radius: var(--ewb-radius);
    margin-bottom: 14px;
    overflow: hidden;
    transition: all var(--ewb-duration) var(--ewb-ease);
    animation: ewb-cardIn 0.4s var(--ewb-ease-out) both;
}
.ewb-assess-group:hover {
    box-shadow: var(--ewb-shadow-sm);
    border-color: var(--ewb-border);
}

.ewb-assess-group-header {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px;
    background: var(--ewb-surface-hover);
    border-bottom: 1px solid var(--ewb-border-light);
}
.ewb-assess-group-info { flex: 1; min-width: 0; }
.ewb-assess-group-info strong {
    display: block; font-size: 16px; font-weight: 700; color: var(--ewb-text);
}
.ewb-assess-group-meta {
    font-size: 12px; color: var(--ewb-text-muted); font-weight: 500;
}

.ewb-assess-group-list { }

.ewb-assess-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--ewb-border-light);
    transition: background var(--ewb-duration) var(--ewb-ease);
}
.ewb-assess-row:last-child { border-bottom: none; }
.ewb-assess-row:hover { background: var(--ewb-surface-hover); }

.ewb-assess-row-info { flex: 1; min-width: 0; }
.ewb-assess-row-title {
    display: block; font-size: 14px; font-weight: 600; color: var(--ewb-text);
}
.ewb-assess-row-meta {
    font-size: 12px; color: var(--ewb-text-muted); margin-top: 2px;
}
.ewb-assess-row-actions {
    display: flex; gap: 6px; flex-shrink: 0;
}

@media (max-width: 639px) {
    .ewb-assess-group-header {
        flex-wrap: wrap;
    }
    .ewb-assess-row {
        flex-direction: column; align-items: stretch; gap: 8px;
    }
    .ewb-assess-row-actions {
        flex-wrap: wrap;
    }
}


/* ═══════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════ */
.ewb-text-center { text-align: center; }
.ewb-mb-0 { margin-bottom: 0; }
.ewb-mt-16 { margin-top: 16px; }
.ewb-gap-8 { gap: 8px; }
