@font-face {
    font-family: Omnes;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Omnes/omnes-regular.ttf') format('truetype');
}
@font-face {
    font-family: Omnes;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/Omnes/omnes-bold.ttf') format('truetype');
}

:root {
    --navy: #3d4971;
    --ink: #24314f;
    --muted: #667085;
    --line: #e6e8ee;
    --card: #fff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Omnes, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(160deg, #3d4971 0%, #5a6581 55%, #72838d 100%);
}

a { color: inherit; }

.wrap {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img { width: 120px; height: auto; }

.brand strong { display: block; font-size: 1.05rem; }

.actions, .downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lang a, .btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 14px;
    text-decoration: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.lang a {
    color: #fff;
    opacity: 0.75;
}

.lang a.is-active { opacity: 1; font-weight: 700; }

.btn-light { background: #fff; color: var(--navy); }
.btn-line { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-danger { background: #8d3040; color: #fff; }

.card {
    background: var(--card);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(20, 28, 48, 0.18);
}

.card + .card { margin-top: 14px; }

h1 { margin: 0 0 8px; font-size: 1.6rem; }
.lead { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }

label { display: block; margin-bottom: 6px; font-weight: 700; }
input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    margin-bottom: 14px;
}
.hint { margin: -8px 0 14px; color: var(--muted); font-size: 0.92rem; }

.alert {
    background: #e8f6ee;
    color: #146c43;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.alert-error { background: #fdecee; color: #8d3040; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.86rem; }
.url { direction: ltr; text-align: left; word-break: break-all; color: var(--muted); font-size: 0.92rem; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions a { color: var(--navy); font-weight: 700; text-decoration: none; }

.grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.preview { text-align: center; }
.preview img { width: 220px; height: 220px; }
.permanent { direction: ltr; word-break: break-all; font-weight: 700; }

.narrow { width: min(420px, 100%); margin: 8vh auto 0; }

@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
    .top { align-items: flex-start; }
}
