:root {
    /* === PALETTE: DEEP FOREST (Nature Restore) === */
    --void-bg: #0b0f0b;      /* Very dark green, almost black */
    --void-surface: #141a14; /* Dark moss/Stone */
    --void-surface-hover: #1e261e;
    
    --border-subtle: #2a352a;
    --border-strong: #3d4d3d;

    /* === ACCENTS === */
    --gold-primary: #E6C25E; /* Amber/Resin */
    --gold-dim: rgba(230, 194, 94, 0.15);
    --gold-glow: rgba(230, 194, 94, 0.3);

    --spore-green: #8FBC8F; /* Dark Sea Green - Lichen style */
    --spore-neon: #98FF98;  /* Mint/Bioluminescent */
    
    --rust-red: #8B3A3A;    /* Earthier Red */
    --rust-dim: rgba(139, 58, 58, 0.2);

    /* === TYPOGRAPHY === */
    --font-sacred: 'Cormorant Garamond', serif;
    --font-tech: 'Quicksand', sans-serif;

    --text-bone: #E0E0E0;
    --text-ash: #8F9F8F;    /* Green-tinted gray */
    --text-void: #0b0f0b;

    /* === SPACING & LAYOUT === */
    --sidebar-width: 280px;
    --header-height: 80px;
    --space-unit: 8px;

    /* === ANIMATIONS === */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

html, body {
    height: 100%;
    background-color: var(--void-bg);
    background: radial-gradient(circle at 50% 0%, #1a241a, var(--void-bg)); /* Canopy light effect */
    color: var(--text-bone);
    font-family: var(--font-tech);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    scrollbar-color: var(--gold-primary) var(--void-bg);
    scrollbar-width: thin;
}

/* === RESET & BASE === */
* { box-sizing: border-box; outline: none; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* === UTILS === */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === LAYOUT === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR (Monolith) */
.monolith-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(20, 26, 20, 0.8); /* Semi-transparent moss */
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-subtle);
    padding: 30px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.5s var(--ease-in-out);
    overflow-y: auto; /* Enable scroll for smaller heights */
}

/* Custom Scrollbar for Sidebar */
.monolith-sidebar::-webkit-scrollbar {
    width: 4px;
}
.monolith-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.monolith-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 2px;
}

.logo-area {
    margin-bottom: 40px;
    text-align: center;
}
.logo-mark {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--spore-neon));
}

/* === USER CARD STYLING (SUBLIMED) === */
.user-summary {
    text-align: center;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 0; /* Brutalist - No Radius */
    margin-bottom: 30px;
    position: relative;
    /* overflow: hidden; REMOVED to prevent clipping of corners/content */
    background: var(--void-surface);
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Decorative Corners */
.user-summary::before, .user-summary::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    z-index: 5;
}
.user-summary::before {
    top: -1px; left: -1px;
    border-top-color: var(--border-strong);
    border-left-color: var(--border-strong);
}
.user-summary::after {
    bottom: -1px; right: -1px;
    border-bottom-color: var(--border-strong);
    border-right-color: var(--border-strong);
}

/* Card Header Background */
.user-summary-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    padding: 25px 15px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

/* Subtle Grid Texture Overlay on Header */
.user-summary-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.1;
    pointer-events: none;
}

/* Tier Label (Badge) */
.tier-badge {
    display: inline-block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 4px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 0; /* Square for brutalist feel */
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-ash);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Card Content Body */
.user-summary-body {
    padding: 20px 15px 30px; /* Increased bottom padding */
    background: linear-gradient(0deg, rgba(0,0,0,0.2), transparent);
}

/* Data Row */
.user-data-row {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.data-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.data-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold-primary);
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.data-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-ash);
    margin-top: 6px;
    opacity: 0.7;
}

/* Mini Progress Bar in Card */
.mini-progress-container {
    margin-top: 20px;
    width: 100%;
}
.mini-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}
.mini-progress-fill {
    height: 100%;
    background: var(--gold-primary);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--gold-glow);
    position: relative;
}
/* Shimmer effect on bar */
.mini-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.mini-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--text-ash);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* TIER 1: SPORE (Organic/Green) */
.user-summary[data-rank-tier="1"] {
    border-color: var(--spore-green);
}
.user-summary[data-rank-tier="1"] .tier-badge {
    border-color: var(--spore-green);
    color: var(--spore-green);
    box-shadow: 0 0 8px rgba(143, 188, 143, 0.2);
}
.user-summary[data-rank-tier="1"] .user-avatar {
    border-color: var(--spore-green);
    box-shadow: 0 0 15px rgba(143, 188, 143, 0.3), inset 0 0 10px rgba(143, 188, 143, 0.1);
}
.user-summary[data-rank-tier="1"]::before { border-top-color: var(--spore-green); border-left-color: var(--spore-green); }
.user-summary[data-rank-tier="1"]::after { border-bottom-color: var(--spore-green); border-right-color: var(--spore-green); }

/* TIER 2: ADEPT (Gold/Structure) */
.user-summary[data-rank-tier="2"] {
    border-color: var(--gold-primary);
}
.user-summary[data-rank-tier="2"] .tier-badge {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}
.user-summary[data-rank-tier="2"] .user-avatar {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px var(--gold-glow), inset 0 0 10px rgba(212, 175, 55, 0.2);
}
.user-summary[data-rank-tier="2"]::before { border-top-color: var(--gold-primary); border-left-color: var(--gold-primary); }
.user-summary[data-rank-tier="2"]::after { border-bottom-color: var(--gold-primary); border-right-color: var(--gold-primary); }

/* TIER 3: MASTER (Cosmic/Void) */
.user-summary[data-rank-tier="3"] {
    border-color: #9d4eff;
    background: linear-gradient(160deg, #120820 0%, #050505 100%);
}
.user-summary[data-rank-tier="3"] .tier-badge {
    border-color: #9d4eff;
    color: #e0b0ff;
    background: rgba(157, 78, 255, 0.1);
    box-shadow: 0 0 15px rgba(157, 78, 255, 0.3);
}
.user-summary[data-rank-tier="3"] .user-avatar {
    border-color: #9d4eff;
    box-shadow: 0 0 25px rgba(157, 78, 255, 0.5), inset 0 0 15px rgba(157, 78, 255, 0.2);
}
.user-summary[data-rank-tier="3"] .user-name {
    color: #e0b0ff;
    text-shadow: 0 0 8px rgba(157, 78, 255, 0.6);
}
.user-summary[data-rank-tier="3"]::before { border-top-color: #9d4eff; border-left-color: #9d4eff; }
.user-summary[data-rank-tier="3"]::after { border-bottom-color: #9d4eff; border-right-color: #9d4eff; }

.user-avatar {
    width: 86px;
    height: 86px;
    margin: 0 auto 12px;
    background: var(--void-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}
/* Avatar Inner Ring */
.user-avatar::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
}

.user-name {
    font-family: var(--font-sacred);
    font-size: 1.5rem;
    color: var(--text-bone);
    position: relative;
    z-index: 2;
    margin-bottom: 4px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.user-rank {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-ash);
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animations */
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 10px rgba(143, 188, 143, 0.2); }
    50% { box-shadow: 0 0 20px rgba(143, 188, 143, 0.5); }
}
@keyframes shine-gold {
    0%, 100% { box-shadow: 0 0 15px var(--gold-glow); border-color: var(--gold-primary); }
    50% { box-shadow: 0 0 25px rgba(230, 194, 94, 0.6); border-color: #fff; }
}
@keyframes pulse-cosmic {
    0% { box-shadow: 0 0 15px rgba(157, 78, 255, 0.4); transform: scale(1); }
    100% { box-shadow: 0 0 30px rgba(157, 78, 255, 0.8); transform: scale(1.05); }
}
@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nav-link {
    text-align: left;
    padding: 12px 15px;
    color: var(--text-ash);
    transition: all 0.3s;
    border-radius: 4px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-link:hover {
    color: var(--text-bone);
    background: rgba(255,255,255,0.02);
}
.nav-link.active {
    color: var(--gold-primary);
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
}

/* CONTENT */
.monolith-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    transition: margin 0.5s var(--ease-in-out);
}

/* === COMPONENTS === */

/* SLAB (Card replacement) */
.slab {
    background: rgba(20, 26, 20, 0.6);
    border: 1px solid var(--border-subtle);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    backdrop-filter: blur(5px);
}
.slab::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* BUTTONS */
.btn-monolith {
    background: var(--void-surface);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 10px 20px;
    font-family: var(--font-tech);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-monolith:hover {
    background: var(--gold-primary);
    color: var(--void-bg);
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-bone);
    padding: 10px 20px;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 4px;
}
.btn-ghost:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* SECTION HEADER */
.section-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.section-title {
    font-family: var(--font-sacred);
    font-size: 2.5rem;
    margin: 0;
    color: var(--gold-primary);
}
.section-subtitle {
    color: var(--text-ash);
    font-style: italic;
    margin-top: 10px;
}

/* MAP PLACEHOLDER */
.map-frame {
    width: 100%;
    height: 300px;
    background: var(--void-bg);
    border: 1px solid var(--border-strong);
    position: relative;
    overflow: hidden;
}

/* PROGRESS BAR */
.progress-monolith {
    height: 10px;
    background: var(--void-bg);
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gold-primary);
    width: 0%;
    transition: width 1s var(--ease-out);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* ORACLE NOTIFICATION */
.oracle-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    color: var(--gold-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.oracle-btn:hover {
    transform: scale(1.1);
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}
.oracle-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--rust-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--border-strong);
}
.status-badge.done { color: var(--spore-neon); border-color: var(--spore-neon); }
.status-badge.pending { color: var(--gold-primary); border-color: var(--gold-primary); }

/* === LEADERBOARD (The Colony) === */
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
}
.leaderboard-row:last-child {
    border-bottom: none;
}
.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.leaderboard-row.highlight {
    background: rgba(230, 194, 94, 0.05); /* Gold dim */
    border-left: 2px solid var(--gold-primary);
}

.lb-rank {
    font-family: var(--font-sacred);
    font-size: 1.2rem;
    color: var(--text-ash);
    width: 50px;
    text-align: center;
}
.lb-user {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.lb-user .name {
    color: var(--text-bone);
    font-size: 1rem;
}
.lb-user .rank-title {
    color: var(--text-ash);
    font-size: 0.8rem;
    font-style: italic;
}
.lb-points {
    font-family: var(--font-tech);
    color: var(--gold-primary);
    font-weight: 500;
}

/* === RITES & BADGES (REFORGED v3.3) === */

.rites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding-bottom: 40px;
}

/* Rite Card */
.rite-card {
    /* Override Slab Margins for Grid */
    margin-bottom: 0 !important;
    
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    position: relative;
    transition: all 0.4s var(--ease-out);
    
    /* Base Style */
    background: rgba(20, 26, 20, 0.8);
    border: 1px solid var(--border-subtle);
    padding: 25px;
    border-radius: 4px; /* Brutalist slight radius */
}

.rite-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border-color: var(--gold-primary);
    z-index: 10;
    background: rgba(20, 26, 20, 0.95);
}

/* Status Variations */
.rite-card.completed {
    border: 1px solid var(--spore-green);
    background: linear-gradient(160deg, rgba(20, 26, 20, 0.9), rgba(143, 188, 143, 0.15));
    box-shadow: 0 0 15px rgba(143, 188, 143, 0.1);
}
.rite-card.completed .rite-icon {
    filter: drop-shadow(0 0 15px var(--spore-green));
    transform: scale(1.1);
}

.rite-card.pending {
    border: 1px dashed var(--gold-primary);
    background: linear-gradient(160deg, rgba(20, 26, 20, 0.9), rgba(230, 194, 94, 0.1));
}

/* Content Elements */
.rite-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rite-card:hover .rite-icon {
    transform: scale(1.1) rotate(5deg);
}

.rite-content h4 {
    font-family: var(--font-sacred);
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: var(--text-bone);
    line-height: 1.2;
    text-align: center;
}

.rite-content p {
    text-align: center;
    color: var(--text-ash);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.rite-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--text-ash);
    width: 100%;
}

.badge-category {
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.rite-footer {
    margin-top: 20px;
    width: 100%;
}

.action-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}
.action-row > * {
    flex: 1;
}

/* Badges System */
.badge-row, .badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
    justify-content: flex-start;
}

.badge-item {
    width: 80px;
    height: 80px;
    background: var(--void-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: help;
    user-select: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.badge-item .badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.badge-item.unlocked {
    border: 1px solid var(--gold-primary);
    background: radial-gradient(circle at 50% 50%, var(--void-surface), var(--void-bg));
    box-shadow: 0 0 15px var(--gold-dim);
}
.badge-item.unlocked:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 25px var(--gold-glow);
    border-color: #fff;
    z-index: 100;
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
    border: 1px dashed var(--border-strong);
    background: rgba(0,0,0,0.3);
}

.lock-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 1rem;
    background: var(--void-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.8);
    color: var(--text-ash);
    z-index: 5;
}

/* === ASCENSION SYSTEM (TIER/RANK VIEW) === */

.ascension-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

/* Tier Section */
.tier-section {
    position: relative;
    padding: 20px;
    background: rgba(20, 26, 20, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tier-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-subtle);
    transition: all 0.3s ease;
}

.tier-section.active {
    background: rgba(20, 26, 20, 0.8);
    border-color: var(--gold-dim);
}
.tier-section.active::before {
    background: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

.tier-section.completed {
    border-color: var(--moss-highlight);
}
.tier-section.completed::before {
    background: var(--moss-highlight);
}

.tier-section.locked {
    opacity: 0.6;
    filter: grayscale(0.8);
}

/* Tier Header */
.tier-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.tier-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tier-name {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--text-main);
    letter-spacing: 0.1em;
    margin: 0;
}
.tier-section.active .tier-name {
    color: var(--gold-primary);
    text-shadow: 0 0 10px var(--gold-glow);
}

.tier-status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-ash);
    border: 1px solid var(--border-subtle);
    padding: 4px 8px;
    border-radius: 4px;
}

.tier-desc {
    color: var(--text-ash);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Ranks List */
.tier-ranks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Rank Step */
.rank-step {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--void-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    gap: 20px;
    transition: all 0.3s ease;
}

.rank-step.current {
    border-color: var(--gold-primary);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

.rank-step.completed {
    border-color: var(--moss-dark);
    opacity: 0.8;
}

.rank-step.locked {
    opacity: 0.5;
    background: rgba(0,0,0,0.2);
    border-style: dashed;
}

/* Rank Columns */
.rank-left {
    flex-shrink: 0;
}

.rank-icon {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rank-step.current .rank-icon {
    filter: drop-shadow(0 0 5px var(--gold-primary));
}

.rank-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rank-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}
.rank-step.current .rank-name {
    color: var(--gold-primary);
}

.rank-desc {
    font-size: 0.8rem;
    color: var(--text-ash);
}

.rank-right {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.rank-threshold {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-ash);
}

.current-badge {
    font-size: 0.65rem;
    background: var(--gold-primary);
    color: #000;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.done-badge {
    color: var(--moss-highlight);
    font-size: 1.2rem;
}

/* Mobile Adjustments for Ascension */
@media (max-width: 600px) {
    .rank-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .rank-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border-subtle);
        padding-top: 10px;
        margin-top: 5px;
    }
}

/* --------------------------------------------------------------------------
   7. MOBILE & RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .monolith-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        transform: none !important;
    }

    .monolith-content {
        margin-left: 0 !important;
        padding: 30px 20px;
    }

    .app-layout {
        flex-direction: column;
    }

    .nav-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .nav-link {
        white-space: nowrap;
        font-size: 1rem;
    }
}

/* --------------------------------------------------------------------------
   8. UTILITY CLASSES (Legacy Support/New)
   -------------------------------------------------------------------------- */
.glass-panel { /* Mapping legacy to new slab */
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    padding: 30px;
    margin-bottom: 30px;
}
.text-gold { color: var(--gold-primary); }
.text-ash { color: var(--text-ash); }
.text-center { text-align: center; }

/* === FIXES & TWEAKS === */

/* Fix: File Upload Button Overflow */
.action-row {
    min-width: 0; /* Allow flex children to shrink */
}

.file-upload-btn {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%; /* Prevent growing beyond parent */
    display: flex !important; /* Force flex to center content properly and handle overflow */
    align-items: center;
    justify-content: center;
}

.file-upload-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}

/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay .slab {
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 1px solid var(--gold-dim);
}

/* === ADMIN SIDEBAR === */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-tab {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-ash);
    padding: 15px 20px;
    text-align: left;
    font-family: var(--font-sacred);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.nav-tab:hover {
    color: var(--text-bone);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-subtle);
    padding-left: 25px; /* Slight movement */
}

.nav-tab.active {
    color: var(--gold-primary);
    background: linear-gradient(90deg, rgba(230, 194, 94, 0.1), transparent);
    border-left: 3px solid var(--gold-primary);
    border-right: none;
    border-top: 1px solid var(--gold-dim);
    border-bottom: 1px solid var(--gold-dim);
}

.nav-tab .icon {
    font-size: 1.2rem;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.3s;
}

.nav-tab:hover .icon,
.nav-tab.active .icon {
    opacity: 1;
    filter: grayscale(0%);
    text-shadow: 0 0 10px var(--gold-dim);
}

.nav-separator {
    height: 1px;
    background: var(--border-subtle);
    margin: 10px 20px;
    opacity: 0.5;
}

/* === LANDING / AUTH PAGE === */
.landing-layout {
    width: 100%;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.landing-header h1 {
    font-family: var(--font-sacred);
    font-size: 4rem;
    color: var(--text-bone);
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    letter-spacing: 0.1em;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.text-muted {
    text-align: center;
    opacity: 0.6;
}

/* INPUTS */
.input-void {
    display: block;
    width: 100%;
    box-sizing: border-box; /* Crucial for padding */
    background: rgba(10, 10, 10, 0.6) !important; /* Darker, more visible */
    border: 1px solid var(--border-strong) !important;
    border-bottom: 2px solid var(--border-strong) !important; /* Heavier bottom */
    color: var(--gold-primary) !important;
    padding: 15px !important;
    margin-bottom: 15px;
    font-family: var(--font-tech);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 0 !important; /* Force brutalist */
    outline: none;
    text-align: center; /* Center text input for style */
}

.input-void:focus {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3) !important;
    transform: scale(1.02); /* Subtle pop */
}

.input-void::placeholder {
    color: var(--text-ash);
    opacity: 0.5;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
}

.landing-footer {
    margin-top: 40px;
    color: var(--text-ash);
    font-size: 0.8rem;
    opacity: 0.5;
    text-align: center;
}
