/* Container and Layout */
.ups-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.ups-form-wrapper {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.ups-form-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.ups-form-title {
    color: #002C5F;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Form Styles */
.ups-form {
    padding: 2rem;
}

.ups-form-group {
    margin-bottom: 1.5rem;
}

.ups-form-group label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.ups-form-group .required {
    color: #DC2626;
    margin-left: 0.25rem;
}

.ups-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 1rem;
    color: #1F2937;
    transition: all 0.2s ease;
}

.ups-input:focus {
    outline: none;
    border-color: #002C5F;
    box-shadow: 0 0 0 3px rgba(0, 44, 95, 0.1);
}

.ups-input:disabled,
.ups-input[readonly] {
    background-color: #F3F4F6;
    cursor: not-allowed;
}

input[type="date"].ups-input {
    min-height: 2.75rem;
}

/* Table Styles */
.ups-table-wrapper {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

.ups-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ups-table-header h2 {
    color: #002C5F;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.ups-table {
    width: 100%;
    border-collapse: collapse;
}

.ups-table th {
    background-color: #F9FAFB;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.ups-table td {
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
    color: #1F2937;
    vertical-align: middle;
}

.ups-table tr:hover {
    background-color: #F9FAFB;
}

/* Status Indicators */
.days-remaining {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.days-remaining.normal {
    background-color: #D1FAE5;
    color: #065F46;
}

.days-remaining.warning {
    background-color: #FEE2E2;
    color: #991B1B;
}

tr.status-warning td {
    background-color: #FEF2F2;
}

/* Button Styles */
.ups-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background-color: #002C5F;
    color: #FFFFFF;
    min-width: 120px;
}

.ups-button:hover {
    background-color: #001F42;
}

.ups-button:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

.ups-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.ups-button.loading {
    position: relative;
    color: transparent;
}

.ups-button.loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading 0.8s linear infinite;
}

.ups-button-secondary {
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    color: #374151;
}

.ups-button-secondary:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}

.ups-button-danger {
    background-color: #DC2626;
}

.ups-button-danger:hover {
    background-color: #B91C1C;
}

.ups-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-width: auto;
}

/* Modal Styles */
.ups-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ups-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.ups-modal-content {
    background: #FFFFFF;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ups-modal.active .ups-modal-content {
    transform: scale(1);
}

.ups-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ups-modal-header h3 {
    margin: 0;
    color: #002C5F;
    font-weight: 600;
}

.ups-modal-close {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 0.5rem;
}

.ups-modal-body {
    padding: 2rem;
    text-align: center;
}

.ups-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ups-modal-icon.warning {
    color: #DC2626;
}

.ups-modal-subtitle {
    color: #6B7280;
    margin-top: 0.5rem;
}

.ups-modal-actions {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Notifications */
.ups-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1100;
}

.ups-notification.success {
    border-left: 4px solid #059669;
}

.ups-notification.error {
    border-left: 4px solid #DC2626;
}

.ups-notification.show {
    transform: translateX(0);
}

/* Action Buttons Container */
.ups-action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Animations */
@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ups-container {
        padding: 1rem;
    }
    
    .ups-form {
        padding: 1rem;
    }
    
    .ups-table-container {
        overflow-x: auto;
    }
    
    .ups-table {
        min-width: 800px;
    }
    
    .ups-action-buttons {
        flex-direction: column;
    }
    
    .ups-button-small {
        width: 100%;
    }
    
    .ups-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .ups-table-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ups-table-actions {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .ups-button,
    .ups-modal,
    .ups-notification {
        display: none !important;
    }
    
    .ups-table {
        border: 1px solid #E5E7EB;
    }
    
    .ups-table th,
    .ups-table td {
        border: 1px solid #E5E7EB;
    }
}