/* CSS for admin/manage_pengadaan.php */
:root {
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --rose-500: #ef4444;
    --rose-600: #dc2626;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.filter-container {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pill {
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    transition: all 0.2s;
    text-decoration: none !important;
}

.filter-pill:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary-blue);
}

.filter-pill.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.request-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.request-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.request-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    border-color: #bfdbfe;
}

.card-top {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tentor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tentor-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.tentor-name {
    font-weight: 800;
    color: var(--slate-900);
    font-size: 1.05rem;
}

.request-date {
    font-size: 0.8rem;
    color: var(--slate-600);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-kode-tag {
    background: #e2e8f0;
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.badge-count-pill {
    background: #f1f5f9;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-pending { background: #fffbeb; color: #b45309; }
.status-disetujui { background: #ecfdf5; color: #065f46; }
.status-ditolak { background: #fef2f2; color: #991b1b; }

/* Items Table inside Card */
.table-responsive-card {
    overflow-x: auto;
    width: 100%;
}

.card-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 650px;
}

.card-items-table th {
    background-color: #f8fafc;
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 11px 14px;
    border-bottom: 1px solid var(--slate-200);
}

.card-items-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.9rem;
}

.card-items-table tr:hover {
    background-color: #fbfcfe;
}

.badge-qty-sm {
    background: #eff6ff;
    color: var(--primary-blue);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s;
}

.btn-nota-badge {
    background: #f1f5f9;
    color: var(--primary-blue);
    border: 1px solid var(--slate-300);
}

.btn-nota-badge:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-link-badge {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.btn-link-badge:hover {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

/* Card Total Summary Bar */
.card-total-summary-bar {
    background: #f8fafc;
    padding: 12px 18px;
    border-top: 1px solid var(--slate-200);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.summary-batch-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-600);
}

.summary-batch-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e3a8a;
}

/* Action Area */
.action-area {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--slate-100);
}

.catatan-box {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    background: var(--slate-50);
}

.catatan-box:focus {
    outline: none;
    background: white;
    border-color: var(--primary-blue);
}

.admin-note-box {
    background: var(--slate-50);
    border-left: 3px solid var(--slate-600);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.note-title {
    font-weight: 700;
    color: var(--slate-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.note-content {
    color: var(--slate-800);
    line-height: 1.4;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-action {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
    transition: all 0.2s;
}

.btn-approve {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-approve:hover {
    background: #059669;
    color: white;
    border-color: #059669;
}

.btn-reject {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.btn-reject:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-delete {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-edit-badge {
    background: #eff6ff;
    color: var(--primary-blue);
    border: 1px solid #bfdbfe;
    cursor: pointer;
}

.btn-edit-badge:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-edit {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.btn-edit:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Modal Overlay & Dialog */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--slate-200);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--slate-600);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--rose-600);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.form-group-modal {
    margin-bottom: 1.2rem;
}

.form-group-modal:last-child {
    margin-bottom: 0;
}

.form-group-modal label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--slate-300);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--slate-800);
    background-color: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    background: var(--slate-50);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px dashed var(--slate-200);
}

.empty-state i {
    font-size: 3rem;
    color: var(--slate-300);
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    color: var(--slate-800);
}

.empty-state p {
    margin: 0;
    color: var(--slate-600);
    font-size: 0.9rem;
}
