/* Apple HIG Driver App Styles */
#aura-driver-app-root {
    max-width: 860px;
    margin: 60px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
}

/* Header */
.aura-app-header {
    text-align: center;
    margin-bottom: 40px;
}

.app-logo svg,
.app-logo img {
    margin: 0 auto 16px;
    stroke: #1d1d1f;
    max-height: 80px;
    width: auto;
    display: block;
}

.aura-app-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.aura-app-header p {
    font-size: 19px;
    color: #86868b;
    font-weight: 400;
}

/* Stepper */
.aura-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.aura-stepper .step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #86868b;
    font-weight: 500;
    font-size: 14px;
}

.aura-stepper .step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.aura-stepper .step.active {
    color: #1d1d1f;
}

.aura-stepper .step.active span {
    background: #0071e3;
}

.step-line {
    width: 60px;
    height: 1px;
    background: #e5e5e5;
    margin: 0 16px;
}

/* Card */
.aura-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.step-heading {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    border-bottom: 1px solid #f5f5f7;
    padding-bottom: 15px;
}

/* Fields */
.field-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.field-group {
    flex: 1;
    margin-bottom: 24px;
    position: relative;
    /* For error msg */
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.field-group input,
.field-group textarea,
.field-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    background: #fff;
    color: #1d1d1f;
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-sizing: border-box;
    -webkit-appearance: none;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.field-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
    /* Make space for arrow */
    cursor: pointer;
}

/* Payment Options */
.field-hint {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
    margin-top: -4px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.payment-option:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-option input[type="radio"]:checked+.option-content {
    color: #0071e3;
}

.payment-option input[type="radio"]:checked~.option-check {
    background: #0071e3;
    border-color: #0071e3;
}

.payment-option input[type="radio"]:checked~.option-check::after {
    opacity: 1;
    transform: scale(1);
}

.payment-option:has(input:checked) {
    border-color: #0071e3;
    background: #f0f7ff;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 14px;
    color: #86868b;
}

.option-check {
    width: 24px;
    height: 24px;
    border: 2px solid #d2d2d7;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.option-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: all 0.2s;
}

/* Error State */
input.aura-error,
textarea.aura-error,
select.aura-error {
    border-color: #ff3b30;
    background-color: #fff2f2;
}

.error-msg {
    display: none;
    font-size: 12px;
    color: #ff3b30;
    margin-top: 6px;
}

.field-group.has-error .error-msg {
    display: block;
}

/* Buttons */
.form-actions {
    margin-top: 40px;
    display: flex;
}

.form-actions.right {
    justify-content: flex-end;
}

.form-actions.split {
    justify-content: space-between;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border-radius: 99px;
    /* Pill */
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: transform 0.1s;
}

.btn-primary {
    background: #0071e3;
    /* iOS Blue */
    color: #fff;
}

.btn-primary:active {
    transform: scale(0.98);
    background: #0077ed;
}

.btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
}

.btn-secondary:hover {
    background: #e8e8ed;
}

/* Checkboxes (Consent) */
.consent-box {
    background: #f5f5f7;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    align-items: flex-start;
}

.checkbox-row:last-child {
    margin-bottom: 0;
}

.checkbox-row input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #0071e3;
}

/* Success */
.success-card {
    text-align: center;
    padding: 60px 40px;
}

.success-icon svg {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.animate-check path,
.animate-check polyline {
    animation: dash 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-card h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

/* Notes */
.info-note {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #49494d;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.info-note.application-note {
    background: #eef7fe;
    /* Light blue tint */
    border-color: rgba(0, 113, 227, 0.1);
    color: #1d1d1f;
}

.note-icon {
    color: #0071e3;
    flex-shrink: 0;
    margin-top: 2px;
}

.note-content strong {
    color: #0071e3;
}

/* Success Card Refinement */
.app-ref-container {
    margin: 24px 0;
    text-align: center;
}

.ref-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #86868b;
    margin-bottom: 8px;
    font-weight: 600;
}

.app-confirm-ref {
    font-family: "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
    font-size: 14px;
    /* Smaller as requested */
    background: #f5f5f7;
    padding: 8px 16px;
    border-radius: 8px;
    color: #1d1d1f;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.05);
    user-select: all;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
}

.success-note {
    background: #fff;
    border: 1px solid #e5e5e5;
    text-align: left;
    max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .field-row {
        flex-direction: column;
        gap: 0;
    }

    #aura-driver-app-root {
        margin: 20px;
    }

    .aura-card {
        padding: 24px;
    }
}

/* Document Upload Section */
.doc-upload-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f5f5f7;
}

.doc-upload-section:last-of-type {
    border-bottom: none;
}

.doc-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.doc-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f5f5f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0071e3;
}

.doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-info strong {
    font-size: 17px;
    color: #1d1d1f;
    font-weight: 600;
}

.doc-desc {
    font-size: 14px;
    color: #86868b;
}

.file-upload-zone {
    border: 2px dashed #d2d2d7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.file-upload-zone.drag-over {
    border-color: #0071e3;
    background: #f0f7ff;
}

.file-input {
    display: none;
}

.upload-placeholder {
    padding: 40px 24px;
    text-align: center;
    color: #86868b;
}

.upload-placeholder svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.upload-placeholder p {
    font-size: 15px;
    margin: 0 0 8px;
    color: #1d1d1f;
}

.upload-placeholder strong {
    color: #0071e3;
}

.file-hint {
    font-size: 13px;
    color: #86868b;
}

.file-preview {
    padding: 16px;
    background: #f5f5f7;
    border-radius: 12px;
}

.preview-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
}

.preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.file-name {
    font-size: 14px;
    color: #1d1d1f;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.btn-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff3b30;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.btn-remove:hover {
    transform: scale(1.1);
}

.btn-remove:active {
    transform: scale(0.95);
}

.muted {
    color: #86868b;
    font-size: 14px;
}

.info-note {
    background: #f5f5f7;
    border-left: 3px solid #0071e3;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.info-note strong {
    color: #1d1d1f;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-row:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.radio-row input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #0071e3;
}

.radio-row span {
    font-size: 15px;
    color: #1d1d1f;
}