/* Big Top staff dashboard */
:root { --teal:#0e6f6c; --teal-dark:#08403f; --ink-dark:#062e2d; --red:#c63a2f; --red-dark:#9e2a21; --cream:#fbf3e4; --cream-2:#f4e7cf; --mustard:#e8b04a; --ink:#1e2626; --muted:#5a6463; --line:#e2d4b8; --white:#fffdf8; }
* { box-sizing: border-box; }
body.dash { margin: 0; font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--cream); }
a { color: var(--teal); }
h1, h2 { font-family: "Bitter", Georgia, serif; color: var(--ink-dark); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.15rem; margin: 0; }
.dwrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }

.dash-header { background: var(--ink-dark); color: #d9ece9; border-bottom: 6px solid; border-image: repeating-linear-gradient(90deg, var(--red) 0 28px, var(--cream) 28px 56px) 6; }
.dash-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.dash-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: "Rye", serif; font-size: 1.4rem; line-height: 1; }
.dash-brand small { display: block; font-family: "DM Sans", sans-serif; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mustard); margin-top: 4px; }
.dash-links { display: flex; gap: 18px; align-items: center; font-size: .92rem; }
.dash-links a, .linkbtn { color: #e6f4f2; text-decoration: none; }
.dash-links form { margin: 0; }
.linkbtn { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.dash-links a:hover, .linkbtn:hover { color: var(--mustard); }
.dash-nav { background: var(--teal-dark); }
.dash-nav .dwrap { display: flex; gap: 4px; overflow-x: auto; }
.dash-nav a { color: #cfe7e4; text-decoration: none; font-weight: 600; padding: 12px 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.dash-nav a.on, .dash-nav a:hover { color: #fff; border-bottom-color: var(--mustard); }
.pill { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; }

.dash-main { padding: 32px 0 64px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 22px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.narrow { max-width: 520px; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.phead h1 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-family: "Bitter", serif; font-size: 2rem; color: var(--ink-dark); }
.stat span { color: var(--muted); font-size: .92rem; }
.stat--alert { border-color: var(--red); } .stat--alert b { color: var(--red); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; }

.dbtn { display: inline-flex; align-items: center; justify-content: center; font: 600 .92rem "DM Sans", sans-serif; padding: .6em 1.1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-dark); text-decoration: none; cursor: pointer; }
.dbtn.small { padding: .35em .8em; font-size: .82rem; }
.dbtn--red { background: var(--red); border-color: var(--red); color: #fff; } .dbtn--red:hover { background: var(--red-dark); }
.dbtn--teal { background: var(--teal); border-color: var(--teal); color: #fff; } .dbtn--teal:hover { background: var(--teal-dark); }
.dbtn--ghost { color: var(--red-dark); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions form { margin: 0; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 220px; }
input, select, textarea { font: inherit; padding: .6em .85em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,111,108,.18); }
.dform { display: grid; gap: 14px; }
.dform label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink-dark); }
.dform input { width: 100%; }
.help { font-size: .82rem; color: var(--muted); } .help ul { margin: 0; padding-left: 18px; }
.ferr { color: var(--red-dark); font-size: .85rem; font-weight: 600; }

.dtable { width: 100%; border-collapse: collapse; font-size: .94rem; }
.dtable th { text-align: left; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--cream-2); padding: 10px 14px; }
.dtable td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.dtable td form { margin: 0; }
.dtable tr.is-open td:first-child { box-shadow: inset 4px 0 0 var(--red); }
@media (max-width: 760px) {
  .dtable thead { display: none; }
  .dtable tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
  .dtable td { display: block; border: 0; padding: 4px 14px; }
  .dtable td::before { content: attr(data-label); display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
}
.badge { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--cream-2); color: var(--muted); }
.badge--ok { background: #dff0ec; color: var(--teal-dark); } .badge--open { background: #fbe4e1; color: var(--red-dark); }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
.meta dt { color: var(--muted); font-size: .88rem; } .meta dd { margin: 0; }
.message-body { background: var(--cream); border-radius: 10px; padding: 16px 18px; white-space: normal; }

.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; background: #dff0ec; color: var(--teal-dark); }
.msg.error { background: #fbe4e1; color: var(--red-dark); } .msg.warning { background: #fdf1d8; color: #6b4a0b; }

.login-card { max-width: 400px; margin: 8vh auto 0; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px 30px; text-align: center; border-top: 8px solid var(--red); }
.login-card img { margin: 0 auto 10px; }
.login-card form { text-align: left; margin-top: 8px; }
.login-card .dbtn { width: 100%; margin-top: 4px; }
