:root {
    --flow-blue: #1269cd;
    --flow-blue-dark: #0a4d99;
    --flow-sky: #69aaff;
    --flow-ink: #20242b;
    --flow-muted: #647184;
    --flow-line: #dbe4ee;
}

body.reference-flow {
    background: #fff;
    color: var(--flow-ink);
}

.reference-flow .container.flow-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.flow-header {
    position: relative;
    min-height: 342px;
    padding: 20px 28px 0;
    background:
        radial-gradient(circle at 25% 58%, rgba(255,255,255,.82) 0 5px, transparent 6px),
        radial-gradient(circle at 82% 74%, rgba(255,255,255,.46) 0 4px, transparent 5px),
        linear-gradient(180deg, #5a9cf4 0%, #91bcf5 48%, #d9e9fb 76%, #fff 100%);
}

.flow-topbar,
.flow-meta,
.flow-progress {
    display: flex;
    align-items: center;
    width: min(100%, 760px);
    margin-right: auto;
    margin-left: auto;
}

.flow-topbar {
    min-height: 42px;
    justify-content: space-between;
    gap: 12px;
}

.kaspersky-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.kaspersky-lockup img {
    display: block;
    width: 130px;
    height: 27px;
}

.kaspersky-edition {
    padding-left: 10px;
    border-left: 1px solid rgba(17,24,32,.35);
    color: #111820;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -.2px;
}

.operator-badge {
    min-width: 70px;
    padding: 8px 13px;
    border: 1.5px solid rgba(16,48,85,.55);
    border-radius: 9px;
    background: rgba(255,255,255,.18);
    color: #102b4a;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.operator-badge .zain-wordmark {
    font-size: 19px;
}

.flow-meta {
    justify-content: space-between;
    margin-top: 15px;
}

.flow-step-label {
    color: #203955;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .25px;
    text-transform: uppercase;
}

.reference-flow .lang-switcher {
    border-color: rgba(23,61,103,.35);
    background: rgba(255,255,255,.2);
}

.reference-flow .lang-switcher button {
    padding: 4px 9px;
    color: #25486e;
}

.reference-flow .lang-switcher button.active {
    color: #0c4f9d;
    box-shadow: 0 2px 8px rgba(20,75,135,.14);
}

.flow-progress {
    gap: 8px;
    margin-top: 9px;
}

.flow-progress span {
    position: relative;
    flex: 1;
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(27,96,174,.18);
}

.flow-progress span::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #1183df, #075db8);
    transform: scaleX(0);
    transform-origin: left;
}

html[dir="rtl"] .flow-progress span::after {
    transform-origin: right;
}

.flow-progress .complete::after,
.flow-progress .active::after { transform: scaleX(1); }
.flow-progress .active::after { opacity: .95; }

.flow-visual {
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: clamp(232px, 24vw, 292px);
    height: clamp(220px, 23vw, 274px);
    transform: translateX(-50%);
}

.flow-visual svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 12px 15px rgba(22,48,79,.12));
}

.flow-body {
    flex: 1;
    width: min(100%, 560px);
    margin-right: auto;
    margin-left: auto;
    padding: 0 28px 24px;
    text-align: center;
}

.flow-product {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 7px;
    direction: ltr;
}

.flow-product-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
}

.flow-product .kaspersky-lockup img {
    width: 112px;
    height: auto;
}

.flow-product .kaspersky-edition {
    font-size: 14px;
}

.flow-title {
    max-width: 380px;
    margin: 0 auto 18px;
    color: #23262b;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
}

.flow-subtitle {
    max-width: 360px;
    margin: -8px auto 19px;
    color: var(--flow-muted);
    font-size: 13px;
    line-height: 1.5;
}

.reference-flow form {
    text-align: left;
}

html[dir="rtl"] .reference-flow form { text-align: right; }

.field-frame {
    position: relative;
    padding-top: 8px;
}

.field-label {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 18px;
    padding: 0 8px;
    background: #fff;
    color: #136ba9;
    font-size: 12px;
    font-weight: 800;
}

html[dir="rtl"] .field-label {
    right: 18px;
    left: auto;
}

.reference-flow .phone-input {
    min-height: 65px;
    padding: 0 16px;
    border: 2px solid #2379a8;
    border-radius: 10px;
    background: #fff;
}

.reference-flow .phone-input:focus-within {
    border-color: #0b6fc6;
    box-shadow: 0 0 0 3px rgba(18,105,205,.1);
}

.phone-field-icon {
    width: 18px;
    height: 24px;
    margin-right: 12px;
    color: #1977a8;
    flex: 0 0 auto;
}

html[dir="rtl"] .phone-field-icon {
    margin-right: 0;
    margin-left: 12px;
}

.reference-flow .phone-input .code {
    padding: 17px 11px 17px 0;
    border: 0;
    margin: 0;
    color: #24282e;
    font-size: 22px;
    font-weight: 700;
}

.reference-flow .phone-input input {
    min-width: 0;
    padding: 17px 0 17px 8px;
    color: #24282e;
    font-size: 19px;
    letter-spacing: 1.1px;
}

.reference-flow .phone-input input::placeholder,
.reference-flow #pinInput::placeholder { color: #9fa8b4; opacity: 1; }

.reference-flow #pinInput {
    width: 100%;
    min-height: 65px;
    box-sizing: border-box;
    padding: 15px 18px !important;
    border: 2px solid #2379a8 !important;
    border-radius: 10px !important;
    background: #fff;
    color: #24282e;
    outline: 0;
    text-align: center;
    font: 800 25px/1.2 "Open Sans", sans-serif !important;
    letter-spacing: 8px;
}

.reference-flow #pinInput:focus {
    border-color: #0b6fc6 !important;
    box-shadow: 0 0 0 3px rgba(18,105,205,.1);
}

.reference-flow .pin-wrapper { margin: 0; }

.reference-flow .primary-btn {
    min-height: 58px;
    margin-top: 17px;
    padding: 15px 20px;
    border-radius: 10px;
    background: linear-gradient(180deg, #167bd6, #0b62bb) !important;
    box-shadow: 0 8px 18px rgba(11,98,187,.2) !important;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
}

.reference-flow .primary-btn:hover { background: linear-gradient(180deg, #0e70c9, #0756a8) !important; }
.reference-flow .primary-btn[disabled] {
    background: #e5e5e5 !important;
    box-shadow: none !important;
    color: #a4a4a4;
}

.reference-flow .error-msg {
    margin: 8px 2px 0;
    text-align: center;
}

.reference-flow .status-card {
    margin-top: 9px;
    text-align: center;
}

.reference-flow .resend {
    margin-top: 12px;
    text-align: center;
}

.reference-flow .resend a { color: var(--flow-blue); }

.flow-success {
    padding-top: 1px;
}

.flow-success .flow-title { margin-bottom: 9px; }
.flow-success .flow-subtitle { margin-top: 0; margin-bottom: 16px; }

.success-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 3px 0 12px;
    padding: 7px 12px;
    border-radius: 99px;
    background: #e8f4ff;
    color: #0861b5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.success-pill::before {
    content: "✓";
    font-size: 14px;
}

.operator-footer {
    width: 100%;
    margin-top: auto;
    padding: 17px 28px 20px;
    border-top: 1px solid #e6ebf0;
    background: #f7f9fb;
    color: #5f6b79;
    font-size: 10.5px;
    line-height: 1.55;
    text-align: center;
}

.operator-footer > * {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.operator-footer[hidden] { display: none; }

.footer-operator-name {
    display: block;
    margin-bottom: 7px;
    color: #26384d;
    font-size: 12px;
    font-weight: 800;
}

.operator-footer p { margin: 0; }
.operator-footer p + p { margin-top: 5px; }

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 10px;
}

.operator-footer a {
    color: #3f536a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

html[dir="rtl"] .operator-footer { text-align: right; }
html[dir="rtl"] .footer-links { direction: rtl; }

@media (max-width: 420px) {
    .flow-header { min-height: 322px; padding-right: 18px; padding-left: 18px; }
    .flow-visual { width: 214px; height: 204px; }
    .flow-body { padding-right: 18px; padding-left: 18px; }
    .flow-title { font-size: 21px; }
    .operator-footer { padding-right: 18px; padding-left: 18px; }
}

@media (min-width: 900px) {
    .flow-header {
        min-height: 395px;
        padding-top: 28px;
    }

    .flow-visual {
        bottom: 0;
    }

    .flow-body {
        padding-top: 8px;
    }

    .flow-title {
        font-size: 25px;
    }
}

@media (max-height: 700px) {
    .flow-header { min-height: 282px; padding-top: 10px; }
    .flow-topbar { min-height: 34px; }
    .flow-meta { margin-top: 8px; }
    .flow-visual { width: 178px; height: 168px; }
    .flow-body { padding-bottom: 16px; }
    .flow-title { font-size: 19px; margin-bottom: 13px; }
    .flow-product { margin-top: 0; }
    .reference-flow .phone-input,
    .reference-flow #pinInput { min-height: 57px; }
    .reference-flow .primary-btn { min-height: 50px; margin-top: 12px; padding: 11px 18px; }
    .operator-footer { padding-top: 13px; padding-bottom: 14px; }
}
