/* =========================================================
   LIFFY OPS — shared admin design system
   Used by: admin.html, admin-users.html,
            admin-user-details.html, admin-withdrawals.html
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root{
    /* ---- surfaces ---- */
    --lf-ink:        #12131a;   /* rail / high-contrast text */
    --lf-ink-soft:    #23242e;
    --lf-paper:      #f6f5f1;   /* main canvas */
    --lf-panel:      #ffffff;   /* cards */
    --lf-line:       #e6e3db;

    /* ---- text ---- */
    --lf-text:       #16161d;
    --lf-muted:      #726f66;
    --lf-on-ink:      #f2f1ec;
    --lf-on-ink-muted:#9b9a9c;

    /* ---- brand / signal ---- */
    --lf-signal:      #ffb100;  /* amber — the "spark" */
    --lf-signal-ink:  #3a2600;
    --lf-volt:        #5b4eff;  /* violet — the "hack" */
    --lf-volt-soft:   #eeecff;

    /* ---- status ---- */
    --lf-success:      #1d9a6c;
    --lf-success-bg:   #e6f6ef;
    --lf-danger:       #e24c4b;
    --lf-danger-bg:    #fdebea;
    --lf-warning:      #b8790a;
    --lf-warning-bg:   #fdf1dc;

    --lf-radius:      14px;
    --lf-radius-sm:   9px;
    --lf-shadow:      0 1px 2px rgba(18,19,26,.04), 0 8px 24px rgba(18,19,26,.06);
    --lf-shadow-lg:   0 20px 45px rgba(18,19,26,.16);

    --lf-font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
    --lf-font-body:     'Inter', Arial, Helvetica, sans-serif;
}

/* =========================================================
   RESET-ISH
========================================================= */

.lf-app *{ box-sizing: border-box; }

.lf-app{
    font-family: var(--lf-font-body);
    background: var(--lf-paper);
    color: var(--lf-text);
    min-height: 100vh;
}

.lf-app h1, .lf-app h2, .lf-app h3{
    font-family: var(--lf-font-display);
    letter-spacing: -0.01em;
    margin: 0;
}

/* =========================================================
   SHELL LAYOUT
========================================================= */

.lf-shell{
    display: flex;
    min-height: 100vh;
}

/* ---- sidebar (the signature element) ---- */

.lf-rail{
    width: 244px;
    flex-shrink: 0;
    background: var(--lf-ink);
    color: var(--lf-on-ink);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.lf-rail-brand{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 22px 8px;
}

.lf-rail-mark{
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--lf-signal);
    color: var(--lf-signal-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--lf-font-display);
    font-weight: 700;
    font-size: 17px;
    flex-shrink: 0;
}

.lf-rail-brand strong{
    display: block;
    font-family: var(--lf-font-display);
    font-size: 16px;
    letter-spacing: 0.02em;
}

.lf-rail-brand span{
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--lf-on-ink-muted);
    text-transform: uppercase;
}

.lf-nav{
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.lf-nav a{
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--lf-radius-sm);
    color: var(--lf-on-ink-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: background .15s ease, color .15s ease;
}

.lf-nav a:hover{
    background: rgba(255,255,255,.06);
    color: var(--lf-on-ink);
}

.lf-nav a.active{
    background: rgba(255,177,0,.12);
    color: var(--lf-on-ink);
}

.lf-nav a.active::before{
    content:"";
    position:absolute;
    left:-16px;
    top:8px;
    bottom:8px;
    width:3px;
    border-radius:2px;
    background: var(--lf-signal);
}

.lf-nav-icon{
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.lf-nav-badge{
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--lf-signal);
    color: var(--lf-signal-ink);
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.lf-nav-badge.show{ display: inline-flex; }

.lf-rail-footer{
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--lf-on-ink-muted);
}

.lf-pulse-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lf-success);
    position: relative;
    flex-shrink: 0;
}

.lf-pulse-dot::after{
    content:"";
    position:absolute;
    inset:-4px;
    border-radius:50%;
    border: 1.5px solid var(--lf-success);
    animation: lf-pulse 2s ease-out infinite;
}

@keyframes lf-pulse{
    0%{ transform: scale(.6); opacity: .9; }
    100%{ transform: scale(1.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
    .lf-pulse-dot::after{ animation: none; }
}

/* ---- mobile topbar ---- */

.lf-topbar{
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--lf-ink);
    color: var(--lf-on-ink);
    position: sticky;
    top: 0;
    z-index: 30;
}

.lf-topbar-toggle{
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: var(--lf-on-ink);
    font-size: 16px;
    cursor: pointer;
}

.lf-topbar strong{ font-family: var(--lf-font-display); font-size: 15px; }

.lf-rail-backdrop{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,14,.5);
    z-index: 35;
}

@media (max-width: 880px){

    .lf-topbar{ display: flex; }

    .lf-rail{
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: var(--lf-shadow-lg);
    }

    .lf-rail.is-open{ transform: translateX(0); }

    .lf-rail-backdrop.is-open{ display: block; }
}

/* ---- main content ---- */

.lf-main{
    flex: 1;
    min-width: 0;
    padding: 30px clamp(16px, 4vw, 40px) 60px;
}

.lf-page-head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.lf-eyebrow{
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--lf-volt);
    margin-bottom: 6px;
}

.lf-page-head h1{
    font-size: 26px;
    font-weight: 700;
}

.lf-page-head p{
    margin: 6px 0 0;
    color: var(--lf-muted);
    font-size: 14px;
    max-width: 56ch;
}

/* =========================================================
   SHARED COMPONENTS
========================================================= */

.lf-card{
    background: var(--lf-panel);
    border: 1px solid var(--lf-line);
    border-radius: var(--lf-radius);
    box-shadow: var(--lf-shadow);
}

.lf-btn{
    font-family: var(--lf-font-body);
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--lf-radius-sm);
    border: 1px solid transparent;
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform .1s ease, filter .15s ease, background .15s ease;
}

.lf-btn:active{ transform: translateY(1px); }

.lf-btn-primary{ background: var(--lf-ink); color: var(--lf-on-ink); }
.lf-btn-primary:hover{ filter: brightness(1.15); }

.lf-btn-signal{ background: var(--lf-signal); color: var(--lf-signal-ink); }
.lf-btn-signal:hover{ filter: brightness(1.06); }

.lf-btn-ghost{ background: transparent; border-color: var(--lf-line); color: var(--lf-text); }
.lf-btn-ghost:hover{ background: var(--lf-paper); }

.lf-btn-success{ background: var(--lf-success); color: #fff; }
.lf-btn-success:hover{ filter: brightness(1.08); }

.lf-btn-danger{ background: var(--lf-danger); color: #fff; }
.lf-btn-danger:hover{ filter: brightness(1.08); }

.lf-btn:disabled{ opacity: .5; cursor: not-allowed; transform: none; }

.lf-pill{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}

.lf-pill.pending{ background: var(--lf-warning-bg); color: var(--lf-warning); }
.lf-pill.approved{ background: var(--lf-success-bg); color: var(--lf-success); }
.lf-pill.rejected{ background: var(--lf-danger-bg); color: var(--lf-danger); }

/* =========================================================
   MODAL (replaces window.confirm / alert)
========================================================= */

.lf-modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(18,19,26,.46);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.lf-modal-overlay.is-open{
    opacity: 1;
    pointer-events: auto;
}

.lf-modal{
    background: var(--lf-panel);
    border-radius: var(--lf-radius);
    box-shadow: var(--lf-shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 22px;
    transform: translateY(8px) scale(.98);
    transition: transform .15s ease;
}

.lf-modal-overlay.is-open .lf-modal{
    transform: translateY(0) scale(1);
}

.lf-modal-icon{
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    margin-bottom: 12px;
}

.lf-modal-icon.tone-approve{ background: var(--lf-success-bg); color: var(--lf-success); }
.lf-modal-icon.tone-reject{ background: var(--lf-danger-bg); color: var(--lf-danger); }

.lf-modal h3{ font-size: 17px; margin-bottom: 6px; }
.lf-modal p{ font-size: 13.5px; color: var(--lf-muted); line-height: 1.5; margin: 0 0 18px; }

.lf-modal-actions{
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* =========================================================
   TOAST (replaces bare status <div> banners visually)
========================================================= */

.lf-toast-region{
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 250;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}

.lf-toast{
    background: var(--lf-ink);
    color: var(--lf-on-ink);
    padding: 12px 14px;
    border-radius: var(--lf-radius-sm);
    font-size: 13.5px;
    box-shadow: var(--lf-shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: lf-toast-in .18s ease;
}

.lf-toast.error{ background: var(--lf-danger); }
.lf-toast.success{ background: var(--lf-success); }

@keyframes lf-toast-in{
    from{ opacity: 0; transform: translateY(-6px); }
    to{ opacity: 1; transform: translateY(0); }
}

/* =========================================================
   FADE OUT (for cards leaving pending list)
========================================================= */

.lf-leaving{
    animation: lf-leave .28s ease forwards;
    pointer-events: none;
}

@keyframes lf-leave{
    to{ opacity: 0; transform: scale(.96) translateY(-4px); max-height: 0; margin: 0; padding: 0; border-width: 0; overflow: hidden; }
}
