:root {
    --canvas: #f5f2fb;
    --paper: #fff;
    --ink: #181225;
    --muted: #716a7d;
    --line: #e5deee;
    --brand: #6d28d9;
    --brand-deep: #4c1d95;
    --pink: #db2777;
    --cyan: #0891b2;
    --danger: #b42318;
    --shadow: 0 20px 55px rgba(62, 35, 101, .1);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
a { color: inherit; }
.apply-shell { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }
.apply-header { border-bottom: 1px solid rgba(229,222,238,.9); background: rgba(255,255,255,.95); }
.header-row { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 20px; }
.apply-wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 900; text-decoration: none; }
.wordmark-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--pink)); color: #fff; font: 900 10px/1 Arial, sans-serif; box-shadow: 0 8px 18px rgba(109,40,217,.25); }
.apply-header nav { display: flex; align-items: center; gap: 10px; }
.apply-header nav a { border-radius: 9px; padding: 8px 12px; color: #51485e; font-size: 12px; font-weight: 800; text-decoration: none; }
.apply-header nav a:hover { background: #f3eff8; color: var(--brand); }
.apply-header .telegram-link { background: var(--brand); color: #fff; }
.apply-header .telegram-link:hover { background: var(--brand-deep); color: #fff; }

.apply-layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(0, 1.55fr); gap: 28px; padding-block: 44px 58px; }
.apply-intro { align-self: start; position: sticky; top: 24px; padding: 19px 4px; }
.eyebrow { margin: 0 0 7px; color: var(--pink); font-size: 10px; font-weight: 900; letter-spacing: .17em; }
.apply-intro h1 { margin: 0; font-size: clamp(35px, 5vw, 56px); letter-spacing: -.055em; line-height: 1.05; }
.lead { margin: 15px 0 24px; color: var(--muted); font-size: 14px; }
.telegram-card { display: flex; align-items: center; gap: 12px; border-radius: 16px; background: linear-gradient(135deg, #0e7490, #6d28d9); padding: 15px; color: #fff; text-decoration: none; box-shadow: 0 15px 36px rgba(74,38,135,.2); }
.telegram-card:hover { transform: translateY(-1px); }
.telegram-icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; background: rgba(255,255,255,.14); font-size: 11px; font-weight: 900; }
.telegram-card small, .telegram-card strong { display: block; }
.telegram-card small { color: rgba(255,255,255,.72); font-size: 10px; }
.telegram-card strong { margin-top: 1px; font-size: 14px; }
.telegram-card b { margin-left: auto; font-size: 20px; }
.process-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.7); padding: 16px; }
.process-card > strong { font-size: 12px; }
.process-card ol { display: grid; gap: 10px; margin: 13px 0 0; padding: 0; list-style: none; }
.process-card li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.process-card li span { display: grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border-radius: 8px; background: #ede9fe; color: var(--brand); font-size: 10px; font-weight: 900; }

.form-card { min-width: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); padding: 27px; box-shadow: var(--shadow); }
.form-heading { position: relative; margin-bottom: 21px; }
.form-heading p { margin: 0 0 2px; color: var(--pink); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.form-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.form-heading > span { position: absolute; top: 12px; right: 0; color: var(--muted); font-size: 10px; }
.form-heading b, .field > span b { color: var(--pink); }
.form-error { margin-bottom: 18px; border: 1px solid #fecdca; border-radius: 11px; background: #fef3f2; padding: 11px 13px; color: var(--danger); font-size: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field-wide { grid-column: 1 / -1; }
.field { position: relative; display: block; min-width: 0; }
.field > span { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 900; }
.field input, .field textarea { display: block; width: 100%; border: 1px solid #d9d1e4; border-radius: 11px; outline: 0; background: #fff; padding: 11px 12px; color: var(--ink); transition: border-color .16s, box-shadow .16s; }
.field input { min-height: 45px; }
.field input[type=file] { padding: 8px; color: var(--muted); font-size: 11px; }
.field textarea { resize: vertical; min-height: 104px; }
.field input:focus, .field textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px #ede9fe; }
.field > small { display: block; margin-top: 5px; color: #948c9f; font-size: 9px; }
.field textarea + small { position: absolute; right: 9px; bottom: 7px; background: rgba(255,255,255,.9); padding-left: 4px; }
.password-field input { padding-right: 56px; }
.password-field button { position: absolute; right: 7px; bottom: 7px; border: 0; border-radius: 7px; background: #f1edfa; padding: 6px 8px; color: var(--brand); font-size: 9px; font-weight: 900; cursor: pointer; }
.thumbnail-preview { display: flex; min-height: 88px; align-items: center; gap: 12px; border: 1px dashed #c4b5fd; border-radius: 12px; background: #faf8ff; padding: 10px; color: var(--muted); font-size: 10px; }
.thumbnail-preview[hidden] { display: none; }
.thumbnail-preview img { width: 96px; height: 68px; border-radius: 9px; object-fit: cover; background: #fff; }
.affiliate-section { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 27px 0 13px; border-top: 1px solid var(--line); padding-top: 22px; }
.affiliate-section p { margin: 0 0 2px; color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.affiliate-section h3 { margin: 0; font-size: 19px; }
.affiliate-section > span { color: var(--muted); font-size: 10px; }
.security-note { display: flex; margin-top: 18px; gap: 9px; border-radius: 11px; background: #f5f3ff; padding: 11px 13px; color: #5b5268; font-size: 10px; }
.security-note strong { flex: 0 0 auto; color: var(--brand); }
.submit-button { width: 100%; min-height: 48px; margin-top: 18px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--pink)); color: #fff; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: 0 12px 24px rgba(109,40,217,.2); }
.submit-button:hover { filter: brightness(.96); }
.submit-note { margin: 7px 0 0; color: #948c9f; font-size: 9px; text-align: center; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.success-panel { display: grid; min-height: 500px; place-content: center; justify-items: center; text-align: center; }
.success-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 19px; background: linear-gradient(135deg, #059669, #0891b2); color: #fff; font-size: 28px; font-weight: 900; box-shadow: 0 12px 25px rgba(5,150,105,.2); }
.success-panel h2 { margin: 17px 0 5px; font-size: 28px; }
.success-panel p { max-width: 430px; margin: 0; color: var(--muted); }
.success-actions { display: flex; margin-top: 22px; flex-wrap: wrap; justify-content: center; gap: 9px; }
.success-actions a { border-radius: 10px; padding: 10px 15px; font-size: 11px; font-weight: 900; text-decoration: none; }
.primary-button { background: var(--brand); color: #fff; }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.apply-footer { border-top: 1px solid var(--line); background: #fff; padding: 19px 0; color: var(--muted); font-size: 10px; }

@media (max-width: 860px) {
    .apply-layout { grid-template-columns: 1fr; padding-top: 26px; }
    .apply-intro { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 0; }
    .apply-intro .eyebrow, .apply-intro h1, .apply-intro .lead { grid-column: 1 / -1; }
    .lead { margin-block: 5px 3px; }
    .process-card { margin-top: 0; }
}

@media (max-width: 620px) {
    .apply-shell { width: min(100% - 24px, 1160px); }
    .header-row { min-height: 57px; }
    .apply-wordmark { font-size: 16px; }
    .apply-header nav a:first-child { display: none; }
    .apply-header nav a { padding: 7px 9px; font-size: 10px; }
    .apply-layout { gap: 20px; padding-bottom: 34px; }
    .apply-intro { grid-template-columns: 1fr; }
    .apply-intro .eyebrow, .apply-intro h1, .apply-intro .lead { grid-column: auto; }
    .apply-intro h1 { font-size: 38px; }
    .form-card { border-radius: 17px; padding: 19px 15px; }
    .field-grid { grid-template-columns: 1fr; gap: 13px; }
    .field-wide { grid-column: auto; }
    .affiliate-section { align-items: flex-start; flex-direction: column; gap: 2px; }
    .security-note { flex-direction: column; gap: 2px; }
    .success-panel { min-height: 410px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
