.kata-shared-header,
.kata-shared-header *,
.kata-shared-footer,
.kata-shared-footer *,
.kata-shared-popup,
.kata-shared-popup * {
    box-sizing: border-box;
}

html,
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* The shared controls replace duplicated page-specific layout shells. */
.kata-topbar,
.kata-buy-topbar,
.kata-download-topbar,
.kata-help-topbar,
.kata-guide-topbar,
.kata-contact-topbar,
.kata-footer:not(.kata-shared-footer),
.kata-products-footer,
.kata-download-footer,
.kata-help-footer,
.kata-guide-footer,
#popup {
    display: none !important;
}

#popup_price,
.kata-shared-legacy-page .page-container > .header,
.kata-shared-legacy-page .page-container > .footer-content,
.kata-shared-legacy-page .page-container > .legalfooter-content {
    display: none !important;
}

.kata-shared-legacy-page .page-container,
body.kata-download-page .page-container,
body.kata-guide-page .page-container {
    position: static !important;
}

.kata-shared-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.kata-shared-header {
    position: sticky;
    top: 0;
    z-index: 500;
    width: 100vw;
    max-width: 100vw;
    border-bottom: 1px solid #1f2937;
    background: rgba(3, 7, 13, 0.98);
    color: #f8fafc;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

body > form {
    margin: 0 !important;
    padding: 0 !important;
}

html[lang="en"] .page-title h1::before {
    content: "BUY A KATA LICENSE";
}

html[lang="en"] .page-title h1::after {
    content: "KATA License Purchase Process";
}

html[lang="en"] .page-title .auto-container::after {
    content: "1. Enter purchase information\A 2. Click Buy now\A 3. Scan the QR code to pay\A 4. Check your email for the license key\A 5. Receive the VAT invoice by email";
}

.kata-shared-header a,
.kata-shared-footer a {
    color: inherit;
    text-decoration: none;
}

.kata-shared-header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 72px;
    gap: 30px;
}

.kata-shared-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.kata-shared-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: #0788d4;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.kata-shared-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kata-shared-brand-copy strong {
    color: #f8fafc;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0;
}

.kata-shared-brand-copy span {
    margin-top: 4px;
    color: #91a4bd;
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.kata-shared-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-width: 0;
}

.kata-shared-nav a {
    position: relative;
    padding: 25px 0 23px;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
    white-space: nowrap;
}

.kata-shared-nav a:hover,
.kata-shared-nav a[aria-current="page"] {
    color: #38bdf8;
}

.kata-shared-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: #38bdf8;
}

.kata-shared-actions {
    display: grid;
    grid-template-columns: auto auto auto auto;
    align-items: center;
    gap: 10px;
}

.kata-shared-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    color: #dbe7f5;
    font-size: 13px;
    font-weight: 800;
}

.kata-shared-signin:hover,
.kata-shared-signin[aria-current="page"] {
    color: #38bdf8;
}

.kata-shared-language {
    display: inline-grid;
    grid-template-columns: repeat(2, 42px);
    min-height: 44px;
    border: 1px solid #334155;
}

.kata-shared-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #aebdd0;
    font-size: 12px;
    font-weight: 900;
}

.kata-shared-language a + a {
    border-left: 1px solid #334155;
}

.kata-shared-language a:hover,
.kata-shared-language a.is-active {
    background: #111827;
    color: #38bdf8;
}

.kata-shared-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #334155;
    background: #0b1220;
    color: #f8fafc !important;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.kata-shared-button:hover {
    border-color: #38bdf8;
}

.kata-shared-button-primary {
    border-color: #f97316;
    background: #f97316;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.26);
}

.kata-shared-button-primary:hover {
    border-color: #ea580c;
    background: #ea580c;
}

.kata-shared-footer {
    clear: both;
    width: 100%;
    border-top: 1px solid #1f2937;
    background: #05070b;
    color: #9fb1c8;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

.kata-shared-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 28px;
    font-size: 13px;
}

.kata-shared-footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 28px;
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
}

.kata-shared-footer-links a:hover {
    color: #38bdf8;
}

.kata-shared-popup {
    position: fixed;
    right: 12px;
    bottom: 14px;
    z-index: 480;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kata-shared-popup a,
.kata-shared-popup img {
    display: block;
}

.kata-shared-popup img {
    width: 60px;
    height: auto;
    max-height: 92px;
    object-fit: cover;
    border: 1px solid #243044;
    background: #0b1220;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.kata-shared-popup-close {
    display: none;
}

@media (max-width: 1120px) {
    .kata-shared-nav {
        display: none;
    }

    .kata-shared-header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 680px) {
    .kata-shared-shell {
        width: min(1180px, calc(100% - 28px));
    }

    .kata-shared-header-inner {
        display: flex;
        flex-wrap: wrap;
        min-height: 0;
        padding: 14px 0;
        gap: 12px;
    }

    .kata-shared-brand {
        width: 100%;
        min-width: 0;
    }

    .kata-shared-actions {
        width: 100%;
        grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .kata-shared-language {
        grid-template-columns: repeat(2, 1fr);
    }

    .kata-shared-button {
        min-width: 0;
        padding: 0 4px;
        font-size: 12px;
    }

    .page-title .auto-container,
    .col-row {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .kata-shared-footer-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 0;
    }

    .kata-shared-footer-links {
        justify-content: flex-start;
        gap: 16px 20px;
    }

    .kata-shared-popup {
        right: 8px;
        bottom: 8px;
        display: flex;
        gap: 6px;
    }

    .kata-shared-popup img {
        width: 46px;
        max-height: 70px;
    }

    .kata-shared-popup-close {
        position: absolute;
        top: -12px;
        right: -4px;
        z-index: 1;
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid #475569;
        border-radius: 50%;
        background: #0b1220;
        color: #fff;
        font: 700 20px/1 Arial, Helvetica, sans-serif;
        cursor: pointer;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    }
}
