/* ==========================
   RESET
========================== */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html,
body{
    height:100%;
}

body{
    margin:0;
    font-family:'Inter',sans-serif;
    color:#1f2937;
    background:#fafafa;
    background-image:url("../images/backgrounds/cargo-drawing-bg-with-white-bg.png");
    background-repeat:no-repeat;
    background-position:center;
    background-size:cover;
}

.form-error{

    margin-bottom:18px;

    padding:12px;

    border-radius:6px;

    background:#ffe8e8;

    color:#d32f2f;

    border:1px solid #f4bcbc;

    font-size:14px;

}

/* ==========================
   PAGE
========================== */

.page{
    min-height:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:40px 16px;
}

/* ==========================
   CARD
========================== */

.card{
    width:min(750px,92vw);
    background:#fff;
    border-radius:18px;
    border: 3px solid #aeaeae;
    padding:30px 48px 34px;
}

/* ==========================
   HEADER
========================== */

.card__header{
    text-align:center;
}

.title{
    margin:0;
    font-size:28px;
    font-weight:700;
}

/* ==========================
   PROGRESS
========================== */

.steps{
    list-style:none;
    display:flex;
    justify-content:center;
    align-items:flex-start;
    margin:28px auto 0;
    padding:0;
}

.steps__item{
    position:relative;
    width:120px;
    text-align:center;
}

.steps__item:not(:last-child)::after{
    content:"";
    position:absolute;
    top:11px;
    left:63%;
    width:74%;
    height:2px;
    background:#dddddd;
}

.steps__dot{
    width:25px;
    height:25px;
    border-radius:50%;
    background:#e5e5e5;
    color:#888;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 8px;
    font-size:11px;
    font-weight:600;
}

.steps__item--active .steps__dot{
    background:#ff8a00;
    color:#fff;
}

.steps__label{
    font-size:14px;
    color:#7b7b7b;
}

.steps__item--active .steps__label{
    color:#000;
    font-weight:600;
}

/* ==========================
   SECTION
========================== */

.section{
    margin-top:55px;
    padding:0 10px;
}

.section__title{
    font-size:18px;
    font-weight:700;
    margin-bottom:22px;
}

/* ==========================
   FORM
========================== */

.form{
    display:grid;
    row-gap:18px;
}

/* ---------- TOP ROW ---------- */

.grid--3-top{
    display:grid;
    grid-template-columns:0.85fr 0.85fr 120px;
    column-gap:20px;
    align-items:start;
}

/* ---------- SECOND ROW ---------- */

.grid--2{
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:34px;
}

/* ==========================
   FIELDS
========================== */

.field{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.field__label{
    font-size:15px;
    color:#5d6778;
}

.field--stack{
    border:none;
    padding:0;
    margin:0;
}

/* ==========================
   INPUTS
========================== */

.input{
    width:100%;
    height:42px;
    border:2px solid #cfcfcf;
    border-radius:6px;
    padding:0 12px;
    font-size:16px;
    background:#fff;
    outline:none;
    transition:.2s;
}

.input:focus{
    border-color:#ff8a00;
    box-shadow:0 0 0 2px rgba(255,138,0,.15);
}

/* ==========================
   SELECT
========================== */

select.input{
    appearance:none;

    background-image:
        linear-gradient(45deg,transparent 50%,#888 50%),
        linear-gradient(135deg,#888 50%,transparent 50%);

    background-position:
        calc(100% - 18px) 18px,
        calc(100% - 13px) 18px;

    background-size:6px 6px;
    background-repeat:no-repeat;
}

/* ==========================
   GENDER
========================== */

.radio-group{
    display:flex;
    align-items:center;
    gap:18px;
    height:42px;
    border:none;
    background:transparent;
    padding:0;
}

.radio{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:16px;
}

.radio input{
    accent-color:#ff8a00;
    
    
}

/* ==========================
   PHOTO
========================== */

.photo{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    margin-top:2px;
}

.photo__btn{
    width:74px;
    height:74px;
    border:none;
    background:transparent;
    padding:0;
    cursor:pointer;
}

.photo__btn img{
    width:74px;
    height:74px;
    object-fit:contain;
}

.photo__label{
    margin-top:4px;
    font-size:13px;
    color:#444;
}

.photo__file{
    display:none;
}

/* ==========================
   BUTTON
========================== */

.actions{
    display:flex;
    justify-content:flex-end;
    margin-top:10px;
}

.btn{
    border:none;
    border-radius:999px;
    padding:12px 28px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
}

.btn--primary{
    background: #FF8F00;
    color:#fff;
    transition:.2s;
}

.btn--primary:hover{
    background:#e78606;
}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:768px){

    .card{
        padding:28px 24px;
    }

    .grid--3-top,
    .grid--2{
        grid-template-columns:1fr;
        row-gap:16px;
    }

    .photo{
        justify-self:center;
    }

    .steps__item{
        width:90px;
    }

    .steps__item:not(:last-child)::after{
        width:60%;
    }

}

/* =====================================================
   REGISTER 2
=====================================================*/

/* completed step */

.steps__item--completed .steps__dot{
    background:#e5e5e5;
    color:#777;
}

.steps__item--completed .steps__label{
    color:#666;
}

/* active connector */

.steps__item--completed::after{
    background:#ff8a00;
}

/* buttons */

.actions--between{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:18px;
}

.btn--secondary{
    background:transparent;
    color: black;
    border: 2px solid black;
    transition:.2s;
}

.btn--secondary:hover{
    background:#000000;
    color: white;
}

/* phone number placeholders */

.input::placeholder{
    color:#b7b7b7;
}


/* =====================================================
   REGISTER 3 - VERIFICATION
=====================================================*/

/* Completed Step */

.steps__item--completed .steps__dot{
    background:#e5e5e5;
    color:#777;
}

.steps__item--completed .steps__label{
    color:#666;
}

.steps__item--completed::after{
    background:#ff8a00;
}

/* Upload Section */

.upload-section{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-bottom:26px;
}

.upload-title{
    margin-bottom:0;
}

.upload-subtitle{
    margin:0;
    font-size:13px;
    color:#9a9a9a;
}

/* Upload Box */

.upload-box{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:190px;
    border:2px dashed #d5d5d5;
    border-radius:8px;
    cursor:pointer;
    transition:.25s;
    background:#fff;
}

.upload-box:hover{
    border-color:#ff8a00;
    background:#fffaf4;
}

.upload-box.dragging{
    border-color:#ff8a00;
    background:#fff6ec;
}

.upload-content{
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.upload-icon{
    width:60px;
    height:42px;
    margin-bottom:14px;
    opacity:.65;
}

.upload-main{
    margin:0;
    font-size:15px;
    font-weight:600;
    color:#222;
}

.upload-format{
    margin:6px 0;
    font-size:13px;
    color:#8d8d8d;
}

.upload-or{
    font-size:14px;
    color:#666;
    margin:3px 0;
}

.upload-link{
    border:none;
    background:none;
    color:#ff8a00;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    padding:0;
}

.upload-link:hover{
    text-decoration:underline;
}

/* Terms */

.terms{
    display:flex;
    align-items:flex-start;
    gap:10px;
    font-size:12px;
    color:#666;
    line-height:1.5;
    margin-top:-8px;
}

.terms input{
    margin-top:2px;
    accent-color:#ff8a00;
    cursor:pointer;
}

.terms a{
    color:#2c79ff;
    text-decoration:none;
}

.terms a:hover{
    text-decoration:underline;
}

/* Buttons */

.btn--outline{
    background:#fff;
    color:#111;
    border:2px solid #111;
    transition:.2s;
}

.btn--outline:hover{
    background:#111;
    color:#fff;
}

/* Actions */

.actions--between{
    display:flex;
    justify-content:flex-end;
    gap:18px;
    margin-top:18px;
}

/* Uploaded File State (optional) */

.upload-box.has-file{
    border-color:#39b54a;
    background:#f6fff6;
}

/* =====================================================
   REGISTER SUCCESS
=====================================================*/

.success-card{

    width:340px;
    background:#fff;

    border-radius:18px;

    border:3px solid #b7b7b7;

    padding:26px 35px 24px;

    display:flex;
    flex-direction:column;
    align-items:center;

    position:relative;
    z-index:2;
}

/* Green shadow behind the card */

.success-shadow{

    width:240px;
    height:28px;

    background:#55de8b;

    border-radius:0 0 8px 8px;

    position:absolute;

    transform:translateY(118px);

    z-index:1;
}

/* Check icon */

.success-icon{

    width:50px;
    height:50px;

    border-radius:50%;

    background:#5BDD8B;

    display:flex;
    justify-content:center;
    align-items:center;

    color:#fff;

    font-size:36px;

    font-weight:700;

    margin-bottom:22px;
}

/* Text */

.success-text{

    margin:0;

    font-size:16px;

    color:#707070;
}

/* Success */

.success-title{

    margin:2px 0 30px;

    font-size:22px;

    color:#009B34;

    font-weight:700;
}

/* Button */

.success-btn{

    width:108px;

    padding:11px 0;

    font-size:18px;
}

/* ==========================================
   Message Modal
========================================== */

.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;

    animation:fadeIn .25s ease;
}

.message-modal{
    width:400px;
    max-width:90%;
    background:#fff;
    border-radius:18px;
    padding:32px;
    text-align:center;

    box-shadow:0 20px 45px rgba(0,0,0,.25);

    animation:popIn .25s ease;
}

.message-modal.error{
    border-top:6px solid #E54B4B;
}

.message-modal.success{
    border-top:6px solid #2BA84A;
}

.modal-icon{
    width:72px;
    height:72px;
    margin:auto;
    border-radius:50%;
    background:#FFF3F3;
    color:#E54B4B;
    font-size:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:18px;
}

.message-modal.success .modal-icon{
    background:#EDFBEF;
    color:#2BA84A;
}

.message-modal h3{
    margin-bottom:12px;
    font-size:24px;
    font-weight:700;
}

.message-modal p{
    color:#555;
    margin-bottom:28px;
    line-height:1.6;
}

.message-modal button{
    width:150px;
}

@keyframes fadeIn{
    from{
        opacity:0;
    }
    to{
        opacity:1;
    }
}

@keyframes popIn{
    from{
        opacity:0;
        transform:scale(.85);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}
/* =====================================================
   VALIDATION HIGHLIGHT
===================================================== */

/* Text Input, Date, Email, Password, Select */

.input-error{
    border:2px solid #E74C3C !important;
    background:#FFF8F8;
    box-shadow:0 0 0 4px rgba(231,76,60,.15);
    transition:all .25s ease;
}

.input-error:focus{
    border-color:#E74C3C !important;
    box-shadow:0 0 0 5px rgba(231,76,60,.18);
}

/* Invalid Radio Group */

.radio-group-error{
    border:2px solid #E74C3C;
    border-radius:8px;
    padding:10px 14px;
    background:#FFF8F8;
    box-shadow:0 0 0 4px rgba(231,76,60,.15);
}

/* Invalid Upload Box */

.upload-box-error{
    border:2px dashed #E74C3C !important;
    background:#FFF8F8;
    box-shadow:0 0 0 4px rgba(231,76,60,.15);
}

/* Shake Animation */

@keyframes invalidShake{

    0%{
        transform:translateX(0);
    }

    20%{
        transform:translateX(-5px);
    }

    40%{
        transform:translateX(5px);
    }

    60%{
        transform:translateX(-4px);
    }

    80%{
        transform:translateX(4px);
    }

    100%{
        transform:translateX(0);
    }

}

/* Animate Invalid Fields */

.input-error,
.radio-group-error,
.upload-box-error{

    animation:invalidShake .35s ease;

}

/* Smooth Scroll */

html{

    scroll-behavior:smooth;

}
/* ==========================================================
   CARGONNECT CLIENT AUTH SECURITY V1
========================================================== */

.password-guidance,
.security-note,
.upload-subtitle,
.auth-result-message {
    color: #535d6a;
    line-height: 1.6;
}

.password-guidance {
    margin: -2px 0 8px;
    font-size: 13px;
}

.security-note {
    margin: 18px 0;
    padding: 12px 14px;
    border: 1px solid #e1e5ea;
    border-radius: 9px;
    background: #f8f9fb;
    font-size: 13px;
}

.form-notice {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-notice--success {
    color: #176338;
    border: 1px solid #a9dfbc;
    background: #f1fbf5;
}

.actions--between {
    justify-content: space-between;
}

.btn--secondary {
    background: #ffffff;
    color: #333b46;
    border: 1px solid #cfd5dc;
}

.btn--secondary:hover {
    background: #f7f8fa;
}

.photo__btn:disabled {
    cursor: wait;
    opacity: .68;
}

.photo__preview--uploaded {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.upload-box {
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.upload-box.is-dragging {
    border-color: #d7601c;
    background: #fff8f2;
    box-shadow: 0 0 0 4px rgba(215, 96, 28, .10);
}

.upload-box.has-file {
    border-color: #2f9b57;
    background: #f5fcf7;
}

.upload-box.has-file .upload-main::after {
    content: " — selected";
    color: #247844;
    font-weight: 700;
}

.auth-result-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.verification-card,
.registration-success-card {
    max-width: 560px;
    width: 100%;
}

.auth-result-message {
    max-width: 470px;
    margin: 18px auto 28px;
    text-align: center;
    font-size: 15px;
}

.auth-result-message strong {
    color: #202733;
    overflow-wrap: anywhere;
}

.auth-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-result-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 150px;
}

.auth-secondary-link {
    display: inline-block;
    margin-top: 18px;
    color: #a94a14;
    font-weight: 700;
    text-decoration: none;
}

.auth-secondary-link:hover {
    text-decoration: underline;
}

.auth-result-symbol {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf9f1;
    color: #25864b;
    font-size: 34px;
    font-weight: 800;
}

.auth-result-symbol--error {
    background: #fff1f1;
    color: #c93737;
}

.verification-confirm-form {
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .auth-result-page {
        padding: 18px;
    }

    .auth-result-actions {
        flex-direction: column;
    }

    .auth-result-link {
        width: 100%;
    }
}


/* ==========================================================
   SHOW / HIDE PASSWORD — CLIENT AUTH V1.1
========================================================== */

.password-visibility-toggle {
    width: fit-content;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-top: -4px;

    color: #4b5563;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    user-select: none;
}

.password-visibility-toggle input {
    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: #ff8a00;

    cursor: pointer;
}

.password-visibility-toggle:focus-within {
    outline: 3px solid rgba(255, 138, 0, .18);
    outline-offset: 3px;
    border-radius: 4px;
}