﻿/* ====== Dashboard Layout ====== */
.admin-dash .dash-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.admin-dash .dash-title {
    margin: 0;
    font-weight: 800;
    letter-spacing: .2px;
}

.admin-dash .dash-subtitle {
    margin: 0;
    color: #6c757d;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: .75rem;
    margin-bottom: .5rem;
}

    /* 4 responsive tiles */
    .kpi-grid > .kpi-card {
        grid-column: span 12;
    }

@media (min-width: 576px) {
    .kpi-grid > .kpi-card {
        grid-column: span 6;
    }
}

@media (min-width: 992px) {
    .kpi-grid > .kpi-card {
        grid-column: span 3;
    }
}

.kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff, #fafafa);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 18px rgba(0,0,0,.04);
}

.kpi-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

    .kpi-card__icon svg {
        width: 22px;
        height: 22px;
        fill: #111;
        opacity: .9;
    }

.kpi-card__meta .kpi-card__label {
    font-size: .85rem;
    color: #6c757d;
}

.kpi-card__meta .kpi-card__value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.kpi-card__hint {
    font-size: .8rem;
    color: #8b8b8b;
}

/* themed accents */
.kpi-orders .kpi-card__icon {
    background: #ffe8d9;
}

.kpi-revenue .kpi-card__icon {
    background: #e6f6ff;
}

.kpi-success .kpi-card__icon {
    background: #e9ffe9;
}

.kpi-pending .kpi-card__icon {
    background: #fff0f7;
}

/* Payment Success ring */
.kpi-success {
    align-items: center;
    gap: 1rem;
}

    .kpi-success .kpi-ring {
        --val: 0;
        --ring-color: #16a34a;
        width: 84px;
        aspect-ratio: 1;
        background: conic-gradient(var(--ring-color) calc(var(--val)*1%), #e9ecef 0);
        border-radius: 50%;
        position: relative;
    }

        .kpi-success .kpi-ring::before {
            content: "";
            position: absolute;
            inset: 8px;
            background: #fff;
            border-radius: 50%;
            box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
        }

    .kpi-success .kpi-ring__value {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        font-weight: 800;
        font-size: 1.05rem;
        color: #111;
    }

/* Panels */
.panel-card {
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 18px rgba(0,0,0,.04);
    padding: 1rem 1.1rem;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .25rem;
}

.panel-title {
    margin: 0;
    font-weight: 700;
}

/* Table + chips */
.panel-table thead th {
    background: #f7f7f9;
    font-weight: 700;
    font-size: .86rem;
    border-top: 0;
    border-bottom: 1px solid #e9ecef;
}

.chip {
    display: inline-block;
    padding: .25rem .5rem;
    border-radius: 999px;
    background: #f0f1f5;
    border: 1px solid rgba(0,0,0,.06);
    font-size: .8rem;
    font-weight: 600;
}

/* Top products */
.top-list {
    list-style: none;
    padding: 0;
    margin: .25rem 0 0 0;
}

.top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .25rem;
    border-bottom: 1px dashed #f0f0f0;
}

    .top-item:last-child {
        border-bottom: 0;
    }

.top-item__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.top-item__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.badge {
    background: #eef2ff;
    color: #3b82f6;
    border: 1px solid rgba(0,0,0,.05);
}

.mono {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Geo list */
.country-list {
    list-style: none;
    padding: 0;
    margin: .25rem 0 0 0;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .25rem;
}

.country {
    font-weight: 600;
}

.pill {
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .8rem;
}

/* Big number */
.big-number {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
}

.muted {
    color: #8b8b8b;
    font-size: .9rem;
}


/* Compact icon-only Radzen buttons (hide text, tighten padding, pill shape) */
.btn-icon-only .rz-button-text {
    display: none;
}

.btn-icon-only {
    padding: .25rem .4rem !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
}

/* Address cell: allow wrapping + multi-line */
.addr-wrap {
    white-space: pre-wrap; /* respect \n and wrap long lines */
    line-height: 1.35;
}

/* Optional: subtle hover for icon-only buttons */
.btn-icon-only:hover {
    filter: brightness(0.95);
}


/* ============================================
   AURAE BADGES — Elegant, Consistent System
   ============================================ */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px; /* adjust if you want smaller/larger */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Base badge style */
/* ============================================
   AURAE BADGES — Refined Version (Smaller & Nicer)
   ============================================ */

/* Base badge style */
.aurae-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem; /* smaller text */
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.20rem 0.55rem;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
    user-select: none;
    line-height: 1.2;
    white-space: nowrap;
}

/* Icon inside badge (smaller, aligned center) */
.aurae-badge-icon {
    font-size: 0.9rem;
    line-height: 1;
    opacity: .9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Payment palette ---- */
.badge-paid {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.badge-pending {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.badge-failed {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.badge-default {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* ---- Delivery palette ---- */
.badge-placed {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.badge-delivery {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.badge-delivered {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

/* Compact visual for long text like "Out for Delivery" */
.badge-delivery {
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
    letter-spacing: 0.03em;
}

/* Optional hover sheen */
.aurae-badge:hover {
    filter: brightness(1.07);
    transition: filter 0.2s ease-in-out;
}


/* Subtle 3D effect on dark mode (optional) */
@media (prefers-color-scheme: dark) {
    .aurae-badge {
        box-shadow: 0 1px 3px rgba(255,255,255,0.08);
    }
}

/* Multi-line friendly cells (wrap nicely in narrow columns) */
.cell-wrap {
    white-space: normal; /* allow wrapping */
    word-break: break-word; /* break long tokens if needed */
    line-height: 1.25;
}

/* Subline inside compact cells (muted, smaller) */
.cell-sub {
    color: #6c757d; /* subtle gray */
    font-size: 0.78rem; /* smaller than main line */
    line-height: 1.2;
}

/* Optional: make long order numbers break at hyphens more naturally */
.cell-wrap {
    overflow-wrap: anywhere; /* modern fallback for odd long strings */
}

/* Sidebar menu */
.sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a,
.sidebar-menu .logout-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

    /* Hover/active effects */
    .sidebar-menu a:hover,
    .sidebar-menu .logout-link:hover {
        background: #f5f5f5;
        color: #000;
    }

/* Logout special tone */
.logout-item {
    margin-top: 0.5rem;
}

.logout-icon {
    font-size: 1.1rem;
    color: #dc3545; /* soft red accent */
}

.logout-link {
    color: #dc3545;
    font-weight: 600;
}

    .logout-link:hover {
        background: #fbeaea;
    }

