/* ==========================================================================
   1. DESIGN TOKENS & INTEGRATED THEME PALETTES
   ========================================================================== */
:root {
    --accent-color: #f15a24; /* Oracle Core Red-Orange Brand Identity */
}

/* Dark Theme Colors (Default Runtime State) */
body.dark-theme {
    --bg-primary: #121214;
    --bg-secondary: #1a1a1e;
    --bg-tertiary: #26262b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --code-bg: #0d0d0f;
    --border-color: #334155;
    --card-title-color: #ffffff;
}

/* Light Theme Colors */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --code-bg: #1e293b; /* Preserves a dark backdrop context for tracking code blocks */
    --border-color: #cbd5e1;
    --card-title-color: #0f172a;
}

/* ==========================================================================
   2. SITE-WIDE RESET & STRUCTURAL LAYOUTS
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-color);
    padding: 2.5rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    color: var(--card-title-color);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
}

/* Centralized Grid Wrapper Constraint Canvas */
.container {
    max-width: 1250px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Header Action Panels Cluster */
.header-actions-wrap {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.75rem;
}

.theme-toggle-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-color);
    background-color: rgba(241, 90, 36, 0.05);
}

/* ==========================================================================
   3. STICKY SIDEBAR NAVIGATION DASHBOARD (index.html)
   ========================================================================== */
.feed-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: flex-start; /* Crucial: Prevents stretching alongside scrollable timeline row contents */
}

.sidebar {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    
    /* 🛠️ KEEP MENUS STICKY WHILE DRAGGING SCROLLBARS */
    position: sticky;
    top: 2rem;
    
    /* ⬇️ NEW: ADDS SCROLLBAR ENGINE ⬇️ */
    max-height: calc(100vh - 4rem); /* Prevents the menu from stretching off the bottom of the screen */
    overflow-y: auto;               /* Automatically shows vertical scrollbars only when items overflow */
    overflow-x: hidden;             /* Restricts accidental horizontal shifting */
}

/* 🎨 OPTIONAL: Custom Sleek Dark Terminal Themed Scrollbar Styles */
.sidebar::-webkit-scrollbar {
    width: 6px; /* Makes the scroll track ultra-thin and professional */
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary); 
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color); 
    border-radius: 4px;
    transition: background 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); /* Changes scrollbar to Oracle Orange on hover */
}


.search-box {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-color);
}

.filter-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.tag-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.6rem 0.8rem;
    color: var(--text-main);
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.tag-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

.tag-btn.active {
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   4. LOG FEED ARTICLE CARDS ENGINE
   ========================================================================== */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.card-title {
    font-size: 1.45rem;
    color: var(--card-title-color);
    font-weight: 700;
}

.badge {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

.badge:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.card-body p {
    margin-bottom: 1.25rem;
    color: var(--text-main);
    font-size: 1.05rem;
}

/* ==========================================================================
   5. CODE CONTAINERS & CLIPBOARD MECHANISMS
   ========================================================================== */
.code-container {
    position: relative;
    margin: 1.25rem 0;
}

pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    white-space: pre; /* Enforces clean backtick code indentation architecture */
}

code {
    color: #f8fafc;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(241, 90, 36, 0.12);
    color: var(--accent-color);
    border: 1px solid rgba(241, 90, 36, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

/* ==========================================================================
   6. SUB-PAGE METRIC INTERACTIVE RUNBOOK BLUEPRINTS (Architecture, Tuning, etc.)
   ========================================================================== */
.arch-grid, .tuning-grid, .backup-grid, .multitenant-grid, .trouble-grid, .patching-grid, .space-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.diagram-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.block-group {
    border: 2px dashed var(--border-color);
    padding: 1.25rem 1rem 1rem 1rem;
    border-radius: 6px;
    position: relative;
}

.block-group::before {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: var(--bg-secondary);
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.05em;
}

.mem-pool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.arch-node {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.arch-node:hover {
    border-color: var(--accent-color);
    background-color: rgba(241, 90, 36, 0.08);
}

.arch-node.selected {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.25);
}

.proc-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
}

.proc-node {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.6rem 0.2rem;
}

.inspector-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.inspector-title {
    color: var(--card-title-color);
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-weight: 700;
}

.inspector-type {
    display: inline-block;
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   PRODUCTION ENGINE DBA TERMINAL PROFILE BANNER
   ========================================================================== */
.dba-profile-banner {
    display: flex;
    flex-direction: column;
    text-align: left;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 850px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.85rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.terminal-line {
    display: flex;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.term-prompt {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
    user-select: none;
}

.term-cmd {
    color: #ffffff;
    font-weight: bold;
}

.term-output {
    color: var(--text-muted);
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.cert-pill {
    background-color: rgba(241, 90, 36, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(241, 90, 36, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* =========================================================================
   1. CORE PROJECT SYSTEM SETUP & TECH DARK THEME
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Consolas', 'Courier New', Monaco, monospace; /* Database terminal look */
}

body {
    background-color: #0d1117; /* Dark charcoal system background */
    color: #c9d1d9;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

/* =========================================================================
   2. CONTAINER MAIN LAYOUT WRAPPER
   ========================================================================= */
.contact {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px 20px;
    background-color: white; /* Elevated terminal layer panel */
    border: 1px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.contact h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff9f43; /* System Amber focus accent color */
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact p.contact-subtitle {
    color: #8b949e;
    font-size: 14px;
    margin-bottom: 35px;
    text-align: center;
    line-height: 1.5;
    border-bottom: 1px dashed #30363d;
    padding-bottom: 20px;
}

.contact form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Flex structural boxes for parallel data inputs */
form .input-box {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.input-box .input-field {
    width: 100%;
}

form .textarea-field {
    width: 100%;
}

/* Dynamic metadata parameter labels */
.field label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #8b949e;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =========================================================================
   3. TERMINAL INPUT FIELD TILES
   ========================================================================= */
.field .item {
    width: 100%;
    padding: 12px 16px;
    background-color: #0d1117; /* Nested pitch black view layer slot */
    border: 1px solid #30363d;
    outline: none;
    border-radius: 4px;
    color: #56d364;            /* Terminal Monitor Matrix Green output values font */
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

form .textarea-field .item {
    resize: none; 
}

.field .item::placeholder {
    color: #484f58; 
}

/* Active click focus tracking state overrides */
.field .item:focus {
    border-color: #ff9f43; /* Glows amber color on active user inputs */
    box-shadow: 0 0 8px rgba(255, 159, 67, 0.15);
}

/* =========================================================================
   4. OPERATION SUBMIT TERMINAL BUTTONS
   ========================================================================= */
form button[type="submit"] {
    padding: 14px 40px;
    background-color: #ff9f43; /* System Amber Primary key color element */
    border: none;
    outline: none;
    border-radius: 4px;
    font-size: 14px;
    color: #0d1117;            /* Extreme dark baseline contract on font fill text */
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    min-width: 220px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.15);
    text-transform: uppercase;
}

form button[type="submit"]:hover {
    background-color: #ffb366;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.25);
}

form button[type="submit"]:active {
    transform: translateY(1px);
}

/* Syntax alert warning layout items */
.field .error-txt {
    font-size: 12px;
    color: #ff7b72;            /* Error message notification red text layers tracking */
    text-align: left;
    margin-top: 4px;
    display: none;
}

/* =========================================================================
   5. SECURE TRANSACTION STATUS MODAL POPUP
   ========================================================================= */
.popup {
    width: 420px;
    max-width: 92vw;
    background-color: #161b22; 
    border: 2px solid #30363d;
    border-radius: 8px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    text-align: center;
    padding: 40px 30px 30px;
    color: #f0f6fc;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), top 0.4s ease;
    z-index: 9999;           
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.open-popup {
    visibility: visible;
    top: 50%;
    transform: translate(-50%, -50%) scale(1); /* Snappy popup entry */
}

.popup h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #56d364; /* Terminal Success Green text pop status info output */
}

.popup p {
    font-size: 14px;
    color: #8b949e;
    line-height: 1.6;
    margin-bottom: 25px;
}

.popup button {
    width: 50%;
    padding: 10px 0;
    background-color: #30363d;
    color: #f0f6fc;
    border: 1px solid #444c56;
    outline: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.15s ease;
}

.popup button:hover {
    background-color: #444c56;
    color: #ffffff;
}

/* =========================================================================
   6. ADAPTIVE MOBILE LAYOUT COMPRESSION
   ========================================================================= */
@media screen and (max-width: 640px) {
    form .input-box {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact h2 {
        font-size: 1.4rem;
    }
    
    .contact {
        margin: 20px auto;
        padding: 25px 15px;
    }
}
