@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.container {
    width: 100%;
    max-width: 920px;
    background: #fff;
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    margin-bottom: 32px;
    color: #0f172a;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ── Formulário ──────────────────────────────────────────────────── */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

input[type="url"],
input[type="text"] {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input[type="url"]:focus,
input[type="text"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

button[type="submit"] {
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover  { background: #1d4ed8; }
button[type="submit"]:active { transform: scale(0.98); }

/* ── Resultado / QR Code ─────────────────────────────────────────── */
.result {
    margin-top: 28px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    padding: 24px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result p {
    color: #166534;
    font-weight: 600;
}

.result a {
    color: #15803d;
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.copy-btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: #166534;
    color: white;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    width: fit-content;
}

.copy-btn:hover { background: #15803d; }

#qrcode {
    margin-top: 8px;
}

#qrcode img,
#qrcode canvas {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

/* ── Erro ────────────────────────────────────────────────────────── */
.error {
    margin-top: 20px;
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* ── Botões de navegação ─────────────────────────────────────────── */
.dashboard-btn {
    display: inline-block;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 10px;
    background: #0f172a;
    color: white;
    margin-top: 28px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.dashboard-btn:hover { background: #1e293b; }

/* ── Tabela (dashboard) ──────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 13px 14px;
    text-align: left;
    vertical-align: middle;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

table tbody tr:hover {
    background: #f8fafc;
}

.url-cell {
    max-width: 260px;
    word-break: break-all;
}

.url-cell a {
    color: #2563eb;
    text-decoration: none;
}

.url-cell a:hover { text-decoration: underline; }

/* badge de cliques */
.clicks-cell { text-align: center; }

.badge {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 20px;
    padding: 3px 12px;
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
}

/* botão excluir dentro de form */
.delete-btn {
    display: inline-block;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    background: #dc2626;
    color: white;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.delete-btn:hover { background: #b91c1c; }

/* form inline na célula */
td form {
    margin: 0;
}

/* ── Responsivo ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .container {
        padding: 28px 20px;
    }

    h1 { font-size: 1.4rem; }
}
