/* --- AESTHETIC DESIGN SYSTEM (LIGHT) --- */
:root {
    --accent: #1168BD;
    --bg-page: #ffffff;
    --bg-panel: #fcfdfe;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --code-bg: #f1f5f9;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
}

/* --- Layout & Navigation --- */
#topNavigation, #diagramControls, #documentationControls {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 4px 12px -8px rgba(0,0,0,0.05) !important;
}

/* --- Typography Hierarchy --- */
h1, h2, h3 {
    letter-spacing: -0.025em;
    font-weight: 700 !important;
    color: #0f172a;
}

h2 { margin-top: 3rem !important; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }

/* --- Documentation Content Aesthetics --- */
#documentationContent {
    /*max-width: 880px;*/
    margin: 40px auto !important;
    font-size: 1.05rem;
}

/* Elegant Table Design */
#documentationContent table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

#documentationContent th {
    background: var(--bg-panel) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 20px !important;
    color: var(--text-muted);
}

#documentationContent td {
    padding: 14px 20px !important;
    border-top: 1px solid var(--border) !important;
}

/* --- Code & Pre Blocks --- */
code {
    background: var(--code-bg) !important;
    color: var(--accent) !important;
    border-radius: 6px !important;
    padding: 0.2rem 0.4rem !important;
    font-size: 0.9em !important;
}

pre {
    background: #f5f5f5;
    color: #cbd5e1 !important;
    padding: 24px !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}


/* --- MIDNIGHT OBSIDIAN OVERRIDES (DARK MODE) --- */
body.dark-mode {
    --bg-page: #0b0f1a;
    --bg-panel: #161b2a;
    --border: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --code-bg: #1e293b;
}

body.dark-mode {
    background-color: var(--bg-page) !important;
    color: var(--text-main) !important;
}

/* Navigation & Panels */
body.dark-mode #topNavigation, body.dark-mode #diagramControls, body.dark-mode #documentationControls, body.dark-mode #diagramNavigationPanel {
    background: var(--bg-panel) !important;
    border-color: var(--border) !important;
    box-shadow: none !important;
}

body.dark-mode #documentationPanel {
    background-color: var(--bg-page) !important;
}

/* Documentation Content Darkening */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: #f8fafc !important; }
body.dark-mode h2 { border-bottom-color: var(--border) !important; }

body.dark-mode #documentationContent table {
    border-color: var(--border) !important;
    background: var(--bg-panel) !important;
}

body.dark-mode #documentationContent th {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #documentationContent td {
    border-top-color: var(--border) !important;
    color: #cbd5e1 !important;
}

/* Diagram Canvas Tweaks */
body.dark-mode .structurizrDiagramCanvas {
    background: #111827 !important;
}

/* Links and Interactive Elements */
body.dark-mode a { color: #60a5fa !important; }
body.dark-mode a:hover { color: #93c5fd !important; }

body.dark-mode .diagramThumbnail {
    /*background: #1e293b !important;*/
    border-color: #334155 !important;
}

body.dark-mode .diagramThumbnailActive {
    background: #334155 !important;
    border-color: #60a5fa !important;
}

/* Dark Mode Code Blocks Override */
body.dark-mode code { background: var(--code-bg) !important; color: #60a5fa !important; }
body.dark-mode pre { background: #010409 !important; border: 1px solid var(--border) !important; }


/* Navigation Icons — hover feedback */
.structurizrNavigation,
.structurizrNavigation > g {
    overflow: visible !important;
}

.structurizrNavigation > g {
    cursor: pointer !important;
    transition: opacity 0.2s, filter 0.2s;
}

.structurizrNavigation > g:hover {
    opacity: 0.7;
    filter: drop-shadow(0px 0px 3px rgba(255,255,255,0.9));
}

/* Double-clickable Element Hover Effect */
.joint-cell[style*="zoom-in"]:hover .structurizrHighlightableElement {
    stroke-width: 4px !important;
    filter: brightness(1.1);
}
