@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

:root {
    --bg: #000;
    --surface: #111;
    --surface-alt: #222;
    --surface-hover: #2a2a2a;
    --surface-inset: #333;
    --text: #fff;
    --text-secondary: #aaa;
    --text-muted: #777;
    --accent: #cf720a;
    --border: rgba(255, 255, 255, 0.15);
    --success: #335033;
    --success-hover: #446044;
    --danger: #503333;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-pill: 999px;
}

html, body, #root {
    width: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Rubik", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Utility: Loading */
.loading {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

/* Utility: Empty */
.empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

/* Layout */
.app--has-sidenav .app__main {
    margin-left: 200px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidenav */
.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 200px;
    padding: 20px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--bg);
    box-sizing: border-box;
}

.app__overlay {
    display: none;
}

.sidenav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 0;
}

.sidenav a:hover,
.sidenav a.active {
    color: var(--accent);
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-children {
    display: flex;
    flex-direction: column;
    padding-left: 16px;
}

.nav-children a {
    font-size: 14px;
    padding: 4px 0;
}

.sidenav .logout {
    margin-top: auto;
    background: none;
    border: none;
    color: var(--text);
    padding: 8px 0;
    text-align: left;
    cursor: pointer;
}

.sidenav .logout:hover {
    color: var(--accent);
}

.app__toggle {
    display: none;
}

/* Recent check-ins */
.recent-checkins h1 {
    margin: 0;
}

.recent-checkins__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.recent-checkins__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-checkins__subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.recent-checkins__controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.recent-checkins__search {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    min-width: 220px;
    outline: none;
}

.recent-checkins__search:focus {
    border-color: var(--accent);
}

.recent-checkins__toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
}

.recent-checkins__toggle input {
    accent-color: var(--accent);
}

.recent-checkins__refresh {
    background: var(--accent);
    border: none;
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
}

.recent-checkins__refresh:disabled {
    opacity: 0.7;
    cursor: default;
}

.recent-checkins__meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.recent-checkins__error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ffd1d1;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin: 10px 0;
}

.recent-checkins__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-checkins__row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.recent-checkins__row-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.recent-checkins__row-name {
    font-weight: 650;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.recent-checkins__row-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.recent-checkins__row-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    white-space: nowrap;
}

.badge--ok {
    border-color: rgba(207, 114, 10, 0.45);
}

.badge--muted {
    color: var(--text-secondary);
    border-color: var(--border);
}

.badge--total {
    font-weight: 700;
}

.recent-checkins__empty {
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.dashboard-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 24px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s;
}

.dashboard-card:hover {
    background: var(--surface-hover);
}

/* Inventory Grid & Cards */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.inventory-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
}

.inventory-card:hover {
    background: var(--surface-hover);
}

.inventory-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #fff;
    padding: 12px;
    box-sizing: border-box;
}

.inventory-card .name {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-card .details {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 10px 8px;
}

.inventory-card .storage {
    font-size: 11px;
    color: var(--accent);
    padding: 0 10px 10px;
}

/* Inventory Page (storage browse) */
.inventory-page h1 {
    margin: 0 0 24px;
}

.inventory-page section {
    margin-bottom: 32px;
}

.inventory-page h2 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 12px;
    text-transform: capitalize;
}

/* Item Page */
.item-page {
    max-width: 500px;
    margin: 0 auto;
}

.item-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.item-header img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-sizing: border-box;
}

.item-info {
    cursor: pointer;
    padding: 12px;
}

.item-info h1 {
    font-size: 22px;
    margin: 0 0 4px;
}

.item-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.storage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storage-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.storage-row .count {
    width: 36px;
    height: 36px;
    background: var(--surface-inset);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.storage-row .name {
    flex: 1;
    margin-left: 12px;
    font-size: 16px;
}

.storage-row .add-btn {
    width: 36px;
    height: 36px;
    background: var(--success);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

.storage-row .add-btn:hover {
    background: var(--success-hover);
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup h2 {
    margin: 0 0 8px;
    font-size: 18px;
    text-align: center;
}

.popup label {
    font-size: 13px;
    color: var(--text-secondary);
}

.popup input,
.popup select {
    background: var(--surface-alt);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text);
    font-size: 14px;
}

.popup button {
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
}

.popup .save-btn {
    background: var(--success);
}

.popup .close-btn {
    background: var(--surface-inset);
}

.popup .remove-btn {
    background: var(--danger);
}

.popup .move-btn {
    background: var(--surface-alt);
}

.popup button:hover {
    filter: brightness(1.2);
}

/* History Page */
.inventory-history h1,
.inventory-status h1 {
    margin: 0 0 20px;
}

.history-group h2 {
    font-size: 16px;
    font-weight: 500;
    margin: 24px 0 12px;
    color: var(--text-secondary);
}

.history-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.history-event {
    display: flex;
    flex-direction: row;
    background: var(--surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
}

.history-event:hover {
    background: var(--surface-hover);
}

.history-event img {
    width: 80px;
    height: 100px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
}

.history-event .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
    min-width: 0;
}

.history-event .action {
    font-size: 14px;
    font-weight: 500;
}

.history-event .name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-event .details {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-event .time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Status Page */
.status-category {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.status-category .name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
}

.status-category .bar-container {
    height: 20px;
    background: var(--surface-alt);
    border-radius: 4px;
    overflow: hidden;
}

.status-category .bar {
    height: 100%;
}

.status-category .counts {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Login Page */
.login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 16px;
}

.login h2 {
    margin: 0;
}

.login p {
    margin: 4px 0;
    color: var(--text-secondary);
}

.login .user-info {
    margin-bottom: 16px;
}

.login .btn {
    background: var(--success);
    color: var(--text);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.login .btn:hover {
    background: var(--success-hover);
}

.login .btn.telegram {
    background: #0088cc;
}

.login .btn.telegram:hover {
    background: #0099dd;
}

.login .waiting {
    color: var(--text-muted);
    font-size: 14px;
}

.login .error {
    color: #c00;
}

/* Search Input */
.search-input {
    width: 100%;
    background: var(--surface-alt);
    border: none;
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 20px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    background: var(--surface-hover);
}

/* Member Page */
.member__scanner-notice {
    margin: 20px 20px 0;
    padding: 10px 14px;
    background: var(--surface-hover);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.member {
    padding: 40px 20px;
}

.member dt {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
}

.member dt:first-child {
    margin-top: 0;
}

.member dd {
    font-size: 24px;
    font-weight: 600;
    margin: 4px 0 0 0;
}

/* Event Tickets */
.event-tickets {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.event-ticket {
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 16px;
}

.event-ticket__event-name {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-ticket__name {
    font-size: 20px;
    font-weight: 600;
    margin-top: 4px;
}

.event-ticket__payment {
    font-size: 14px;
    margin-top: 6px;
    color: var(--text-secondary);
}

.event-ticket__scanned-at {
    font-size: 14px;
    margin-top: 4px;
}

/* Toasts */
.toasts {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    pointer-events: auto;
    cursor: pointer;
    max-width: 400px;
    text-align: center;
}

.toast--success {
    background: var(--success);
    color: var(--text);
}

.toast--error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ffd1d1;
}

.toast--info {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text);
}

/* Mobile Responsive */
@media (max-width: 700px) {
    .recent-checkins__controls {
        justify-content: flex-start;
    }

    .recent-checkins__search {
        width: 100%;
        min-width: 0;
    }

    .recent-checkins__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .recent-checkins__row-name {
        max-width: 100%;
    }

    .recent-checkins__row-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 800px) {
    .sidenav {
        width: 80%;
        max-width: 300px;
        height: auto;
        top: 20px;
        bottom: 20px;
        border-radius: 0 var(--radius) var(--radius) 0;
        border: 1px solid var(--border);
        border-left: none;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }

    .app--nav-open .sidenav {
        transform: translateX(0);
    }

    .app__overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 150;
    }

    .app--nav-open .app__overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .app__main,
    .app--has-sidenav .app__main {
        margin-left: 0;
    }

    .app__toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--accent);
        border: none;
        color: var(--text);
        font-size: 24px;
        cursor: pointer;
        z-index: 100;
    }
}

/* User List */
.user-list h1 {
    margin: 0 0 16px;
}

.user-list__controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.user-list__search {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
}

.user-list__search:focus {
    border-color: var(--accent);
}

.user-list__filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.user-list__select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
}

.user-list__checkbox {
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
}

.user-list__checkbox input {
    accent-color: var(--accent);
}

.user-list__meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.user-list__error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ffd1d1;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.user-list__results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-list__row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.user-list__row:hover {
    background: var(--surface-hover);
}

.user-list__row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-list__row-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-list__row-username {
    color: var(--text-secondary);
    font-size: 12px;
}

.user-list__row-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.user-list__row-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.user-list__row-balance {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    white-space: nowrap;
}

.user-list__empty {
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

/* User Detail */
.user-detail__back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 16px;
}

.user-detail__back:hover {
    color: var(--accent);
}

.user-detail__header h1 {
    margin: 0 0 12px;
}

.user-detail__error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ffd1d1;
    padding: 10px 12px;
    border-radius: var(--radius);
}

.user-detail__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 16px;
    margin-bottom: 8px;
}

.user-detail__info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-detail__info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-detail__section {
    margin-top: 28px;
}

.user-detail__section h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
}

.user-detail__roles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.user-detail__permissions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Role badge colors */
.badge--board {
    background: rgba(207, 114, 10, 0.2);
    border-color: rgba(207, 114, 10, 0.45);
    color: #f0a040;
}

.badge--active {
    background: rgba(50, 140, 80, 0.2);
    border-color: rgba(50, 140, 80, 0.45);
    color: #60c080;
}

.badge--member {
    background: rgba(60, 120, 200, 0.2);
    border-color: rgba(60, 120, 200, 0.45);
    color: #70b0f0;
}

.badge--previous {
    background: rgba(150, 100, 150, 0.2);
    border-color: rgba(150, 100, 150, 0.45);
    color: #c0a0c0;
}

/* Balance */
.user-detail__balance-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.user-detail__balance-card {
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.user-detail__balance-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.user-detail__balance-value {
    font-size: 28px;
    font-weight: 700;
}

.user-detail__balance-value--negative {
    color: #ff6b6b;
}

.user-detail__balance-warning {
    background: var(--danger);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ffd1d1;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-top: 12px;
    font-size: 13px;
}

/* Memberships */
.user-detail__memberships {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-detail__membership-card {
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-detail__membership-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.user-detail__membership-row .user-detail__info-label {
    min-width: 130px;
    flex-shrink: 0;
}

/* Timeline */
.user-detail__timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-detail__timeline-entry {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.user-detail__timeline-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.user-detail__timeline-content {
    flex: 1;
    min-width: 0;
}

.user-detail__timeline-description {
    font-size: 13px;
}

.user-detail__timeline-time {
    font-size: 11px;
    color: var(--text-muted);
}

.user-detail__timeline-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}

.user-detail__timeline-impact {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.user-detail__timeline-impact--positive {
    color: #60c080;
}

.user-detail__timeline-impact--negative {
    color: #ff6b6b;
}

.user-detail__timeline-running {
    font-size: 11px;
    color: var(--text-muted);
}

.user-detail__empty {
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

/* Legacy */
.user-detail__legacy-balance {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.user-detail__legacy-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-detail__legacy-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 10px 14px;
    flex-wrap: wrap;
}

.user-detail__legacy-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-detail__legacy-amount {
    font-weight: 700;
    font-size: 15px;
}

.user-detail__legacy-date {
    font-size: 12px;
    color: var(--text-muted);
}

.user-detail__legacy-status {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Mobile responsive for user pages */
@media (max-width: 700px) {
    .user-list__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-list__row-right {
        width: 100%;
        justify-content: space-between;
    }

    .user-detail__balance-cards {
        grid-template-columns: 1fr;
    }

    .user-detail__info-grid {
        grid-template-columns: 1fr;
    }

    .user-detail__timeline-entry {
        flex-wrap: wrap;
    }

    .user-detail__legacy-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
