@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&display=swap');

:root {
    --brand-light: #5cb8fc;
    --brand-blue: #0071bc;
    --brand-navy: #011155;
    --paper: #f5f8fd;
    --text: #10142b;
    --muted: #6b7280;
    --border: #e2e8f0;
    --bg: #ffffff;
    --danger: #c00;
    --success: #0a8a4a;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--paper);
    margin: 0;
}

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

h1, h2, h3 { font-family: var(--font-display); }

/* ---------- Top bar (all pages) ---------- */
.wbn-topbar {
    background: var(--brand-navy);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wbn-logo { height: 28px; display: block; }
.wbn-nav a {
    margin-left: 1.25rem;
    color: #cfe6ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.wbn-nav a:hover { color: #ffffff; }

/* ---------- Hero (homepage only) ---------- */
.wbn-hero {
    position: relative;
    background: linear-gradient(160deg, var(--brand-navy) 0%, #062a7a 55%, var(--brand-blue) 100%);
    overflow: hidden;
    padding: 3.5rem 1.5rem 5.5rem;
    text-align: center;
}
.wbn-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.5;
}
.wbn-hero::after {
    content: "";
    position: absolute;
    top: 30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: var(--brand-light);
    opacity: 0.35;
    transform: rotate(12deg);
}
.wbn-hero h1 {
    position: relative;
    color: #ffffff;
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.6rem;
    letter-spacing: -0.03em;
}
.wbn-hero p {
    position: relative;
    color: #cfe6ff;
    font-size: 1.05rem;
    margin: 0;
}

/* floating card that overlaps the hero bottom edge */
.wbn-card {
    position: relative;
    background: #ffffff;
    max-width: 560px;
    margin: -3.5rem auto 3rem;
    padding: 1.75rem;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(1, 17, 85, 0.18);
}

.wbn-page {
    max-width: 480px;
    margin: 3rem auto;
    padding: 0 1rem 3rem;
}
.wbn-page.wide {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

/* ---------- Gone / expired link page ---------- */
.wbn-gone {
    max-width: 420px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    text-align: center;
}
.wbn-gone h1 { font-size: 1.5rem; }
.countdown { font-weight: 700; color: var(--brand-blue); }

/* ---------- Disclaimer box on homepage ---------- */
.disclaimer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

input[type=url], input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    border: 1px 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.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.1s ease;
}
button:hover, .btn:hover { background: var(--brand-navy); }
button:active, .btn: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; }
.muted { color: var(--muted); font-size: 0.85rem; }

table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(1, 17, 85, 0.06);
}
th {
    text-align: left;
    padding: 0.7rem 0.75rem;
    background: var(--brand-navy);
    color: #cfe6ff;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
tr:last-child td { border-bottom: none; }

/* keeps view/edit states from resizing the row or bleeding into neighboring columns */
.cell-stack { display: block; min-width: 0; }
.cell-stack .slug-view, .cell-stack .target-view { display: flex; align-items: center; gap: 0.2rem; min-width: 0; flex-wrap: wrap; }
.cell-stack .slug-text { white-space: nowrap; } /* short codes are always short — never truncate them */
.cell-stack .target-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.inline-edit { display: block; width: 100%; }
.inline-edit input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.35rem;
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.inline-edit-actions { display: flex; gap: 0.4rem; }
.inline-edit-actions button,
.save-slug-btn, .save-target-btn {
    padding: 0.3rem 0.75rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    font-weight: 600;
}

.plan-badge {
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    vertical-align: middle;
}
.plan-badge.pro { background: var(--brand-blue); }
.plan-badge.free { background: var(--muted); }

.status-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.status-pill.active { background: #e3f7ea; color: var(--success); }
.status-pill.inactive { background: #fde8e8; color: var(--danger); }

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

.manage-cell { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem; }
.manage-cell .icon-btn {
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}


/* --- QR modal --- */
.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: 14px;
    padding: 1.5rem;
    max-width: 320px;
    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;
}
