/* Wizard Styles - Professional SaaS UI */

.wizard-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Wizard Card */
.wizard-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wizard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    text-align: center;
}

.wizard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.wizard-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step-label {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.progress-step.completed .step-label {
    color: var(--success-color);
}

.progress-line {
    width: 80px;
    height: 3px;
    background: var(--border-color);
    margin: 0 10px;
    margin-bottom: 28px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.progress-step.completed + .progress-line {
    background: var(--success-color);
}

/* Wizard Steps */
.wizard-form {
    padding: 30px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.step-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Select Cards */
.select-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    text-align: left;
}

.select-card {
    position: relative;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.select-card:hover {
    border-color: var(--primary-light);
    background: rgba(37, 99, 235, 0.02);
}

.select-card.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.select-card input {
    position: absolute;
    opacity: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.select-card .check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.select-card.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Category Cards */
.category-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.category-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.category-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-card.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.category-card input {
    position: absolute;
    opacity: 0;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon.it {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.category-icon.pantry {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.category-icon.others {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #9333ea;
}

.category-info {
    flex: 1;
}

.category-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.category-card .check-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.category-card.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Problem Grid */
.detail-section {
    text-align: left;
    margin-bottom: 20px;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.problem-card {
    position: relative;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.problem-card:hover {
    border-color: var(--primary-light);
}

.problem-card.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.problem-card input {
    position: absolute;
    opacity: 0;
}

.problem-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.problem-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.problem-card .check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.problem-card.selected .check-icon {
    opacity: 1;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.product-card {
    position: relative;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
    text-align: center;
}

.product-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.product-card.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.product-card input {
    position: absolute;
    opacity: 0;
}

.product-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.product-stock {
    font-size: 0.7rem;
    color: var(--success-color);
    font-weight: 500;
    text-transform: uppercase;
}

.product-card .check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.product-card.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Quantity Input */
.quantity-input {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 200px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quantity-input .form-control {
    width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Others Info */
.others-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 10px;
    text-align: left;
}

.others-info svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.others-info p {
    color: var(--text-secondary);
    margin: 0;
}

/* Review Card */
.review-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 25px;
    text-align: left;
}

.review-section {
    margin-bottom: 25px;
}

.review-section:last-child {
    margin-bottom: 0;
}

.review-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

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

.review-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.review-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* Submit Notice */
.submit-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 25px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    text-align: left;
}

.submit-notice svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.submit-notice p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Navigation */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.wizard-navigation .btn {
    min-width: 140px;
}

/* Success State */
.wizard-success {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.success-animation {
    margin-bottom: 30px;
}

.checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--success-color);
    stroke-width: 3;
    stroke-linecap: round;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.success-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.ticket-summary-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
}

.ticket-id-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.ticket-id-display .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.ticket-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    flex: 1;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.copy-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-value {
    font-weight: 500;
    color: var(--text-primary);
}

.success-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.success-info svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.success-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.success-info a {
    color: var(--primary-color);
    font-weight: 500;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Form Grid */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: left;
}

/* Required indicator */
.required {
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .wizard-container {
        padding: 20px 15px;
    }

    .wizard-header {
        padding: 25px 20px;
    }

    .wizard-header h1 {
        font-size: 1.4rem;
    }

    .wizard-progress {
        padding: 15px 10px;
        flex-wrap: wrap;
        gap: 5px;
    }

    .progress-line {
        width: 20px;
        margin: 0 5px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.6rem;
        display: none;
    }

    .progress-step.active .step-label,
    .progress-step.completed .step-label {
        display: block;
    }

    .wizard-form {
        padding: 20px 15px;
    }

    .step-icon {
        width: 60px;
        height: 60px;
    }

    .step-icon svg {
        width: 32px;
        height: 32px;
    }

    .step-content h2 {
        font-size: 1.25rem;
    }

    .step-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .select-cards {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        padding: 12px;
    }

    .product-image {
        width: 60px;
        height: 60px;
        margin-bottom: 8px;
    }

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

    .category-card {
        padding: 15px;
        gap: 12px;
    }

    .category-icon {
        width: 45px;
        height: 45px;
    }

    .category-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-title {
        font-size: 1rem;
    }

    .category-desc {
        font-size: 0.8rem;
    }

    .wizard-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .wizard-navigation .btn {
        width: 100%;
        justify-content: center;
    }

    .wizard-success {
        padding: 30px 20px;
    }

    .success-title {
        font-size: 1.4rem;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ticket-id-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ticket-number {
        font-size: 1.1rem;
        word-break: break-all;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }

    .review-card {
        padding: 20px 15px;
    }

    .review-row {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .review-value {
        text-align: left;
    }

    .form-grid {
        gap: 20px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .progress-line {
        width: 15px;
        margin: 0 3px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .product-card {
        padding: 10px;
    }

    .product-image {
        width: 50px;
        height: 50px;
    }

    .product-name {
        font-size: 0.85rem;
    }
}
