:root {
    --navy: #14287f;
    --indigo: #494ba9;
    --accent: #0693e3;
    --light-grey: #f2f2f2;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--light-grey);
    color: #1a1a1a;
}

header.site-header {
    background: linear-gradient(120deg, var(--navy), var(--indigo));
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header.site-header a.logo-link {
    display: flex;
    align-items: center;
}

header.site-header img.logo {
    height: 48px;
}

header.site-header nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    margin-left: 1.5rem;
    opacity: 0.9;
}

header.site-header nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

h1, h2, h3 {
    color: var(--navy);
}

.card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(20, 40, 127, 0.08);
    margin-bottom: 1.5rem;
}

.team-select-wrapper {
    max-width: 420px;
    margin: 2rem auto 0;
}

.team-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 1rem 3rem 1rem 1.25rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314287f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 1.1rem;
    border: 2px solid var(--navy);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(20, 40, 127, 0.12);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-select:hover,
.team-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(6, 147, 227, 0.25);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.4rem;
    margin: 1rem 0;
}

.number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    margin: 0;
    padding: 0;
}

.number-badge.taken {
    background: var(--indigo);
    color: var(--white);
    cursor: default;
}

.number-badge.free {
    background: var(--light-grey);
    color: #999;
    border: 1px dashed #ccc;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.number-badge.free:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 40, 127, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.modal h3 {
    margin-top: 0;
}

button.cancel {
    background: #888;
}

button.cancel:hover {
    background: #666;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

table th {
    color: var(--navy);
}

form.inline-form {
    display: inline;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
}

input[type="text"], select, input[type="password"] {
    padding: 0.5rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

button, .btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background: var(--navy);
}

button.danger, .btn.danger {
    background: #c0392b;
}

button.danger:hover, .btn.danger:hover {
    background: #8e2417;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.flash.success {
    background: #dff5e1;
    color: #1e6b34;
    border: 1px solid #b6e3c0;
}

.flash.error {
    background: #fbe1df;
    color: #8e2417;
    border: 1px solid #f2b8b3;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--indigo);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.admin-section {
    margin-top: 2rem;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}
