/* Driver Registration - Clean Design */

.register-main {
    padding: 120px 0 60px;
    min-height: 100vh;
    background: var(--color-surface);
}

.register-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Left Info */
.register-info {
    position: sticky;
    top: 120px;
    align-self: start;
}

.register-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.register-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 32px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    background: rgba(42, 77, 255, 0.08);
    border-radius: 12px;
    flex-shrink: 0;
}

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

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.benefit-text strong {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text);
}

.benefit-text span {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Form Wrapper */
.register-form-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* Progress Steps - Modern Design */
.form-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 0;
    position: relative;
}

/* Connecting line behind steps */
.form-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.progress-step {
    flex: 1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Step number circle */
.progress-step > span:first-child {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Step label text */
.progress-step > span:last-child {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

/* Hover effect */
.progress-step:hover > span:first-child {
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.progress-step:hover > span:last-child {
    color: var(--color-text);
}

/* Active step */
.progress-step.active > span:first-child {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 77, 255, 0.3);
    transform: scale(1.1);
}

.progress-step.active > span:last-child {
    color: var(--color-accent);
    font-weight: 600;
}

/* Completed step */
.progress-step.completed > span:first-child {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.progress-step.completed > span:first-child::after {
    content: '✓';
    font-size: 16px;
}

.progress-step.completed > span:last-child {
    color: #22c55e;
}

/* Hide number text when completed */
.progress-step.completed > span:first-child {
    font-size: 0;
}

/* Progress line fill for completed steps */
.progress-step.completed::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #22c55e;
    z-index: -1;
}

.progress-step:last-child.completed::after {
    display: none;
}

/* Form Steps */
.form-step {
    display: none;
}

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

.form-step h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--color-text);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Phone Input */
.phone-input {
    display: flex;
}

.country-code {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-weight: 600;
    color: var(--color-text);
}

.phone-input input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Checkbox - Normal Style */
.checkbox-group {
    margin-top: 24px;
    margin-bottom: 24px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text);
    line-height: 1;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--color-accent);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    margin: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
    background: rgba(42, 77, 255, 0.08);
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 77, 255, 0.2);
}

.checkbox-label .checkmark {
    display: none;
}

.checkbox-label span {
    line-height: 20px;
}

.checkbox-label a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.modal-body h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 20px 0 8px;
}

.modal-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 0 0 12px 20px;
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.modal-body li {
    margin-bottom: 4px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    flex: 1;
}

/* Error Message */
.error-msg {
    display: none;
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 500;
    padding: 4px 8px;
    background: #fef2f2;
    border-radius: 4px;
}

.form-group.has-error .error-msg {
    display: block;
    animation: shake 0.3s ease;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error .phone-input {
    border-color: #ef4444 !important;
    background: #fef2f2;
}

.form-group.has-error label {
    color: #ef4444;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* Upload Sections */
.upload-section {
    margin-bottom: 24px;
}

.upload-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.upload-grid {
    display: grid;
    gap: 12px;
}

.upload-grid.single {
    grid-template-columns: 120px;
}

.upload-grid.double {
    grid-template-columns: repeat(2, 1fr);
    max-width: 280px;
}

.upload-grid.triple {
    grid-template-columns: repeat(3, 1fr);
}

.upload-box {
    aspect-ratio: 4/3;
    border: 2px dashed #ddd;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: #fafafa;
    transition: all 0.2s ease;
    min-height: 80px;
}

.upload-box:hover {
    border-color: var(--color-accent);
    background: rgba(42, 77, 255, 0.02);
}

.upload-box.has-file {
    border-style: solid;
    border-color: #22c55e;
}

.upload-box.error {
    border-color: #ef4444;
}

.upload-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-placeholder span {
    font-size: 12px;
    font-weight: 500;
    color: #999;
}

.upload-preview {
    position: absolute;
    inset: 0;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-upload {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-upload:hover {
    background: #ef4444;
}

/* Buttons */
.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-light);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: var(--color-text);
}

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

.btn-next {
    width: 100%;
}

.btn-submit {
    flex: 1;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-loading:not([hidden]) {
    display: flex;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload Progress */
.upload-progress {
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-text-light);
}

.progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    width: 0%;
    transition: width 0.3s ease;
}

/* Results */
.form-result {
    text-align: center;
    padding: 48px 24px;
}

.form-result.form-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(34, 197, 94, 0.1);
}

/* Animated Success Checkmark */
.success-animation {
    margin: 0 auto 32px;
    animation: success-pop 0.5s ease-out forwards;
}

@keyframes success-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.checkmark-svg {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    padding: 20px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: rgba(255, 255, 255, 0.4);
    animation: checkmark-circle 0.6s ease-in-out forwards;
}

.checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 4;
    stroke-linecap: round;
    stroke: #fff;
    animation: checkmark-check 0.4s ease-in-out 0.4s forwards;
}

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

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

.form-success h2 {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 16px !important;
}

.success-text {
    font-size: 15px;
    color: var(--color-text-light);
    max-width: 400px;
    margin: 0 auto 32px !important;
    line-height: 1.6;
}

.btn-home {
    padding: 14px 40px;
    font-size: 16px;
    border-radius: 12px;
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.result-icon.success {
    background: #22c55e;
}

.result-icon.success::after {
    content: '';
    display: block;
    width: 20px;
    height: 32px;
    border: solid #fff;
    border-width: 0 4px 4px 0;
    transform: rotate(45deg) translate(8px, -4px);
}

.result-icon.error {
    background: #ef4444;
}

.result-icon.error::after {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    height: 100%;
}

.form-result h2 {
    margin-bottom: 12px;
}

.form-result p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 900px) {
    .register-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .register-info {
        position: static;
        text-align: center;
    }
    
    .benefits-list {
        display: none;
    }
}

@media (max-width: 600px) {
    .register-main {
        padding: 100px 16px 40px;
    }
    
    .register-form-wrapper {
        padding: 20px;
    }
    
    .form-progress {
        gap: 0;
        margin-bottom: 32px;
    }
    
    .form-progress::before {
        left: 24px;
        right: 24px;
        top: 16px;
    }

    .progress-step > span:first-child {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .progress-step > span:last-child {
        font-size: 10px;
        max-width: 60px;
        white-space: normal;
        line-height: 1.2;
    }
    
    .progress-step.active > span:first-child {
        transform: scale(1.05);
    }
    
    .progress-step.completed::after {
        top: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .upload-grid.triple {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-buttons {
        flex-direction: column;
    }
}
