/* Dinkr admin panel. Palette from the Android app. */
:root {
  --teal: #0E5A4A;
  --teal-dark: #0B4639;
  --lime: #CDEB52;
  --ground: #F5F6F0;
  --ink: #15201A;
  --muted: #55605A;
  --card: #FFFFFF;
  --border: #E3E6DC;
  --divider: #EEF0E8;
  --soft-teal: #E4F0EC;
  --warn-bg: #FFF1DD;
  --warn: #8A4B00;
  --error: #B3261E;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--teal); }
h1, h2 { font-family: "Space Grotesk", Inter, system-ui, sans-serif; letter-spacing: -0.01em; }
h1 { font-size: 28px; margin: 8px 0 12px; }
h2 { font-size: 19px; margin: 0 0 12px; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--ink); color: #fff;
}
header.top a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; font-family: "Space Grotesk", Inter, sans-serif; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); display: inline-block; }
.brand .tag { font-size: 12px; font-weight: 600; color: var(--ink); background: var(--lime); padding: 2px 8px; border-radius: 999px; }
header nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
header nav a { opacity: .85; font-weight: 600; font-size: 14px; }
header nav a:hover { opacity: 1; }
header nav .link { color: var(--lime); }

main { max-width: 1100px; margin: 0 auto; padding: 20px 24px 40px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.narrow { max-width: 460px; margin: 32px auto; }
.prose { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 10px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.flash { padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.flash.ok { background: var(--soft-teal); color: var(--teal-dark); }
.flash.err { background: #FCE8E6; color: var(--error); }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
label.check { flex-direction: row; align-items: center; gap: 6px; }
label.wide { flex-basis: 100%; }
label.hp { position: absolute; left: -9999px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
input[type=checkbox] { min-height: auto; width: 18px; height: 18px; accent-color: var(--teal); }
.w-sm { width: 80px; }
.row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 14px; }
.row-form label { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; }
form.inline { display: inline; }
.search { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search input[type=search] { min-width: 260px; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: #fff; border: 0; border-radius: 12px;
  padding: 10px 18px; min-height: 42px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--teal-dark); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--divider); }
.btn.danger { background: #fff; color: var(--error); border: 1px solid #F1C6C2; }
.btn.danger:hover { background: #FCE8E6; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #FAFBF7; }
tr:last-child td { border-bottom: 0; }
tr.deleted td { color: var(--muted); text-decoration: line-through; }
tr.deleted td.actions { text-decoration: none; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form + form { margin-left: 6px; }
.card table { border: 0; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--divider); color: var(--ink); }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.approved, .badge.confirmed { background: var(--soft-teal); color: var(--teal-dark); }
.badge.rejected, .badge.cancelled { background: #FCE8E6; color: var(--error); }

.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; color: var(--ink); text-decoration: none; }
.tile .v { font-family: "Space Grotesk", Inter, sans-serif; font-size: 34px; font-weight: 700; }
.tile .l { color: var(--muted); font-size: 14px; }
.tile.hot { background: var(--lime); border-color: var(--lime); }
.list { padding-left: 18px; }
.list li { margin: 6px 0; }
.list .badge { margin-left: 8px; }

@media (max-width: 700px) {
  main { padding: 16px; }
  header.top { padding: 12px 16px; }
  table { display: block; overflow-x: auto; }
}
