* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

input[type="number"] {
    -moz-appearance: textfield; /* ебучий Firefox */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; /* хромоподобная шобла */
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0d0e15;
    color: #ffffff;
    min-width: 320px;
}

.logo {
    padding: 20px;
    font-size: 30px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: #12131c;
    color: #ffffff;
}
.logo img {
    height: 50px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 22px;
    background-color: #12131c;
    color: #ffffffeb;
}
.title {
    color: #8674d2;
}
.profile-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    object-fit: cover;
}

.img-box {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-box img.ava {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    image-rendering: auto;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-box img.logo-ava {
    position: absolute;
    width: 25px;
    bottom: 0;
    left: 60%;
    border-radius: 50%;
}

.bg-squares {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    top: 160px;
    width: 30vw;
}

/* плавающие квадраты под полупрозрачный фиолетовый неоновый подсвет */
.bg-squares span {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(139, 149, 224, 0.115);
    border: 1px solid rgba(139, 149, 224, 0.08);
    border-radius: 12px;
    animation: float 18s ease-in-out infinite;
}
/* --- ПРИМИТИВНЫЙ ОРГАНИЧНЫЙ ГРАФИК (Simple Organic Chart) --- */

.chart-container {
    width: 100%;
    max-width: 500px; /* Ограничим для органичности */
    height: 180px;
    background-color: #12131c; /* Менее темный фон, чем body, для выделения */
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden; /* Чтобы градиент не вылезал */
}

.chart-title {
    font-size: 14px;
    color: #8a8f9e; /* Текст хлебных крошек */
    margin-bottom: 10px;
    font-weight: 400;
}

.chart-value {
    font-size: 24px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
}

.chart-value span.delta {
    font-size: 14px;
    color: #8b95e0; /* Акцентный лавандовый */
    margin-left: 8px;
    font-weight: 400;
}

/* SVG Элемент для графика */
.organic-chart {
    width: 100%;
    height: 100px; /* Высота самой линии */
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Линия графика */
.chart-line {
    fill: none;
    stroke: #8b95e0; /* Лавандовый */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0px 4px 6px rgba(139, 149, 224, 0.3)); /* Мягкое свечение линии */
}

/* Градиентная заливка ПОД линией */
.chart-area {
    fill: url(#chartGradient);
}

/* Анимация прорисовки линии */
.chart-line {
    stroke-dasharray: 1000; /* Длина линии, подбирается */
    stroke-dashoffset: 1000;
    animation: dash 2.5s ease-out forwards;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}
.bg-squares span:nth-child(1) { top: 10%; left: 15%; }
.bg-squares span:nth-child(2) { top: 30%; left: 35%; animation-duration: 7s; animation-delay: -4s; }
.bg-squares span:nth-child(3) { top: 20%; left: 55%; animation-duration: 5.2s; animation-delay: -8s; }
.bg-squares span:nth-child(4) { top: 50%; left: 25%; animation-duration: 4.20s; animation-delay: -2s; }
.bg-squares span:nth-child(5) { top: 60%; left: 50%; animation-duration: 6.24s; animation-delay: -6s; }

@keyframes float {
    0%, 100% { 
        transform: translateY(0) translateX(0); 
        opacity: 0.6; 
    }
    50% { 
        transform: translateY(-20px) translateX(10px); 
        opacity: 0.1; 
    }
}


main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - (75px + 81px));
    min-height: 700px;
    background-color: #0d0e15;
    color: #ffffff;
}

.main-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    padding: 100px;
}
.main-box .box {
    min-width: calc(50% - 25px);
    display: none;
}
.main-box .box.active {
    display: block;
    animation: show-in-form 0.3s ease;
}
.box.left {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.box.left h1 {
    text-align: center;
    font-size: 59px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}
.box.left h4 {
    font-size: 24px;
    font-weight: 300;
    color: #8a8f9e;
}
.main-box .box form {
    background-color: #1c1e30;
    padding: 26px;
    padding-top: calc(26px + 24px + 26px + 24px);
    overflow: hidden;
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    position: relative;
}
.title-box {
    width: 100%;
    background-color: rgba(13, 14, 21, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
}
.title-box .title-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 24px;
    background-color: #1c1e30;
    color: #ffffff;
    width: fit-content;
    font-weight: 500;
    font-size: 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.with-icon {
    width: 16px;
    opacity: 0.6;
    filter: invert(1);
}

.form-group {
    padding: 16px 26px;
    background-color: #ffffff;
    border: 1px solid transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 5px;
}
.form-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.form-box input {
    border: none;
    outline: none;
    font-size: 20px;
    margin-top: 8px;
    width: 100%;
    background: transparent;
    color: #0d0e15;
}
.form-title {
    color: #6b7280;
}
.form-actives {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 20px;
    gap: 6px;
    background-color: #f1f3f9;
    color: #0d0e15;
}
.form-actives img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.form-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    padding: 0 16px;
    margin-bottom: 32px;
    color: #8a8f9e;
}
.form-subtitle button {
    background: none;
    outline: none;
    border: none;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    color: #8b95e0;
}
.form-subtitle button.hide {
    display: none;
}

.submit-btn {
    background-color: #8b95e0;
    color: #0d0e15;
    width: 100%;
    font-size: 26px;
    border: none;
    outline: none;
    border-radius: 32px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.submit-btn:hover {
    background-color: #9aa5f4;
}
.submit-btn:active {
    transform: scale(0.98);
    background-color: #7a84cd;
}

.loader-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1c1e30be;
    backdrop-filter: blur(8px);
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    font-weight: 400;
    color: #ffffff;
}
.loader-box.active {
    display: flex;
    animation: show-in 0.3s ease;
}
.fa-spinner {
    font-size: 50px;
    color: #8b95e0;
}

.form-group .view {
    color: #0d0e15;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 400;
}
.warning {
    width: 100%;
    text-align: center;
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 6px;
    color: #8a8f9e;
}

.btn-box {
    display: flex;
    gap: 12px;
    width: 100%;
}
.btn-box button {
    width: 50%;
    border-radius: 12px;
    padding: 12px;
    border: none;
    outline: none;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}
.second-btn {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.second-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
#form-error-label {
    width: 100%;
    text-align: center;
    margin-top: 12px;
    color: #ff5c5c;
    display: none;
    font-weight: 400;
    font-size: 14px;
}
#form-error-label.active {
    display: block;
}
@keyframes show-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes show-in-form {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.error-content {
    position: relative;
    padding: 25px 15px;
    text-align: center;
    color: #ffffff;
}
.error-content i {
    color: #8a8f9e;
}

.error-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: #8b95e0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-wrap {
    border: 3px solid #8b95e0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.error-desc {
    margin-top: 8px;
    margin-bottom: 26px;
    font-size: 15px;
    color: #8a8f9e;
    line-height: 1.4;
}

.error-decoration {
    width: 100%;
    height: 8px;
    background:
        repeating-linear-gradient(
            45deg,
            #8b95e0 0,
            #8b95e0 5px,
            transparent 5px,
            transparent 10px
        );
    opacity: 0.4;
}

.error-decoration.top {
    margin-bottom: 20px;
}

.error-decoration.bottom {
    margin-top: 25px;
}

.support-btn {
    margin-top: 18px;
    padding: 12px 18px;
    background: #8b95e0;
    color: #0d0e15;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
    text-decoration: none;
}

.support-btn:hover {
    transform: translateY(-2px);
    background-color: #9aa5f4;
}

@media (max-width: 1150px) {
    .form-box input {
        font-size: 16px;
    }
    .box.left h1 {
        font-size: 39px;
    }
    .box.left h4 {
        font-size: 18px;
    }
}
@media (max-width: 1070px) {
    .form-actives {
        font-size: 14px;
    }
    .form-actives img {
        width: 20px;
        height: 20px;
    }
    .submit-btn {
        font-size: 20px;
    }
}
@media (max-width: 1000px) {
    .main-box {
        gap: 10px;
    }
}
@media (max-width: 970px) {
    .form-group {
        padding: 16px;
    }
    .main-box {
        padding: 50px;
    }
}
@media (max-width: 900px) {
    .form-group {
        padding: 10px;
    }
}
@media (max-width: 790px) {
    .form-subtitle {
        font-size: 12px;
    }
    .main-box .box form {
        padding-left: 12px;
        padding-right: 12px;
    }
    .form-title {
        font-size: 12px;
    }
    .main-box {
        padding: 25px;
    }
}
@media (max-width: 700px) {
    main {
        height: auto;
    }
    .main-box {
        flex-direction: column;
    }
    .main-box .box {
        width: 100% !important;
    }
    .main-box .box.left {
        width: 100% !important;
    }
    .box.left h1 {
        font-size: 32px;
        width: 100%;
        text-align: center;
    }
    .box.left h4 {
        font-size: 16px;
        width: 100%;
        text-align: center;
    }
    .form-box input {
        min-width: 180px;
    }
    .main-box .box.left {
        text-shadow: 0px 5px 15px rgba(0, 0, 0, 0.5);
    }
}
@media (max-width: 660px) {
    header {
        font-size: 20px;
    }
    .logo {
        font-size: 24px;
    }
    .logo img {
        height: 35px;
    }
    .img-box {
        width: 30px;
        height: 30px;
    }
    .profile-box img.ava {
        width: 100%;
        height: 100%;
    }
    .profile-box img.logo-ava {
        width: 15px;
    }
}
@media (max-width: 550px) {
    header {
        padding: 10px 10px;
    }
    .main-box .box {
        width: auto;
    }
    .main-box .box.left {
        width: auto;
    }
    .bg-squares {
        top: 60px;
        width: 70vw;
    }
    .bg-squares span {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 420px) {
    .box.left h1 {
        font-size: 24px;
    }
    .box.left h4 {
        font-size: 15px;
    }
}
@media (max-width: 460px) {
    header {
        font-size: 16px;
    }
    body {
        min-width: 360px;
    }
    .form-group .view {
        font-size: 16px;
    }
}
@media (max-width: 360px) {
    header {
        font-size: 14px;
    }
    body {
        min-width: 360px;
    }
}
.form-actives {
    transform: scale(0.6);
}