:root {
    --red: #e31b23;
    --red-dark: #b9141b;
    --black: #090909;
    --dark: #171717;
    --bg: #f3f5f8;
    --card: #ffffff;
    --text: #202124;
    --muted: #6b7280;
    --border: #e1e5eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(227, 27, 35, .35), transparent 28%),
        linear-gradient(135deg, #050505 0%, #1b1b1b 65%, #2b0b0d 100%);
    color: white;
    padding: 24px 7vw 95px;
}

.navbar,
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.admin-header {
    background: var(--black);
    color: white;
    padding: 24px 7vw;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
    font-size: 18px;
}

.logo {
    width: 220px;
    max-width: 55vw;
}

.hero-content {
    max-width: 980px;
    margin: 70px auto 0;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: -2px;
}

.hero p {
    max-width: 720px;
    margin: 18px auto 0;
    color: #d7d7d7;
    font-size: 20px;
    line-height: 1.55;
}

.searchbar {
    margin: 34px auto 0;
    max-width: 920px;
    background: white;
    padding: 12px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1fr 250px 135px;
    gap: 12px;
    box-shadow: var(--shadow);
}

.field {
    text-align: left;
}

.field span {
    display: block;
    margin: 0 0 6px 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f7f8fa;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
    background: white;
}

button,
.btn {
    border: 0;
    border-radius: 15px;
    padding: 14px 22px;
    background: var(--red);
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

button:hover,
.btn:hover {
    background: var(--red-dark);
}

.btn-light {
    background: white;
    color: var(--black);
}

.btn-light:hover {
    background: #eeeeee;
}

.btn.small {
    padding: 10px 14px;
    font-size: 14px;
}

.container {
    max-width: 1180px;
    margin: -55px auto 60px;
    padding: 0 20px;
    position: relative;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.stats article {
    background: var(--card);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.stats strong {
    display: block;
    color: var(--red);
    font-size: 36px;
    line-height: 1;
    margin-bottom: 8px;
}

.stats span {
    color: var(--muted);
    font-weight: 700;
}

.category-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 34px;
    padding-bottom: 6px;
}

.category-filter a {
    white-space: nowrap;
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    padding: 11px 17px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.category-filter a.active,
.category-filter a:hover {
    background: var(--red);
    border-color: var(--red);
    color: white;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 22px;
}

.section-title h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
}

.section-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 22px;
}

.card,
.empty,
.admin-form {
    background: var(--card);
    border: 1px solid rgba(225, 229, 235, .7);
    border-radius: 26px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card {
    min-height: 285px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: .2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.card-header,
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.badge {
    background: #ffe7ea;
    color: var(--red);
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.version {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
}

.card p {
    margin: 0;
    color: #515862;
    line-height: 1.55;
    flex: 1;
}

.tags {
    color: var(--muted);
    font-size: 14px;
    min-height: 20px;
}

.card-footer {
    border-top: 1px solid #eef0f4;
    padding-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 44px;
}

.admin-container {
    margin-top: 35px;
}

.alert {
    background: #e8fff1;
    color: #176b3a;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 800;
}

.admin-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 35px;
}

.admin-form label {
    font-weight: 800;
}

.admin-form .full {
    grid-column: 1 / -1;
}

.table-wrapper {
    background: white;
    border-radius: 20px;
    overflow: auto;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
}

th {
    background: #fafafa;
}

footer {
    background: var(--black);
    color: white;
    padding: 26px 7vw;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

footer span {
    color: #cfcfcf;
}

@media (max-width: 850px) {
    .searchbar,
    .stats,
    .admin-form {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .navbar,
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-content {
        margin-top: 42px;
        text-align: left;
    }

    .hero h1 {
        font-size: 42px;
    }

    .logo {
        width: 200px;
    }
}