:root {
    --brand-light: #5cb8fc;
    --brand-blue: #0071bc;
    --brand-navy: #011155;
    --text: #1a1a2e;
    --muted: #667085;
    --border: #e2e8f0;
    --bg: #f4f8fd;
    --card: #ffffff;
    --danger: #c0392b;
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-navy); }

/* --- Top bar --- */
.wbn-topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wbn-logo { height: 34px; display: block; }
nav.wbn-nav { font-size: 0.9rem; display: flex; gap: 1.25rem; align-items: center; }
nav.wbn-nav a { color: var(--brand-navy); font-weight: 600; }
nav.wbn-nav a:hover { color: var(--brand-blue); }

/* --- Hero (homepage) --- */
.wbn-hero {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    padding: 3.5rem 1.5rem 5.5rem;
    text-align: center;
    color: white;
}
.wbn-hero h1 {
    color: white;
    font-size: 2.2rem;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.wbn-hero p {
    color: #cfe3ff;
    margin: 0;
    font-size: 1.05rem;
}

/* --- Generic page wrapper (login/register/dashboard) --- */
.wbn-page {
    max-width: 440px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.wbn-page.wide { max-width: 900px; }

/* --- Card that floats up from the hero --- */
.wbn-card {
    background: var(--card);
    max-width: 560px;
    margin: -3.5rem auto 2rem;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(1, 17, 85, 0.15);
    position: relative;
    z-index: 2;
}

h1 { color: var(--brand-navy); letter-spacing: -0.02em; }

input[type=url], input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fafbff;
}
input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.15);
}

button, .btn {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    cursor: pointer;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.1s ease, background 0.15s ease;
}
button:hover, .btn:hover { background: var(--brand-navy); }
button:active { transform: scale(0.98); }
button:disabled { background: var(--muted); cursor: not-allowed; }
button.full-width { width: 100%; }

.error { color: var(--danger); margin-bottom: 1rem; font-size: 0.9rem; }
.muted { color: var(--muted); font-size: 0.85rem; }

.disclaimer {
    margin-top: 2.5rem;
    padding: 1rem 1.2rem;
    background: #eef4ff;
    border: 1px solid #dbe8ff;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(1, 17, 85, 0.06);
}
th {
    text-align: left;
    padding: 0.7rem 0.8rem;
    background: var(--brand-navy);
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
td {
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7faff; }

.plan-badge {
    color: white;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    vertical-align: middle;
}
.plan-badge.pro { background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy)); }
.plan-badge.free { background: var(--muted); }

.status-pill {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-pill.active { background: #e3f6ea; color: #1a7f4a; }
.status-pill.inactive { background: #fdeaea; color: var(--danger); }

/* small icon buttons (edit slug, QR, toggle, target) */
.icon-btn {
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    color: var(--brand-blue);
    border-radius: 5px;
    font-size: 0.8rem;
    padding: 0.15rem 0.45rem;
    margin-left: 0.2rem;
}
.icon-btn:hover { background: var(--brand-light); border-color: var(--brand-blue); color: var(--brand-navy); }

.slug-input, .target-input { padding: 0.35rem; font-size: 0.85rem; border: 1px solid var(--border); border-radius: 5px; }
.slug-input { width: 140px; }
.target-input { width: 260px; }

/* --- Modal (shared: QR, target edit) --- */
.wbn-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(1, 17, 85, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.wbn-modal-overlay.open { display: flex; }
.wbn-modal {
    background: white;
    border-radius: 12px;
    padding: 1.6rem;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 40px rgba(1, 17, 85, 0.3);
}
.wbn-modal h3 {
    margin-top: 0;
    color: var(--brand-navy);
    font-size: 1rem;
    word-break: break-all;
}
.wbn-modal .qr-canvas-holder { display: flex; justify-content: center; margin: 1rem 0; }
.wbn-modal-close { background: var(--muted); }
.wbn-modal-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.5rem; }

/* --- Disabled/expired link landing page --- */
.wbn-gone {
    max-width: 440px;
    margin: 5rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(1, 17, 85, 0.1);
}
.wbn-gone h1 { font-size: 1.4rem; }
.wbn-gone .countdown { color: var(--brand-blue); font-weight: 700; }