/* ========================================
   Company Registration - 4 Step Form
   ======================================== */

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes checkBounce {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Main Layout ---- */
.reg-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fff;
    min-height: calc(100vh - 130px);
}

/* Left Image Panel */
.reg-image-panel {
    width: 28%;
    min-width: 280px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.reg-image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.reg-image-panel::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 100%;
    background: linear-gradient(to left, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

/* Right Content Area */
.reg-content {
    flex: 1;
    padding: 2.5rem 4% 2.5rem 4%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Step Indicator ---- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 600px;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 0 0 auto;
    min-width: 100px;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    cursor: default;
}
.step-circle svg {
    width: 18px;
    height: 18px;
}
.step-label {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    margin-top: 8px;
    transition: color 0.3s;
    white-space: nowrap;
}

/* Active Step */
.step-item.active .step-circle {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 4px 14px rgba(17, 17, 17, 0.25);
}
.step-item.active .step-label {
    color: #111;
    font-weight: 600;
}

/* Completed Step */
.step-item.completed .step-circle {
    background: #fff;
    color: #111;
    border-color: #111;
}
.step-item.completed .step-label {
    color: #111;
    font-weight: 500;
}

/* Connecting Lines */
.company-regi-step-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
    margin: 0 -4px;
    position: relative;
    top: -12px;
    transition: background 0.4s;
    min-width: 40px;
}
.company-regi-step-line.completed {
    background: #111;
}

/* ---- Form Content Area ---- */
.reg-form-container {
    width: 100%;
    max-width: 800px;
    animation: fadeInUp 0.5s ease-out;
}

/* Step Panels */
.step-panel {
    display: none;
    animation: fadeInUp 0.45s ease-out;
}
.step-panel.active {
    display: block;
}

/* Step Header */
.step-header {
    margin-bottom: 2rem;
}
.step-title {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    margin: 0 0 0.5rem 0;
}
.step-subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 300;
    margin: 0;
}

/* Content Split (form + info card) */
.reg-content-split {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}
.reg-form-column {
    flex: 1;
    min-width: 0;
}

/* ---- Form Elements ---- */
.reg-form-group {
    margin-bottom: 1.5rem;
}
.reg-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}
.reg-form-label .optional {
    color: #999;
    font-weight: 300;
    font-size: 13px;
}
.reg-form-input,
.reg-form-select,
.reg-form-textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 400;
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
    background: #fff;
}
.reg-form-input::placeholder,
.reg-form-select::placeholder,
.reg-form-textarea::placeholder {
    color: #aaa;
    font-weight: 300;
}
.reg-form-input:hover,
.reg-form-select:hover,
.reg-form-textarea:hover {
    border-color: #ccc;
}
.reg-form-input:focus,
.reg-form-select:focus,
.reg-form-textarea:focus {
    border-color: #c59c5f;
    box-shadow: 0 0 0 3px rgba(197, 156, 95, 0.1);
}
.reg-form-input.is-invalid,
.reg-form-select.is-invalid,
.reg-form-textarea.is-invalid {
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.reg-form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
.reg-form-select option[value=""] {
    color: #aaa;
}

.reg-form-textarea {
    padding: 0.75rem 1rem;
    min-height: 90px;
    resize: vertical;
    line-height: 1.5;
}

/* Row layout for side-by-side fields */
.reg-form-row {
    display: flex;
    gap: 1rem;
}
.reg-form-row .reg-form-group {
    flex: 1;
}

/* Password Input Wrapper */
.reg-input-wrapper {
    position: relative;
}
.reg-input-wrapper .reg-form-input {
    padding-right: 48px;
}
.reg-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}
.reg-toggle-password:hover {
    color: #111;
}

/* Error Messages */
.reg-error-message {
    color: #e11d48;
    font-size: 12px;
    font-weight: 400;
    margin-top: 6px;
    display: none;
    animation: slideIn 0.3s ease-out;
    padding-left: 2px;
}
.reg-error-message.visible {
    display: block;
}

/* ---- Info Card (Right Side) ---- */
.reg-info-card {
    width: 260px;
    min-width: 260px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    animation: fadeInRight 0.5s ease-out 0.2s both;
    position: sticky;
    top: 2rem;
    transition: all 0.3s;
}
.reg-info-card:hover {
    border-color: #e8dcc8;
    box-shadow: 0 8px 25px rgba(197, 156, 95, 0.06);
}

.reg-info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #eaeaea;
    margin-bottom: 1.25rem;
    color: #111;
    transition: all 0.3s;
}
.reg-info-card:hover .reg-info-icon {
    border-color: #c59c5f;
    color: #c59c5f;
    background: #fdf3e3;
}

.reg-info-success {
    min-width: 260px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    animation: fadeInRight 0.5s ease-out 0.2s both;
    position: sticky;
    top: 2rem;
    transition: all 0.3s;
}
.reg-info-success:hover {
    border-color: #e8dcc8;
    box-shadow: 0 8px 25px rgba(197, 156, 95, 0.06);
}

.success-model {
    text-align: center;
}

.reg-info-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin: 0 0 1rem 0;
}
.reg-info-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    font-weight: 300;
    margin: 0 0 1rem 0;
}
.reg-info-link {
    color: #c59c5f;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.reg-info-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.reg-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.reg-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    font-weight: 400;
}
.reg-info-list li:last-child {
    margin-bottom: 0;
}
.reg-info-list .info-check {
    flex-shrink: 0;
    margin-top: 1px;
    color: #c59c5f;
}

/* ---- Buttons Area ---- */
.reg-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 0;
}
.reg-buttons.with-back {
    justify-content: space-between;
}

.btn-reg-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 48px;
    padding: 0 2rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.btn-reg-continue::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.5s;
}
.btn-reg-continue:hover {
    background: #c59c5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 156, 95, 0.3);
}
.btn-reg-continue:hover::after {
    left: 100%;
}
.btn-reg-continue:active {
    transform: translateY(0);
}

.btn-reg-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 48px;
    padding: 0 2rem;
    background: #fff;
    color: #111;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-reg-back:hover {
    background: #fafafa;
    border-color: #ccc;
}

.btn-reg-skip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 48px;
    padding: 0 2rem;
    background: #fff;
    color: #111;
    border: 1px solid #c59c5f;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-reg-skip:hover {
    background: #fdf3e3;
}

.btn-reg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 48px;
    padding: 0 2rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    letter-spacing: 0.3px;
}
.btn-reg-submit:hover {
    background: #c59c5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 156, 95, 0.3);
}
.btn-reg-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Right-aligned buttons wrapper */
.reg-buttons-right {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

/* ---- Step 4: File Upload ---- */
.upload-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.upload-item:last-child {
    border-bottom: none;
}
.upload-item:hover {
    background: #fcfcfc;
}

.upload-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.upload-item-icon {
    width: 40px;
    height: 40px;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
    transition: all 0.2s;
}
.upload-item:hover .upload-item-icon {
    border-color: #c59c5f;
    color: #c59c5f;
    background: #fdf3e3;
}
.upload-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 2px 0;
}
.upload-item-info h4 .optional {
    font-weight: 300;
    color: #999;
    font-size: 13px;
}
.upload-item-info p {
    font-size: 12px;
    color: #888;
    margin: 0;
    font-weight: 300;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    gap: 6px;
    white-space: nowrap;
}
.btn-upload:hover {
    background: #fafafa;
    border-color: #c59c5f;
    color: #c59c5f;
}
.btn-upload.uploaded {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
}
.btn-upload.uploaded:hover {
    background: #dcfce7;
}

/* File name display */
.upload-file-name {
    font-size: 12px;
    color: #16a34a;
    margin-top: 4px;
    display: none;
    animation: slideIn 0.3s ease-out;
}
.upload-file-name.visible {
    display: block;
}

/* Hidden file inputs */
.upload-input {
    display: none;
}

/* Terms Checkbox for Step 4 */
.reg-terms {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 1.5rem 0 0.5rem 0;
}
.reg-terms-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #111;
    flex-shrink: 0;
    transition: all 0.2s;
}
.reg-terms-checkbox:checked {
    border-color: #111;
}
.reg-terms-label {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    font-weight: 300;
}
.reg-terms-label a {
    color: #c59c5f;
    text-decoration: none;
    font-weight: 600;
}
.reg-terms-label a:hover {
    text-decoration: underline;
}

/* ---- Success State (after submission) ---- */
.reg-success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.3s ease-out;
}
.reg-success-overlay.visible {
    display: flex;
}
.reg-success-modal {
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.4s ease-out 0.1s both;
}
.reg-success-icon {
    width: 72px;
    height: 72px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: #16a34a;
    animation: checkBounce 0.5s ease-out 0.3s both;
}
.reg-success-modal h2 {
    font-size: 22px;
    font-weight: 600;
    color: #111;
    margin: 0 0 0.75rem 0;
}
.reg-success-modal p {
    font-size: 14px;
    color: #666;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

/* ---- Progress Shimmer (loading on submit) ---- */
.btn-loading {
    background: linear-gradient(90deg, #111 25%, #333 50%, #111 75%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite !important;
    pointer-events: none;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .reg-info-card {
        width: 240px;
        min-width: 240px;
        padding: 1.5rem 1.25rem;
    }
}
@media (max-width: 960px) {
    .reg-content-split {
        flex-direction: column;
    }
    .reg-info-card {
        width: 100%;
        min-width: auto;
        position: static;
        order: -1;
    }
}
@media (max-width: 768px) {
    .reg-image-panel {
        display: none;
    }
    .reg-content {
        padding: 2rem 5%;
    }
    .step-indicator {
        margin-bottom: 2rem;
    }
    .step-item {
        min-width: 70px;
    }
    .step-label {
        font-size: 10px;
    }
    .reg-form-row {
        flex-direction: column;
        gap: 0;
    }
    .reg-buttons {
        flex-direction: column;
    }
    .reg-buttons.with-back {
        flex-direction: column-reverse;
    }
    .reg-buttons-right {
        width: 100%;
        flex-direction: column;
    }
    .btn-reg-continue,
    .btn-reg-back,
    .btn-reg-skip,
    .btn-reg-submit {
        width: 100%;
    }
}

/* ---- Step 5 Success Transform ---- */
.reg-main.step-5-active {
    background: url('../images/auth-bg.jpg') center/cover no-repeat !important;
    position: relative;
}
.reg-main.step-5-active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 1;
}
.reg-main.step-5-active .reg-image-panel {
    display: none !important;
}
.reg-main.step-5-active .reg-content {
    background: transparent !important;
    flex: 1 !important;
    padding: 2rem 4% !important;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}
.reg-main.step-5-active .reg-form-container {
    background: transparent !important;
    max-width: 100% !important;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: auto;
    padding: 0;
}

#step5Panel {
    background: #fff;
    padding: 4rem 5rem !important;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    animation: fadeInUp 0.5s ease-out;
    max-width: 720px !important;
    width: 100%;
    text-align: center;
}
#step5Panel .success-icon {
    width: 84px;
    height: 84px;
    background: #cbf6ca;
    color: #1a9611;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
}
#step5Panel .success-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 3.5px;
}
#step5Panel .step-title.success-model {
    font-size: 26px;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.25rem;
}
#step5Panel .step-subtitle.success-model {
    font-size: 14px;
    color: #222;
    line-height: 1.6;
    margin-bottom: 3rem;
}
#step5Panel .reg-info-success {
    text-align: left;
    background: #fdfdfd;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 2rem 2.5rem;
    margin: 0 auto 1rem auto;
}
#step5Panel .reg-info-icon {
    width: 48px;
    height: 48px;
    background: #fae8c8;
    color: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#step5Panel .reg-info-icon svg {
    width: 24px;
    height: 24px;
}
#step5Panel .reg-info-title {
    margin: 0 0 0.75rem 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}
#step5Panel .reg-info-text {
    font-size: 13px;
    color: #333;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
#step5Panel .reg-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
#step5Panel .reg-info-list li {
    font-size: 13px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#step5Panel .reg-info-list li svg {
    color: #111;
}
#step5Panel .btn-reg-submit {
    min-width: 160px;
    border-radius: 6px;
    padding: 12px 32px;
}
@media (max-width: 768px) {
    #step5Panel {
        padding: 3rem 1.5rem !important;
    }
}
