.customers-eyebrow {
    color: #a78bfa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.customer-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.customer-metric {
    min-height: 125px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 11px;
}

.customer-metric i {
    grid-row: 1 / 4;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(124, 58, 237, .15);
    color: #a78bfa;
    display: grid;
    place-items: center;
}

.customer-metric span,
.customer-metric small {
    color: var(--muted);
    font-size: 13px;
}

.customer-metric strong {
    font-size: 25px;
}

.customer-top,
.customer-table-panel {
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}

.customer-top {
    padding: 18px;
}

.customer-top > header {
    margin-bottom: 14px;
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.customer-top header span {
    color: #fbbf24;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}

.customer-top h2 {
    margin: 3px 0 0;
    font-size: 18px;
}

.customer-top header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.customer-top-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
}

.top-customer {
    min-width: 0;
    padding: 13px;
    border: 1px solid #334155;
    border-radius: 11px;
    color: var(--text);
    text-decoration: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
}

.top-customer:hover {
    border-color: #7c3aed;
}

.top-position {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(251, 191, 36, .15);
    color: #fbbf24;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.top-customer div {
    min-width: 0;
}

.top-customer div strong,
.top-customer div small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.top-customer div small {
    margin-top: 3px;
    color: var(--muted);
}

.top-customer b {
    grid-column: 2;
    color: #c4b5fd;
}

.customer-toolbar {
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
}

.customer-toolbar label {
    min-width: 280px;
    flex: 1;
    position: relative;
}

.customer-toolbar label i {
    position: absolute;
    left: 14px;
    top: 50%;
    color: #64748b;
    transform: translateY(-50%);
}

.customer-toolbar input,
.customer-toolbar select,
.customer-toolbar button,
.customer-toolbar > a {
    min-height: 43px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.customer-toolbar input,
.customer-toolbar select {
    width: 100%;
    padding: 0 13px;
    background: var(--panel);
    color: var(--text);
}

.customer-toolbar input {
    padding-left: 40px;
}

.customer-toolbar button,
.customer-toolbar > a {
    padding: 0 18px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    text-decoration: none;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.customer-toolbar > a {
    background: #334155;
}

.customer-table-panel {
    overflow-x: auto;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
}

.customer-table th,
.customer-table td {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(51, 65, 85, .65);
    text-align: left;
    white-space: nowrap;
}

.customer-table th {
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-table td {
    color: #cbd5e1;
    font-size: 13px;
}

.customer-table tbody tr:hover {
    background: rgba(30, 41, 59, .58);
}

.customer-table td:first-child {
    min-width: 225px;
}

.customer-table td:first-child strong,
.customer-table td:first-child small {
    display: block;
}

.customer-table td:first-child small {
    max-width: 240px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
}

.order-count {
    font-weight: 800;
}

.order-count em {
    margin-left: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .12);
    color: #4ade80;
    font-size: 10px;
    font-style: normal;
    text-transform: uppercase;
}

.customer-orders-link {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
}

.customer-orders-link i {
    margin-left: 5px;
}

.customer-empty {
    padding: 30px !important;
    color: var(--muted) !important;
    text-align: center !important;
}

@media (max-width: 1100px) {
    .customer-metrics,
    .customer-top-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .customer-metrics,
    .customer-top-grid {
        grid-template-columns: 1fr;
    }

    .customer-toolbar {
        flex-direction: column;
    }

    .customer-toolbar label {
        min-width: 0;
    }
}
