.auth-wrap,
.user-app {
    min-height: 100vh;
    background: #f4f7fb;
    color: #122033;
    font-family: "Dana FaNum", Tahoma, sans-serif;
}

.auth-wrap {
    display: grid;
    place-items: center;
    padding: 48px 16px;
}

.auth-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 1.25rem;
    padding: 32px 28px;
    box-shadow: 0 16px 40px rgba(11, 31, 75, 0.06);
}

.auth-brand {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-top {
    height: 68px;
    background: #0b1f4b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.user-top a {
    color: #fff;
    text-decoration: none;
}

.user-top-name {
    font-size: 14px;
    font-weight: 700;
}

.user-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 72px;
}

.user-side {
    position: sticky;
    top: 92px;
    height: fit-content;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 1.25rem;
    padding: 16px 12px;
    box-shadow: 0 10px 28px rgba(11, 31, 75, 0.04);
}

.user-who {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px 8px 16px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #e8f1ff;
    color: #1565d8;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: none;
}

.user-who strong {
    display: block;
    font-size: 15px;
}

.user-nav {
    display: grid;
    gap: 4px;
}

.user-nav a,
.user-tabbar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #243044;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.user-nav svg,
.user-tabbar svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.user-nav a.is-active,
.user-nav a:hover,
.user-tabbar a.is-active {
    background: #e8f1ff;
    color: #1565d8;
}

.user-logout {
    width: 100%;
    margin-top: 12px;
    border: 0;
    background: #f4f7fb;
    border-radius: 12px;
    padding: 10px;
    font-family: inherit;
    font-weight: 700;
    color: #5c6b82;
    cursor: pointer;
}

.user-main {
    min-width: 0;
    display: grid;
    gap: 20px;
}

.panel-card,
.trip-card,
.wallet-card,
.note-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 1.25rem;
    box-shadow: 0 10px 28px rgba(11, 31, 75, 0.04);
}

.panel-card {
    padding: 24px;
}

.panel-card h1,
.panel-card h2,
.section-head h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.panel-card h1 {
    font-size: 28px;
}

.lede {
    margin: 8px 0 0;
    color: #5c6b82;
    font-size: 14px;
    line-height: 1.8;
    max-width: 62ch;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.overview-link {
    display: block;
    padding: 16px;
    border-radius: 16px;
    background: #f5f8fc;
    text-decoration: none;
    color: inherit;
}

.overview-link span {
    display: block;
    color: #5c6b82;
    font-size: 13px;
    font-weight: 700;
}

.overview-link strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    color: #0b1f4b;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.trip-filter {
    border: 1px solid #e6ebf2;
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #122033;
}

.trip-list {
    display: grid;
    gap: 14px;
}

.trip-card {
    padding: 18px;
}

.trip-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.trip-ref {
    font-weight: 800;
    color: #0b1f4b;
    text-decoration: none;
    font-size: 16px;
}

.trip-meta {
    margin: 4px 0 0;
    color: #5c6b82;
    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-wait { background: #fff4e5; color: #9a5b00; }
.badge-info { background: #e8f1ff; color: #0d4eae; }
.badge-ok { background: #e8f8ee; color: #1b7a3a; }
.badge-bad { background: #fdf0f1; color: #b42332; }
.badge-mute { background: #eef2f6; color: #526074; }

.wallet-card {
    padding: 24px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(21, 101, 216, 0.16), transparent 55%),
        #0b1f4b;
    color: #fff;
    border-color: transparent;
}

.wallet-card h2,
.wallet-card .lede {
    color: rgba(255, 255, 255, 0.78);
}

.wallet-balance {
    margin: 12px 0 0;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.wallet-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-top: 18px;
}

.wallet-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
}

.wallet-form input {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 180px;
    min-height: 42px;
    background: #fff;
    color: #122033;
    font-family: inherit;
}

.wallet-form button,
.btn-primary {
    border: 0;
    border-radius: 12px;
    background: #1565d8;
    color: #fff;
    padding: 10px 16px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.note-list {
    display: grid;
    gap: 10px;
}

.note-card {
    padding: 14px 16px;
    box-shadow: none;
}

.note-card strong {
    display: block;
    margin-bottom: 4px;
}

.empty-state {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 8px;
    padding: 28px 12px;
    color: #5c6b82;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: #1565d8;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.muted {
    color: #5c6b82;
    font-size: 13px;
    line-height: 1.7;
}

.user-tabbar {
    display: none;
}

.user-app :focus-visible {
    outline: 2px solid #1565d8;
    outline-offset: 2px;
}

.user-app ::selection {
    background: #d6e6ff;
}

@media (max-width: 800px) {
    .user-shell {
        grid-template-columns: 1fr;
        padding: 16px 14px 120px;
        gap: 16px;
    }

    .user-side {
        display: none;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .panel-card h1 {
        font-size: 24px;
    }

    .wallet-balance {
        font-size: 30px;
    }

    .user-tabbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 40;
        background: #fff;
        border-top: 1px solid #e6ebf2;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    }

    .user-tabbar a {
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        padding: 6px 2px;
        font-size: 11px;
    }
}
