/* =========================================================================
   FFHUT ROOT PORTAL ARCHITECTURE
   ========================================================================= */

/* Hide unwanted vanilla forum modules globally on the portal page */
#panel,
.navigation,
body > div:first-of-type > table,
#header > div:not(.wrapper) { 
    display: none !important; 
}

/* Base Layout & Typography */
body {
    background: #0d121a;
    color: #fff;
}

a {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.root-portal-header {
    background: #0d121a;
    width: 100%;
    text-align: center;
}

/* Modern Retro Typography Enhancements */
.portal-welcome-card h2, 
.sidebar-widget h4, 
.portal-main-feed .thead {
    font-family: "Tahoma", "Verdana", system-ui, sans-serif;
    text-shadow: 0 0 10px rgba(92, 179, 255, 0.15);
}

/* Navigation Grid */
.portal-nav-bar {
    display: flex;
    justify-content: center;
    background: #141c26;
    border: 1px solid #2c3e53;
    border-radius: 4px;
    padding: 12px 0;
    margin-top: 10px;
    margin-bottom: 20px;
    list-style: none;
}

.portal-nav-bar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 0 25px;
}

.portal-nav-bar a:hover, .portal-nav-bar a.active {
    color: #5cb3ff;
}

/* Welcome Feature Card */
.portal-welcome-card {
    background: #1a2432;
    border: 1px solid #2c3e53;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.portal-welcome-card h2 {
    color: #5cb3ff;
    margin-top: 0;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
}

.portal-welcome-card p {
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Core Layout Split (75/25) */
.portal-layout-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.portal-main-feed {
    min-width: 0; /* Prevents grid blowout from code tags or wide images */
}

.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sidebar Component Styling */
.sidebar-widget {
    background: #1a2432;
    border: 1px solid #2c3e53;
    border-radius: 4px;
    padding: 18px;
}

.sidebar-widget h4 {
    color: #5cb3ff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid #2c3e53;
    padding-bottom: 8px;
}

.sidebar-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-link-list li {
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    border-bottom: 1px dashed #223142;
    padding-bottom: 8px;
}

.sidebar-link-list li:last-child {
    border: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-link-list li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Fluid truncation via browser engine */
}

.sidebar-link-list li a:hover {
    color: #5cb3ff;
}

.sidebar-meta {
    display: block;
    font-size: 0.75rem;
    color: #8da2b9;
    margin-top: 4px;
}

/* Immersive Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #0d121a;
}
::-webkit-scrollbar-thumb {
    background: #1c293a;
    border: 2px solid #0d121a;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2c3e53;
}

/* Grounded Footer Configuration */
.portal-grounded-footer {
    background: #141c26;
    border-top: 1px solid #2c3e53;
    padding: 25px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 0.85rem;
    color: #8da2b9;
}

/* Native MyBB Forum Theme Camouflage */
.portal-main-feed .tborder {
    background: #141c26 !important;
    border: 1px solid #2c3e53 !important;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: none !important;
}

.portal-main-feed .thead {
    background: transparent !important;
    border-bottom: 1px solid #2c3e53 !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

.portal-main-feed .thead a {
    color: #5cb3ff !important;
}

.portal-main-feed .trow1, 
.portal-main-feed .trow2 {
    background: transparent !important;
    color: #e2e8f0 !important;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 !important;
}

.portal-main-feed .tfoot {
    background: transparent !important;
    border-top: 1px dashed #223142 !important;
    padding-top: 12px !important;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #8da2b9;
}

/* Responsive Structural Collapse */
@media (max-width: 990px) {
    .portal-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   AFFILIATES & WEBMASTER KIT LINK SYSTEM
   ========================================================================= */

/* Directory content cards */
.portal-card { 
    background: #1a2432; 
    border: 1px solid #2c3e53; 
    padding: 20px; 
    border-radius: 4px; 
    margin-bottom: 25px; 
}

.portal-card p { 
    color: #e2e8f0; 
    font-size: 1rem; 
    line-height: 1.6; 
    margin-bottom: 15px; 
}

/* Asset extraction boxes (HTML source textareas) */
.button-code-box { 
    width: 100%; 
    background: #0d121a; 
    border: 1px solid #2c3e53; 
    color: #a2b4c7; 
    font-family: monospace; 
    font-size: 0.8rem; 
    padding: 8px; 
    border-radius: 3px; 
    resize: none; 
    margin-top: 5px; 
}

/* Webmaster Asset Deck Wrappers */
.webmaster-kit-deck {
    display: flex; 
    flex-direction: column; 
    gap: 30px;
}

.webmaster-option-card {
    background: #141c26; 
    border: 1px solid #2c3e53; 
    padding: 20px; 
    border-radius: 4px;
}

.webmaster-option-tag {
    display: block; 
    font-size: 0.8rem; 
    color: #8da2b9; 
    margin-bottom: 10px; 
    font-weight: bold; 
    letter-spacing: 1px;
}

.webmaster-img-preview {
    background: #0d121a; 
    padding: 10px; 
    border: 1px solid #2c3e53; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    text-align: center;
}

.webmaster-img-preview img {
    max-width: 100%; 
    height: auto; 
    max-height: 140px; 
    display: block; 
    margin: 0 auto; 
    border-radius: 2px;
}

.webmaster-fields-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 15px;
}

.webmaster-fields-grid label {
    color: #fff; 
    font-size: 0.85rem; 
    font-weight: bold; 
    display: block; 
    margin-bottom: 5px;
}

/* =========================================================================
   ARCHIVES & VAULT UTILITIES
   ========================================================================= */

/* Generic card subheaders */
.portal-card h3 {
    color: #5cb3ff;
    margin-top: 0;
    font-size: 1.25rem;
}

/* Pending/Muted notice text */
.status-muted {
    color: #8da2b9;
}

/* Key-Value alignment for system metrics and side-by-side data */
.sidebar-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}