/* Own look for the programme tool (neutral, white-label).
 * Calm, warm paper background, deep pine as the main colour and soft brass as the accent.
 * The old variable names (--navy, --gold, --steel, --pale, --light) are kept so older rules follow along. */
:root {
  --ink: #1f2a2c;
  --ink-2: #44514f;
  --muted: #6b7472;
  --paper: #f4f2ee;
  --surface: #ffffff;
  --line: #e6e1d9;
  --line-2: #d8d2c8;
  --pine: #2f5d55;
  --pine-d: #234740;
  --pine-tint: #e9f1ef;
  --brass: #a77a3f;
  --brass-d: #8c6531;
  --brass-tint: #f7efe3;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(31, 42, 44, .06), 0 1px 3px rgba(31, 42, 44, .08);
  --shadow-2: 0 4px 14px rgba(31, 42, 44, .10), 0 1px 3px rgba(31, 42, 44, .06);
  --shadow-3: 0 18px 50px rgba(31, 42, 44, .22), 0 4px 12px rgba(31, 42, 44, .10);
  /* legacy names */
  --navy: var(--pine);
  --steel: #4b7d73;
  --gold: var(--brass);
  --pale: var(--pine-tint);
  --light: #dbe7e4;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-radius: 10px;
  --bs-focus-ring-color: rgba(47, 93, 85, .25);
}

body { background: var(--paper); font-family: var(--bs-body-font-family); color: var(--ink); font-size: .92rem;
       -webkit-font-smoothing: antialiased; }
a { color: var(--pine); }
a:hover { color: var(--pine-d); }
code { color: var(--pine); font-size: .8rem; }
::selection { background: #cfe2dd; }

/* ── Navbar (staff pages) ── */
.navbar { background: var(--surface) !important; border-bottom: 1px solid var(--line); }
.navbar-brand { color: var(--ink) !important; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.navbar-brand span { color: var(--brass); }
.navbar-brand i { color: var(--pine); }
.nav-link { color: var(--ink-2) !important; padding: .55rem .85rem !important; border-radius: 999px; font-weight: 500; }
.nav-link:hover { background: var(--pine-tint); color: var(--pine-d) !important; }
.nav-link.active { background: var(--pine-tint); color: var(--pine-d) !important; }
.nav-link i { margin-right: 4px; }
.navbar-toggler .bi { color: var(--ink) !important; }
.year-pill { background: var(--pine); color: #fff !important; }
.year-pill:hover { background: var(--pine-d) !important; color: #fff !important; }

/* ── Cards, headers, tables ── */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-1); }
.stat-card .num { font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.stat-card .lbl { font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin-top: 4px; }
.page-header { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 1rem 1.4rem; border-radius: var(--radius);
               margin-bottom: 1.25rem; box-shadow: var(--shadow-1); }
.page-header h1 { font-size: 1.25rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.page-header p { margin: 0; font-size: .84rem; color: var(--muted); }
.table thead th { background: #f0ede7; color: var(--ink-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
                  border: none; white-space: nowrap; font-weight: 600; }
.table td { vertical-align: middle; font-size: .86rem; }
.table tbody tr:hover { background: #faf8f5; }
.badge-song { background: var(--pine); color: #fff; }
.badge-poem { background: #8a8f8e; color: #fff; }
.rank-badge { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .72rem; }
.rank-1 { background: var(--brass); color: #fff; } .rank-2 { background: #9e9e9e; color: #fff; }
.rank-3 { background: #9b7b50; color: #fff; } .rank-other { background: var(--pine); color: #fff; }

/* ── Buttons ── */
.btn { border-radius: 10px; font-weight: 500; transition: background .15s, box-shadow .15s, transform .08s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-lg { border-radius: 12px; padding: .7rem 1.2rem; font-size: 1rem; }
.btn-sm { border-radius: 8px; }
.btn-navy, .btn-primary { background: var(--pine); color: #fff; border: 1px solid var(--pine); box-shadow: 0 1px 2px rgba(35, 71, 64, .3); }
.btn-navy:hover, .btn-primary:hover, .btn-navy:focus { background: var(--pine-d); border-color: var(--pine-d); color: #fff; }
.btn-gold { background: var(--brass); color: #fff; border: 1px solid var(--brass); box-shadow: 0 1px 2px rgba(140, 101, 49, .3); }
.btn-gold:hover, .btn-gold:focus { background: var(--brass-d); border-color: var(--brass-d); color: #fff; }
.btn-light, .btn-outline-secondary { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
.btn-light:hover, .btn-outline-secondary:hover { background: #f6f4f0; border-color: #c9c2b6; color: var(--ink); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(31, 42, 44, .06); color: var(--ink); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line-2); padding: .5rem .75rem; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47, 93, 85, .15); }
.form-label { font-weight: 550; color: var(--ink-2); font-size: .86rem; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--pine); border-color: var(--pine); }
.alert { border-radius: var(--radius); }
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--shadow-3); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); padding: .35rem; }
.dropdown-item { border-radius: 8px; }
.dropdown-item.active, .dropdown-item:active { background: var(--pine); }

footer { color: #a8a39b; font-size: .72rem; padding: 1.2rem 0; text-align: center; border-top: 1px solid var(--line); margin-top: 2.5rem; }

/* ── Date / time picker (fields.js) ── */
.pick { position: relative; display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line-2); border-radius: 10px;
        background: var(--surface); padding: 0 .35rem 0 .65rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-height: 40px; }
.pick:hover { border-color: #bdb5a8; }
.pick.open, .pick:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47, 93, 85, .15); }
.pick > .bi { color: var(--pine); font-size: 1.05rem; }
.pick input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; padding: .45rem 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.pick input::placeholder { color: #a7a299; }
.pick .clr { border: 0; background: transparent; color: #aaa49a; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.pick .clr:hover { background: #f1eee8; color: var(--ink); }
.dnice { color: var(--pine-d); min-height: 1.2em; font-size: .82rem; }

.pop { position: fixed; z-index: 3000; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-3); border: 1px solid var(--line);
       padding: .8rem; width: 312px; font-size: .9rem; animation: popIn .14s ease-out; user-select: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; gap: .3rem; margin-bottom: .55rem; }
.pop-head .ttl { flex: 1; display: flex; gap: .25rem; justify-content: center; }
.pop-head .ttl button { border: 0; background: transparent; font-weight: 650; color: var(--ink); padding: .3rem .55rem; border-radius: 8px; font-size: .95rem; }
.pop-head .ttl button:hover { background: var(--pine-tint); color: var(--pine-d); }
.pop-head .ttl button .bi { font-size: .7rem; opacity: .6; }
.pop-nav { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-2); }
.pop-nav:hover { background: #f1eee8; }
.pop-nav:disabled { opacity: .25; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .wd { text-align: center; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: .2rem 0 .35rem; font-weight: 600; }
.cal button, .grid-pick button { border: 0; background: transparent; border-radius: 10px; height: 38px; color: var(--ink); font-variant-numeric: tabular-nums;
                                 position: relative; transition: background .1s; }
.cal button:hover, .grid-pick button:hover { background: var(--pine-tint); color: var(--pine-d); }
.cal button.out { color: #c4bfb6; }
.cal button.today::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brass); }
.cal button.on, .grid-pick button.on { background: var(--pine); color: #fff; font-weight: 600; }
.cal button:disabled, .grid-pick button:disabled { color: #d4d0c8; background: transparent; cursor: default; }
.grid-pick { display: grid; gap: 4px; }
.grid-pick.c3 { grid-template-columns: repeat(3, 1fr); }
.grid-pick.c4 { grid-template-columns: repeat(4, 1fr); }
.grid-pick.c5 { grid-template-columns: repeat(5, 1fr); }
.grid-pick.c6 { grid-template-columns: repeat(6, 1fr); }
.grid-pick button { height: 44px; font-size: .92rem; }
.grid-pick button.now { box-shadow: inset 0 0 0 1px var(--brass); }
.pop-sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: .55rem 0 .3rem; }
.pop-sec:first-child { margin-top: 0; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: .65rem; padding-top: .55rem; gap: .4rem; }
.pop-foot .btn { font-size: .82rem; }
.pop-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.pop-quick button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: var(--ink-2); }
.pop-quick button:hover { border-color: var(--pine); color: var(--pine-d); }
.pop-quick button.on { background: var(--pine); color: #fff; border-color: var(--pine); }
.pop-quick button .bi-star-fill { color: var(--brass); font-size: .6rem; vertical-align: 1px; }
.pop-quick button.on .bi-star-fill { color: #f0d7a8; }
.pop-backdrop { display: none; }
@media (max-width: 600px) {
  .pop { left: 8px !important; right: 8px !important; bottom: 8px !important; top: auto !important; width: auto; border-radius: 20px; padding: 1rem; }
  .pop-backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 28, 30, .35); z-index: 2999; }
  .cal button { height: 44px; }
}
