/* ── Admin Orders ── */

.admin-orders-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-orders-filter-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-orders-filter-btn:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.admin-orders-filter-btn.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

/* Table */
.admin-orders-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.admin-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-orders-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.admin-orders-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.admin-orders-table tbody tr:last-child {
    border-bottom: none;
}

.admin-orders-table tbody tr:hover {
    background: #f8fafc;
}

.admin-orders-table td {
    padding: 12px 16px;
    color: #1e293b;
    vertical-align: middle;
}

.admin-orders-table td.muted {
    color: #94a3b8;
    font-size: 0.8rem;
}

.admin-orders-row-link {
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
}

.admin-orders-row-link:hover {
    text-decoration: underline;
}

/* Status badges */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-status-badge.status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.order-status-badge.status-paid {
    background: #dcfce7;
    color: #166534;
}

.order-status-badge.status-shipped {
    background: #dbeafe;
    color: #1e40af;
}

.order-status-badge.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.order-status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Order Detail ── */
.admin-order-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-order-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-order-detail-id {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

.admin-order-detail-title {
    margin: 0 0 4px;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.admin-order-detail-meta {
    font-size: 0.82rem;
    color: #64748b;
}

.admin-order-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-order-status-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.admin-order-save-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: #0f172a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.admin-order-save-btn:hover {
    background: #1e293b;
}

.admin-order-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.admin-order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 700px) {
    .admin-order-grid {
        grid-template-columns: 1fr;
    }
}

.admin-order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.admin-order-card h3 {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.admin-order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.admin-order-info-row:last-child {
    border-bottom: none;
}

.admin-order-info-row span:first-child {
    color: #64748b;
    flex-shrink: 0;
}

.admin-order-info-row span:last-child,
.admin-order-info-row strong {
    color: #0f172a;
    text-align: right;
    word-break: break-word;
}

.admin-order-items {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.admin-order-items h3 {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.admin-order-item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.admin-order-item-row:last-child {
    border-bottom: none;
}

.admin-order-item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-order-item-info {
    flex: 1;
    min-width: 0;
}

.admin-order-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-order-item-sku {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.admin-order-item-qty {
    font-size: 0.82rem;
    color: #64748b;
}

.admin-order-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.admin-order-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
