:root {
    /* Culturise brand — https://www.culturise.tech/ */
    --bg: #0e0f11;
    --surface: #18191d;
    --surface-alt: #24262c;
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.68);
    --accent: #ff4500;
    --accent-hover: #d85927;
    --accent-soft: rgba(255, 69, 0, 0.14);
    --danger: #e5484d;
    --success: #30a46c;
    --radius: 5px;
    --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.site-header__inner,
.site-footer__inner,
.site-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
    color: var(--text);
}

.brand__logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.brand__tagline {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--accent);
    text-transform: none;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2px;
    background: var(--surface-alt);
}

.lang-switcher__item {
    padding: 6px 10px;
    border-radius: 3px;
    color: var(--text-muted);
    white-space: nowrap;
}

.lang-switcher__item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.lang-switcher__item--active {
    color: var(--text);
    background: var(--accent-soft);
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
}

.site-nav__user {
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-main {
    padding-top: 40px;
    padding-bottom: 64px;
    min-height: calc(100vh - 72px - 72px);
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-head__sub {
    margin: 0 0 32px;
    color: var(--text-muted);
    font-size: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.card--auth {
    max-width: 420px;
    margin: 24px auto;
}

.card__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.card__subtitle {
    margin: 0 0 24px;
    color: var(--text-muted);
}

.card__foot {
    margin: 24px 0 0;
    font-size: 0.9rem;
}

.form__field {
    display: block;
    margin-bottom: 18px;
}

.form__field span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form__field input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease;
}

.form__field input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--lg {
    padding: 14px 26px;
    font-size: 1rem;
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert--error {
    background: rgba(229, 72, 77, 0.12);
    border-color: rgba(229, 72, 77, 0.35);
    color: #ff9a9d;
}

.alert--success {
    background: rgba(48, 163, 108, 0.12);
    border-color: rgba(48, 163, 108, 0.35);
    color: #77d7a5;
}

.alert--info {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--text-muted);
}

.release-latest {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 69, 0, 0.08) 100%);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 40px;
}

.release-latest__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.release-latest__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.release-latest__info h2 {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.meta {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.changelog {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 520px;
}

.changelog h4 {
    color: var(--text);
    margin: 0 0 6px;
}

.release-previous h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.table thead th {
    color: var(--text-muted);
    font-weight: 600;
    background: var(--surface-alt);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table__actions {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 72px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.license-form {
    margin: 28px 0;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 69, 0, 0.06) 100%);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}

.license-form__title {
    margin: 0 0 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.license-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
    margin-bottom: 8px;
}

.license-form__notes {
    grid-column: 1 / -1;
}

.license-form .form__field {
    margin-bottom: 16px;
}

.license-form .form__field input {
    width: 100%;
    box-sizing: border-box;
}

.license-form .btn--primary {
    margin-top: 4px;
}

.alert--token {
    background: var(--accent-soft);
    border: 1px solid rgba(255, 69, 0, 0.35);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.token-plain {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    word-break: break-all;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-wrap {
    overflow-x: auto;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge--success {
    background: rgba(48, 164, 108, 0.18);
    color: var(--success);
}

.badge--muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.actions-cell {
    white-space: nowrap;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn--small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn--danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn--danger:hover {
    background: rgba(229, 72, 77, 0.12);
}

.small {
    font-size: 0.82rem;
}

@media (max-width: 720px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header__actions {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .release-latest__body {
        flex-direction: column;
    }

    .table th,
    .table td {
        padding: 10px 12px;
    }

    .license-form__grid {
        grid-template-columns: 1fr;
    }
}
