/* Purchase Requests Wizard Styles */

/* --- Glassmorphism Effect --- */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow {
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.5), 0 0 10px rgba(79, 70, 229, 0.5);
}

/* --- Wizard Navigation --- */
.wizard-step-link { 
    transition: all 0.3s; 
}

.wizard-step-link.active { 
    font-weight: 700; 
    color: #3b82f6; 
}

/* --- Form Inputs --- */
input, textarea, select {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* --- Select Styling --- */
select {
    background-color: #111827 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148,163,184,.25) !important;
    border-radius: 8px !important;
    padding: .625rem .75rem !important;
}

select option {
    background-color: #111827 !important;
    color: #f8fafc !important;
    padding: 8px 12px !important;
    border: none !important;
}

select option:hover {
    background-color: #1f2937 !important;
}

select option:checked {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

input::placeholder, 
textarea::placeholder { 
    color: #94a3b8; 
}

/* --- Product List (Autocomplete Dropdown) --- */
#product-list { 
    background-color: #1e293b; 
    border: 1px solid #334155; 
    max-height: 200px;
    overflow-y: auto;
}

#product-list div { 
    color: #cbd5e1; 
    font-size: 12px !important; 
    transition: background-color 0.2s;
}

#product-list div:hover { 
    background-color: #3b82f6; 
    color: #ffffff; 
}

/* --- Supplier List (Autocomplete Dropdown) --- */
#supplier-list div { 
    font-size: 12px !important; 
}

#supplier-list { 
    background-color: #1e293b; 
    border: 1px solid #334155; 
}

#supplier-list div:hover { 
    background-color: #334155; 
}

/* --- Radio Cards --- */
.radio-card { 
    transition: all 0.2s ease-in-out; 
    border: 2px solid transparent; 
}

.radio-card.selected { 
    border-color: #3b82f6; 
    background-color: rgba(59, 130, 246, 0.15); 
}

/* --- Purchase History Table --- */
#purchase-history-container .glass { 
    padding: 12px !important; 
}

#purchase-history-container table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
}

#purchase-history-container thead tr { 
    background: rgba(148,163,184,0.08); 
}

#purchase-history-container th { 
    color: #cbd5e1; 
    font-weight: 600; 
    font-size: 12px; 
    padding: 10px 14px; 
    border-bottom: 1px solid rgba(148,163,184,0.12); 
    white-space: nowrap; 
}

#purchase-history-container td { 
    color: #cbd5e1; 
    font-size: 12px; 
    padding: 12px 14px; 
    vertical-align: middle; 
}

#purchase-history-container tbody tr:hover { 
    background: rgba(255,255,255,0.04); 
}

/* --- Action Buttons --- */
.ph-action { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 6px 10px; 
    border-radius: 10px; 
    font-size: 11px; 
}

.ph-action.view { 
    color: #60a5fa; 
    background: rgba(59,130,246,.12); 
}

.ph-action.edit { 
    color: #fbbf24; 
    background: rgba(251,191,36,.12); 
}

.ph-action.delete { 
    color: #f87171; 
    background: rgba(248,113,113,.12); 
}

.ph-action.product { 
    color: #22c55e; 
    background: rgba(34,197,94,.12); 
}

.ph-badge { 
    padding: 2px 8px; 
    border-radius: 999px; 
    font-size: 10px; 
}

.ph-badge.blue { 
    background: rgba(59,130,246,.25); 
    color: #93c5fd; 
}

/* --- Actions (for History Table) --- */
.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.btn-action {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: transparent;
    color: #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
}

.btn-action.btn-edit:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.btn-action.btn-delete:hover {
    border-color: #f87171;
    color: #f87171;
}

/* Status button special styling */
.btn-action.btn-warning {
    border: 1px solid #fbbf24;
    background: transparent;
    color: #fbbf24;
    display: inline-block;
}

.btn-action.btn-warning:hover {
    background: #fbbf24;
    color: #0f172a;
}

/* Status cell for better alignment */
#purchase-history-container td.ph-status-cell {
    text-align: center;
}

#purchase-history-container td.ph-status-cell .btn-action {
    margin: 0 auto;
    display: inline-block;
}

/* Status badge styling for completed/failed */
.ph-status-cell span.btn-action {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: transparent;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    display: inline-block;
}

/* Completed status */
.ph-status-cell .status-completed {
    border-color: #22c55e !important;
    color: #22c55e;
}

/* Failed status */
.ph-status-cell .status-failed {
    border: 1px solid #f87171 !important;
    color: #f87171;
}

/* --- Table Footer (Pagination) --- */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(180deg, #0d1524, #0b1220);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.range-info {
    color: #94a3b8;
    font-size: 12px;
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-btn {
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #0b1220;
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover {
    transform: translateY(-1px);
    border-color: #22d3ee;
}

.page-btn[disabled] {
    opacity: 0.5;
    cursor: default;
}

.page-btn.active {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15));
    border-color: rgba(34, 211, 238, 0.35);
}

