/* Portfolio Page Styles - Modern Redesign */

/* Summary Section - Clean Dashboard Style */
.summary-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.summary-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.summary-label {
    font-size: 11px;
    color: #64748B;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.summary-value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--mandiri-blue);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.summary-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.summary-status.green {
    background-color: #D1FAE5;
    color: #065F46;
}

.summary-status.yellow {
    background-color: #FEF3C7;
    color: #92400E;
}

.summary-status.red {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Controls - Modern Filter System */
.portfolio-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7F9 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--mandiri-blue);
    box-shadow: 0 0 0 3px rgba(0, 164, 228, 0.12);
    background-color: #FFFFFF;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    background-color: #FFFFFF;
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-width: 140px;
}

.filter-select:hover {
    border-color: #D4DCEA;
    background-color: #F8FAFC;
}

.filter-select:focus {
    outline: none;
    border-color: var(--mandiri-blue);
    box-shadow: 0 0 0 3px rgba(0, 164, 228, 0.12);
}

/* Active Filter Pills (Signature Element) */
.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: var(--mandiri-blue);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.filter-pill-remove {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.filter-pill-remove:hover {
    opacity: 1;
}

/* Modern Data Table */
.table-container {
    background-color: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.portfolio-table thead {
    background: linear-gradient(135deg, #F8FAFC 0%, #F5F7F9 100%);
    border-bottom: 1px solid #E2E8F0;
}

.portfolio-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background-color 0.2s ease;
}

.portfolio-table th:hover {
    background-color: #EEF2F5;
}

.sort-indicator {
    opacity: 0.5;
    font-size: 10px;
    margin-left: 4px;
}

.portfolio-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-secondary);
    font-size: 13px;
}

.portfolio-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #FFFFFF;
}

.portfolio-table tbody tr:nth-child(even) {
    background-color: #FAFBFC;
}

.portfolio-table tbody tr:hover {
    background-color: #EEF7FF;
    box-shadow: inset 0 0 0 1px #E0ECFF;
}

/* Modern Status Badges with Subtle Design */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: capitalize;
    transition: all 0.2s ease;
}

.status-badge::before {
    content: '●';
    font-size: 8px;
}

.status-approve {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.status-approve:hover {
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.status-pending {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    border: 1px solid #FCD34D;
}

.status-pending:hover {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.status-need-fu {
    background: linear-gradient(135deg, #DBEAFE 0%, #BAE6FD 100%);
    color: #0C4A6E;
    border: 1px solid #7DD3FC;
}

.status-need-fu:hover {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.status-reject {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.status-reject:hover {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* EWS Badge */
.ews-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #FEE2E2;
    color: #991B1B;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #FECACA;
}

.ews-badge.none {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* Modern Action Buttons */
.action-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--mandiri-blue) 0%, #0078B8 100%);
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 164, 228, 0.15);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 164, 228, 0.25);
    background: linear-gradient(135deg, #0098E8 0%, #0068A8 100%);
}

/* Modern Modal with Signature Left Border */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.25s ease-out;
    overflow-y: auto;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background-color: #FFFFFF;
    margin: 0 auto;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    animation: slideDown 0.3s ease-out;
    border: 1px solid #E2E8F0;
    overflow: hidden;
}

/* Modal Header - Clean and Professional */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 32px;
    border-bottom: 1px solid #E2E8F0;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

.modal-header-left h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 10px 0;
}

.modal-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    padding: 4px 10px;
    background-color: #F3F4F6;
    border-radius: 6px;
}

.meta-item:not(:last-child)::after {
    content: none;
}

.close {
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    color: #9CA3AF;
    line-height: 1;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close:hover {
    color: #374151;
    background-color: #F3F4F6;
}

/* Modal Sections - Organized with Subtle Separation */
.modal-section {
    padding: 28px 32px;
    border-bottom: 1px solid #F0F0F0;
}

.modal-section:first-of-type {
    padding-top: 0;
    border-bottom: 1px solid #E2E8F0;
}

.modal-section:last-of-type {
    border-bottom: none;
    padding-bottom: 32px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #1F2937;
    margin: 0 0 20px 0;
}

/* Data Grid - Clean Display */
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.data-field {
    display: flex;
    flex-direction: column;
}

.data-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6B7280;
    margin-bottom: 8px;
}

.data-value {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
}

/* Document Grid - Simplified */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.doc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background-color: #F9FAFB;
    transition: all 0.2s ease;
}

.doc-card:hover {
    border-color: #D4DCEA;
    background-color: #FFFFFF;
}

.doc-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #10B981;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.doc-check.missing {
    background-color: #EF4444;
}

.doc-info {
    flex: 1;
}

.doc-name {
    font-size: 13px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 3px;
}

.doc-status {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.doc-status.missing {
    color: #EF4444;
}

/* Action Section */
.action-section {
    background-color: var(--mandiri-blue-pale);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 28px;
    border-left: 4px solid var(--mandiri-blue);
}

/* Modal Actions & Footer */
.modal-actions {
    border-bottom: none;
    padding-top: 0;
    padding-bottom: 28px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 32px;
    border-top: 1px solid #E2E8F0;
    background-color: #F9FAFB;
}

.btn-outline {
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-lighter);
    border-color: var(--gray-400);
}

.action-group {
    margin-bottom: 16px;
}

.action-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--mandiri-blue);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-success {
    background-color: #10B981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-warning {
    background-color: #F59E0B;
    color: white;
}

.btn-warning:hover {
    background-color: #D97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-danger {
    background-color: #EF4444;
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-primary {
    background-color: var(--mandiri-blue);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--mandiri-blue-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.2);
}

#reasonSection,
#rejectReasonSection {
    margin-top: 0;
    background-color: #F9FAFB;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

#reasonSection label,
#rejectReasonSection label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1F2937;
    font-size: 13px;
    text-transform: capitalize;
}

#reasonSelect,
#notesInput,
#rejectNotesInput {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 10px;
    width: 100%;
}

#reasonSelect:focus,
#notesInput:focus,
#rejectNotesInput:focus {
    outline: none;
    border-color: var(--mandiri-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

#notesInput,
#rejectNotesInput {
    min-height: 80px;
    resize: vertical;
}

/* Modern Form Fields */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #1F2937;
    text-transform: capitalize;
}

.form-input {
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background-color: #FFFFFF;
}

.form-input:hover {
    border-color: #D4DCEA;
}

.form-input:focus {
    outline: none;
    border-color: var(--mandiri-blue);
    box-shadow: 0 0 0 3px rgba(0, 164, 228, 0.1);
    background-color: #FFFFFF;
}

.form-input select {
    cursor: pointer;
}

/* Modern Period Button Styling */
.period-btn {
    padding: 12px 20px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background-color: #FFFFFF;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    color: #6B7280;
}

.period-btn:hover {
    border-color: #D4DCEA;
    background-color: #F8FAFC;
    color: #374151;
}

.period-btn.active {
    background: linear-gradient(135deg, var(--mandiri-blue) 0%, #0078B8 100%);
    color: white;
    border-color: var(--mandiri-blue);
    box-shadow: 0 4px 12px rgba(0, 164, 228, 0.2);
}

#periodCard {
    transition: transform 0.2s, box-shadow 0.2s;
}

#periodCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .summary-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .summary-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .summary-card {
        padding: 16px 12px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .filter-select {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .summary-section {
        grid-template-columns: 1fr;
    }

    .portfolio-controls {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .portfolio-table th,
    .portfolio-table td {
        padding: 10px 8px;
        font-size: 11px;
    }
}
