/* ==========================================================================
   1. RESPONSIVE BREAKPOINTS (:ROOT & TYPOGRAPHY)
   ========================================================================== */

/* Classic Mobile */
@media screen and (max-width: 480px) {
    :root { 
        font-size: 12px; 
        --header-height: 30px; 
    }
    .logo-container { display: none !important; }
    .sidebar-capsule-bg { display: none !important; } /* Strips out sub-menus */
}

/* Smartphone */
@media screen and (min-width: 481px) and (max-width: 768px) {
    :root { 
        font-size: 14px; 
        --header-height: 40px; 
    }
    .logo-container { display: none !important; }
    .sidebar-capsule-bg { display: none !important; } /* Strips out sub-menus */
}

/* Tablet */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    :root { 
        font-size: 15px; 
        --header-height: 50px; 
    }
    .sidebar-capsule-bg { display: none !important; } /* Strips out sub-menus */
}

/* Laptop / Standard Monitor */
@media screen and (min-width: 1025px) and (max-width: 1600px) {
    :root { 
        font-size: 16px; 
        --header-height: 60px; 
    }
}

/* Wide Monitors / UWHD */
@media screen and (min-width: 1601px) and (max-width: 2560px) {
    :root { 
        font-size: 18px; 
        --header-height: 80px; 
    }
}

/* Large TVs / 4K */
@media screen and (min-width: 2561px) {
    :root { 
        font-size: 22px; 
        --header-height: 120px; 
    }
}

/* Custom Scalable Tooltip Logic - Desktop Only (Screens larger than 1024px) */
@media (min-width: 1025px) {
    .menu-icon::after {
        content: attr(data-tooltip);
        position: absolute;
        top: 100%;
        margin-top: 0.85rem;   
        left: 50%;
        transform: translateX(-50%) scale(0.75); 
        background-color: #101010;
        color: #efefef;
        font-size: 0.9rem;
        font-weight: 400;
        padding: 0.25rem 0.5rem;
        border: 1px solid #000000;
        border-radius: 4px;
        white-space: nowrap;
        font-family: Arial, sans-serif;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease;
        transition-delay: 0s;
    }

    .menu-icon.active::after {
        margin-top: 0.65rem; 
        transform: translateX(-50%) scale(0.66); 
    }

    .menu-icon:hover::after {
        opacity: 1;
        transition-delay: 0.4s;
    }

    .menu-icon:not(.active):hover::after {
        transform: translateX(-50%) scale(0.75); 
    }

    .menu-icon.active::after,
    .menu-icon.active:hover::after {
        transform: translateX(-50%) scale(0.66); 
    }
}

/* ==========================================================================
   2. BASIC RESET & BASE STYLES
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #efefef; 
    font-size: 1rem; /* Follows fluid :root sizes */
    color: #101010;
/*    background: linear-gradient(to bottom, #bcbcbc 0%, #cdcdcd 30%, #efefef 100%); */
    background-attachment: fixed;
}

a { 
    color: #a29bfe; /* Brand purple */
    text-decoration: none;
    transition: all 0.1s ease-in-out;
    font-weight: 500;
}

a:hover {
    color: #00ffdd; /* Interactive glow cyan */
    text-decoration: none;
}

/* ==========================================================================
   3. STRUCTURAL LAYOUT SYSTEM & COLUMNS
   ========================================================================== */

.main-container {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    height: 100vh;
    border: 5px solid #bcbcbc;
}

.main-container td {
    font-size: 1rem; 
}

/* Master Grid Column Ratios */
.col-w-15 { width: 15%; }
.col-w-35 { width: 35%; }

.header-cell {
    height: var(--header-height);
    position: relative;
    background-color: transparent;
    color: #efefef;
    padding: 2rem 1rem; 
    font-size: 1.8rem;
    z-index: 50;
}

/* Core Structural Alignments */
.header-left { text-align: left; vertical-align: middle; padding-left: 22px; }
.header-center { text-align: center; vertical-align: middle; }
.header-right { text-align: right; vertical-align: middle; padding-right: 20px; }

/* Unified Column Top Alignment and Padding Layout */
.col-side-a, .col-side-b, .col-main-a, .col-main-b {
    vertical-align: top;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}

.col-side-a { width: 15%; padding: 10px; text-align: left; }
.col-side-b { width: 15%; padding: 10px; text-align: right; }
.col-main-a { width: 35%; padding: 15px; text-align: right; }
.col-main-b { width: 35%; padding: 15px; text-align: left; }

/* Dynamic Central Viewport */
#main-viewport {
    width: 70%;
    vertical-align: top;
    text-align: center;
}

.column-title {
    font-weight: normal;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

/* ==========================================================================
   4. BRANDING ENGINE LOGO SPECIFICATIONS
   ========================================================================== */

.logo-container {
    font-family: Consolas, sans-serif; 
    font-weight: 700; 
    font-size: 2.2rem; 
    color: #101010; 
    letter-spacing: -0.05em; 
    white-space: nowrap;
}

#spn_logo {
    font-size: 1.2rem; 
    vertical-align: super; 
    font-weight: 700; 
    color: #101010; 
    letter-spacing: -0.05em;
}

#lbl_logo, #spn_logo {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   5. NAVIGATION CAPSULE & CIRCLE MENU
   ========================================================================== */

.menu-capsule-bg {
    display: inline-block;
    background-color: rgba(16, 16, 16, 0.2);
    border: 1px solid rgba(16, 16, 16, 0.3);
    padding: 16px 23px;
    border-radius: 58px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 
                0 1px 4px rgba(16, 16, 16, 0.3);
}

.circle-menu-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.menu-icon {
    width: 3rem;  
    height: 3rem;
    background-color: #6c6c6c; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    color: #efefef;
    transition: transform 0.1s, background-color 0.1s;
    position: relative; 
    transform-origin: center center;
    font-variant-emoji: text;
}

.menu-icon:hover {
    background-color: #101010;
    color: #efefef;
    transform: scale(1.2); 
}

/* Consolidated Active State with Valid GPU Hardware Acceleration Fixes */
.menu-icon.active {
    background-color: #cf1111;
    color: #efefef;
    transform: scale(1.3) translateZ(0); 
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: opacity, transform; 
}

.menu-icon.active:hover {
    background-color: #101010;
    color: #efefef;
    transform: scale(1.3) translateZ(0); 
}

/* ==========================================================================
   6. SIDEBAR ACTIONS DECK (RECT BUTTONS)
   ========================================================================== */

.sidebar-capsule-bg {
    display: inline-block;
    width: 100%;
    background-color: rgba(16, 16, 16, 0.2);
    border: 1px solid rgba(16, 16, 16, 0.3);
    padding: 1rem 0;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 
                0 1px 4px rgba(16, 16, 16, 0.3);
    margin-top: 40px;
}

.sidebar-actions {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.rect-button {
    display: block;
    width: 90%;
    margin: 0 auto;
    padding: 0.8rem 0;
    background-color: #6c6c6c;
    color: #efefef;
    text-align: center;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    font-style: italic;
    font-size: 0.9rem;
    transition: transform 0.1s, background-color 0.1s, color 0.1s;
    cursor: pointer;
}

.rect-button:hover {
    background-color: #101010;
    color: #efefef;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-style: italic;
    transform: scale(1.0);
}

.rect-button.active {
    background-color: #cf1111;
    color: #efefef;
    text-decoration: none;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.05em;
    transform: scale(1.0);
}

.rect-button.active:hover {
    background-color: #101010;
    color: #efefef;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-style: normal;
    transform: scale(1.0);
}

/* ==========================================================================
   7. USER CONTROLS, INPUTS & FIELDS
   ========================================================================== */

.input-container {
    display: inline-flex;
    width: 100%;
    max-width: 350px; 
    background-color: #efefef;
    vertical-align: middle;
    position: relative;
}

.form-group {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 0 0.8rem 1.5rem;
    background: rgba(123, 123, 123, 0.2); 
    border: 1px solid rgba(0, 0, 0, 0.3); 
    border-radius: 4px; 
    color: #101010; 
    font-family: Arial, sans-serif; 
    font-size: 0.9rem; 
    box-sizing: border-box; 
    outline: none;
    box-shadow: 0 1px 3px rgba(123, 123, 123, 0.6);
}

.form-input:hover, .form-input:focus {
    border: 1px solid rgba(0, 0, 0, 0.5); 
}

/* Placeholder Handling Across Specific Engines */
.input-container .form-input::placeholder { font-style: italic; }
.input-container .form-input::-moz-placeholder { font-style: italic; }
.input-container .form-input:-ms-input-placeholder { font-style: italic; }

/* Precise Cross-Browser Form Autofill Color Reset Override */
.input-container .form-input:-webkit-autofill,
.input-container .form-input:-webkit-autofill:hover, 
.input-container .form-input:-webkit-autofill:focus,
.input-container .form-input:-webkit-autofill:active {
    transition: background-color 600000s ease-in-out 0s;
    background: rgba(16, 16, 16, 0.2) !important;
    -webkit-text-fill-color: #101010 !important;
    color: #101010 !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    font-family: Arial, sans-serif !important;
    font-size: 0.9rem !important;
}

.login-btn, .logout-btn {
    display: inline-block;
    width: 80%;
    max-width: 150px;
    padding: 0.6rem 0;
    background-color: #6c6c6c;
    font-weight: bold;
    font-size: 0.9rem;
    border: none; 
    border-radius: 60px; 
    transition: all 0.1s ease;
    color: #efefef; 
    font-family: Arial, sans-serif; 
    cursor: pointer; 
    box-shadow: 0 1px 3px rgba(123, 123, 123, 0.6);
    letter-spacing: 0.05em;
}

.login-btn:hover, .logout-btn:hover {
    background-color: #101010;
    color: #efefef;  
    transform: translateY(0px);
    box-shadow: 0 1px 3px rgba(123, 123, 123, 0.6);
}

.login-btn:active, .logout-btn:active {
    background-color: #cf1111;
    color: #efefef;  
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(123, 123, 123, 0.6);
}

.form-error-msg {
    color: #cf1111;
    font-size: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-family: monospace;
    text-align: center;
}

/* ==========================================================================
   8. VIEW PANELS & SUBSYSTEM BLOCKS (Dashboard, Profile & System Modules)
   ========================================================================== */

.view-panel-split {
    width: 50%;
    box-sizing: border-box;
    margin-top: 45px;
}

.split-left {
    float: left;
    text-align: right;
    padding-right: 2px;
}

.split-right {
    float: right;
    text-align: left;
    padding-left: 2px;
    font-style: italic;
}

.view-panel-wide {
    width: 100%;
    text-align: center;
    clear: both;
}

.wide-text-block {
    display: none; /* Safely initialized for JS switching engines */
    text-align: left;
    max-width: 90%;
    margin: 0 auto;
}

.form-block-centered {
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

.title-centered {
    text-align: center;
}

.panel-body-text {
    white-space: pre-line;
    line-height: 1.6;
}

/* Layout Engine Visibility Control Helper */
.panel-hidden {
    display: none; /* Removed !important so your JS tab engine can override this natively */
}

/* ==========================================================================
   9. SECURITY & INTERACTION INTERFACE ENGINES
   ========================================================================== */

/* Website Content Selection Engine styling */
::selection { background-color: #101010; color: #efefef; }
::-moz-selection { background-color: #101010; color: #efefef; }

/* Selective UI Selection Blockers */
.logo-container { cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.menu-icon, .menu-icon a, .rect-button, .login-btn { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
input::placeholder, input::-webkit-input-placeholder, input::-moz-placeholder, input:-ms-input-placeholder { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* Minimalist Hardware-Accelerated Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(16, 16, 16, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(123, 123, 123, 0.1); border-radius: 4px; transition: background 0.2s ease; }
::-webkit-scrollbar-thumb:hover { background: #6c6c6c; }
* { scrollbar-width: thin; scrollbar-color: rgba(123, 123, 123, 0.1) rgba(16, 16, 16, 0.2); }
