@import url('main.css');

/* === DASHBOARD STATS === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 4px solid transparent;
    transition: transform 0.2s;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.blue {
    border-color: var(--info);
}

.stat-card.red {
    border-color: var(--danger);
}

.stat-card.green {
    border-color: var(--success);
}

.stat-icon {
    font-size: 2.5rem;
    background: #f8fafc;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-align: left;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    text-align: left;
}

/* === ADMIN TABS & SEARCH === */
.admin-tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
}

.admin-tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-family: 'Sarabun';
    transition: all 0.2s;
    font-size: 0.9rem;
}

.admin-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Sarabun';
    font-size: 0.95rem;
    background: #fdfdfd;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* === ACTION BUTTONS IN TABLE (Admin Only) === */
.actions-col {
    white-space: nowrap;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.actions-col button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
    font-family: 'Sarabun';
    transition: opacity 0.2s;
}

.actions-col button:hover {
    opacity: 0.9;
}

.btn-approve {
    background: var(--success);
}

.btn-reject {
    background: var(--danger);
}

.btn-pickup {
    background: var(--info);
}

.btn-return {
    background: var(--warning);
}

/* === ITEM TAGS/BADGES (เพิ่มส่วนนี้เพื่อให้ Admin แสดงผลเหมือน User) === */
.item-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    margin-bottom: 2px;
}

.item-qty-badge {
    background-color: var(--primary, #0ea5e9);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-left: 6px;
    font-weight: 700;
}

/* Responsive adjustments for Admin page */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .admin-tabs {
        width: 100%;
    }

    .admin-tab-btn {
        flex: 1;
        text-align: center;
    }
}

/* === PAGINATION CSS === */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    gap: 15px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Sarabun';
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
}

.page-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}
