/* ═══════════════════════════════════════════════════════════════
   🧬 Cepha Material UI v1.0
   A lightweight Material-inspired design system for NetWasmMvc.SDK
   Zero dependencies — pure CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────── */

:root {
    --cepha-primary: #667eea;
    --cepha-primary-dark: #5a67d8;
    --cepha-primary-light: #7f96ff;
    --cepha-secondary: #a0aec0;
    --cepha-accent: #ed64a6;

    --cepha-bg: #0f0f23;
    --cepha-surface: #1a1a2e;
    --cepha-surface-2: #252542;
    --cepha-surface-3: #2d2d5e;

    --cepha-text: #e2e8f0;
    --cepha-text-muted: #a0aec0;
    --cepha-text-dim: #718096;

    --cepha-border: #2d3748;
    --cepha-border-light: #4a5568;

    --cepha-success: #48bb78;
    --cepha-warning: #ecc94b;
    --cepha-error: #fc8181;
    --cepha-info: #63b3ed;

    --cepha-radius: 8px;
    --cepha-radius-sm: 4px;
    --cepha-radius-lg: 12px;
    --cepha-radius-full: 9999px;

    --cepha-shadow: 0 1px 3px rgba(0,0,0,.3);
    --cepha-shadow-md: 0 4px 6px rgba(0,0,0,.4);
    --cepha-shadow-lg: 0 10px 15px rgba(0,0,0,.5);

    --cepha-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --cepha-font-mono: 'Cascadia Code', 'Fira Code', Consolas, monospace;

    --cepha-transition: 0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--cepha-font);
    background: var(--cepha-bg);
    color: var(--cepha-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

/* ─── Typography ─────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--cepha-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; color: var(--cepha-text-muted); }

p { margin-bottom: 1rem; }

.lead { font-size: 1.25rem; color: var(--cepha-text-muted); font-weight: 300; }
.text-muted { color: var(--cepha-text-muted) !important; }
.text-dim { color: var(--cepha-text-dim) !important; }
.text-primary { color: var(--cepha-primary) !important; }
.text-success { color: var(--cepha-success) !important; }
.text-warning { color: var(--cepha-warning) !important; }
.text-error { color: var(--cepha-error) !important; }
.text-info { color: var(--cepha-info) !important; }

.text-center { text-align: center !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }
.text-nowrap { white-space: nowrap !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-light { font-weight: 300 !important; }

.fs-sm { font-size: 0.85rem !important; }
.fs-lg { font-size: 1.2rem !important; }
.fs-xl { font-size: 1.5rem !important; }

small, .small { font-size: 0.85rem; }

a { color: var(--cepha-primary); text-decoration: none; transition: color var(--cepha-transition); }
a:hover { color: var(--cepha-primary-light); text-decoration: underline; }

code {
    font-family: var(--cepha-font-mono);
    background: var(--cepha-surface-2);
    padding: 0.15em 0.4em;
    border-radius: var(--cepha-radius-sm);
    font-size: 0.9em;
    color: var(--cepha-primary-light);
}

pre {
    font-family: var(--cepha-font-mono);
    background: var(--cepha-surface);
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}
pre code { background: none; padding: 0; color: var(--cepha-text); }

blockquote {
    border-inline-start: 4px solid var(--cepha-primary);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--cepha-text-muted);
    background: var(--cepha-surface);
    border-radius: 0 var(--cepha-radius) var(--cepha-radius) 0;
}

hr {
    border: none;
    border-top: 1px solid var(--cepha-border);
    margin: 1.5rem 0;
}

/* ─── Grid System ────────────────────────────────────────────── */

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 720px; }
.container-lg { max-width: 1400px; }
.container-fluid { max-width: 100%; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row > * { padding: 0 0.75rem; }

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1  { flex: 0 0 auto; width: 8.333%; }
.col-2  { flex: 0 0 auto; width: 16.667%; }
.col-3  { flex: 0 0 auto; width: 25%; }
.col-4  { flex: 0 0 auto; width: 33.333%; }
.col-5  { flex: 0 0 auto; width: 41.667%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-7  { flex: 0 0 auto; width: 58.333%; }
.col-8  { flex: 0 0 auto; width: 66.667%; }
.col-9  { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333%; }
.col-11 { flex: 0 0 auto; width: 91.667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 768px) {
    .col-md-1  { flex: 0 0 auto; width: 8.333%; }
    .col-md-2  { flex: 0 0 auto; width: 16.667%; }
    .col-md-3  { flex: 0 0 auto; width: 25%; }
    .col-md-4  { flex: 0 0 auto; width: 33.333%; }
    .col-md-5  { flex: 0 0 auto; width: 41.667%; }
    .col-md-6  { flex: 0 0 auto; width: 50%; }
    .col-md-7  { flex: 0 0 auto; width: 58.333%; }
    .col-md-8  { flex: 0 0 auto; width: 66.667%; }
    .col-md-9  { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1024px) {
    .col-lg-1  { flex: 0 0 auto; width: 8.333%; }
    .col-lg-2  { flex: 0 0 auto; width: 16.667%; }
    .col-lg-3  { flex: 0 0 auto; width: 25%; }
    .col-lg-4  { flex: 0 0 auto; width: 33.333%; }
    .col-lg-5  { flex: 0 0 auto; width: 41.667%; }
    .col-lg-6  { flex: 0 0 auto; width: 50%; }
    .col-lg-7  { flex: 0 0 auto; width: 58.333%; }
    .col-lg-8  { flex: 0 0 auto; width: 66.667%; }
    .col-lg-9  { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* ─── Navbar ─────────────────────────────────────────────────── */

.cepha-nav {
    background: var(--cepha-surface);
    border-bottom: 1px solid var(--cepha-border);
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.cepha-nav-brand a {
    color: var(--cepha-text);
    font-weight: 700;
    font-size: 1.2rem;
}
.cepha-nav-brand a:hover { text-decoration: none; }

.cepha-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.cepha-nav-links a {
    color: var(--cepha-text-muted);
    font-size: 0.9rem;
    transition: color var(--cepha-transition);
}
.cepha-nav-links a:hover { color: var(--cepha-text); text-decoration: none; }
.cepha-nav-links a.active { color: var(--cepha-primary); }

.cepha-user-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.85rem;
    background: var(--cepha-surface); color: var(--cepha-primary);
    border: 1px solid var(--cepha-border); font-weight: 500;
}

/* ─── Main Content ───────────────────────────────────────────── */

.cepha-main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ─── Hero ────────────────────────────────────────────────────── */

.cepha-hero {
    text-align: center;
    padding: 3rem 0;
}
.cepha-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.cepha-hero .lead { margin-bottom: 0.5rem; }

/* ─── Cards ──────────────────────────────────────────────────── */

.cepha-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cepha-card {
    background: var(--cepha-surface);
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius);
    padding: 1.5rem;
    transition: border-color var(--cepha-transition), background var(--cepha-transition), box-shadow var(--cepha-transition);
}
.cepha-card:hover {
    border-color: var(--cepha-primary);
    background: var(--cepha-surface-2);
    box-shadow: var(--cepha-shadow-md);
}
.cepha-card h3 { margin-bottom: 0.5rem; }
.cepha-card p { color: var(--cepha-text-muted); font-size: 0.9rem; }
.cepha-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cepha-border);
    font-weight: 600;
}
.cepha-card-body { padding: 1.5rem; }
.cepha-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--cepha-border);
    color: var(--cepha-text-muted);
    font-size: 0.85rem;
}

/* ─── Buttons ────────────────────────────────────────────────── */

.cepha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--cepha-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--cepha-transition);
    text-decoration: none;
    line-height: 1.5;
    user-select: none;
}
.cepha-btn:hover { text-decoration: none; }
.cepha-btn:disabled, .cepha-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.cepha-btn-primary {
    background: var(--cepha-primary);
    color: #fff;
}
.cepha-btn-primary:hover { background: var(--cepha-primary-dark); color: #fff; }

.cepha-btn-secondary {
    background: var(--cepha-surface-2);
    color: var(--cepha-text);
    border-color: var(--cepha-border);
}
.cepha-btn-secondary:hover { background: var(--cepha-surface-3); border-color: var(--cepha-border-light); }

.cepha-btn-success { background: var(--cepha-success); color: #fff; }
.cepha-btn-success:hover { background: #38a169; color: #fff; }

.cepha-btn-error { background: var(--cepha-error); color: #fff; }
.cepha-btn-error:hover { background: #e53e3e; color: #fff; }

.cepha-btn-outline {
    background: transparent;
    color: var(--cepha-primary);
    border-color: var(--cepha-primary);
}
.cepha-btn-outline:hover { background: var(--cepha-primary); color: #fff; }

.cepha-btn-ghost {
    background: transparent;
    color: var(--cepha-text-muted);
}
.cepha-btn-ghost:hover { background: var(--cepha-surface-2); color: var(--cepha-text); }

.cepha-btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.cepha-btn-lg { padding: 0.75rem 2rem; font-size: 1.1rem; }
.cepha-btn-block { width: 100%; }

.cepha-btn-group { display: inline-flex; }
.cepha-btn-group .cepha-btn { border-radius: 0; }
.cepha-btn-group .cepha-btn:first-child { border-radius: var(--cepha-radius) 0 0 var(--cepha-radius); }
.cepha-btn-group .cepha-btn:last-child { border-radius: 0 var(--cepha-radius) var(--cepha-radius) 0; }

/* ─── Forms & Inputs ─────────────────────────────────────────── */

.cepha-field { margin-bottom: 1rem; }
.cepha-field label, .cepha-label {
    display: block;
    font-size: 0.85rem;
    color: var(--cepha-text-muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.cepha-input, .cepha-field input, .cepha-field select, .cepha-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--cepha-bg);
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius);
    color: var(--cepha-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--cepha-transition), box-shadow var(--cepha-transition);
}
.cepha-input:focus, .cepha-field input:focus, .cepha-field select:focus, .cepha-field textarea:focus {
    outline: none;
    border-color: var(--cepha-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.cepha-input::placeholder { color: var(--cepha-text-dim); }

.cepha-field textarea { min-height: 100px; resize: vertical; }

.cepha-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

.cepha-check, .cepha-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.cepha-check input, .cepha-radio input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--cepha-primary);
}

.cepha-hint { font-size: 0.8rem; color: var(--cepha-text-dim); margin-top: 0.25rem; }
.cepha-field-error input { border-color: var(--cepha-error); }
.cepha-field-error .cepha-hint { color: var(--cepha-error); }

/* ─── Auth Forms ─────────────────────────────────────────────── */

.cepha-auth-form {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--cepha-surface);
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius);
    padding: 2rem;
}
.cepha-auth-form h2 { margin-bottom: 1.5rem; }
.cepha-auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--cepha-text-muted);
}

/* ─── Tables ─────────────────────────────────────────────────── */

.cepha-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.cepha-table th, .cepha-table td {
    padding: 0.75rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--cepha-border);
}
.cepha-table th {
    font-weight: 600;
    color: var(--cepha-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cepha-table-striped tr:nth-child(even) { background: var(--cepha-surface); }
.cepha-table-hover tr:hover { background: var(--cepha-surface-2); }

.cepha-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─── Badges ─────────────────────────────────────────────────── */

.cepha-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--cepha-radius-sm);
    line-height: 1;
    white-space: nowrap;
}
.cepha-badge-primary { background: var(--cepha-primary); color: #fff; }
.cepha-badge-success { background: var(--cepha-success); color: #fff; }
.cepha-badge-warning { background: var(--cepha-warning); color: #000; }
.cepha-badge-error { background: var(--cepha-error); color: #fff; }
.cepha-badge-info { background: var(--cepha-info); color: #fff; }
.cepha-badge-muted { background: var(--cepha-surface-2); color: var(--cepha-text-muted); }

.cepha-pill { border-radius: var(--cepha-radius-full); }

/* ─── Alerts ─────────────────────────────────────────────────── */

.cepha-alert {
    padding: 0.8rem 1rem;
    border-radius: var(--cepha-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.cepha-alert-success { background: rgba(72, 187, 120, 0.12); border-color: var(--cepha-success); color: var(--cepha-success); }
.cepha-alert-warning { background: rgba(236, 201, 75, 0.12); border-color: var(--cepha-warning); color: var(--cepha-warning); }
.cepha-alert-error   { background: rgba(252, 129, 129, 0.12); border-color: var(--cepha-error); color: var(--cepha-error); }
.cepha-alert-info    { background: rgba(99, 179, 237, 0.12); border-color: var(--cepha-info); color: var(--cepha-info); }

/* ─── Modal ──────────────────────────────────────────────────── */

.cepha-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}
.cepha-modal-overlay:target { display: flex; }

.cepha-modal {
    background: var(--cepha-surface);
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--cepha-shadow-lg);
    animation: cepha-modal-in 0.2s ease;
}
@keyframes cepha-modal-in {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.cepha-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cepha-border);
    font-weight: 600;
    font-size: 1.1rem;
}
.cepha-modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--cepha-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: var(--cepha-radius-sm);
    text-decoration: none;
    transition: background var(--cepha-transition);
}
.cepha-modal-close:hover { background: var(--cepha-surface-2); color: var(--cepha-text); text-decoration: none; }
.cepha-modal-body { padding: 1.5rem; }
.cepha-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--cepha-border);
}

/* ─── Tabs ───────────────────────────────────────────────────── */

.cepha-tabs {
    display: flex;
    border-bottom: 2px solid var(--cepha-border);
    gap: 0;
    margin-bottom: 1.5rem;
}
.cepha-tab {
    padding: 0.6rem 1.2rem;
    color: var(--cepha-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--cepha-transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}
.cepha-tab:hover { color: var(--cepha-text); }
.cepha-tab.active, .cepha-tab[aria-selected="true"] {
    color: var(--cepha-primary);
    border-bottom-color: var(--cepha-primary);
}

.cepha-tab-panel { display: none; }
.cepha-tab-panel.active { display: block; }

/* ─── Spinners ───────────────────────────────────────────────── */

.cepha-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--cepha-border);
    border-top-color: var(--cepha-primary);
    border-radius: 50%;
    animation: cepha-spin 0.6s linear infinite;
}
.cepha-spinner-sm { width: 1rem; height: 1rem; }
.cepha-spinner-lg { width: 2.5rem; height: 2.5rem; border-width: 3px; }

@keyframes cepha-spin { to { transform: rotate(360deg); } }

.cepha-skeleton {
    background: linear-gradient(90deg, var(--cepha-surface) 25%, var(--cepha-surface-2) 50%, var(--cepha-surface) 75%);
    background-size: 200% 100%;
    animation: cepha-shimmer 1.5s infinite;
    border-radius: var(--cepha-radius-sm);
    height: 1em;
}
@keyframes cepha-shimmer { to { background-position: -200% 0; } }

.cepha-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--cepha-text-muted);
}

/* ─── Progress Bar ───────────────────────────────────────────── */

.cepha-progress {
    height: 6px;
    background: var(--cepha-surface-2);
    border-radius: var(--cepha-radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
}
.cepha-progress-bar {
    height: 100%;
    background: var(--cepha-primary);
    border-radius: var(--cepha-radius-full);
    transition: width 0.3s ease;
}
.cepha-progress-bar-success { background: var(--cepha-success); }
.cepha-progress-bar-warning { background: var(--cepha-warning); }
.cepha-progress-bar-error { background: var(--cepha-error); }

/* ─── Tooltip ────────────────────────────────────────────────── */

[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--cepha-surface-3);
    color: var(--cepha-text);
    padding: 0.3rem 0.6rem;
    border-radius: var(--cepha-radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--cepha-transition);
    z-index: 3000;
    box-shadow: var(--cepha-shadow);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── Divider ────────────────────────────────────────────────── */

.cepha-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--cepha-text-dim);
    font-size: 0.85rem;
    margin: 1.5rem 0;
}
.cepha-divider::before, .cepha-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cepha-border);
}

/* ─── List Group ─────────────────────────────────────────────── */

.cepha-list {
    list-style: none;
    border: 1px solid var(--cepha-border);
    border-radius: var(--cepha-radius);
    overflow: hidden;
}
.cepha-list-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--cepha-border);
    transition: background var(--cepha-transition);
}
.cepha-list-item:last-child { border-bottom: none; }
.cepha-list-item:hover { background: var(--cepha-surface-2); }
.cepha-list-item.active { background: var(--cepha-surface-2); border-inline-start: 3px solid var(--cepha-primary); }

/* ─── Breadcrumbs ────────────────────────────────────────────── */

.cepha-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    font-size: 0.9rem;
    color: var(--cepha-text-muted);
    margin-bottom: 1rem;
}
.cepha-breadcrumb li + li::before { content: '/'; margin-right: 0.25rem; color: var(--cepha-text-dim); }
.cepha-breadcrumb li:last-child { color: var(--cepha-text); }

/* ─── Footer ─────────────────────────────────────────────────── */

.cepha-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--cepha-text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--cepha-border);
}

/* ─── Spacing Utilities ──────────────────────────────────────── */

.m-0  { margin: 0 !important; }
.m-1  { margin: 0.25rem !important; }
.m-2  { margin: 0.5rem !important; }
.m-3  { margin: 1rem !important; }
.m-4  { margin: 1.5rem !important; }
.m-5  { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }    .mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }  .mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }  .mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }    .mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }  .mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }  .mb-5 { margin-bottom: 3rem !important; }

.ms-0 { margin-inline-start: 0 !important; }  .ms-1 { margin-inline-start: 0.25rem !important; }
.ms-2 { margin-inline-start: 0.5rem !important; }  .ms-3 { margin-inline-start: 1rem !important; }
.ms-auto { margin-inline-start: auto !important; }

.me-0 { margin-inline-end: 0 !important; }  .me-1 { margin-inline-end: 0.25rem !important; }
.me-2 { margin-inline-end: 0.5rem !important; }  .me-3 { margin-inline-end: 1rem !important; }
.me-auto { margin-inline-end: auto !important; }

.mx-auto { margin-inline: auto !important; }

.p-0  { padding: 0 !important; }
.p-1  { padding: 0.25rem !important; }
.p-2  { padding: 0.5rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-5  { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }  .pt-3 { padding-top: 1rem !important; }
.pb-0 { padding-bottom: 0 !important; }  .pb-3 { padding-bottom: 1rem !important; }
.px-2 { padding-inline: 0.5rem !important; }  .px-3 { padding-inline: 1rem !important; }
.py-2 { padding-block: 0.5rem !important; }  .py-3 { padding-block: 1rem !important; }

/* ─── Display Utilities ──────────────────────────────────────── */

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-stretch { align-items: stretch !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

/* ─── Visibility ─────────────────────────────────────────────── */

.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-100 { opacity: 1 !important; }

/* ─── Borders & Rounded ──────────────────────────────────────── */

.border { border: 1px solid var(--cepha-border) !important; }
.border-0 { border: 0 !important; }
.rounded { border-radius: var(--cepha-radius) !important; }
.rounded-sm { border-radius: var(--cepha-radius-sm) !important; }
.rounded-lg { border-radius: var(--cepha-radius-lg) !important; }
.rounded-full { border-radius: var(--cepha-radius-full) !important; }

/* ─── Shadows ────────────────────────────────────────────────── */

.shadow { box-shadow: var(--cepha-shadow) !important; }
.shadow-md { box-shadow: var(--cepha-shadow-md) !important; }
.shadow-lg { box-shadow: var(--cepha-shadow-lg) !important; }
.shadow-none { box-shadow: none !important; }

/* ─── Width & Height ─────────────────────────────────────────── */

.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.min-vh-100 { min-height: 100vh !important; }

/* ─── Overflow ───────────────────────────────────────────────── */

.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-x-auto { overflow-x: auto !important; }

/* ─── Position ───────────────────────────────────────────────── */

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; top: 0; }

/* ─── Responsive Visibility ──────────────────────────────────── */

@media (max-width: 767px) {
    .d-md-none { display: none !important; }
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-none-up { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   🧬 CephaLoader — Native Loading System
   Physarum-inspired network animation with context-aware messaging
   ═══════════════════════════════════════════════════════════════ */

/* ─── Overlay ────────────────────────────────────────────────── */

.cepha-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cepha-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── Physarum Network Animation (SVG inline) ────────────────── */

.cepha-loader-sigil {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 1.5rem;
}

/* Core: pulsing node ring */
.cepha-loader-sigil::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid var(--cepha-primary);
    border-radius: 50%;
    animation: cepha-pulse-ring 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Inner DNA helix dots */
.cepha-loader-sigil::after {
    content: '';
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--cepha-primary);
    animation: cepha-core-breathe 1.5s ease-in-out infinite;
    box-shadow:
        0 0 12px rgba(102, 126, 234, 0.6),
        0 0 40px rgba(102, 126, 234, 0.15);
}

/* Orbiting nodes */
.cepha-loader-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--cepha-primary-light);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(127, 150, 255, 0.6);
}
.cepha-loader-node:nth-child(1) {
    top: 0; left: 50%;
    transform: translateX(-50%);
    animation: cepha-orbit-1 3s linear infinite;
}
.cepha-loader-node:nth-child(2) {
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    animation: cepha-orbit-2 3s linear infinite;
}
.cepha-loader-node:nth-child(3) {
    top: 50%; left: 0;
    transform: translateY(-50%);
    animation: cepha-orbit-3 2.4s linear infinite;
}
.cepha-loader-node:nth-child(4) {
    top: 50%; right: 0;
    transform: translateY(-50%);
    animation: cepha-orbit-4 2.4s linear infinite;
}

/* Network veins connecting nodes */
.cepha-loader-veins {
    position: absolute;
    inset: 0;
    animation: cepha-veins-rotate 6s linear infinite;
}
.cepha-loader-veins::before,
.cepha-loader-veins::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--cepha-primary), transparent);
    opacity: 0.3;
    border-radius: 1px;
}
.cepha-loader-veins::before {
    top: 50%; left: 10%; right: 10%;
    height: 1px;
    transform: translateY(-50%);
}
.cepha-loader-veins::after {
    left: 50%; top: 10%; bottom: 10%;
    width: 1px;
    transform: translateX(-50%);
}

/* ─── Message ────────────────────────────────────────────────── */

.cepha-loader-message {
    font-family: var(--cepha-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cepha-text);
    letter-spacing: 0.02em;
    text-align: center;
    animation: cepha-text-fade 2s ease-in-out infinite;
}

.cepha-loader-sub {
    font-size: 0.75rem;
    color: var(--cepha-text-dim);
    margin-top: 0.5rem;
    font-family: var(--cepha-font-mono);
    letter-spacing: 0.05em;
}

/* ─── Form Processing State ──────────────────────────────────── */

form.cepha-processing {
    position: relative;
    pointer-events: none;
}
form.cepha-processing::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 35, 0.15);
    border-radius: var(--cepha-radius);
    z-index: 1;
}
form.cepha-processing input,
form.cepha-processing select,
form.cepha-processing textarea,
form.cepha-processing button {
    opacity: 0.6;
    cursor: wait !important;
}
form.cepha-processing button[type="submit"] {
    position: relative;
    color: transparent;
}
form.cepha-processing button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cepha-spin 0.5s linear infinite;
}

/* ─── Navigation Loading Bar ─────────────────────────────────── */

.cepha-nav-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cepha-primary), var(--cepha-accent), var(--cepha-primary-light));
    background-size: 200% 100%;
    z-index: 10001;
    width: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
    animation: cepha-nav-shimmer 1.5s linear infinite;
}
.cepha-nav-progress.active {
    opacity: 1;
    animation: cepha-nav-shimmer 1.5s linear infinite, cepha-nav-grow 8s cubic-bezier(0.1, 0.5, 0.3, 1) forwards;
}
.cepha-nav-progress.done {
    width: 100% !important;
    opacity: 0;
    transition: width 0.15s ease, opacity 0.3s ease 0.15s;
}

/* ─── Keyframes ──────────────────────────────────────────────── */

@keyframes cepha-pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.7; border-color: var(--cepha-primary); }
    50%      { transform: scale(1.08); opacity: 1; border-color: var(--cepha-primary-light); }
}
@keyframes cepha-core-breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%      { transform: scale(1.15); opacity: 1; }
}
@keyframes cepha-orbit-1 {
    0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
    25%  { transform: translateX(10px) translateY(10px); opacity: 0.5; }
    50%  { transform: translateX(-50%) translateY(4px); opacity: 1; }
    75%  { transform: translateX(-14px) translateY(10px); opacity: 0.5; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes cepha-orbit-2 {
    0%   { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    25%  { transform: translateX(-14px) translateY(-10px); opacity: 1; }
    50%  { transform: translateX(-50%) translateY(-4px); opacity: 0.5; }
    75%  { transform: translateX(10px) translateY(-10px); opacity: 1; }
    100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
}
@keyframes cepha-orbit-3 {
    0%   { transform: translateY(-50%) translateX(0); opacity: 1; }
    50%  { transform: translateY(-50%) translateX(6px); opacity: 0.4; }
    100% { transform: translateY(-50%) translateX(0); opacity: 1; }
}
@keyframes cepha-orbit-4 {
    0%   { transform: translateY(-50%) translateX(0); opacity: 0.4; }
    50%  { transform: translateY(-50%) translateX(-6px); opacity: 1; }
    100% { transform: translateY(-50%) translateX(0); opacity: 0.4; }
}
@keyframes cepha-veins-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes cepha-text-fade {
    0%, 100% { opacity: 0.8; }
    50%      { opacity: 1; }
}
@keyframes cepha-nav-grow {
    0%   { width: 0; }
    100% { width: 90%; }
}
@keyframes cepha-nav-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
