@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --at-coral:    #e05a42;
    --at-coral-h:  #cc4a33;
    --at-bg:       #e8f4f4;
    --at-text:     #1a1a2e;
    --at-muted:    #7a8a99;
    --at-border:   #dde4ea;
    --at-green:    #27ae60;
    --at-green-bg: #eafaf1;
    --at-green-br: #a9dfbf;
    --at-red:      #c0392b;
    --at-red-bg:   #fdedec;
    --at-red-br:   #f1948a;
    --at-blue:     #2471a3;
    --at-blue-bg:  #eaf4fd;
    --at-blue-br:  #aed6f1;
    --at-radius:   16px;
    --at-shadow:   0 8px 48px rgba(0,0,0,0.10);
    --at-font:     'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Wrapper ── */
.at-wrap {
    font-family: var(--at-font) !important;
    display: flex;
    justify-content: center;
    padding: 40px 16px;
    background: var(--at-bg);
    min-height: 60vh;
    align-items: flex-start;
}

.at-card {
    background: #fff;
    border-radius: var(--at-radius);
    padding: 48px 52px;
    width: 100%;
    max-width: 560px;
    box-shadow: var(--at-shadow);
    position: relative;
    overflow: hidden;
    font-family: var(--at-font) !important;
}

/* Coral top bar */
.at-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--at-coral), #f0956a);
}

/* ── Icon circle ── */
.at-icon-circle {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #fde8e4, #fcd3cb);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
    color: var(--at-coral);
}

/* ── Typography ── */
.at-title {
    font-family: var(--at-font) !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--at-text) !important;
    text-align: center;
    margin: 0 0 10px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.4px;
}

.at-subtitle {
    font-family: var(--at-font) !important;
    font-size: 14px;
    color: var(--at-muted);
    text-align: center;
    line-height: 1.6;
    margin: 0 auto 28px;
    max-width: 380px;
    display: block;
    font-weight: 400;
}

/* ── Status messages ── */
.at-status {
    font-family: var(--at-font) !important;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}
.at-status svg { flex-shrink: 0; margin-top: 1px; }
.at-status.at-error   { display: flex; background: var(--at-red-bg);  color: var(--at-red);   border: 1px solid var(--at-red-br); }
.at-status.at-success { display: flex; background: var(--at-green-bg);color: var(--at-green); border: 1px solid var(--at-green-br); }
.at-status.at-loading { display: flex; background: var(--at-blue-bg); color: var(--at-blue);  border: 1px solid var(--at-blue-br); }

/* ── Success notification banner (step 2 top) ── */
.at-notify-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--at-green-bg);
    color: var(--at-green);
    border: 1px solid var(--at-green-br);
    padding: 13px 16px;
    border-radius: 10px;
    font-family: var(--at-font) !important;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}
.at-notify-success svg { flex-shrink: 0; margin-top: 2px; }

/* ── OTP Boxes ── */
.at-otp-wrap {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.at-otp-box {
    width: 50px !important; height: 58px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: var(--at-font) !important;
    border: 1.5px solid var(--at-border) !important;
    border-radius: 12px !important;
    outline: none !important;
    background: #f9fafb !important;
    color: var(--at-text) !important;
    transition: border-color .2s, box-shadow .2s, background .2s;
    caret-color: var(--at-coral);
    box-shadow: none !important;
    padding: 0 !important;
}
.at-otp-box:focus {
    border-color: var(--at-coral) !important;
    box-shadow: 0 0 0 3px rgba(224,90,66,.12) !important;
    background: #fff !important;
}
.at-otp-box.at-filled {
    background: #fff !important;
    border-color: #c5cdd5 !important;
}

/* ── Primary button — full width ── */
.at-btn-primary {
    width: 100% !important;
    padding: 16px !important;
    background: var(--at-coral) !important;
    color: #fff !important;
    font-family: var(--at-font) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    letter-spacing: 0.1px;
    transition: background .2s, transform .1s, box-shadow .2s !important;
    box-shadow: 0 4px 16px rgba(224,90,66,.28) !important;
    display: block !important;
    text-align: center;
    margin-top: 8px;
}
.at-btn-primary:hover    { background: var(--at-coral-h) !important; box-shadow: 0 6px 20px rgba(224,90,66,.38) !important; }
.at-btn-primary:active   { transform: scale(.98) !important; }
.at-btn-primary:disabled { opacity: .6 !important; cursor: not-allowed !important; box-shadow: none !important; }

/* ── Form title & subtitle ── */
.at-form-title {
    font-family: var(--at-font) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--at-text) !important;
    margin: 0 0 6px !important;
    letter-spacing: -0.3px;
    line-height: 1.2 !important;
}
.at-form-subtitle {
    font-family: var(--at-font) !important;
    font-size: 13px;
    color: var(--at-muted);
    margin: 0 0 24px;
    line-height: 1.5;
    font-weight: 400;
}

/* ── Form grid ── */
.at-form-grid { display: flex; flex-direction: column; gap: 16px; }

.at-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.at-row.at-full { grid-template-columns: 1fr; }

.at-field label {
    display: block !important;
    font-family: var(--at-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--at-text) !important;
    margin-bottom: 7px !important;
    letter-spacing: 0.1px;
}
.at-req { color: var(--at-coral); margin-left: 2px; }

/* ── Inputs ── */
.at-input {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1.5px solid var(--at-border) !important;
    border-radius: 10px !important;
    font-family: var(--at-font) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--at-text) !important;
    outline: none !important;
    background: #fff !important;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.at-input:focus {
    border-color: var(--at-coral) !important;
    box-shadow: 0 0 0 3px rgba(224,90,66,.1) !important;
}
.at-input::placeholder {
    color: #c0c8d0 !important;
    font-family: var(--at-font) !important;
}

/* ── Select dropdown ── */
.at-select-wrap { position: relative; }
.at-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px; top: 50%; transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--at-muted);
    pointer-events: none;
}
.at-select-wrap .at-input { padding-right: 36px !important; cursor: pointer; }

/* ── Terms row ── */
.at-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.at-terms-row input[type="checkbox"] {
    width: 17px; height: 17px;
    flex-shrink: 0; margin-top: 2px;
    accent-color: var(--at-coral);
    cursor: pointer;
}
.at-terms-row label {
    font-family: var(--at-font) !important;
    font-size: 13px !important;
    color: var(--at-muted) !important;
    line-height: 1.5 !important;
    cursor: pointer;
    font-weight: 400 !important;
}

/* ── Success screen ── */
.at-success-wrap {
    text-align: center;
    padding: 20px 0 8px;
    animation: at-fadein .5s ease;
}
@keyframes at-fadein { from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);} }

.at-success-circle {
    width: 88px; height: 88px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(39,174,96,.3);
    animation: at-pop .5s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes at-pop { 0%{transform:scale(0);opacity:0;}70%{transform:scale(1.1);}100%{transform:scale(1);opacity:1;} }

.at-success-title {
    font-family: var(--at-font) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--at-text) !important;
    margin: 0 0 10px !important;
    letter-spacing: -0.3px;
}
.at-success-msg {
    font-family: var(--at-font) !important;
    font-size: 15px;
    color: var(--at-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── Spinner ── */
.at-spinner {
    width: 17px; height: 17px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: at-spin .7s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes at-spin { to{transform:rotate(360deg);} }

/* ── Step transition ── */
.at-step { animation: at-slide .3s ease; }
@keyframes at-slide { from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);} }

/* ── Responsive ── */
@media (max-width: 560px) {
    .at-card { padding: 36px 20px; }
    .at-row  { grid-template-columns: 1fr; }
    .at-otp-box { width: 36px !important; height: 46px !important; font-size: 17px !important; }
    .at-otp-wrap { gap: 5px; }
}

/* ── Terms label links ── */
.at-terms-row label a {
    color: var(--at-coral) !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
}
.at-terms-row label a:hover {
    color: var(--at-coral-h) !important;
}
