/* ═══════════════════════════════════════════════════════
   JURA — MEMBERSHIP TAB
   Dual-state room: unauthorized wall and
   the cinematic post-payment reward sequence.
═══════════════════════════════════════════════════════ */

#membership-apparatus {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    scroll-snap-align: center; 
}

#membership-apparatus.is-member .unauthorized-state  { display: none !important; }
#membership-apparatus:not(.is-member) .authorized-state { display: none !important; }

/* ── Unauthorized Room ── */
.unauthorized-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
}

.unauthorized-title {
    font-family: 'Epilogue', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    letter-spacing: -0.02em;
}

.unauthorized-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 500px;
    line-height: 1.6;
    margin: 0;
}

/* ── Authorized Room (Cinematic Timeline) ── */
.authorized-state {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.m-text-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    gap: 1.4em;
    pointer-events: none;
}

.m-word {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(20px);
    font-family: 'Epilogue', sans-serif;
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 200;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.m-welcome-layer .m-word {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(5rem, 10vw, 9rem);
    font-weight: 300;
    font-style: italic;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(255,255,255,0.2);
}

@keyframes m-arrive {
    0%   { opacity: 0; filter: blur(12px); transform: translateY(20px); }
    100% { opacity: 1; filter: blur(0px);  transform: translateY(0); }
}
@keyframes m-depart {
    0%   { opacity: 1; filter: blur(0px);  transform: scale(1); }
    100% { opacity: 0; filter: blur(12px); transform: scale(0.95); }
}

/* Phase 1 & 2 Cinematic */
.authorized-state.is-playing .m-p1-1 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.0s forwards, m-depart 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards; }
.authorized-state.is-playing .m-p1-2 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards, m-depart 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards; }
.authorized-state.is-playing .m-p1-3 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards, m-depart 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards; }
.authorized-state.is-playing .m-p2-1 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 3.5s forwards, m-depart 0.8s cubic-bezier(0.16, 1, 0.3, 1) 7.5s forwards; }
.authorized-state.is-playing .m-p2-2 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 3.6s forwards, m-depart 0.8s cubic-bezier(0.16, 1, 0.3, 1) 7.5s forwards; }
.authorized-state.is-playing .m-p2-3 { animation: m-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) 4.6s forwards, m-depart 0.8s cubic-bezier(0.16, 1, 0.3, 1) 7.5s forwards; }
.authorized-state.is-playing .m-p2-4 { animation: m-arrive 1.2s cubic-bezier(0.16, 1, 0.3, 1) 4.7s forwards, m-depart 0.8s cubic-bezier(0.16, 1, 0.3, 1) 7.5s forwards; }
.authorized-state.is-playing .m-p3-1 { animation: m-arrive 2.5s cubic-bezier(0.16, 1, 0.3, 1) 8.5s forwards; }

/* ── THE TAB-SWITCH REPLAY FIX (The Checkpoint) ── */
.authorized-state.is-settled .m-text-layer {
    display: none !important;
    animation: none !important;
}
.authorized-state.is-settled .m-dashboard-layer {
    transition: none !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── THE COMMAND CENTER (Dashboard Layer) ── */
.m-dashboard-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* CRITICAL: Anchors content below nav bar */
    align-items: center;
    padding: 120px max(5vw, 4rem) 100px; /* Aligned to accommodate the expanded nav bar */
    box-sizing: border-box;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(30px);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 1.8s;
    overflow-y: auto; 
    
    /* The Native Magnetism Physics */
    scroll-snap-type: y mandatory;
    scroll-padding-top: 120px; /* Protects the nav bar from being overlapped during top-snaps */
    gap: 1.5rem; /* Spaces out the physical snap zones identically to the old grid gap */
}

/* ── DASHBOARD SCROLL MAGNETISM ── */
.m-snap-zone {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.m-snap-zone.snap-center {
    scroll-snap-align: center;
}

.m-snap-zone.snap-top {
    scroll-snap-align: start;
}

.authorized-state.show-dashboard .m-dashboard-layer {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear;
}

/* Kills the watermark completely */
.authorized-state.show-dashboard .m-welcome-layer {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -60%) scale(0.9);
    transition: opacity 2.5s ease, transform 2.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 2.5s;
}

/* ── TIER 1: IDENTITY ── */
.m-dash-identity {
    text-align: left;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.m-user-name {
    font-family: 'Epilogue', sans-serif;
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 200;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.m-user-standing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(162, 185, 231, 0.8);
}

/* ── TIER 2 & 3: THE GRID ── */
.m-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
}

.col-span-2 { grid-column: span 2; }
.m-flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-auto { margin-top: auto; }

.m-dash-card {
    /* The Volumetric Wash: Tracks the light-x and light-y coordinates */
    background: radial-gradient(800px circle at var(--light-x, 50%) var(--light-y, -20%), var(--light-color, rgba(255, 255, 255, 0.05)), transparent 40%), rgba(10, 18, 35, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(162, 185, 231, 0.10);
    padding: 1.8rem;
    text-align: left;
    position: relative;
    border-radius: 4px;
    /* The Specular Glint: Multiplies the directional vector by physical glass thickness */
    box-shadow: inset calc(var(--light-dir-x, 0) * -1.5px) calc(var(--light-dir-y, 0) * -1.5px) 1px rgba(255, 255, 255, 0.12);
}

.m-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
}

.m-card-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(162, 185, 231, 0.5);
}

/* Linked Emails */
.m-seat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.m-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.m-seat-item:last-child { border-bottom: none; }

.m-seat-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.m-seat-email {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    font-size: 0.9rem;
}

.m-seat-email.text-muted { color: rgba(255, 255, 255, 0.4); font-style: italic; }

.m-seat-role {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(162, 185, 231, 0.5);
}

.m-status-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A2B9E7;
    background: rgba(162, 185, 231, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

/* Management Drawer */
.m-manage-toggle {
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(162, 185, 231, 0.5);
    cursor: pointer;
    transition: color 0.3s ease;
    width: 100%;
    margin-top: auto; /* Physically anchors the toggle to the bottom of the card */
}
.m-manage-toggle:hover { color: #ffffff; }

.m-manage-expansion {
    max-height: 0; /* Changed from height to max-height for fluid expansion */
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.4s ease;
}

.m-manage-expansion.is-open {
    max-height: 600px; /* Provides a massive ceiling so expanding the ledger never clips the buttons */
    opacity: 1;
    margin-bottom: 1.5rem;
}

.m-manage-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.m-ghost-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.45); /* Darkened to simulate depth */
    border: 1px solid rgba(162, 185, 231, 0.15); /* Subdued border */
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 1rem; /* Increased padding for internal breathing room */
    outline: none;
    resize: none; /* The mechanical lock: physically prevents user distortion */
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6); /* Carves the element into the glass */
}
.m-ghost-input:focus { border-color: #A2B9E7; }

.m-icon-btn {
    background: rgba(162, 185, 231, 0.1);
    border: none;
    color: #A2B9E7;
    padding: 0 1rem;
    cursor: pointer;
}

.m-manage-action-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}
.m-manage-action-btn:hover { background: rgba(255, 255, 255, 0.08); }
.text-danger { color: #F87171 !important; }

/* Teams */
.m-text-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #A2B9E7;
    cursor: pointer;
    padding: 0;
}
.m-text-btn:hover { color: #ffffff; }

.m-team-tabs {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.m-team-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0 0 0.5rem 0;
    cursor: pointer;
    position: relative;
}
.m-team-tab.is-active { color: #ffffff; }
.m-team-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #A2B9E7;
}

.m-team-members {
    display: flex;
    flex-direction: column;
}

.m-team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.m-member-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.m-remove-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}
.m-remove-btn:hover { color: #F87171; }

/* Efficiency SVG Graph */
.m-hero-metric {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.m-metric-num {
    font-family: 'Epilogue', sans-serif;
    font-size: clamp(3rem, 4vw, 4rem);
    font-weight: 200;
    color: #ffffff;
    line-height: 1;
}
.m-metric-unit {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(162, 185, 231, 0.8);
}
.m-metric-context {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}
.m-graph-card {
    background: linear-gradient(to bottom, rgba(10, 18, 35, 0.4), rgba(5, 9, 18, 0.6));
    min-height: 250px;
}
.m-svg-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 1;
}

.m-info-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 300px; 
    padding: 1.2rem 1.5rem;
    /* The Volumetric Wash: Scaled down to 400px to match the smaller geometry */
    background: radial-gradient(400px circle at var(--light-x, 50%) var(--light-y, -20%), var(--light-color, rgba(255, 255, 255, 0.05)), transparent 60%), rgba(5, 9, 18, 0.98);
    border: 1px solid rgba(162, 185, 231, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif; 
    font-size: 0.85rem; 
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 4px;
    /* The Specular Glint combined with the ambient drop shadow */
    box-shadow: inset calc(var(--light-dir-x, 0) * -1.5px) calc(var(--light-dir-y, 0) * -1.5px) 1px rgba(255, 255, 255, 0.1), 0 10px 40px rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

/* ── Spatial Awareness: Downward Flip ── */
.m-info-tooltip.is-flipped {
    bottom: auto;
    top: 150%;
    transform: translateX(-50%) translateY(-10px);
}

.m-info-trigger:hover .m-info-tooltip,
.m-info-trigger.is-active .m-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.m-info-trigger:hover .m-info-tooltip.is-flipped,
.m-info-trigger.is-active .m-info-tooltip.is-flipped {
    transform: translateX(-50%) translateY(0);
}

.m-info-tooltip strong {
    color: #A2B9E7;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* ── Tooltip Pagination Tabs ── */
.tooltip-panes {
    position: relative;
    min-height: 90px;
}

.tooltip-pane {
    display: none;
    animation: tooltip-fade 0.3s ease;
}

.tooltip-pane.is-active {
    display: block;
}

@keyframes tooltip-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tooltip-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(162, 185, 231, 0.15);
}

.t-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(162, 185, 231, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.t-dot:hover { border-color: #ffffff; }
.t-dot.is-active { background: #A2B9E7; border-color: #A2B9E7; }

/* ── TIER 4: RADAR CHART & FEEDBACK PORTAL ── */

.m-radar-body {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.m-radar-svg-wrap {
    flex: 0 0 auto;
    width: min(500px, 55%);
}

.m-radar-svg-wrap svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.m-radar-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10;
}

.m-radar-legend-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem;
    border: 1px solid rgba(162, 185, 231, 0.06);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: default;
    border-radius: 2px;
}

.m-radar-legend-item.is-hovered {
    border-color: rgba(162, 185, 231, 0.25);
    background: rgba(162, 185, 231, 0.05);
}

.m-radar-legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-radar-legend-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(162, 185, 231, 0.6);
    transition: color 0.3s ease;
}

.m-radar-legend-item.is-hovered .m-radar-legend-name { color: #A2B9E7; }

.m-radar-legend-pct {
    font-family: 'Epilogue', sans-serif;
    font-size: 1.1rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.m-radar-legend-item.is-hovered .m-radar-legend-pct { color: #ffffff; }

.m-radar-bar-track {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    margin-top: 0.4rem;
}

.m-radar-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(162, 185, 231, 0.4);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s, background 0.3s ease;
}

.m-radar-legend-item.is-hovered .m-radar-bar-fill { background: #A2B9E7; }

/* The Feedback Trigger Button */
.m-feedback-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #C4B5D4;
    background: rgba(196, 181, 212, 0.1);
    border: 1px solid rgba(196, 181, 212, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.m-feedback-btn:hover {
    background: rgba(196, 181, 212, 0.25);
    color: #ffffff;
    border-color: #C4B5D4;
}

/* The Ephemeral Portal Overlay */
.m-ephemeral-portal {
    position: absolute;
    inset: 0;
    background: rgba(5, 9, 18, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.m-ephemeral-portal.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.m-ephemeral-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

@media (max-width: 800px) {
    .m-radar-body { flex-direction: column; }
    .m-radar-svg-wrap { width: 100%; }
}

/* ── FINANCIAL LEDGER ── */
.m-ledger-container {
    margin: 1.2rem 0 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.m-ledger-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 185px; 
    overflow: hidden; 
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    /* Paints the bottom 35% of the clamped list into a transparent fade */
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

.m-ledger-list.is-expanded {
    max-height: 800px; 
    /* Pulls the fade down to the absolute bottom so all rows are visible when open */
    -webkit-mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
}

.m-ledger-row {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr 1fr;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.m-ledger-row:hover {
    background: rgba(162, 185, 231, 0.08);
}

.m-ledger-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.m-ledger-ref {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    color: rgba(162, 185, 231, 0.8);
    letter-spacing: 0.05em;
}

.m-ledger-amount {
    font-family: 'Epilogue', sans-serif;
    font-size: 0.85rem;
    color: #ffffff;
    text-align: right;
}

.m-ledger-download {
    background: none;
    border: none;
    color: rgba(162, 185, 231, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
    transition: color 0.3s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.m-ledger-download svg {
    width: 14px;
    height: 14px;
}

/* Hover Physics: Icon illuminates and slightly drops to indicate download */
.m-ledger-row:hover .m-ledger-download {
    color: #ffffff;
}

.m-ledger-download:hover {
    transform: translateY(2px);
}

/* ── GLOBAL DESTRUCTIVE MODAL ── */
.m-global-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 9, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.m-global-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.m-modal-box {
    background: rgba(10, 18, 35, 0.95);
    border: 1px solid rgba(248, 113, 113, 0.2);
    padding: 2.5rem;
    border-radius: 4px;
    max-width: 480px;
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.m-global-modal.is-active .m-modal-box {
    transform: scale(1) translateY(0);
}

.m-modal-title {
    font-family: 'Epilogue', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.m-modal-warning {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.m-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ── PROGRESSIVE REVOCATION ACCORDION ── */
.m-revoke-expansion {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding-top 0.3s ease;
}

.m-revoke-expansion.is-open {
    max-height: 120px;
    opacity: 1;
    padding-top: 0.2rem;
}