.aiida-banner {
    display: flex;
    align-items: center;
    background-color: black; 
    padding: 40px;
    font-family: 'Arial', sans-serif;
    max-width: 1000px;
    margin: 0 auto; /* Centers the banner on the page */
    box-sizing: border-box;
}

/* Left side logo positioning */
.logo-container {
    margin-right: 30px;
    flex-shrink: 0;
}

.logo img {
    max-height: 45px; /* Adjust this number to make the logo larger or smaller */
    width: auto;
    display: block;
}

/* Remove the text styles from the logo link to prevent layout shifting */
a.logo {
    margin-bottom: 0;
    text-decoration: none;
}

.logo-container img {
    height: 220px;
    display: block;
    width: auto;
}

/* Right side content wrapper */
.text-container {
    display: flex;
    flex-direction: column;
}

/* The L-shaped golden bracket */
.main-heading-bracket {
    border-left: 4px solid #c8a14c;
    border-bottom: 4px solid #c8a14c;
    padding-left: 20px;
    padding-bottom: 15px;
    margin-bottom: 12px;
}

/* Main typography with 3D/Embossed Gold Effect */
.main-heading-bracket h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.05;
    font-weight: 800; /* Extra bold */
    color: #dfb85b; /* Primary gold color */
    letter-spacing: -0.5px;
    text-shadow: 
        1px 1px 0px #a47d2f,
        2px 2px 0px #785a1f,
        3px 3px 5px rgba(0, 0, 0, 0.6);
}

/* Bottom Tagline Typography */
.sub-heading {
    margin-left: 24px; 
    color: #c8a14c; 
    font-size: 15px;
    letter-spacing: 0.2px;
    font-weight: 600;
}

/* =========================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================= */

/* Tablets and smaller screens (under 768px) */
@media (max-width: 768px) {
    .aiida-banner {
        flex-direction: column; /* Stacks the logo on top of the text */
        align-items: flex-start; 
        padding: 30px 20px;
    }

    .logo-container {
        margin-right: 0;
        margin-bottom: 30px; /* Adds space below the logo */
        align-self: center; /* Centers the logo above the text */
    }

    .logo-container img {
        height: 160px; /* Scales down the logo */
    }

    .main-heading-bracket h1 {
        font-size: 32px; /* Reduces heading size */
    }

    .sub-heading {
        font-size: 12px; /* Reduces tagline size */
    }
}

/* Mobile phones (under 480px) */
@media (max-width: 480px) {
    .aiida-banner {
        padding: 20px 15px;
    }

    .logo-container img {
        height: 130px;
    }

    .main-heading-bracket {
        border-left: 3px solid #c8a14c; /* Thinner border for small screens */
        border-bottom: 3px solid #c8a14c;
        padding-left: 15px;
        padding-bottom: 10px;
    }

    .main-heading-bracket h1 {
        font-size: 24px; /* Much smaller heading for phones */
    }

    .sub-heading {
        margin-left: 18px; /* Adjusts margin to align with new thinner border */
        font-size: 10px; 
    }
}


/* ==========================================================================
   VARIABLES & THEME SETUP
   ========================================================================== */


:root {
    --gold: #D4AF37;
    --gold-dark: #997A15;
    --black: #030303;
    --surface: rgba(20, 20, 20, 0.7);
    --border: rgba(212, 175, 55, 0.15);
}

body {
    background-color: var(--black);
    color: #E0E0E0;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   TYPOGRAPHY & GLOBAL STYLES
   ========================================================================== */
h1, h2, h3, .logo, .sub-headline {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
    color: #A0A0A0;
}

li {
    margin-bottom: 0.5rem;
}

.container {
    padding: 100px 10%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-intro {
    color: #A0A0A0;
    max-width: 600px;
    margin: 20px auto 0;
    font-weight: 300;
}

.gold-line {
    height: 2px;
    width: 60px;
    background-color: var(--gold);
    margin: 15px 0;
}

.gold-line.center {
    margin: 15px auto;
}

/* ==========================================================================
   AMBIENT EFFECTS & NAVIGATION
   ========================================================================== */
.ambient-glow {
    position: fixed;
    top: -20vh;
    left: -10vw;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(212,175,55,0.06) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.premium-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(3, 3, 3, 0.85);
     /* Glassmorphism */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #fff;
    margin-left: 2.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

.cta-nav {
    border: 1px solid var(--gold);
    padding: 8px 16px;
    border-radius: 4px;
}

.cta-nav:hover {
    background: var(--gold);
    color: var(--black) !important;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--black));
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.sub-headline {
    font-size: 1.5rem;
    color: #fff;
    margin-top: 20px;
}

.hero-tagline {
    font-weight: 200;
    letter-spacing: 3px;
    color: var(--gold-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-subtext {
    color: #A0A0A0;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 40px;
}

.cta-button-gold {
    display: inline-block;
    padding: 15px 35px;
    background: var(--gold);
    color: var(--black);
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.cta-button-gold:hover {
    background: #FFF;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   EDITORIAL SPLIT (ABOUT SECTION)
   ========================================================================== */
.editorial-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.stats-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat h3 {
    margin: 0;
    font-size: 1.4rem;
}

.stat p {
    margin: 5px 0 0;
    color: #A0A0A0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   BENTO GRID SYSTEM (STRATEGIC PRIORITIES)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.bento-large {
    grid-column: 1 / -1; /* Spans full width */
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
   
    -webkit-backdrop-filter: blur(10px);
     backdrop-filter: blur(10px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.infrastructure-tags {
    margin: 20px 0;
}

.infrastructure-tags span {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 10px 10px 0;
    border: 1px solid var(--gold-dark);
    color: var(--gold);
    font-size: 0.8rem;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.05);
}

/* ==========================================================================
   HIGH-RES ASSET PLACEHOLDERS
   ========================================================================== */
.hi-res-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1.414; /* Standard aspect ratio for technical renders/documents */
    background: rgba(0, 0, 0, 0.5);
    border: 1px dashed var(--gold-dark);
    margin-top: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-dark);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hi-res-placeholder.square {
    aspect-ratio: 1 / 1; /* Perfect square for side-by-side editorial flow */
    margin-top: 0;
}

/* ==========================================================================
   EDITORIAL FLOW (FLAGSHIP PROGRAMMES)
   ========================================================================== */
.editorial-flow {
    display: flex;
    flex-direction: column;
    gap: 100px;
    margin-top: 50px;
}

.programme-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.programme-item.reverse {
    direction: rtl; /* Flips the layout elegantly */
}

.programme-item.reverse > * {
    direction: ltr; /* Keeps text reading left-to-right */
}

.programme-item h3 {
    font-size: 1.8rem;
}

/* ==========================================================================
   IMPACT MATRIX & FOOTER
   ========================================================================== */
.impact-section {
    text-align: center;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.8), transparent);
    border-top: 1px solid var(--border);
}

.impact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    max-width: 900px;
    margin-inline: auto;
}

.impact-item {
    background: var(--surface);
    border: 1px solid var(--gold-dark);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    color: #E0E0E0;
    transition: all 0.3s ease;
     -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.impact-item:hover {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.05);
}

.premium-footer {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid var(--border);
    background: var(--black);
}

.footer-logo {
    font-size: 2rem;
    margin: 0;
}

.footer-motto {
    font-family: 'Cinzel', serif;
    color: var(--gold-dark);
    letter-spacing: 2px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.hi-res-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This prevents the image from squishing or stretching */
    border-radius: inherit; /* Keeps the rounded corners if the parent div has them */
    display: block;
}

/* ==========================================================================
   PHYSICS-BASED ANIMATIONS (SCROLL REVEAL)
   ========================================================================== */
.reveal {
    opacity: 0;
    visibility: hidden;
}

.fade-up.active,
.bento-card.active {
    opacity: 1;
    visibility: visible;
    animation: fadeUpAnim 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpAnim {
    0% { 
        opacity: 0; 
        transform: translateY(50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Staggered Delays for Bento Grid */
.stagger-1.active { animation-delay: 0.1s; }
.stagger-2.active { animation-delay: 0.25s; }
.stagger-3.active { animation-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .editorial-split,
    .programme-item {
        grid-template-columns: 1fr;
        direction: ltr !important; /* Disables reverse layout on mobile */
    }
    
    .nav-links {
        display: none; /* Consider adding a hamburger menu for mobile */
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   FORM GRID, SPACING & ALIGNMENT
   ========================================================================== */
.auth-form {
    text-align: left;
    margin-top: 20px;
}

/* Increased gap for better horizontal spacing */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px; 
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Forces bottom-alignment if label heights differ */
    margin-bottom: 25px; 
}

/* Remove bottom margin when inside a grid row to prevent double-spacing */
.form-row .input-group {
    margin-bottom: 0;
}

.full-width-group {
    grid-column: 1 / -1;
}

/* Strict label alignment and increased spacing */
.input-group label {
    display: block;
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Roomier inputs with strict box-sizing for perfect alignment */
.input-group input,
.input-group select {
    width: 100%;
    padding: 16px 20px; /* Increased padding for a premium, tactile feel */
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    box-sizing: border-box; /* Crucial for keeping padding from breaking the grid width */
    transition: all 0.3s ease;
    margin: 0; /* Resets any browser default margins */
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    background: rgba(10, 10, 10, 0.9);
}

.input-group input::placeholder {
    color: #666;
}

/* Ensure the dropdown matches the text inputs perfectly */
.input-group select {
    
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; 
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D4AF37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem top 50%; /* Adjusted arrow spacing */
    background-size: 0.75rem auto;
}

.input-group select option {
    background: var(--black);
    color: #fff;
    padding: 10px;
}

/* Adjust the submit button spacing */
.cta-button-gold.full-width {
    width: 100%;
    margin-top: 20px;
    padding: 18px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Mobile responsiveness: stack columns and reduce gaps */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 25px; /* Restores vertical spacing when stacked */
        margin-bottom: 25px;
    }
    
    .auth-card {
        padding: 30px 20px; /* Gives the form more room to breathe on small screens */
    }
}

/* ==========================================================================
   AUTHENTICATION LAYOUT (PERFECT FULL-SCREEN CENTERING)
   ========================================================================== */
.auth-wrapper {
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;     /* Centers vertically */
    min-height: 100vh;       /* Enforces full screen height */
    padding: 120px 5% 50px;  /* 120px top padding offsets your fixed navigation bar */
    box-sizing: border-box;  /* Prevents the padding from pushing the container larger than 100vh */
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), var(--black));
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 50px;
    width: 100%;
    max-width: 750px; /* Keeps the form from stretching too wide on 4K/Ultra-wide screens */
   
    -webkit-backdrop-filter: blur(15px);
     backdrop-filter: blur(15px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
    margin: auto; /* Redundancy to ensure it stays centered */
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (SMART STACKING)
   ========================================================================== */
@media (max-width: 768px) {
    /* Break the 2-column grid into a single column for phones/tablets */
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px; /* Tightens the gap when stacked vertically */
        margin-bottom: 20px;
    }
    
    /* Give the card more breathing room on small screens */
    .auth-card {
        padding: 40px 25px; 
    }
    
    /* Adjust top padding so it doesn't push the form too far down on mobile */
    .auth-wrapper {
        padding-top: 100px;
    }
}

/* ==========================================================================
   HAMBURGER ICON & MOBILE MENU
   ========================================================================== */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001; /* Keeps it above the mobile menu */
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--gold);
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #111111; /* Solid dark background matching the image */
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding-top: 90px; /* Space for the fixed header */
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-content {
    padding: 0 20px 50px;
}

/* Accordion Layout matching Menu.png */
.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.menu-link, .menu-label {
    color: #E0E0E0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

/* The Circular Toggle Button */
.accordion-toggle {
    background: #D4AF37; /* AIIDC Gold */
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* CSS Drawn Arrows (No images required) */
.arrow {
    border: solid #000; /* Black arrow inside the gold circle */
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
}

.accordion-item.open .arrow {
    transform: translateY(2px) rotate(-135deg); /* Flips arrow up */
}

/* Accordion Body / Nested Links */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sub-menu-link {
    display: block;
    padding: 15px 0 15px 20px; /* Indents the nested items */
    color: #A0A0A0;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    text-transform: uppercase;
}

.sub-menu-link:last-child {
    border-bottom: none;
    margin-bottom: 15px;
}

/* Hamburger Animation to 'X' */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hide desktop nav and show hamburger on screens smaller than 900px */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: block;
    }
}

/* ==========================================================================
   BRAND TITLE & RESPONSIVE HEADER
   ========================================================================== */
.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1002; 
}

.brand-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.3;
    max-width: 250px; /* Forces the long title to wrap onto 2 lines, preventing link overlap */
    display: block;
}

/* Update the existing premium-nav to handle potential wrapping gracefully */
.premium-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows the menu to drop down if the screen is cramped */
    gap: 10px;
}

/* Ensure the nav links align properly if they are forced to wrap */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    flex: 1; /* Pushes links to the right edge */
}

/* ==========================================================================
   MOBILE CENTERING LOGIC
   ========================================================================== */
@media (max-width: 900px) {
    .premium-nav {
        position: relative; /* Required for the absolute centering below */
        flex-wrap: nowrap;  /* Forces logo and hamburger to stay on one line */
    }
    
    .brand-container {
        gap: 0;
    }

        .nav-links {
        display: none;
    }

    .brand-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        max-width: 55vw; /* Keeps the text from colliding with the logo or hamburger */
        text-align: center;
        font-size: 0.65rem; /* Scaled down for readability on small screens */
    }
}

/* ==========================================================================
   DESKTOP DROPDOWNS
   ========================================================================== */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 2.5rem;
}

.dropdown a.dropbtn {
    margin-left: 0; /* Overrides the default spacing to keep the arrow aligned */
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow-down {
    border: solid #fff;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Premium Hover State */
.dropdown:hover .dropbtn { color: var(--gold); }
.dropdown:hover .arrow-down {
    border-color: var(--gold);
    transform: translateY(2px) rotate(-135deg); /* Arrow flips up */
}

/* The Dropdown Box */
.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 150%;
    left: -20px;
    background: rgba(10, 10, 10, 0.95);
    
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    min-width: 280px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 100;
    transition: all 0.3s ease;
    transform: translateY(15px); /* Creates a slide-up animation */
    padding: 10px 0;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    top: 100%;
}

/* Links inside the Dropdown */
.dropdown-content a {
    color: #A0A0A0;
    padding: 12px 25px;
    text-decoration: none;
    display: block;
    margin-left: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding-left: 30px; /* High-end interaction: text slides slightly right on hover */
}

/* ==========================================================================
   MOBILE MENU EXIT BUTTON
   ========================================================================== */
.mobile-menu-overlay {
    padding-top: 20px; /* Reduced to make room for the exit button */
}

.mobile-menu-top {
    display: flex;
    justify-content: flex-end;
    padding: 0 25px 20px;
}

.close-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    font-weight: 200;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-menu-btn:hover {
    color: var(--gold);
    transform: rotate(90deg); /* Subtle spin interaction */
}

/* Hide desktop dropdown mechanics on mobile */
@media (max-width: 900px) {
    .dropdown {
        display: none;
    }
}

/* ==========================================================================
   AFRICA ECONOMY CARDS SECTION
   ========================================================================== */
.economy-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

.card-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 35px;
  
    -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    scroll-margin-top: 120px; /* Ensures smooth scroll landing clears header */
}

.card-item:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.7);
}

.card-header-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.card-header-badge h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gold);
}

.card-header-badge .card-icon {
    font-size: 2rem;
}

.card-section {
    margin-bottom: 20px;
}

.card-section h4 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-section p {
    color: #CCCCCC;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    position: relative;
    padding-left: 20px;
    color: #DDDDDD;
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.benefits-list li::before {
    content: "•";
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

.approach-box {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--gold);
    padding: 15px 18px;
    border-radius: 0 6px 6px 0;
}

.approach-box p {
    font-size: 0.85rem;
    color: #BBBBBB;
}

.cta-button-card {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cta-button-card:hover {
    background: var(--gold);
    color: var(--black);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

@media (max-width: 600px) {
    .economy-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card-item {
        padding: 25px;
    }
}

/* ==========================================================================
   UPCOMING EVENTS SECTION
   ========================================================================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.event-card {
    display: flex;
    align-items: center;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--gold-dark);
    padding: 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
   
    -webkit-backdrop-filter: blur(10px);
     backdrop-filter: blur(10px);
}

.event-card:hover {
    background: rgba(25, 25, 25, 0.95);
    border-left: 3px solid var(--gold);
    transform: translateX(5px); /* Slides slightly right to invite a click */
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5);
}

.event-date-badge {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    padding: 15px 10px;
    border-radius: 4px;
    margin-right: 20px;
    text-align: center;
    min-width: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.event-details h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #E0E0E0;
    line-height: 1.4;
}

.event-link {
    font-size: 0.8rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.event-card:hover .event-link {
    color: var(--gold);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
        align-items: flex-start;
        border-left: none;
        border-top: 3px solid var(--gold-dark);
    }

    .event-card:hover {
        border-left: none;
        border-top: 3px solid var(--gold);
        transform: translateY(-5px);
    }

    .event-date-badge {
        margin-right: 0;
        margin-bottom: 15px;
        padding: 8px 15px;
    }
}

/* ==========================================================================
   ADMINISTRATION DASHBOARD & DATA TABLES
   ========================================================================== */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
  
    -webkit-backdrop-filter: blur(15px);
      backdrop-filter: blur(15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.admin-card-title {
    color: var(--gold);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

/* Premium Data Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    color: #A0A0A0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.premium-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #E0E0E0;
    font-size: 0.9rem;
    vertical-align: middle;
}

.premium-table tbody tr {
    transition: background 0.3s ease;
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Role Badges */
.role-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.role-badge.administrator {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.role-badge.contributor {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.role-badge.viewer {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.status-indicator.inactive { background: #e74c3c; }

/* Mobile Adjustments */
@media (max-width: 900px) {
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SECURE UPLOAD ENGINE UI
   ========================================================================== */
/* Custom File Input */
.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 35px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(212, 175, 55, 0.4); /* Gold dashed border */
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.file-drop-area:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--gold);
}

.file-msg {
    color: #A0A0A0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none; /* Allows clicking through to the invisible input */
    transition: color 0.3s ease;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0; /* Hides the ugly default browser button while keeping functionality */
}

/* Toggle Switch (Allow Download) */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border-left: 3px solid var(--gold-dark);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--gold);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: var(--black);
}

.toggle-text strong {
    display: block;
    color: #E0E0E0;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.toggle-text p {
    margin: 0;
    color: #888;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* ==========================================================================
   DOCUMENT VIEWER & COMMENT SYSTEM
   ========================================================================== */
.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.doc-meta {
    color: #A0A0A0;
    font-size: 0.85rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-actions {
    display: flex;
    gap: 15px;
}

.cta-button-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.4);
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button-danger:hover {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
}

/* The Layout Grid */
.repo-viewer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: 70vh; /* Keeps the viewer locked in the screen viewport */
    min-height: 600px;
}

/* The Document Display */
.viewer-panel {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 100%;
    padding: 5px;
}

/* The Comments Column */
.comments-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
  
    -webkit-backdrop-filter: blur(15px);
      backdrop-filter: blur(15px);
    height: 100%;
}

.panel-title {
    padding: 20px;
    margin: 0;
    color: var(--gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comments-thread {
    flex: 1; /* Takes up all remaining space */
    padding: 20px;
    overflow-y: auto; /* Enables scrolling for long threads */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-bubble {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--gold-dark);
    padding: 15px;
    border-radius: 0 6px 6px 0;
}

.comment-author {
    color: #E0E0E0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.comment-time {
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.comment-text {
    color: #BBBBBB;
    font-size: 0.9rem;
    line-height: 1.5;
}

.comment-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.comment-input-area textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    resize: none; /* Prevents breaking the layout layout */
    box-sizing: border-box;
}

.comment-input-area textarea:focus {
    border-color: var(--gold);
    outline: none;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .repo-viewer-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .viewer-panel {
        height: 50vh;
    }
    .comments-panel {
        height: 60vh;
    }
    .repo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ==========================================================================
   DESKTOP MEGA MENU SCROLL FIX
   ========================================================================== */
.dropdown.mega-dropdown .dropdown-content.mega-content {
    /* Prevents the menu from falling off the bottom of the screen */
    max-height: calc(100vh - 100px); 
    overflow-y: auto; 
    
    /* CRITICAL: Stops the main website from scrolling while you scroll the menu */
    overscroll-behavior: contain; 
}

/* Premium Gold Scrollbar just for the Mega Menu */
.dropdown.mega-dropdown .dropdown-content.mega-content::-webkit-scrollbar {
    width: 6px;
}
.dropdown.mega-dropdown .dropdown-content.mega-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.dropdown.mega-dropdown .dropdown-content.mega-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3); /* Muted gold */
    border-radius: 10px;
}
.dropdown.mega-dropdown .dropdown-content.mega-content::-webkit-scrollbar-thumb:hover {
    background: var(--gold); /* Bright gold when actively scrolling */
}

/* ==========================================================================
   MOBILE/TOUCH INTERACTION HIGHLIGHTS
   ========================================================================== */
.sub-menu-link {
    transition: all 0.3s ease;
    border-left: 0px solid transparent; /* Prepares the border for the hover animation */
}

/* Applies to mouse hover, touch-hold, and active tap states */
.sub-menu-link:hover, 
.sub-menu-link:active, 
.sub-menu-link:focus {
    color: var(--gold);
    /* Creates a subtle fading gold highlight box */
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    
    /* High-end interaction: The text slightly indents to the right */
    padding-left: 28px; 
    
    /* Adds a solid gold accent bar on the left edge */
    border-left: 3px solid var(--gold);
}

.menu-link {
    transition: color 0.3s ease;
}

.menu-link:hover, 
.menu-link:active {
    color: var(--gold);
}

/* ==========================================================================
   AUDIT LOG ACTION BADGES
   ========================================================================== */
.action-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
}

/* Passive Actions */
.action-badge.view { background: rgba(255, 255, 255, 0.1); color: #ccc; border: 1px solid rgba(255, 255, 255, 0.2); }

/* Constructive Actions */
.action-badge.upload { background: rgba(212, 175, 55, 0.15); color: var(--gold); border: 1px solid rgba(212, 175, 55, 0.3); }
.action-badge.comment { background: rgba(52, 152, 219, 0.15); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }
.action-badge.user_created { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }

/* Destructive Actions */
.action-badge.soft_delete { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }


/* ==========================================================================
   OUTLINE BUTTONS (HOVER FIXES)
   ========================================================================== */
/* Secure Logout Outline Button */
.cta-nav-danger {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-left: 15px; /* Keeps it spaced correctly in the navigation */
}

.cta-nav-danger:hover {
    background: #e74c3c;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
}

/* Document Library View Button */
.cta-button-gold-outline {
    display: inline-block;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cta-button-gold-outline:hover {
    background: var(--gold);
    color: #000000; /* Forces black text on the gold background */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Authentication Badges */
.action-badge.login { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.action-badge.logout { background: rgba(243, 156, 18, 0.15); color: #f39c12; border: 1px solid rgba(243, 156, 18, 0.3); }

/* Password Audit Badges */
.action-badge.password_change { background: rgba(52, 152, 219, 0.15); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }
.action-badge.password_reset { background: rgba(155, 89, 182, 0.15); color: #9b59b6; border: 1px}

/* ==========================================================================
   DEMO MODE WATERMARK (REPEATING GRID + 50% RED LAYER)
   ========================================================================== */
.demo-watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50; 
    pointer-events: none; 
    -webkit-user-select: none;
    user-select: none;
    color: transparent; 
    
    /* NEW: The 50% Red Overlay Layer */
    background-color: rgba(231, 76, 60, 0.5); 
    
    /* UPDATED: Repeating SVG text pattern (now White for contrast against the red) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Ctext x='50%25' y='50%25' transform='rotate(-35 140 140)' fill='rgba(255, 255, 255, 0.85)' font-family='Arial, sans-serif' font-size='38' font-weight='900' text-anchor='middle' dominant-baseline='middle'%3EDEMO MODE%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    background-position: center center;
}

/* ==========================================================================
   MEMBERSHIP PRICING GRIDS
   ========================================================================== */
.tier-category-title {
    text-align: center;
    color: var(--gold);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Compact 5-column grid for businesses */
.pricing-grid.grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 30px;
    
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.pricing-card h4 {
    margin: 0 0 15px 0;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #E0E0E0;
}

.price {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 25px;
}

.price span {
    font-size: 0.9rem;
    color: #888;
    font-weight: 300;
}

.price.small { font-size: 1.8rem; }
.price.custom { font-size: 1.5rem; letter-spacing: 1px; }

.benefits-list {
    list-style: none; /* Strips any default browser bullets */
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left; /* Forces text to the left */
}

.benefits-list li {
    position: relative; /* Acts as the anchor for the absolute dot */
    padding: 12px 0 12px 20px; /* The 20px left padding creates a permanent indent for the text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #BBBBBB;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block; /* Overrides any problematic flex properties */
}

.benefits-list li::before {
    content: "•";
    position: absolute;
    left: 0; /* Pins the dot to the far left of the li container */
    top: 13px; /* Aligns the dot vertically with the first line of text */
    color: var(--gold);
    font-size: 1.5rem; /* Enlarged slightly for a premium feel */
    line-height: 1; /* Strips inherited line-height so the dot stays perfectly round */
}

.compact-benefits {
    color: #888;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Popular Highlight */
.pricing-card.popular {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #000;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-card.strategic {
    background: rgba(212, 175, 55, 0.03);
}

/* Membership Audit Badges */
.action-badge.create_tier { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.action-badge.update_tier { background: rgba(52, 152, 219, 0.15); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }

/* --- Ambassador Review Interface --- */
.review-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.rejection-notes-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

/* --- Document Viewer Modal --- */
.custom-modal {
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.6); 
}
.modal-content {
    background-color: #fff;
    margin: 5% auto; 
    padding: 20px;
    border-radius: 8px;
    width: 80%; 
    max-width: 900px;
}
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal:hover { color: #000; }

/* --- Dynamic Ad-Hoc Action Builder (Issues #16 & #17) --- */
.adhoc-row {
    border: 1px solid #007bff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f0f8ff; /* Light blue to differentiate from standard items */
    position: relative;
}
.remove-adhoc {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #dc3545;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}
.remove-adhoc:hover {
    color: #a71d2a;
}
.adhoc-dynamic-fields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #007bff;
}
.form-group {
    margin-bottom: 10px;
}

/* --- Process Architect UI Fixes --- */

/* Issue #1: SLA Flexbox Layout Fix */
.sla-config-group {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
    clear: both; /* Prevents floating elements from overlapping the submit button below */
}
.sla-input-wrapper {
    display: flex;
    align-items: center;
}
.sla-input-wrapper input {
    width: 150px;
}

/* Issue #9: Tier Visibility Grid */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    background: #f4f7fa;
    padding: 15px;
    border: 1px solid #d1d8e0;
    border-radius: 5px;
    margin-top: 10px;
}

/* Issue #8: Phase Re-ordering Styles */
.phase-node {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.phase-order-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.btn-move {
    background: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 12px;
}
.btn-move:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
.phase-content {
    flex-grow: 1;
}
/* Disable the up button on the first item, and down button on the last */
.phase-node:first-child .move-up,
.phase-node:last-child .move-down {
    opacity: 0.3;
    pointer-events: none;
}

/* --- Dynamic Form Builder (Issue #2) --- */
.form-builder-section {
    background: #fdfdfe;
    border: 1px dashed #adb5bd;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}
.form-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.field-row {
    background: #ffffff;
    border: 1px solid #dee2e6;
    padding: 10px 30px 10px 10px; /* Right padding for the X button */
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.field-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}
.field-inputs input[type="text"] {
    flex-grow: 2;
}
.field-inputs select {
    flex-grow: 1;
}
.required-toggle {
    font-size: 13px;
    white-space: nowrap;
    margin-bottom: 0;
}
.remove-field {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}
.remove-field:hover {
    color: #a71d2a;
}

/* --- Template Delivery & Execution (Issue #15) --- */
.document-submission-card {
    border: 1px solid #ced4da;
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.doc-action-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.upload-zone {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px dashed #ced4da;
}

/* --- AMBASSADOR REVIEW INTERFACE --- */
.review-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.rejection-notes-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

/* --- DOCUMENT VIEWER MODAL --- */
.custom-modal {
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.6); 
}
.modal-content {
    background-color: #fff;
    margin: 5% auto; 
    padding: 20px;
    border-radius: 8px;
    width: 80%; 
    max-width: 900px;
}
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal:hover { color: #000; }

/* --- AD-HOC ACTIONS BUILDER --- */
.adhoc-row {
    border: 1px solid #007bff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f0f8ff; 
    position: relative;
}
.remove-adhoc {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #dc3545;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}
.remove-adhoc:hover { color: #a71d2a; }

/* --- USER TASK SUBMISSION INTERFACE --- */
.submission-section {
    background: #ffffff;
    border: 1px solid #dee2e6;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dynamic-field-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}
.dynamic-field-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Document Upload Cards */
.document-submission-card {
    border: 1px solid #ced4da;
    background: #fdfdfe;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.doc-action-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}
.upload-zone {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px dashed #ced4da;
}

/* Rejection / Revision States (Issues #4 & #13) */
.has-error {
    border: 1px solid #dc3545; /* Red border to highlight rejected items */
    background-color: #fff8f8;
}
.rejection-alert {
    padding: 8px 12px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 13px;
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

/* --- FINANCIAL INTERMEDIATE ROUTING & INVOICING --- */
.financial-routing-card {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 8px;
}
.border-radius-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
}
.amount-input {
    font-size: 1.25rem;
    font-weight: bold;
    color: #212529;
}

/* User Invoice View */
.invoice-card {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
}
.invoice-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #007bff;
}
.invoice-total-row {
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}
.invoice-body .table td {
    vertical-align: middle;
    border-top: 1px dashed #e9ecef;
}

/* --- CROSS-SILO DIRECTORY (Issue #12) --- */
.silo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.silo-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}
.silo-card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.silo-card-body {
    padding: 0;
    flex-grow: 1;
}
.workflow-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.workflow-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f3f5;
}
.workflow-item:last-child {
    border-bottom: none;
}
.wf-info {
    flex-grow: 1;
    padding-right: 15px;
}
.badge-active-tasks {
    background-color: #e3f2fd;
    color: #0d6efd;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* --- PROCESS ARCHITECT LAYOUT --- */
.aiida-brand-header { display: flex; align-items: center; padding: 15px 30px; border-bottom: 2px solid rgba(255, 255, 255, 0.1); margin-bottom: 30px; }
.aiida-brand-header h1 { font-family: 'Times New Roman', Times, serif; color: #cfb53b; font-size: 1.6rem; margin: 0; font-weight: normal;}
.architect-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.master-settings-card, .phase-node-isolated, .phase-summary-card { background: #ffffff; border: 1px solid #dee2e6; border-radius: 6px; color: #333; margin-bottom: 30px; overflow: hidden; }
.master-settings-header, .phase-header-dark { background-color: #212529; color: #cfb53b; padding: 15px 20px; font-family: 'Times New Roman', Times, serif; font-size: 1.25rem; margin: 0; display: flex; justify-content: space-between; align-items: center; }
.master-settings-body, .phase-body-pad { padding: 20px; }
.builder-grid-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.builder-grid-col { flex: 1 1 calc(33% - 20px); min-width: 250px; }
.builder-grid-col-full { flex: 1 1 100%; }
.config-box { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; padding: 15px; height: 100%; }
.arch-input, .arch-select { width: 100%; padding: 10px; border: 1px solid #ced4da; border-radius: 4px; margin-top: 5px; }
.arch-btn { padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: 600; border: none; display: inline-block; }
.btn-outline { background: transparent; border: 1px solid #0056b3; color: #0056b3; }
.btn-save-master { background-color: #198754; color: white; padding: 10px 20px; }
.btn-edit { background: transparent; border: 1px solid #cfb53b; color: #cfb53b; padding: 4px 12px; }
label { font-weight: 600; margin-bottom: 2px; display: block; font-size: 0.95rem; }