/* ============================================================
   AVELIOTECH Portal UI — landing design system for app pages
   Quicksand · violet #4F23D9 · rose→violet gradient · lavender/cream
   Reusable .lx-* components. Loaded on user + auth layouts.
   ============================================================ */

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

:root {
    --lx-canvas: #f7f6fc;
    --lx-surface: #ffffff;
    --lx-cream: #f6f2e6;
    --lx-violet: #4f23d9;
    --lx-violet-deep: #3a179e;
    --lx-violet-ink: #2a1170;
    --lx-rose: #e54362;
    --lx-grad: linear-gradient(119deg, #e54362 0%, #7b2fd0 46%, #4f23d9 100%);
    --lx-grad-soft: linear-gradient(119deg, rgba(229,67,98,0.12), rgba(79,35,217,0.12));
    --lx-ink: #241a3d;
    --lx-ink-soft: #4c4468;
    --lx-muted: #726c88;
    --lx-faint: #a49dbe;
    --lx-line: #e7e3f2;
    --lx-line-strong: #d6d0e6;
    --lx-font: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    --lx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Base: apply landing font/canvas to the user shell ---- */
.user-layout {
    font-family: var(--lx-font) !important;
    background: var(--lx-canvas) !important;
    color: var(--lx-ink);
    letter-spacing: -0.01em;
}
.user-layout .mobile-container { background: transparent !important; }
.user-layout h1, .user-layout h2, .user-layout h3,
.user-layout h4, .user-layout h5, .user-layout h6 {
    font-family: var(--lx-font) !important;
    letter-spacing: -0.03em;
}

/* ============================================================
   Page scaffolding
   ============================================================ */
.lx-page { padding: 1.4rem 1.15rem 2rem; position: relative; }
.lx-aura {
    position: absolute; inset: 0 0 auto 0; height: 320px; z-index: 0; pointer-events: none;
    background:
        radial-gradient(240px 240px at 92% -12%, rgba(229,67,98,0.18), transparent 62%),
        radial-gradient(280px 260px at 4% 8%, rgba(79,35,217,0.14), transparent 62%);
}
.lx-page > * { position: relative; z-index: 1; }

.lx-eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--lx-violet-ink); margin-bottom: 0.75rem;
}
.lx-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--lx-grad); border-radius: 2px; }

.lx-title { font-family: var(--lx-font); font-size: 2rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; color: var(--lx-ink); }
.lx-title--grad {
    background: var(--lx-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lx-sub { color: var(--lx-ink-soft); font-size: 0.98rem; font-weight: 500; margin-top: 0.4rem; }
.lx-section-h { font-family: var(--lx-font); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: var(--lx-ink); margin-bottom: 0.9rem; }

/* ============================================================
   Cards & surfaces
   ============================================================ */
.lx-card {
    background: var(--lx-surface); border: 1.5px solid var(--lx-line); border-radius: 22px;
    padding: 1.3rem; box-shadow: 0 18px 40px -30px rgba(42,17,112,0.4);
}
.lx-card--flush { padding: 0; overflow: hidden; }
.lx-card--grad {
    position: relative; overflow: hidden; isolation: isolate; border: none; color: #fff;
    background: var(--lx-grad); background-size: 150% 150%;
    box-shadow: 0 28px 55px -26px rgba(79,35,217,0.6);
}
.lx-card--grad::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(130% 100% at 88% -10%, rgba(255,255,255,0.4), transparent 55%);
}

/* ============================================================
   Buttons
   ============================================================ */
.lx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: var(--lx-font); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em;
    padding: 0.9rem 1.5rem; border-radius: 100px; border: none; cursor: pointer;
    transition: transform .25s var(--lx-ease), box-shadow .25s, background-position .7s var(--lx-ease), color .25s, border-color .25s;
    text-decoration: none;
}
.lx-btn svg { width: 17px; height: 17px; }
.lx-btn--grad { color: #fff; background: var(--lx-grad); background-size: 160% 160%; box-shadow: 0 14px 30px -12px rgba(79,35,217,0.6); }
.lx-btn--grad:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 20px 40px -14px rgba(79,35,217,0.7); }
.lx-btn--ghost { color: var(--lx-violet-ink); background: var(--lx-surface); box-shadow: inset 0 0 0 1.5px var(--lx-line-strong); }
.lx-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--lx-violet); color: var(--lx-violet); }
.lx-btn--light { color: var(--lx-violet-ink); background: #fff; box-shadow: 0 14px 30px -14px rgba(15,5,45,0.4); }
.lx-btn--light:hover { transform: translateY(-2px); }
.lx-btn--danger { color: #fff; background: #e11d48; box-shadow: 0 14px 30px -14px rgba(225,29,72,0.5); }
.lx-btn--danger:hover { transform: translateY(-2px); background: #be123c; }
.lx-btn--block { width: 100%; }
.lx-btn:active { transform: translateY(0); }

/* ============================================================
   Forms
   ============================================================ */
.lx-field { margin-bottom: 1.1rem; }
.lx-label { display: block; font-family: var(--lx-font); font-weight: 700; font-size: 0.82rem; color: var(--lx-ink-soft); margin-bottom: 0.5rem; letter-spacing: 0.01em; }
.lx-input, .lx-select, .lx-textarea {
    width: 100%; font-family: var(--lx-font); font-weight: 500; font-size: 0.98rem; color: var(--lx-ink);
    background: var(--lx-canvas); border: 1.5px solid var(--lx-line); border-radius: 14px;
    padding: 0.85rem 1rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.lx-input::placeholder, .lx-textarea::placeholder { color: var(--lx-faint); }
.lx-input:focus, .lx-select:focus, .lx-textarea:focus {
    outline: none; border-color: var(--lx-violet); background: #fff;
    box-shadow: 0 0 0 4px rgba(79,35,217,0.1);
}
.lx-input:disabled, .lx-input[readonly] { color: var(--lx-muted); background: #f2f0f8; }
.lx-textarea { resize: vertical; min-height: 110px; }

/* ============================================================
   List rows (numbered / icon menu)
   ============================================================ */
.lx-list { background: var(--lx-surface); border: 1.5px solid var(--lx-line); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px -32px rgba(42,17,112,0.4); }
.lx-row {
    display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left;
    padding: 1rem 1.15rem; background: transparent; border: none; border-top: 1px solid var(--lx-line);
    text-decoration: none; cursor: pointer; transition: background .25s var(--lx-ease);
}
.lx-row:first-child { border-top: none; }
.lx-row:hover { background: var(--lx-grad-soft); }
.lx-row__ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--lx-grad-soft); color: var(--lx-violet); transition: background .25s var(--lx-ease), color .25s; }
.lx-row:hover .lx-row__ico { background: var(--lx-grad); color: #fff; }
.lx-row__ico svg, .lx-row__ico i { width: 20px; height: 20px; }
.lx-row__num { flex-shrink: 0; width: 2rem; font-family: var(--lx-font); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em; background: var(--lx-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lx-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lx-row__label { font-weight: 700; font-size: 0.98rem; color: var(--lx-ink); }
.lx-row__desc { font-size: 0.76rem; font-weight: 600; color: var(--lx-muted); }
.lx-row__go { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--lx-surface); border: 1.5px solid var(--lx-line); color: var(--lx-violet); transition: transform .25s var(--lx-ease), background .25s, color .25s, border-color .25s; }
.lx-row:hover .lx-row__go { background: var(--lx-grad); color: #fff; border-color: transparent; transform: translateX(3px); }
.lx-row__go svg { width: 15px; height: 15px; }

/* ============================================================
   Bits: chips, badges, stats, dividers
   ============================================================ */
.lx-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border-radius: 100px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; background: var(--lx-grad-soft); color: var(--lx-violet-ink); }
.lx-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 100px; font-size: 0.7rem; font-weight: 700; }
.lx-badge--ok { background: rgba(22,179,100,0.12); color: #0f8a4d; }
.lx-badge--warn { background: rgba(229,164,67,0.15); color: #b4791a; }
.lx-badge--muted { background: #efedf6; color: var(--lx-muted); }
.lx-stat { position: relative; padding-left: 1rem; }
.lx-stat::before { content: ""; position: absolute; left: 0; top: 0.2rem; bottom: 0.2rem; width: 3px; border-radius: 3px; background: var(--lx-grad); }
.lx-stat__num { font-family: var(--lx-font); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; color: var(--lx-ink); line-height: 1; }
.lx-stat__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lx-muted); margin-top: 0.3rem; }
.lx-grad-text { background: var(--lx-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lx-divider { height: 1px; background: var(--lx-line); border: none; margin: 1.2rem 0; }

/* ============================================================
   Immersive full-bleed hero (shared across account/list pages)
   ============================================================ */
.lx-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 1.7rem 1.35rem 2.4rem; border-radius: 0 0 34px 34px;
    background: var(--lx-grad); background-size: 150% 150%; color: #fff;
    box-shadow: 0 28px 55px -26px rgba(79,35,217,0.6);
    animation: lxIn .6s var(--lx-ease) both;
}
.lx-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(140% 120% at 88% -20%, rgba(255,255,255,0.34), transparent 48%); }
.lx-hero::after { content: ""; position: absolute; width: 190px; height: 190px; right: -60px; bottom: -90px; border-radius: 50%; background: rgba(255,255,255,0.08); z-index: -1; }
.lx-hero__eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.lx-hero__eyebrow::before { content: ""; width: 22px; height: 2px; background: rgba(255,255,255,0.7); border-radius: 2px; }
.lx-hero__title { font-family: var(--lx-font); font-size: 1.95rem; font-weight: 700; letter-spacing: -0.035em; margin-top: 0.5rem; }
.lx-hero__sub { font-size: 0.92rem; font-weight: 500; color: rgba(255,255,255,0.78); margin-top: 0.35rem; }
.lx-hero__btns { display: flex; gap: 0.6rem; margin-top: 1.4rem; }

.lx-body { padding: 0 1.15rem 2rem; }
.lx-overlap { position: relative; z-index: 2; margin-top: -1.5rem; }
.lx-block-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lx-faint); margin: 1.7rem 0.3rem 0.8rem; }

/* ============================================================
   Modals (overlay + card). Toggle with .hidden — the compound
   selector beats .hidden so inline display is never needed.
   ============================================================ */
.lx-modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: rgba(42,17,112,0.55); backdrop-filter: blur(8px);
}
.lx-modal.hidden { display: none; }
.lx-modal__card {
    position: relative; background: #fff; border-radius: 26px; padding: 1.8rem;
    width: 100%; max-width: 24rem; box-shadow: 0 40px 80px -30px rgba(42,17,112,0.6);
}
.lx-modal__card--center { text-align: center; }

/* ---- Bottom sheet (slides up) ---- */
.lx-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(42,17,112,0.55); backdrop-filter: blur(8px); }
.lx-sheet.hidden { display: none; }
.lx-sheet__panel { position: relative; width: 100%; max-width: 428px; max-height: 94vh; overflow-y: auto; background: #fff; border-radius: 30px 30px 0 0; box-shadow: 0 -22px 60px -20px rgba(42,17,112,0.5); animation: lxSheetUp .42s var(--lx-ease) both; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.lx-sheet__handle { position: sticky; top: 0; width: 44px; height: 4px; border-radius: 4px; background: var(--lx-line-strong); margin: 0.7rem auto 0; }
.lx-sheet__pad { padding: 0.8rem 1.4rem 0; }
.lx-sheet__center { text-align: center; padding: 0.4rem 1.4rem 0; }
@keyframes lxSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .lx-sheet__panel { animation: none; } }

/* ============================================================
   Entrance animation
   ============================================================ */
@keyframes lxIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lx-in { animation: lxIn .6s var(--lx-ease) both; }
.lx-in-1 { animation-delay: .06s; } .lx-in-2 { animation-delay: .12s; }
.lx-in-3 { animation-delay: .18s; } .lx-in-4 { animation-delay: .24s; } .lx-in-5 { animation-delay: .30s; }
@media (prefers-reduced-motion: reduce) { .lx-in, .lx-in-1, .lx-in-2, .lx-in-3, .lx-in-4, .lx-in-5 { animation: none; } }
