:root {
    --manual-bg: #f5f6fb;
    --manual-surface: #ffffff;
    --manual-border: #e2e8f0;
    --manual-muted: #64748b;
    --manual-primary: #6c5dd3;
    --manual-primary-dark: #5947c2;
    --manual-success: #10b981;
}

.manual-confirmation-page {
    background: var(--manual-bg);
    padding: 56px 24px 96px;
    min-height: 100vh;
    font-family: "Sora", "DM Sans", "Segoe UI", sans-serif;
    color: #0f172a;
}

.manual-confirmation-hero {
    max-width: 960px;
    margin: 0 auto 36px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(108, 93, 211, 0.12);
    color: var(--manual-primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.manual-confirmation-hero h1 {
    font-size: 34px;
    font-weight: 700;
    margin: 18px 0 12px;
    color: #0f172a;
}

.manual-confirmation-hero p {
    font-size: 16px;
    color: var(--manual-muted);
    margin: 0;
}

.manual-confirmation-container {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 0.9fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.manual-confirmation-card {
    background: var(--manual-surface);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    padding: 32px;
}

.manual-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.manual-form .manual-field {
    display: flex;
    flex-direction: column;
}

.manual-alert {
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
}

.manual-alert.is-error {
    background: rgba(248, 113, 113, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.manual-alert.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.manual-field label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    display: block;
}

.manual-field small {
    display: block;
    margin-top: 6px;
    color: var(--manual-muted);
    font-size: 12px;
}

.manual-field input,
.manual-field textarea {
    width: auto;
    border: 1px solid var(--manual-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fdfdff;
}

.manual-field textarea {
    resize: vertical;
    min-height: 110px;
}

.manual-field input:focus,
.manual-field textarea:focus {
    border-color: rgba(108, 93, 211, 0.6);
    box-shadow: 0 0 0 3px rgba(108, 93, 211, 0.15);
    outline: none;
}

.field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.field-heading .pill {
    background: rgba(108, 93, 211, 0.12);
    color: var(--manual-primary);
    font-weight: 600;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
}

.manual-order-picker {
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: 16px;
    padding: 16px;
    background: #f8f9ff;
}

.manual-order-item {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.manual-order-item:hover {
    border-color: rgba(108, 93, 211, 0.5);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.manual-order-item.selected {
    border-color: rgba(108, 93, 211, 0.8);
    background: #f5f3ff;
    box-shadow: 0 12px 32px rgba(108, 93, 211, 0.15);
}

.manual-order-item .order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.manual-order-item .order-number {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
}

.manual-order-item .order-total {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
}

.manual-order-item .order-meta {
    font-size: 13px;
    color: var(--manual-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.manual-order-item .order-products {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 14px;
}

.picker-search input {
    border: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
    font-family: inherit;
}

.picker-search input:focus {
    outline: none;
}

.picker-body {
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#manual-order-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--manual-muted);
    font-size: 14px;
}

.manual-selected-orders {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.manual-selected-orders > * {
    background: #eef2ff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #4338ca;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.manual-selected-orders button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font-size: 16px;
    line-height: 1;
}

.manual-upload {
    border: 2px dashed rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 32px;
    background: #fcfcff;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.manual-upload:hover {
    border-color: rgba(108, 93, 211, 0.6);
    background: #f2f4ff;
}

.manual-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.manual-upload .upload-content svg {
    color: var(--manual-primary);
    margin-bottom: 12px;
}

.manual-upload .upload-content strong {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
}

.manual-upload .upload-content p {
    margin: 0;
    color: var(--manual-muted);
    font-size: 13px;
}

.manual-upload-preview {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.manual-upload-preview .preview-item {
    border: 1px solid var(--manual-border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    background: #fff;
}

.manual-form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manual-submit-btn {
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6c5dd3 0%, #936dff 100%);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.manual-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(108, 93, 211, 0.25);
}

.manual-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loader {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.manual-submit-btn.loading .btn-loader {
    display: inline-flex;
}

.helper-text {
    margin: 0;
    font-size: 13px;
    color: var(--manual-muted);
    text-align: center;
}

.manual-success {
    text-align: center;
    padding: 48px 32px;
}

.manual-success .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--manual-success);
}

.manual-success h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.manual-success p {
    color: var(--manual-muted);
    margin: 0 0 24px;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.manual-btn-primary,
.manual-btn-secondary,
.manual-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.manual-btn-primary {
    background: linear-gradient(135deg, #6c5dd3 0%, #8b7ee8 100%);
    color: #fff;
}

.manual-btn-secondary {
    border: 2px solid rgba(15, 23, 42, 0.1);
    color: #0f172a;
    background: #fff;
}

.manual-btn-link {
    color: var(--manual-primary);
    font-size: 14px;
    padding: 0;
}

.manual-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background: var(--manual-surface);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.sidebar-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.sidebar-card ul {
    padding-left: 20px;
    margin: 0;
    color: var(--manual-muted);
    line-height: 1.8;
    font-size: 14px;
}

.sidebar-card p {
    color: var(--manual-muted);
    font-size: 14px;
    margin: 0 0 12px;
}

.manual-btn-link:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .manual-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .manual-confirmation-container {
        grid-template-columns: 1fr;
    }

    .manual-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1 1 260px;
    }
}

@media (max-width: 640px) {
    .manual-confirmation-page {
        padding: 32px 16px 64px;
    }

    .manual-form-grid {
        grid-template-columns: 1fr;
    }

    .manual-confirmation-card,
    .sidebar-card {
        padding: 24px;
    }

    .manual-upload {
        padding: 24px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
