/* ========================================
   Integrated Transaction Manager Styles
   ======================================== */

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

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

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.slide-down {
    animation: slideDown 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.spinner-large {
    width: 50px;
    height: 50px;
    border-width: 5px;
}

/* ===== FORM ELEMENTS ===== */
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* ===== FILE UPLOAD ===== */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background-color: #fafafa;
}

.upload-area:hover {
    border-color: #3b82f6;
    background-color: #f0f9ff;
}

.upload-area.dragover {
    border-color: #3b82f6;
    background-color: #dbeafe;
    transform: scale(1.02);
}

/* ===== CUSTOM RADIO BUTTONS ===== */
.custom-radio {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.custom-radio:checked {
    border-color: #3b82f6;
    background-color: #3b82f6;
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* ===== CONFIRMATION OPTIONS ===== */
.confirmation-option {
    transition: all 0.3s ease;
}

.confirmation-option:hover {
    transform: translateX(5px);
}

.confirmation-option.selected-setuju {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
}

.confirmation-option.selected-komplain {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
}

/* ===== STAR RATING ===== */
.star-rating {
    transition: color 0.2s, transform 0.2s;
    cursor: pointer;
}

.star-rating:hover {
    transform: scale(1.1);
}

.star-rating.filled {
    color: #fbbf24 !important;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    position: relative;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #e5e7eb;
    z-index: 0;
    transform: translateY(-50%);
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #10b981);
    transition: width 0.5s ease;
}

.progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e5e7eb;
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    transition: all 0.3s;
}

.progress-step.active .progress-circle {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .progress-circle {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.progress-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.progress-step.active .progress-label,
.progress-step.completed .progress-label {
    color: #1f2937;
    font-weight: 600;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-active {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-disputed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===== CARDS ===== */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.info-card-body {
    color: #6b7280;
}

.info-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-card-row:last-child {
    border-bottom: none;
}

.info-card-label {
    font-weight: 500;
    color: #6b7280;
}

.info-card-value {
    font-weight: 600;
    color: #1f2937;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.btn-success {
    background: linear-gradient(to right, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(to right, #059669, #047857);
}

.btn-danger {
    background: linear-gradient(to right, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(to right, #dc2626, #b91c1c);
}

/* ===== MESSAGES ===== */
.itm-message {
    max-width: 400px;
    z-index: 9999;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== ADMIN TABLES ===== */
.wp-list-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.wp-list-table thead {
    background-color: #f9fafb;
}

.wp-list-table th {
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem !important;
}

.wp-list-table td {
    padding: 0.75rem 1rem !important;
    vertical-align: middle;
}

.wp-list-table tbody tr:hover {
    background-color: #f9fafb;
}

.wp-list-table code {
    background-color: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card p {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-card-blue {
    border-left-color: #3b82f6;
}

.stat-card-blue h3 {
    color: #3b82f6;
}

.stat-card-green {
    border-left-color: #10b981;
}

.stat-card-green h3 {
    color: #10b981;
}

.stat-card-red {
    border-left-color: #ef4444;
}

.stat-card-red h3 {
    color: #ef4444;
}

.stat-card-yellow {
    border-left-color: #f59e0b;
}

.stat-card-yellow h3 {
    color: #f59e0b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .progress-container {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .progress-line {
        display: none;
    }
    
    .progress-step {
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .progress-circle {
        width: 50px;
        height: 50px;
    }
    
    .stat-card p {
        font-size: 1.5rem;
    }
    
    .itm-message {
        top: auto !important;
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        max-width: none !important;
    }
    
    .wp-list-table {
        font-size: 0.875rem;
    }
    
    .wp-list-table th,
    .wp-list-table td {
        padding: 0.5rem !important;
    }
}

@media (max-width: 640px) {
    .info-card-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn {
        width: 100%;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print,
    button,
    .btn,
    select,
    input[type="file"] {
        display: none !important;
    }
    
    .wp-list-table {
        font-size: 10px;
    }
    
    .stat-card {
        break-inside: avoid;
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.opacity-50 {
    opacity: 0.5;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== TRANSITIONS ===== */
.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
