/* v9.0.2 */
/* ============================================================================
   quick-update-module-v8.5.3-4.css
   Giao diện Wizard cho Module Cập nhật nhanh - Version 4
   - Thêm nút Hủy bỏ (Cancel)
   - Tối ưu footer cho 3 nút
   ============================================================================ */

:root {
    --qu-primary: #5865f2;
    --qu-success: #10b981;
    --qu-warning: #f59e0b;
    --qu-danger: #ef4444;
    --qu-bg: #ffffff;
    --qu-text: #0f172a;
    --qu-text-muted: #64748b;
    --qu-border: #e2e8f0;
    --qu-radius: 16px;
    --qu-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.qu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qu-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.qu-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 90%;
    max-width: 500px;
    background: var(--qu-bg);
    border-radius: var(--qu-radius);
    box-shadow: var(--qu-shadow);
    z-index: 10999;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.qu-modal.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Wizard Progress Bar */
.qu-progress-container {
    padding: 20px 24px 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--qu-border);
}

.qu-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.qu-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--qu-border);
    transform: translateY(-50%);
    z-index: 1;
}

.qu-progress-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--qu-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--qu-text-muted);
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.qu-progress-step.is-active {
    border-color: var(--qu-primary);
    background: var(--qu-primary);
    color: white;
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.4);
}

.qu-progress-step.is-done {
    border-color: var(--qu-success);
    background: var(--qu-success);
    color: white;
}

/* Header */
.qu-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qu-header-title {
    display: flex;
    flex-direction: column;
}

.qu-title-jp {
    font-weight: 900;
    font-size: 18px;
    color: var(--qu-text);
    line-height: 1.2;
}

.qu-title-vi {
    font-weight: 600;
    font-size: 13px;
    color: var(--qu-text-muted);
}

.qu-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qu-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Body */
.qu-body {
    padding: 0 24px 24px;
    overflow-y: auto;
    flex: 1;
}

#qu-step-content {
    animation: qu-fade-in 0.3s ease-out;
}

@keyframes qu-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Info Step cuối */
.qu-hero-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 24px;
}

.qu-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.qu-hero-text {
    flex: 1;
}

.qu-hero-code {
    font-weight: 900;
    font-size: 16px;
    color: #1e293b;
}

.qu-hero-name {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* Fields */
.qu-field {
    margin-bottom: 20px;
}

.qu-label {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.qu-label-jp {
    font-weight: 800;
    font-size: 13px;
    color: #334155;
}

.qu-label-vi {
    font-weight: 600;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
}

.qu-input,
.qu-select {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
}

.qu-input:focus,
.qu-select:focus {
    border-color: var(--qu-primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
}

/* Selection Grid (for Employee) */
.qu-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.qu-selection-item {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.qu-selection-item.is-selected {
    border-color: var(--qu-primary);
    background: rgba(88, 101, 242, 0.05);
}

.qu-sel-name {
    font-weight: 850;
    font-size: 13px;
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
}

.qu-sel-sub {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

/* Footer */
.qu-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--qu-border);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    background: #f8fafc;
}

.qu-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    flex: 1;
}

.qu-btn-back {
    background: #e2e8f0;
    color: #475569;
}

.qu-btn-next {
    background: var(--qu-primary);
    color: white;
}

.qu-btn-save {
    background: var(--qu-success);
    color: white;
}

.qu-btn-cancel-text {
    background: transparent;
    color: var(--qu-danger);
    border: 1px solid var(--qu-border);
    flex: 0 0 auto;
    padding: 0 12px;
}

.qu-btn-cancel-text:hover {
    background: #fee2e2;
}

.qu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Summary List Step cuối */
.qu-summary-list {
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px 16px;
    border: 1px solid var(--qu-border);
}

.qu-summary-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--qu-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.qu-summary-item:last-child {
    border-bottom: none;
}

.qu-sum-label {
    flex: 1;
}

.qu-sum-val {
    font-weight: 850;
    color: #1e293b;
    text-align: right;
    margin-left: 12px;
}

/* Mobile optimization */
@media (max-width: 600px) {
    .qu-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        top: 0;
        left: 0;
        transform: translateY(100%);
        border-radius: 0;
    }

    .qu-modal.is-visible {
        transform: translateY(0);
    }

    .qu-footer {
        padding: 12px 16px;
        gap: 6px;
    }

    .qu-btn {
        font-size: 12px;
        padding: 0 8px;
    }
}