/* ==========================================================================
   Bydow Admin Design System - Component CSS (BEM Architecture)
   File: css/bydow_design.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Admin Header & Date Pill
   -------------------------------------------------------------------------- */
.bydow-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bydow-admin-header__title-group {
    display: flex;
    flex-direction: column;
}

.bydow-admin-header__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.bydow-admin-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1C1B1F;
    margin: 0 0 0.25rem 0;
}

.bydow-admin-header__subtitle {
    font-size: 0.875rem;
    color: #775357;
    margin: 0;
}

.bydow-admin-header__date-badge {
    background-color: #fff0f1;
    color: #dd0286;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 0;
    border: 1px solid #f0dee2;
}

/* --------------------------------------------------------------------------
   2. Admin Stat Cards Grid
   -------------------------------------------------------------------------- */
.bydow-admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
    .bydow-admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bydow-admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

.bydow-admin-stat-card {
    background-color: #ffffff;
    border: 1px solid #e3e2e1;
    border-radius: 0;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bydow-admin-stat-card__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #775357;
    letter-spacing: 0.5px;
}

.bydow-admin-stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1C1B1F;
}

.bydow-admin-stat-card__value--highlight {
    color: #dd0286;
}

.bydow-admin-stat-card__trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bydow-admin-stat-card__trend--up {
    color: #2ea854;
}

.bydow-admin-stat-card__trend--down {
    color: #c5221f;
}

.bydow-admin-stat-card__subtext {
    font-size: 0.75rem;
    color: #775357;
}

.bydow-admin-stat-card__subtext--warning {
    color: #d97706;
    font-weight: 600;
}

.bydow-admin-stat-card__subtext--action {
    color: #dd0286;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Admin Toolbar (Search & Filters)
   -------------------------------------------------------------------------- */
.bydow-admin-toolbar {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.bydow-admin-table-header {
    padding: 0.8rem 0.8rem;
    border-bottom: 1px solid #f0dee2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: #faf9f8;
}

.bydow-admin-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.bydow-admin-tab {
    padding: 0.4rem 0.875rem !important;
    font-size: 0.65rem !important;
    cursor: pointer;
}

.bydow-admin-toolbar__search {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 360px;
}

.bydow-admin-toolbar__input {
    width: 100%;
    padding-left: 2.5rem !important;
}

.bydow-admin-toolbar__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #775357;
    font-size: 18px;
    pointer-events: none;
}

.bydow-admin-toolbar__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.bydow-admin-toolbar__select {
    width: auto !important;
    cursor: pointer;
}

.bydow-admin-toolbar__btn {
    font-size: 0.8125rem !important;
}

/* --------------------------------------------------------------------------
   4. Admin Table Component
   -------------------------------------------------------------------------- */
.bydow-admin-card {
    background-color: #ffffff;
    border: 1px solid #e3e2e1;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    padding: 0;
    overflow: hidden;
}

.bydow-admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.bydow-admin-table {
    width: 100%;
    min-width: 768px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.bydow-admin-table__head {
    background-color: #faf9f8;
    border-bottom: 2px solid #f0dee2;
}

.bydow-admin-table__head-row {
    color: #1C1B1F;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bydow-admin-table__th {
    padding: 0.8rem 0.8rem;
    white-space: nowrap;
}

.bydow-admin-table__th--right {
    text-align: right;
}

.bydow-admin-table__body {
    background-color: #ffffff;
}

.bydow-admin-table__row {
    border-bottom: 1px solid #f0dee2;
    transition: background-color 0.15s ease-in-out;
}

.bydow-admin-table__row:hover {
    background-color: #faf9f8;
}

.bydow-admin-table__td,
.bydow-admin-table td {
    padding: 0.6rem 0.6rem;
    color: #1C1B1F;
    vertical-align: middle;
    white-space: nowrap;
}

.bydow-admin-table__td--bold {
    font-weight: 700;
}

.bydow-admin-table__td--medium {
    font-weight: 600;
}

.bydow-admin-table__td--muted {
    color: #775357;
    font-size: 0.8125rem;
}

.bydow-admin-table__td--right {
    text-align: right;
}

.bydow-admin-table__empty {
    padding: 2.5rem;
    text-align: center;
    color: #775357;
}

/* --------------------------------------------------------------------------
   5. Admin Status Badges
   -------------------------------------------------------------------------- */
.bydow-admin-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.bydow-admin-badge--delivered {
    background-color: #eef6f0;
    color: #2ea854;
}

.bydow-admin-badge--processing {
    background-color: #e8f0fe;
    color: #1a73e8;
}

.bydow-admin-badge--shipped {
    background-color: #fef3c7;
    color: #d97706;
}

.bydow-admin-badge--cancelled {
    background-color: #fce8e6;
    color: #c5221f;
}

.bydow-admin-badge--pending {
    background-color: #fff0f1;
    color: #dd0286;
}

.bydow-admin-badge--paid {
    color: #2ea854;
    font-weight: 600;
    font-size: 0.8125rem;
}

.bydow-admin-badge--unpaid {
    color: #775357;
    font-weight: 600;
    font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   6. Admin Pagination Bar
   -------------------------------------------------------------------------- */
.bydow-admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0.8rem;
    border-top: 1px solid #f0dee2;
    font-size: 0.8125rem;
    color: #775357;
    background-color: #faf9f8;
    flex-wrap: wrap;
    gap: 1rem;
}

.bydow-admin-pagination__info {
    font-size: 0.8125rem;
}

.bydow-admin-pagination__count {
    font-weight: 700;
    color: #1C1B1F;
}

.bydow-admin-pagination__controls {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.bydow-admin-pagination__btn {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
}
