.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100vh;
    height: 100dvh;
    padding: 28px 18px;
    overflow-y: auto;
    background: #111111;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    color: #f5f5f5;
}

.sidebar h2 {
    margin: 0 0 36px;
    padding: 0 12px 22px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #d4af37;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #bcbcbc;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.sidebar nav a:hover {
    background: #202020;
    color: #ffffff;
}

.sidebar nav a.active {
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.12);
    color: #e7c95e;
}

/* Main content offset */

.main {
    min-width: 0;
    margin-left: 250px;
    padding: 30px;
}

/* Responsive sidebar */

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 22px 12px;
    }

    .sidebar h2 {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 1.2rem;
    }

    .sidebar nav a {
        padding: 11px 10px;
        font-size: 0.84rem;
    }

    .main {
        margin-left: 200px;
        padding: 22px 16px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 68px;
        padding: 20px 8px;
        align-items: center;
    }

    .sidebar h2 {
        margin-bottom: 24px;
        padding: 0 0 18px;
        border-bottom: 0;
        font-size: 0;
    }

    .sidebar h2::after {
        content: "QF";
        font-size: 1rem;
        color: #d4af37;
    }

    .sidebar nav {
        width: 100%;
        align-items: center;
    }

    .sidebar nav a {
        justify-content: center;
        width: 48px;
        height: 46px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .main {
        margin-left: 68px;
        padding: 20px 12px;
    }
}

.users-page {
    --users-gold: #d4af37;
    --users-gold-dark: #a7831d;
    --users-ink: #171717;
    --users-muted: #777777;
    --users-border: #e9e5dc;
    --users-surface: #ffffff;
    --users-soft: #faf9f6;

    min-width: 0;
}

.users-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.users-topbar > div:first-child {
    min-width: 0;
}

.users-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--users-gold-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.users-topbar h1 {
    margin: 0;
    color: var(--users-ink);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -0.04em;
}

.users-topbar p {
    margin: 8px 0 0;
    color: var(--users-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.users-header-icon {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    background: linear-gradient(145deg, #fffdf6, #f4e8bd);
    color: #92701b;
    font-size: 1.45rem;
}

.users-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.users-stat-card {
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--users-border);
    border-radius: 15px;
    background: var(--users-surface);
    box-shadow: 0 4px 16px rgba(25, 25, 25, 0.025);
    transition: border-color 180ms ease, transform 180ms ease;
}

.users-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.6);
}

.users-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    color: #666666;
    font-size: 0.8rem;
    font-weight: 650;
}

.users-stat-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    font-size: 0.95rem;
}

.users-stat-icon.gold {
    background: #f8edc9;
    color: #8b6810;
}

.users-stat-icon.blue {
    background: #e6efff;
    color: #315fa9;
}

.users-stat-icon.green {
    background: #dff3e6;
    color: #207448;
}

.users-stat-icon.purple {
    background: #eee7fb;
    color: #7550a6;
}

.users-stat-card > strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--users-ink);
    font-size: clamp(1.65rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.users-stat-card > small {
    display: block;
    margin-top: 9px;
    color: var(--users-muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

.users-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--users-border);
    border-radius: 16px;
    background: var(--users-surface);
    box-shadow: 0 6px 24px rgba(25, 25, 25, 0.035);
}

.users-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #f0ede6;
}

.users-panel-heading h2 {
    margin: 0;
    color: var(--users-ink);
    font-size: 1.05rem;
    font-weight: 750;
}

.users-panel-heading p {
    margin: 6px 0 0;
    color: var(--users-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.users-live-label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #dceee2;
    border-radius: 999px;
    background: #f1faf4;
    color: #286c43;
    font-size: 0.7rem;
    font-weight: 700;
}

.users-live-label > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2d9b59;
}

.users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
}

.users-search {
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(100%, 440px);
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #e4e0d6;
    border-radius: 10px;
    background: #fff;
    color: #898989;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.users-search:focus-within {
    border-color: var(--users-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.users-search > i {
    flex: 0 0 auto;
    font-size: 0.85rem;
}

.users-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--users-ink);
    font: inherit;
    font-size: 0.84rem;
}

.users-search input::placeholder {
    color: #a09d96;
}

.users-search input:focus {
    outline: none;
    box-shadow: none;
}

.users-clear-search {
    display: grid;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: #f1eee7;
    color: #555;
    cursor: pointer;
}

.users-clear-search[hidden] {
    display: none;
}

.users-result-count {
    flex: 0 0 auto;
    color: var(--users-muted);
    font-size: 0.77rem;
}

.users-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid #f0ede6;
    scrollbar-width: thin;
}

.users-table {
    width: 100%;
    min-width: 850px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.users-table thead {
    background: var(--users-soft);
}

.users-table th {
    padding: 14px 18px;
    border-bottom: 1px solid var(--users-border);
    color: #77736a;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.users-table th:first-child,
.users-table td:first-child {
    padding-left: 24px;
}

.users-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #f0eee9;
    color: #454545;
    font-size: 0.81rem;
    vertical-align: middle;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-table tbody tr {
    transition: background-color 150ms ease;
}

.users-table tbody tr:hover {
    background: #fdfbf5;
}

.users-customer {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.users-avatar {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    border: 1px solid #eadba8;
    border-radius: 12px;
    background: #fbf3d8;
    color: #775d16;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.users-customer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.users-customer-name {
    overflow-wrap: anywhere;
    color: #222;
    font-size: 0.82rem;
    font-weight: 750;
}

.users-customer-email {
    overflow-wrap: anywhere;
    color: #858078;
    font-size: 0.74rem;
}

.users-phone {
    white-space: nowrap;
    color: #555;
}

.users-date {
    white-space: nowrap;
    color: #666;
    font-size: 0.77rem;
}

.users-order-count {
    display: inline-flex;
    min-width: 32px;
    height: 27px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid #e8e2d3;
    border-radius: 8px;
    background: #faf8f2;
    color: #57491e;
    font-size: 0.75rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.users-spend {
    color: #242424;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.users-muted {
    color: #aaa49a;
}

.users-message {
    padding: 44px 20px !important;
    color: #77736a !important;
    text-align: center;
    line-height: 1.8;
}

.users-message i {
    margin-right: 7px;
}

.users-message.is-error {
    color: #a93232 !important;
}

.users-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 24px;
    border-top: 1px solid #f0ede6;
    background: #fff;
}

.users-pagination > span {
    color: var(--users-muted);
    font-size: 0.77rem;
}

.users-pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e0d5;
    border-radius: 8px;
    background: #fff;
    color: #383838;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.users-page-btn:hover:not(:disabled) {
    border-color: var(--users-gold);
    background: #fffaf0;
}

.users-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.users-page-number {
    min-width: 36px;
    color: #333 !important;
    text-align: center;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.users-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0;
    color: #88847b;
    font-size: 0.75rem;
    line-height: 1.6;
}

.users-footer-note i {
    color: #9a7b26;
}

.users-page button:focus-visible, .users-page a:focus-visible, .users-page input:focus-visible {
    outline: 2px solid #b38c20;
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .users-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .users-topbar {
        margin-bottom: 20px;
    }

    .users-header-icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 1.2rem;
    }

    .users-stat-card {
        padding: 16px;
    }

    .users-stat-top {
        margin-bottom: 16px;
    }

    .users-panel-heading,
    .users-toolbar {
        padding-right: 16px;
        padding-left: 16px;
    }

    .users-panel-heading {
        align-items: flex-start;
    }

    .users-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 11px;
    }

    .users-search {
        width: 100%;
    }

    .users-result-count {
        font-size: 0.75rem;
    }

    .users-table th:first-child,
    .users-table td:first-child {
        padding-left: 16px;
    }

    .users-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .users-pagination-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .users-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .users-stat-card {
        padding: 13px;
        border-radius: 12px;
    }

    .users-stat-top {
        align-items: flex-start;
        gap: 6px;
        font-size: 0.73rem;
    }

    .users-stat-icon {
        flex-basis: 31px;
        width: 31px;
        height: 31px;
        border-radius: 9px;
        font-size: 0.8rem;
    }

    .users-stat-card > strong {
        font-size: 1.6rem;
    }

    .users-stat-card > small {
        font-size: 0.68rem;
    }

    .users-panel-heading {
        flex-direction: column;
        gap: 12px;
    }

    .users-live-label {
        align-self: flex-start;
    }

    .users-page-btn {
        padding: 0 10px;
    }

    .users-footer-note {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 360px) {
    .users-header-icon {
        display: none;
    }

    .users-stat-card {
        padding: 11px;
    }

    .users-stat-card > strong {
        font-size: 1.4rem;
    }

    .users-pagination-actions {
        gap: 5px;
    }

    .users-page-btn {
        gap: 5px;
        padding: 0 7px;
        font-size: 0.7rem;
    }
}