/* ─────────────────────────────────────────────────
   Molnz Technical Documentation — Light Theme
   ───────────────────────────────────────────────── */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.08);
    --accent: #0891b2;
    --accent-light: #06b6d4;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-2: #f1f5f9;
    --bg-card: #ffffff;
    --bg-code: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-sidebar-active: rgba(79, 70, 229, 0.06);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #4f46e5;

    --border: #e2e8f0;
    --border-active: rgba(79, 70, 229, 0.35);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.08);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --sidebar-width: 290px;
    --header-height: 64px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.35rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    background: var(--bg-code);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

pre {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.82rem;
    line-height: 1.65;
    color: #e2e8f0;
}

/* ══════════════════════════════════════════════════
   LOGIN GATE
   ══════════════════════════════════════════════════ */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.55);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    opacity: 1;
    transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px);
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(79, 70, 229, 0.05);
    position: relative;
    animation: loginSlideUp 0.4s ease;
}

@keyframes loginSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: white;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.login-card h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.login-card .login-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.login-field input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    display: none;
    padding: 9px 14px;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 1rem;
    text-align: center;
    animation: shake 0.4s ease;
}

.login-error.show {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* When locked - prevent scroll */
body.locked {
    overflow: hidden;
}

/* ─── Header ─── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-badge {
    padding: 5px 12px;
    background: var(--primary-glow);
    border: 1px solid var(--border-active);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--text-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logout-btn {
    padding: 5px 14px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(220, 38, 38, 0.04);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

/* ─── Layout ─── */
.layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ─── Sidebar ─── */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 1.5rem 0;
    z-index: 900;
    transition: transform var(--transition-normal);
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    padding: 0 1.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface-2);
}

.sidebar-link.active {
    color: var(--text-accent);
    background: var(--bg-sidebar-active);
    border-left-color: var(--primary);
}

.sidebar-link .icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar-link.active .icon {
    opacity: 1;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.sidebar-footer p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ─── Main Content ─── */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem 3rem 4rem;
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.content-wrapper {
    max-width: 920px;
    margin: 0 auto;
}

/* ─── Sections ─── */
.doc-section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 .icon {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.section-header .section-desc {
    margin-top: 0.5rem;
    font-size: 0.92rem;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    padding: 3rem 0 2rem;
    margin-bottom: 3rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--primary-glow);
    border: 1px solid var(--border-active);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero h1 {
    font-size: 2.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.hero .lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hero-meta-item .value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ─── Cards ─── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card-icon.primary {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.card-icon.accent {
    background: rgba(8, 145, 178, 0.08);
    color: var(--accent);
}

.card-icon.success {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}

.card-icon.warning {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
}

.card-icon.danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
}

.card-icon.info {
    background: rgba(37, 99, 235, 0.08);
    color: var(--info);
}

.card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

.card .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-active {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-soon {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-planned {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ─── Tables ─── */
.spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.spec-table thead th {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.spec-table tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.spec-table tbody tr:last-child td {
    border-bottom: none;
}

.spec-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.02);
}

.spec-table .spec-key {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ─── API Table ─── */
.api-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    background: var(--bg-card);
}

.api-table thead th {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.api-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.api-table tbody tr:last-child td {
    border-bottom: none;
}

.api-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.02);
}

.method-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.method-get {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}

.method-post {
    background: rgba(37, 99, 235, 0.08);
    color: var(--info);
}

.method-put {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
}

.method-delete {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
}

/* ─── Callout ─── */
.callout {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.callout .callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.callout p {
    margin-bottom: 0;
}

.callout-info {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--text-secondary);
}

.callout-info .callout-icon {
    color: var(--info);
}

.callout-warning {
    background: rgba(217, 119, 6, 0.05);
    border: 1px solid rgba(217, 119, 6, 0.15);
    color: var(--text-secondary);
}

.callout-warning .callout-icon {
    color: var(--warning);
}

.callout-success {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--text-secondary);
}

.callout-success .callout-icon {
    color: var(--success);
}

/* ─── Architecture Layers ─── */
.arch-layer {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    border: 1px solid;
}

.arch-layer .layer-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    opacity: 0.9;
}

.arch-layer .layer-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.arch-layer .layer-item {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: inherit;
}

.layer-presentation {
    background: rgba(79, 70, 229, 0.04);
    border-color: rgba(79, 70, 229, 0.2);
    color: var(--primary);
}

.layer-api {
    background: rgba(8, 145, 178, 0.04);
    border-color: rgba(8, 145, 178, 0.2);
    color: var(--accent);
}

.layer-business {
    background: rgba(5, 150, 105, 0.04);
    border-color: rgba(5, 150, 105, 0.2);
    color: var(--success);
}

.layer-data {
    background: rgba(217, 119, 6, 0.04);
    border-color: rgba(217, 119, 6, 0.2);
    color: var(--warning);
}

.layer-infra {
    background: rgba(220, 38, 38, 0.04);
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--danger);
}

/* ─── Module Header ─── */
.module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.module-header .module-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.module-header .module-meta h3 {
    margin-bottom: 2px;
}

.module-header .module-meta p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ─── Module Sub-Sections ─── */
.module-subsection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.module-subsection-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.module-subsection-header .sub-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--primary-glow);
    color: var(--primary);
}

.module-subsection-header h4 {
    font-size: 1rem;
    margin-bottom: 0;
}

.module-subsection-header .sub-badge {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sub-badge-ready {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.sub-badge-pending {
    background: rgba(217, 119, 6, 0.06);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.module-subsection .coming-soon-text {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
}

.module-subsection .coming-soon-text i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
    font-style: normal;
}

/* ─── Placeholder ─── */
.placeholder-section {
    padding: 2.5rem;
    text-align: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    background: var(--bg-surface-2);
}

.placeholder-section .placeholder-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.4;
}

.placeholder-section h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.placeholder-section p {
    font-size: 0.85rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ─── Back to Top ─── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ─── Tab Panels ─── */
.tab-nav {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* ─── Status List ─── */
.status-list {
    list-style: none;
    margin: 1rem 0;
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.status-list li:last-child {
    border-bottom: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.done {
    background: var(--success);
}

.status-dot.in-progress {
    background: var(--warning);
    animation: pulse 2s infinite;
}

.status-dot.planned {
    background: var(--text-muted);
}

/* ─── Ownership Banner ─── */
.ownership-banner {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.ownership-item {
    flex: 1;
    min-width: 200px;
}

.ownership-item .label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.ownership-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ownership-item .sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Footer ─── */
.doc-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.doc-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Overlay (mobile) ─── */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 899;
}

.sidebar-overlay.active {
    display: block;
}

/* ─── Hidden (for future activation) ─── */
.hidden-section {
    display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .main {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle {
        display: flex;
    }

    .main {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-meta {
        gap: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .header-badge {
        display: none;
    }

    .ownership-banner {
        flex-direction: column;
        gap: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }
}