:root {
    --accent: #0b77ff;
    --muted: #666;
    --surface: #ffffff;
    --bg: #f7f9fb;
    --radius: 6px;
}

* {
    box-sizing: border-box;
}
body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial;
    margin: 0;
    padding: 0;
    color: #111;
    background: var(--bg);
}
header {
    background: var(--accent);
    color: white;
    padding: 1rem 1.25rem;
}
header h1 {
    margin: 0;
    font-size: 1.25rem;
}
header nav {
    margin-top: 0.4rem;
}
header a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    margin-right: 0.75rem;
}

main {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.card-surface {
    background: var(--surface);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(18, 38, 63, 0.06);
}

h2 {
    margin-top: 0;
}

form {
    display: block;
}
.form-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
label {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--muted);
}
input,
select,
button,
textarea {
    font: inherit;
}
input,
select,
textarea {
    padding: 0.5rem 0.6rem;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    background: #fff;
    min-width: 0;
}
input[type="number"] {
    width: 6rem;
}

button {
    padding: 0.55rem 0.9rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
button:active {
    transform: translateY(1px);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
th,
td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f0f2f5;
    text-align: left;
}
th {
    background: #fbfdff;
    color: var(--muted);
    font-weight: 600;
}
tr:nth-child(even) td {
    background: #fafcfe;
}

.batches {
    list-style: none;
    padding: 0;
    margin: 0;
}
.batches li {
    margin: 0.4rem 0;
    padding: 0.6rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eef3fb;
}
.batches a {
    font-weight: 600;
    color: var(--accent);
}

/* Top bubble for open batches */
.bubble {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 0.75rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 6px 14px rgba(18, 38, 63, 0.06);
    border: 1px solid #eef6ff;
}
.bubble-item {
    width: 100%;
    background: #fff;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #eef3fb;
    box-shadow: 0 4px 10px rgba(12, 40, 80, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}
.bubble-item .info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.bubble-item h4 {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bubble-item .meta {
    font-size: 0.9rem;
    color: var(--muted);
    white-space: nowrap;
}
.bubble-item .actions {
    flex: 0 0 auto;
}

footer {
    padding: 1rem;
    background: transparent;
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 700px) {
    .two-col {
        display: flex;
        gap: 1rem;
    }
    .two-col > * {
        flex: 1;
    }
}

.small {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Fields prefilled from a returning visitor's saved cookie, not yet
   confirmed by the visitor for this batch. */
.saved-info-field {
    background-color: #fff8e1 !important;
    border-color: #ffca28 !important;
}
