:root {
    --bg-white: #ffffff;
    --bg-light: #f1f3f5;
    --bg-header: #18202b;

    --text-dark: #17212b;
    --text-gray: #526071;

    --accent-primary: #b8322a;
    --accent-dark: #92271f;

    --border-color: #cbd2da;
    --focus-color: #2563eb;
    --surface-muted: #e8edf2;

    --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-modal: 0 24px 80px rgba(15, 23, 42, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

input,
textarea,
button,
select {
    font: inherit;
}

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: var(--accent-dark);
    text-underline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 4px;
}

::selection {
    background: #f4cbc7;
    color: #17212b;
}

/* Верхняя панель */

.header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    padding: 12px 28px;
    background: var(--bg-header);
    border-bottom: 1px solid #344151;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 10px;
    background: transparent;
    text-decoration: none;
}

#header-logo {
    display: block;
    width: auto;
    height: 36px;
    object-fit: contain;
}

.header-caption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.header-caption-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.header-caption-note {
    color: #bdc7d4;
    font-size: 11px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-left: auto;
}

.secondary-btn {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 16px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}

.secondary-btn:hover {
    background: #e8edf2;
    border-color: #8d9bab;
}

/* JS задаёт кнопке кабинета inline-цвета после авторизации. */
#auth-btn {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #17212b;
}

#auth-btn:hover {
    background: #e8edf2 !important;
    border-color: #e8edf2 !important;
}

.hamburger-btn,
.mobile-only,
.menu-overlay {
    display: none;
}

/* Основной макет */

.layout-wrapper {
    display: flex;
    min-height: calc(100vh - 76px);
}

.sidebar {
    flex: 0 0 252px;
    width: 252px;
    padding: 28px 16px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
}

.model-list {
    list-style: none;
}

.model-list::before {
    content: "ОБОРУДОВАНИЕ";
    display: block;
    margin: 0 14px 18px;
    color: var(--text-gray);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.model-list li {
    margin-bottom: 8px;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #354354;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.model-list li:hover {
    background: #f1f3f5;
    border-color: #dce1e7;
    color: #17212b;
}

.model-list li.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 5px 12px rgba(184, 50, 42, 0.14);
}

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 30px clamp(20px, 3vw, 48px) 48px;
}

.canvas-header {
    padding-bottom: 4px;
}

#current-crane-title {
    max-width: 1000px;
    color: var(--text-dark);
    font-size: clamp(21px, 2.1vw, 30px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.6px;
}

/* 3D и чертёж */

.visual-split-container {
    display: flex;
    height: clamp(350px, 43vh, 520px);
    min-height: 350px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.visual-panel {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas-container {
    overflow: hidden;
    background: #18202b;
    border-right: 1px solid #344151;
}

#canvas-container::before,
#drawing-container::before {
    position: absolute;
    top: 14px;
    left: 16px;
    z-index: 2;
    pointer-events: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.4px;
}

#canvas-container::before {
    content: "3D-МОДЕЛЬ";
    color: #c5cfdd;
}

#drawing-container::before {
    content: "ЧЕРТЁЖ";
    color: #526071;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

#drawing-container {
    background: #ffffff;
}

#drawing-container img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    cursor: zoom-in;
}

#crane-drawing {
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
}

#crane-drawing.loaded {
    opacity: 1;
}

#drawing-container img:hover {
    transform: scale(1.015);
}

#drawing-placeholder-text {
    position: absolute;
    max-width: 85%;
    text-align: center;
    color: var(--text-gray);
    font-size: 13px;
    pointer-events: none;
}

#drawing-filename {
    color: var(--text-gray) !important;
}

#drawing-warning {
    color: #a12c25 !important;
}

/* Секции формы */

.options-panel {
    min-width: 0;
}

.accordion-item {
    margin-bottom: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #f8fafc;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #eaf0f5;
}

.accordion-header::after {
    content: "⌄";
    flex-shrink: 0;
    color: var(--accent-primary);
    font-size: 22px;
    line-height: 1;
    transition: transform 0.2s;
}

.accordion-item:not(.active) .accordion-header::after {
    transform: rotate(-90deg);
    color: var(--text-gray);
}

.accordion-content {
    max-height: 0;
    padding: 0 22px;
    overflow: hidden;
    background: #ffffff;
}

.accordion-item.active .accordion-content {
    max-height: none;
    padding: 24px 22px;
    border-top: 1px solid var(--border-color);
}

.customer-details {
    margin-top: 24px;
    border-color: #aab5c2;
}

.customer-details > .accordion-header {
    background: #e8edf2;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 22px;
    align-items: stretch;
}

.field-wrapper {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.form-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.options-grid .form-group {
    flex: 1;
    justify-content: flex-end;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #354354;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
}

.premium-input,
.select-wrapper select,
.form-group input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #aab5c2;
    border-radius: 7px;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.premium-input::placeholder {
    color: #697586;
    opacity: 1;
}

.premium-input:hover,
.select-wrapper select:hover {
    border-color: #748397;
}

.premium-input:focus,
.select-wrapper select:focus,
.form-group input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--focus-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

textarea.premium-input {
    resize: vertical;
    min-height: 96px;
}

.select-wrapper {
    position: relative;
    min-width: 0;
}

.select-wrapper select {
    appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-wrapper::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #526071;
    pointer-events: none;
}

.sub-fields {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mini {
    min-width: 0;
    font-size: 13px;
}

/* Кнопки */

.form-actions {
    margin-top: 24px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.primary-btn {
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    transition: background 0.2s, border-color 0.2s;
}

.primary-btn:hover:not(:disabled) {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.primary-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-actions > .primary-btn {
    max-width: 560px;
}

.form-hint {
    margin-top: 12px;
    color: var(--text-gray);
    font-size: 12px;
}

/* Модальные окна */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 17, 27, 0.72);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    overflow-y: auto;
    padding: 24px;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 470px;
    margin: auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #cbd2da;
    border-radius: 14px;
    box-shadow: var(--shadow-modal);
}

.modal-content h2 {
    padding-right: 24px;
    font-size: 23px;
    line-height: 1.3;
}

.close-modal-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #526071;
    font-size: 20px;
}

.close-modal-btn:hover {
    background: #e8edf2;
    color: #17212b;
}

.auth-tabs {
    display: flex;
    margin: 16px 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #526071;
    font-size: 13px;
    font-weight: 600;
}

.auth-tab:hover {
    color: var(--text-dark);
    background: #f8fafc;
}

.auth-tab.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-primary);
}

#logout-btn {
    color: var(--accent-dark) !important;
}

.auth-form {
    display: none;
}

.auth-form.active-form {
    display: block;
    animation: fadeIn 0.2s ease;
}

.auth-form > .form-group,
#requisites-form > .form-group {
    margin-bottom: 18px;
}

.phone-input-group {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.phone-input-group .select-wrapper {
    flex: 0 0 112px;
}

.phone-input-group > input {
    flex: 1;
    min-width: 0;
}

.phone-prefix {
    padding-left: 8px !important;
    padding-right: 24px !important;
}

.phone-input-group .select-wrapper::after {
    right: 8px;
}

.password-field {
    position: relative;
}

.password-field .premium-input {
    padding-right: 48px !important;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #526071;
}

.toggle-password:hover {
    background: #edf1f5;
    color: #17212b;
}

.toggle-password.is-visible .icon-eye {
    display: none;
}

.toggle-password.is-visible .icon-eye-off {
    display: block !important;
}

.password-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.password-hints .hint {
    padding: 4px 8px;
    border: 1px solid #cbd2da;
    border-radius: 5px;
    background: #f1f3f5;
    color: #526071;
    font-size: 10px;
}

.password-hints .hint.valid {
    background: #edf8f1;
    border-color: #8ab89d;
    color: #20633b;
}

.password-hints .hint.valid::before {
    content: "✓ ";
}

.password-note {
    margin-top: 8px;
    color: #526071;
    font-size: 11px;
    line-height: 1.6;
}

.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
}

.consent-group input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.consent-group label {
    color: #526071;
    font-size: 12px;
    line-height: 1.6;
    cursor: pointer;
}

.consent-group a {
    color: var(--accent-dark);
}

#fullscreen-modal {
    display: none;
}

#fullscreen-modal.active {
    display: flex !important;
}

#fullscreen-modal .close-modal-btn:hover {
    background: #344151;
    color: #ffffff;
}

/* Уведомления */

#toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 360px;
    max-width: calc(100vw - 24px);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 9px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.5;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: auto;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-success { border-left-color: #237044; }
.toast-error { border-left-color: #b8322a; }
.toast-warning { border-left-color: #96600a; }

.toast-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.toast-success .toast-icon { background: #237044; }
.toast-error .toast-icon { background: #b8322a; }
.toast-warning .toast-icon { background: #96600a; }

.toast-text {
    flex: 1;
    overflow-wrap: anywhere;
}

.toast-close {
    flex-shrink: 0;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: #526071;
    font-size: 22px;
    line-height: 1;
}

.toast-close:hover {
    color: #17212b;
}

.loader-spinner {
    position: absolute;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: 3px solid #dce2e9;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Страница 404 */

.page-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    text-align: center;
}

.page-404 .error-container {
    max-width: 520px;
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.page-404 h1 {
    color: var(--accent-primary);
    font-size: 88px;
    line-height: 1;
}

.page-404 h2 {
    margin: 20px 0 14px;
    font-size: 24px;
}

.page-404 p {
    margin-bottom: 24px;
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
}

.page-404 .btn-home {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 8px;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.page-404 .btn-home:hover {
    background: var(--accent-dark);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Планшеты */

@media (max-width: 1100px) {
    .sidebar {
        flex-basis: 220px;
        width: 220px;
        padding: 24px 12px;
    }

    .main-content {
        padding: 24px 20px 36px;
    }

    .header-caption-note {
        display: none;
    }
}

/* Телефоны */

@media (max-width: 768px) {
    .header {
        min-height: 66px;
        gap: 12px;
        padding: 10px 14px;
    }

    .logo {
        padding: 5px 8px;
    }

    #header-logo {
        height: 30px;
    }

    .header-caption {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    #auth-btn {
        max-width: 45vw;
        padding: 10px;
        font-size: 11px;
    }

    .hamburger-btn {
        display: grid;
        place-items: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border: 1px solid #607084;
        border-radius: 7px;
        background: transparent;
        color: #ffffff;
        font-size: 22px;
    }

    .layout-wrapper {
        display: block;
        min-height: calc(100vh - 66px);
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1000;
        width: min(340px, 88vw);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        padding: 0;
        border: 0;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.25s, visibility 0.25s;
    }

    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
        box-shadow: -16px 0 50px rgba(15, 23, 42, 0.25);
    }

    .mobile-only {
        display: flex;
    }

    .sidebar-header {
        align-items: center;
        justify-content: space-between;
        padding: 18px;
        background: #18202b;
        color: #ffffff;
    }

    .sidebar-header h3 {
        font-size: 15px;
    }

    .close-btn {
        width: 36px;
        height: 36px;
        border: 0;
        background: transparent;
        color: #ffffff;
        font-size: 20px;
    }

    .model-list {
        padding: 18px 14px;
    }

    .model-list::before {
        display: none;
    }

    .menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(10, 17, 27, 0.65);
    }

    .menu-overlay.visible {
        display: block;
    }

    .main-content {
        gap: 20px;
        padding: 24px 14px 32px;
    }

    #current-crane-title {
        font-size: 22px;
        letter-spacing: -0.4px;
    }

    .visual-split-container {
        flex-direction: column;
        height: auto;
        min-height: 0;
        border-radius: 10px;
    }

    .visual-panel {
        flex: none;
        width: 100%;
        height: 280px;
    }

    #canvas-container {
        border-right: 0;
        border-bottom: 1px solid #344151;
    }

    #drawing-container {
        height: 250px;
    }

    .accordion-header {
        padding: 16px;
        font-size: 13px;
    }

    .accordion-content {
        padding: 0 16px;
    }

    .accordion-item.active .accordion-content {
        padding: 20px 16px;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .premium-input,
    .select-wrapper select,
    .form-group input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
        font-size: 16px;
    }

    .form-actions {
        padding: 20px 16px;
    }

    .primary-btn {
        font-size: 13px;
    }

    .modal-overlay.active {
        padding: 12px;
    }

    .modal-content {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }

    .modal-content h2 {
        font-size: 21px;
    }

    .auth-tab {
        padding: 12px 5px;
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    #toast-container {
        top: 78px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .page-404 .error-container {
        padding: 32px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.header {
    height: 76px;
    min-height: 76px;
}

.logo {
    padding: 0;
    background: transparent;
}

#header-logo {
    height: 36px;
    width: auto;
    transform: scale(1.6);
    transform-origin: left center;
}

.header-caption {
    margin-left: 24px;
}

@media (max-width: 768px) {
    .header {
        height: 66px;
        min-height: 66px;
    }

    #header-logo {
        height: 30px;
        transform: scale(1.25);
    }
}



.registration-phone .iti {
    width: 100%;
}

#registration-phone {
    padding-left: 58px;
}

.iti {
    --iti-border-color: #cbd2da;
    --iti-dropdown-bg: #ffffff;
    --iti-hover-color: #edf1f5;
    --iti-dialcode-color: #526071;
}

.iti--container {
    z-index: 12000;
}

.iti__dropdown-content {
    overflow: hidden;
    border: 1px solid #cbd2da;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
}

.iti__search-input {
    min-height: 44px;
    padding: 12px;
    color: #17212b;
    font: inherit;
}

.iti__country-list {
    max-height: 240px;
}

.iti__country {
    padding: 11px 12px;
    color: #17212b;
    font-size: 13px;
}

.iti__selected-country {
    border-radius: 7px 0 0 7px;
}

.phone-help-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 8px;
    color: var(--text-gray);
    font-size: 11px;
    line-height: 1.5;
}

.text-btn {
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-btn:hover {
    color: var(--accent-primary);
}



.primary-btn,
.secondary-btn,
.model-list li {
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.primary-btn:active:not(:disabled),
.secondary-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.model-list li:hover:not(.active) {
    transform: translateX(3px);
}

.accordion-header {
    transition:
        background-color 180ms ease,
        color 180ms ease;
}


.accordion-item.active .accordion-content > * {
    animation: contentAppear 220ms ease both;
}


.modal-overlay:not(#fullscreen-modal) {
    display: flex;
    padding: 24px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

.modal-overlay:not(#fullscreen-modal).active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay:not(#fullscreen-modal) > .modal-content {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.modal-overlay:not(#fullscreen-modal).active > .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.auth-form.active-form {
    animation: contentAppear 180ms ease both;
}

.iti__dropdown-content {
    animation: contentAppear 160ms ease both;
}

.canvas-header,
.visual-split-container {
    animation: contentAppear 300ms ease both;
}

@keyframes contentAppear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .modal-overlay:not(#fullscreen-modal) {
        padding: 12px;
    }
}

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

.brand-hero {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 33vh;
    height: 33svh;
    min-height: 160px;
    padding: 24px;

    background: var(--bg-header);
}

.brand-hero #header-logo {
    width: min(90vw, 80svh, 1100px);
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.header .header-caption {
    margin-left: 0;
}

#canvas-container {
    background: #ffffff;
}

#canvas-container::before {
    color: var(--text-gray);
}


.order-lock-notice {
    margin-top: 10px;
    padding: 12px 14px;

    color: #744600;
    background: #fff4d6;
    border-left: 3px solid #d99b16;
    border-radius: 6px;

    font-size: 0.88rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .brand-hero {
        padding: 20px 16px;
    }

    .brand-hero #header-logo {
        width: 100%;
        transform: none;
    }
}

.header {
    height: 88px;
    min-height: 88px;
    padding: 10px 24px;
    gap: 24px;
}

.header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 180px;
    width: 180px;
    height: 68px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
}

.header #header-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.header .header-caption {
    margin-left: 0;
}

.header .header-actions {
    margin-left: auto;
}

@media (max-width: 768px) {
    .header {
        height: 72px;
        min-height: 72px;
        padding: 8px 12px;
        gap: 10px;
    }

    .header .logo {
        flex: 0 0 140px;
        width: 140px;
        height: 52px;
    }

    .header .header-actions {
        gap: 8px;
        min-width: 0;
    }

    .header #auth-btn {
        min-width: 0;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .header .logo {
        flex-basis: 110px;
        width: 110px;
    }

    .header #auth-btn {
        max-width: 100px;
    }
}