:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --border: #2d3a4f;
    --text: #e7edf5;
    --muted: #8b9cb3;
    --accent: #1877f2;
    --accent-hover: #166fe5;
    --success: #31a24c;
    --danger: #e41e3f;
    --radius: 10px;
    font-family: "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--accent);
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    font-weight: 500;
}

.nav a:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.flash.ok {
    background: rgba(49, 162, 76, 0.15);
    border: 1px solid var(--success);
}

.flash.err {
    background: rgba(228, 30, 63, 0.12);
    border: 1px solid var(--danger);
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    margin-bottom: 0.85rem;
}

textarea {
    min-height: 88px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn.secondary:hover {
    border-color: var(--muted);
}

.btn.small {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.btn.danger {
    background: var(--danger);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
    font-weight: 600;
}

.link-list {
    margin: 0;
    padding-left: 1.2rem;
    word-break: break-all;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.link-rows .row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: flex-start;
}

.link-rows input {
    flex: 1;
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.pending {
    background: rgba(255, 180, 0, 0.2);
    color: #ffc107;
}

.badge.ok {
    background: rgba(49, 162, 76, 0.2);
    color: #6fdc85;
}

.badge.no {
    background: rgba(228, 30, 63, 0.15);
    color: #ff6b81;
}

.auth-box {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-box h1 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.help {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: -0.5rem;
    margin-bottom: 0.85rem;
}

.hero-dash h2 {
    margin-top: 0;
}

.hero-dash > p:last-of-type {
    margin-bottom: 0;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.trust-ico {
    color: var(--success);
    font-weight: 700;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 720px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.steps-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.65;
}

.steps-list li {
    margin-bottom: 0.35rem;
}

.info-pills {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.small-gap {
    margin-bottom: 0.65rem;
}

.pill {
    display: inline-block;
    font-size: 0.88rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    line-height: 1.4;
}

.field-hint {
    font-size: 0.82rem;
    margin: 0 0 0.65rem;
    min-height: 1.25rem;
}

.field-hint.field-ok {
    color: var(--success);
}

.field-hint.field-bad {
    color: var(--danger);
}

.link-li-invalid a {
    text-decoration: line-through;
    opacity: 0.78;
}

.link-reason {
    font-size: 0.82rem;
    margin-top: 0.28rem;
    color: var(--muted);
}

.review-row {
    margin-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
