html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f5;
    color: #050505;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.button,
.add-shop-button {
    font-family: inherit;
}

#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 50px;
    padding: 0 14px;
    background: #fff;
    box-sizing: border-box;
}

.header_left {
    display: flex;
    align-items: center;
}

.header_left img {
    height: 35px;
    object-fit: contain;
    display: block;
}

.header_central ul {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0;
    margin: 0;
}

.header_central li {
    list-style: none;
}

.header_central a,
.header_rigth a,
.logout-button {
    color: #070707;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.header_rigth {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header_rigth p {
    margin: 0;
    max-width: 160px;
    overflow: hidden;
    color: #222;
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.logout-form {
    margin: 0;
}

.logout-button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.public-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.public-language-switcher__label {
    color: #555;
    font-size: 13px;
    font-weight: 700;
}

.public-language-switcher__select {
    min-height: 32px;
    border: 1px solid #d4d4d8;
    background: #fff;
    color: #111;
    padding: 0 8px;
    font: inherit;
    font-size: 14px;
}

.dashboard-shell {
    max-width: none;
    margin: 0;
    padding: 0 14px;
}

.projects-page {
    padding: 84px 56px 70px;
}

.projects-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 46px;
}

.projects-head h1 {
    margin: 0;
    color: #050505;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.projects-head-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
}

.projects-limit-note {
    max-width: 330px;
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}

.add-shop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 270px;
    min-height: 48px;
    padding: 0 28px;
    border: 1px solid #8d79dc;
    background: #8d79dc;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    box-sizing: border-box;
    cursor: pointer;
}

.add-shop-button--disabled,
.add-shop-button:disabled {
    border-color: #d6d6df;
    background: #e7e7ec;
    color: #999;
    cursor: not-allowed;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 310px;
    padding: 38px 36px 36px;
    border: 1px solid #c8c8c8;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.project-card:hover {
    border-color: #9b86ef;
    box-shadow: 0 14px 34px rgba(20, 20, 40, 0.08);
    transform: translateY(-2px);
}

.project-card--deleted {
    opacity: 0.5;
}

.project-card--deleted:hover {
    border-color: #c8c8c8;
    box-shadow: none;
    transform: none;
}

.project-delete-button {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e4b5b5;
    background: #fff;
    color: #b3261e;
    font-size: 18px;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.project-card:hover .project-delete-button {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.project-delete-button:hover {
    background: #b3261e;
    border-color: #b3261e;
    color: #fff;
}

.project-card-main h2 {
    margin: 0 0 20px;
    padding-right: 44px;
    color: #050505;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.project-card-main h2 a {
    color: inherit;
}

.project-description {
    max-width: 430px;
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: #777;
    font-size: 13px;
}

.project-meta span + span::before {
    content: "•";
    margin-right: 10px;
    color: #aaa;
}

.project-card-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 56px;
}

.project-card-footer form,
.project-admin-form {
    flex: 0 0 auto;
    margin: 0;
}

.project-admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    min-height: 47px;
    padding: 0 24px;
    border: 1px solid #9b86ef;
    background: #fff;
    color: #8d79dc;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.project-admin-button:hover {
    background: #f6f3ff;
}

.project-admin-button.disabled,
.project-admin-button:disabled {
    border-color: #d6d6df;
    color: #aaa;
    background: #f7f7f9;
    cursor: not-allowed;
}

.project-public-link {
    min-width: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.muted {
    color: #777;
}

.empty-projects {
    max-width: 620px;
    padding: 46px;
    border: 1px solid #c8c8c8;
    background: #fff;
}

.empty-projects h2 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.2;
}

.empty-projects p {
    margin: 0 0 28px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.deleted-projects {
    margin-top: 58px;
}

.deleted-projects h2 {
    margin: 0 0 24px;
    color: #050505;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.site-detail-page {
    padding: 84px 56px 70px;
}

.site-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 36px;
}

.site-detail-title {
    min-width: 0;
}

.site-detail-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
}

.site-detail-back:hover {
    color: #8d79dc;
}

.site-detail-title h1 {
    margin: 0;
    color: #050505;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
    word-break: break-word;
}

.site-detail-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    padding-top: 34px;
}

.site-detail-actions form {
    margin: 0;
}

.site-detail-admin-button {
    min-width: 180px;
}

.site-detail-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    min-height: 47px;
    padding: 0 24px;
    border: 1px solid #e4b5b5;
    background: #fff;
    color: #b3261e;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    box-sizing: border-box;
}

.site-detail-delete-button:hover {
    background: #b3261e;
    border-color: #b3261e;
    color: #fff;
}

.site-detail-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid #e4b5b5;
    background: #fff;
    color: #b3261e;
    box-sizing: border-box;
}

.site-detail-alert strong,
.site-detail-alert span {
    font-size: 14px;
    line-height: 1.45;
}

.site-detail-card {
    max-width: 980px;
    padding: 36px;
    border: 1px solid #c8c8c8;
    background: #fff;
    box-sizing: border-box;
}

.site-detail-card h2 {
    margin: 0 0 28px;
    color: #050505;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.site-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #e5e5e8;
}

.site-detail-field {
    min-width: 0;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e8;
}

.site-detail-field:nth-child(odd) {
    padding-right: 28px;
}

.site-detail-field:nth-child(even) {
    padding-left: 28px;
    border-left: 1px solid #e5e5e8;
}

.site-detail-field span {
    display: block;
    margin-bottom: 8px;
    color: #777;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.site-detail-field strong,
.site-detail-field a {
    color: #050505;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.site-detail-field a {
    color: #8d79dc;
}

.site-detail-field a:hover {
    text-decoration: underline;
}

.onboarding-page {
    max-width: 1120px;
    padding: 72px 56px 70px;
}

.onboarding-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 32px;
}

.onboarding-head h1,
.onboarding-complete h1 {
    margin: 0 0 14px;
    color: #050505;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
}

.onboarding-head p,
.onboarding-complete p {
    max-width: 680px;
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.55;
}

.onboarding-head-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 34px 0 0;
    flex: 0 0 auto;
}

.onboarding-head-actions form {
    margin: 0;
}

.onboarding-form {
    display: grid;
    gap: 24px;
}

.onboarding-step,
.onboarding-complete {
    padding: 30px;
    border: 1px solid #c8c8c8;
    background: #fff;
    box-sizing: border-box;
}

.onboarding-step--hidden {
    display: none;
}

.onboarding-step-title {
    margin-bottom: 20px;
}

.onboarding-step-title span {
    display: block;
    margin-bottom: 7px;
    color: #777;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
}

.onboarding-step-title h2 {
    margin: 0;
    color: #050505;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.onboarding-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.onboarding-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 5px;
    align-items: flex-start;
    min-height: 58px;
    padding: 15px;
    border: 1px solid #d9dbe4;
    background: #fff;
    box-sizing: border-box;
}

.onboarding-option input[type="radio"],
.onboarding-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.onboarding-option strong {
    min-width: 0;
    color: #050505;
    font-size: 15px;
    line-height: 1.35;
}

.onboarding-option small,
.onboarding-option em {
    grid-column: 2;
    color: #666;
    font-size: 13px;
    line-height: 1.35;
    font-style: normal;
}

.onboarding-option em {
    color: #9a5a00;
    font-weight: 700;
}

.onboarding-option--disabled {
    background: #f7f7f9;
    color: #888;
}

.onboarding-option--disabled strong {
    color: #777;
}

.onboarding-domain {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 14px;
}

.onboarding-domain-custom input[type="text"] {
    grid-column: 2;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cfd3df;
    box-sizing: border-box;
    font: inherit;
}

.onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.onboarding-secondary-action {
    border-color: #d6d6df;
    color: #444;
}

.onboarding-secondary-action:hover {
    background: #f3f3f6;
    border-color: #c3c4ce;
    color: #111;
}

.onboarding-warning-list {
    display: grid;
    gap: 10px;
    margin: 22px 0 24px;
}

.onboarding-warning {
    padding: 12px 14px;
    border: 1px solid #ead6a7;
    background: #fff8e8;
    color: #7a4d00;
    font-size: 14px;
    line-height: 1.4;
}

.messages {
    max-width: 1180px;
    padding: 0;
    margin: 0 auto 22px;
}

.messages li {
    list-style: none;
    background: #fff;
    border-left: 4px solid #8d79dc;
    padding: 13px 16px;
    margin-bottom: 8px;
}

.panel,
.item-card,
.auth-box {
    background: #fff;
    border: 1px solid #e5e7ef;
    padding: 22px;
}

.form-grid p {
    margin: 0 0 16px;
}

.form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    border: 1px solid #cfd3df;
    padding: 8px 10px;
}

.auth-page {
    max-width: 430px;
    margin: 70px auto;
    padding: 0 20px;
}

@media (max-width: 1180px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    #header {
        height: auto;
        min-height: 72px;
        flex-wrap: wrap;
        padding: 14px 22px;
    }

    .header_central ul {
        flex-wrap: wrap;
        gap: 14px;
    }

    .projects-page {
        padding: 44px 22px;
    }

    .site-detail-page {
        padding: 44px 22px;
    }

    .onboarding-page {
        padding: 44px 22px;
    }

    .onboarding-head {
        flex-direction: column;
        gap: 20px;
    }

    .onboarding-head h1,
    .onboarding-complete h1 {
        font-size: 34px;
    }

    .onboarding-head-actions,
    .onboarding-secondary-action {
        width: 100%;
    }

    .onboarding-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .onboarding-options-grid,
    .onboarding-domain {
        grid-template-columns: 1fr;
    }

    .projects-head {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .site-detail-head {
        flex-direction: column;
        gap: 24px;
        margin-bottom: 28px;
    }

    .site-detail-title h1 {
        font-size: 34px;
    }

    .site-detail-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        padding-top: 0;
    }

    .site-detail-actions form,
    .site-detail-admin-button,
    .site-detail-delete-button {
        width: 100%;
    }

    .site-detail-card {
        padding: 28px 24px;
    }

    .site-detail-card h2 {
        font-size: 24px;
    }

    .site-detail-grid {
        grid-template-columns: 1fr;
    }

    .site-detail-field:nth-child(odd),
    .site-detail-field:nth-child(even) {
        padding-right: 0;
        padding-left: 0;
        border-left: 0;
    }

    .projects-head-actions {
        align-items: stretch;
        width: 100%;
    }

    .projects-limit-note {
        max-width: none;
        text-align: left;
    }

    .projects-head h1 {
        font-size: 34px;
    }

    .add-shop-button {
        width: 100%;
        min-width: 0;
    }

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

    .project-card {
        min-height: auto;
        padding: 28px 24px;
    }

    .project-card-main h2 {
        font-size: 26px;
    }

    .project-card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-top: 36px;
    }

    .project-admin-button {
        width: 100%;
    }
}
