/* ============================================================
   FastBuy — Admin custom overrides (on top of Tabler UI)
   Tabler provides all components; this file adds brand tweaks
   ============================================================ */

/* Use Inter font throughout */
:root {
    --tblr-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Brand color — electric blue to match storefront */
:root {
    --tblr-primary: #2563eb;
    --tblr-primary-rgb: 37, 99, 235;
}

/* Sidebar brand styling */
.navbar-vertical .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Stat cards — add icon circles */
.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.stat-card-icon .ti { font-size: 22px; }

/* Product thumbnail in tables */
.table .thumb {
    width: 40px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--tblr-border-color);
}

/* Form card spacing */
.form-card {
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    padding: 2rem;
    max-width: 840px;
}

/* Error alert */
.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #991b1b;
}

/* Chart bar hover */
.chart__bar {
    transition: background 0.15s ease;
}

/* Checkbox row */
.check-row {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.check-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}
.check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tblr-primary);
    cursor: pointer;
}

/* Image grid */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.img-cell {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--tblr-border-color);
    border-radius: 8px;
}
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-cell form { position: absolute; top: 6px; right: 6px; }
.img-cell form button {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Dashboard two-column grid */
.dash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 992px) {
    .dash-grid { grid-template-columns: 1fr; }
}

/* Table header in card */
.table-wrap__head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Toolbar search */
.toolbar__search {
    min-width: 280px;
}

/* Page head — title row with optional action */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.page-head h1,
.page-head .h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Two-column layout (list + form sidebar) */
.admin-two-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.admin-two-col--even { grid-template-columns: 1fr 1fr; }
@media (max-width: 992px) {
    .admin-two-col,
    .admin-two-col--even { grid-template-columns: 1fr; }
}

/* Card with header label */
.card-header-label {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Status badge colors — maps order/customer/review states to Tabler tones */
.badge.status-pending    { background: rgba(251, 191, 36, 0.15);  color: #b45309; }
.badge.status-paid       { background: rgba(34, 197, 94, 0.15);   color: #15803d; }
.badge.status-processing { background: rgba(59, 130, 246, 0.15);  color: #1d4ed8; }
.badge.status-shipped    { background: rgba(99, 102, 241, 0.15);  color: #4338ca; }
.badge.status-delivered  { background: rgba(16, 185, 129, 0.15);  color: #047857; }
.badge.status-cancelled  { background: rgba(239, 68, 68, 0.15);   color: #b91c1c; }
.badge.status-refunded   { background: rgba(148, 163, 184, 0.15); color: #475569; }
.badge.status-failed     { background: rgba(220, 38, 38, 0.15);   color: #991b1b; }
.badge.status-active     { background: rgba(34, 197, 94, 0.15);   color: #15803d; }
.badge.status-archived   { background: rgba(148, 163, 184, 0.15); color: #475569; }
.badge.status-disabled   { background: rgba(239, 68, 68, 0.15);   color: #b91c1c; }
.badge.status-draft      { background: rgba(148, 163, 184, 0.15); color: #475569; }
.badge.status-published  { background: rgba(34, 197, 94, 0.15);   color: #15803d; }
.badge.status-approved   { background: rgba(34, 197, 94, 0.15);   color: #15803d; }

/* Filter chips row */
.filter-chips {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.filter-chips .filter-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tblr-muted);
    background: transparent;
    border: 1px solid var(--tblr-border-color);
    text-decoration: none;
    transition: all 0.15s ease;
}
.filter-chips .filter-chip:hover {
    border-color: var(--tblr-primary);
    color: var(--tblr-primary);
}
.filter-chips .filter-chip.is-active {
    background: var(--tblr-primary);
    border-color: var(--tblr-primary);
    color: #fff;
}

/* Inline delete button (icon-only, low emphasis) */
.btn-icon-danger {
    background: none;
    border: none;
    color: var(--tblr-danger);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.8125rem;
}
.btn-icon-danger:hover { opacity: 0.8; }

/* Star rating display */
.star-rating { color: #f59e0b; letter-spacing: 1px; }

/* Chart container */
.chart {
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.chart__title {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--tblr-muted);
}
.chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 180px;
    margin-bottom: 0.5rem;
}
.chart__bar {
    flex: 1;
    background: var(--tblr-primary);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: background 0.15s ease;
}
.chart__bar:hover { background: var(--tblr-primary-fg); }
.chart__labels {
    display: flex;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--tblr-muted);
}
.chart__labels span { flex: 1; text-align: center; }

/* Admin login page */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--tblr-bg-surface);
}
.admin-login .card {
    max-width: 420px;
    width: 100%;
}
.admin-login .brand {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.admin-login .brand span { color: var(--tblr-primary); }
