:root {
    --background: #f6f7f9;
    --surface: #ffffff;
    --text: #16181d;
    --muted: #6b7280;
    --border: #e2e5e9;
    --primary: #111827;
    --primary-hover: #2b3443;
    --success: #137a4b;
    --warning: #a06200;
    --danger: #b42318;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    line-height: 1.55;
}

a {
    color: var(--text);
}

.container {
    width: min(100% - 32px, 960px);
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 21px;
    font-weight: 750;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a {
    text-decoration: none;
}

.nav form {
    margin: 0;
}

.nav-button {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.main-content {
    min-height: calc(100vh - 140px);
    padding-top: 44px;
    padding-bottom: 64px;
}


/* Footer */

.site-footer {
    overflow: hidden;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.security-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 27px 0 26px;
    border-bottom: 1px solid var(--border);

    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent,
            black 7%,
            black 93%,
            transparent
        );

    mask-image:
        linear-gradient(
            to right,
            transparent,
            black 7%,
            black 93%,
            transparent
        );
}

.security-marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation:
        security-marquee-scroll
        65s
        linear
        infinite;
}

.security-marquee:hover
.security-marquee-track {
    animation-play-state: paused;
}

.security-marquee-group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    white-space: nowrap;
    padding-right: 26px;
}

.security-marquee-group span {
    display: inline-flex;
    align-items: center;
    color: #6f7682;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.security-marquee-group span::after {
    content: "·";
    margin: 0 18px;
    color: #b2b7bf;
    font-size: 17px;
    font-weight: 400;
}

@keyframes security-marquee-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.footer-bottom {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: var(--text);
    font-size: 15px;
    font-weight: 750;
}

.footer-caption {
    color: var(--muted);
    font-size: 13px;
}


/* Typography */

h1 {
    margin-top: 0;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
}

h2 {
    margin-top: 36px;
}


/* Hero */

.hero {
    margin-bottom: 42px;
}

.hero p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

.rules {
    margin-top: 22px;
    padding-left: 22px;
}


/* Buttons */

.button {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-hover);
}

.button-small {
    padding: 8px 13px;
}

.button-danger {
    background: var(--danger);
}


/* Vacancies */

.vacancy-grid {
    display: grid;
    gap: 16px;
}

.vacancy-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.vacancy-card h2,
.vacancy-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.vacancy-card h2 a,
.vacancy-card h3 a {
    text-decoration: none;
}

.vacancy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--muted);
}

.salary {
    margin-top: 14px;
    font-weight: 700;
}


/* Status */

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eceff3;
    font-size: 13px;
    font-weight: 600;
}

.badge-published {
    color: var(--success);
    background: #eaf7f0;
}

.badge-pending {
    color: var(--warning);
    background: #fff5df;
}

.badge-rejected {
    color: var(--danger);
    background: #fff0ef;
}

.badge-closed {
    color: var(--muted);
    background: #eceff3;
}


/* Forms and cards */

.form-card,
.content-card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

form p {
    margin: 0 0 20px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cdd2d8;
    border-radius: 7px;
    background: white;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #c7d2fe;
    border-color: #7182be;
}

.helptext {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.errorlist {
    margin: 7px 0;
    padding-left: 20px;
    color: var(--danger);
}


/* Messages */

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 13px 16px;
    background: #eef8f2;
    border: 1px solid #cfe8d9;
    border-radius: 8px;
}


/* Dashboard */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-section {
    margin-top: 34px;
}

.closed-notice {
    margin: 20px 0;
    padding: 14px 18px;
    background: #f0f1f3;
    border-radius: 8px;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--muted);
}

.empty-state {
    padding: 36px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}


/* Mobile */

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-card,
    .content-card,
    .vacancy-card {
        padding: 20px;
    }

    .security-marquee {
        padding-top: 23px;
        padding-bottom: 22px;

        -webkit-mask-image:
            linear-gradient(
                to right,
                transparent,
                black 4%,
                black 96%,
                transparent
            );

        mask-image:
            linear-gradient(
                to right,
                transparent,
                black 4%,
                black 96%,
                transparent
            );
    }

    .security-marquee-group span {
        font-size: 12px;
    }

    .security-marquee-group span::after {
        margin-left: 14px;
        margin-right: 14px;
    }

    .footer-bottom {
        min-height: 70px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .security-marquee-track {
        animation: none;
    }
}

/* Telegram contact */

.telegram-contact {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 11px 15px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;

    background: #111827;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    box-shadow:
        0 8px 24px rgba(17, 24, 39, 0.16);

    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.telegram-contact:hover {
    background: #2b3443;
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 12px 30px rgba(17, 24, 39, 0.20);
}

.telegram-contact-question {
    color: #d1d5db;
    font-weight: 500;
}

.telegram-contact-action {
    color: #ffffff;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.footer-links a {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

@media (max-width: 700px) {
    .telegram-contact {
        right: 14px;
        bottom: 14px;
        padding: 11px 14px;
    }

    .telegram-contact-question {
        display: none;
    }

    .footer-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-contact {
        transition: none;
    }
}
