/* zmyers.net teacher hub — v1.4: same look as the Server panel, wide grid instead of one long list */
:root {
  color-scheme: dark;
  --bg: #101217; --panel: #181b22; --panel2: #1f232c; --well: #0b0d11; --line: #2b303b;
  --ink: #ebe6d8; --ink2: #c4bfb2; --muted: #9b968a; --gold: #c8a45a; --gold2: #e2c27a;
  --green: #5fbf7a; --red: #e06a6a; --blue: #7aa3d8;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold2); }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px 60px; }

/* top bar: shared with the Server panel (same text in both files) */
/* ---- shared top bar: identical on the teacher hub and the Server panel, so switching doesn't move anything ---- */
html { scrollbar-gutter: stable; }
.zbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; height: auto; min-height: 64px; border-bottom: 1px solid #2b303b; padding: 0 0 14px; margin: 0 0 18px; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.zbar[hidden] { display: none; }
.zbar .zt { font-family: Georgia, "Times New Roman", serif; font-weight: normal; letter-spacing: .32em; font-size: 26px; line-height: 32px; margin: 0; color: #e2c27a; }
.zbar .zs { color: #9b968a; font-size: 13px; line-height: 18px; letter-spacing: .08em; margin-top: 4px; text-transform: uppercase; }
.zbar .zr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zbar .zsw { display: inline-flex; border: 1px solid #2b303b; border-radius: 8px; overflow: hidden; }
.zbar .zsw a { width: 84px; text-align: center; padding: 7px 0; font-size: 14px; line-height: 20px; color: #9b968a; text-decoration: none; background: #181b22; }
.zbar .zsw a + a { border-left: 1px solid #2b303b; }
.zbar .zsw a.on { background: #c8a45a; color: #17140c; font-weight: 600; }
.zbar .zsw a:not(.on):hover { color: #ebe6d8; }
.zbar .zb { display: inline-block; background: #1f232c; color: #ebe6d8; border: 1px solid #2b303b; padding: 7px 13px; border-radius: 6px; font: inherit; font-size: 14px; line-height: 20px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.zbar .zb:hover { border-color: #c8a45a; }
.zwrap { max-width: 1440px; margin: 0 auto; padding: 22px 24px 0; }
@media (max-width: 520px) { .zwrap { padding: 16px 14px 0; } }

.lead { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
h2 { font-family: Georgia, serif; font-weight: normal; letter-spacing: .12em; font-size: 15px; color: var(--gold2); margin: 0 0 10px; text-transform: uppercase; }

.btn { display: inline-flex; align-items: center; gap: .4em; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); padding: 7px 13px; border-radius: 6px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--gold); }
.btn.dark, .btn.gold { background: var(--gold); color: #17140c; border-color: var(--gold); font-weight: 600; }
.btn.sm { font-size: 13px; padding: 4px 10px; }
.btn.danger { border-color: #6a3434; color: #f0b0b0; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.star { color: var(--muted); }
.btn.star.on { color: var(--gold2); border-color: #6a5a2a; background: #2a2414; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }

/* shortcuts across the top */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 22px; }
.shortcuts a { display: block; padding: 11px 14px; text-decoration: none; color: var(--ink); border-left: 3px solid var(--c, var(--gold)); }
.shortcuts a:hover { border-color: var(--gold); border-left-color: var(--c, var(--gold)); }
.shortcuts b { display: block; font-weight: 600; }
.shortcuts span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* tabs: same as the Server panel's buttons */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { background: var(--panel); color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; border-radius: 6px; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.tabs .n { font-size: 12px; opacity: .8; }
.tabs button.new:not(.on) { color: var(--gold2); border-color: #6a5a2a; }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .search { flex: 1; min-width: 220px; background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-size: 15px; }
.filters .search:focus, dialog input:focus, .panel input:focus { outline: none; border-color: var(--gold); }

/* the tiles: a grid, several across */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 2px 12px; align-content: start; }
.tile:hover { border-color: #3a404d; }
.tile .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--c, #3b4d7a); grid-column: 1; grid-row: 1 / span 2; }
.tile .nm, .tile .meta { grid-column: 2; }
.tile .edit { grid-column: 3; grid-row: 1 / span 2; align-self: start; }
.tile .ic svg { width: 18px; height: 18px; }
.tile .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .nm a { color: var(--ink); text-decoration: none; }
.tile .nm a:hover { color: var(--gold2); }
.tile .meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .desc { grid-column: 2 / -1; font-size: 13px; color: var(--ink2); margin-top: 2px; }
.tile .ctrls { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tile .ctrls:empty { display: none; }
.tile .ctrls .spacer { flex: 1; }
.empty { color: var(--muted); padding: 14px 0; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: none; background: var(--panel2); padding: 4px 10px; font-size: 13px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: #343a47; color: var(--ink); }
.seg button.on.pub { background: #1f4a2c; color: #bfeccb; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: var(--gold); margin: 0; }
.tag { display: inline-block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); margin-left: 6px; vertical-align: 1px; font-weight: 600; }
.tag.ai { color: #aab6ff; border-color: #3a4170; }
.tag.pub { color: var(--green); border-color: #2f5f3d; }
.tag.own { color: var(--muted); }
.tag.tch { color: var(--gold2); border-color: #6a5a2a; }

.warn { background: #2a2414; border: 1px solid #6a5a2a; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }

/* login */
.panel { max-width: 400px; margin: 12vh auto 0; padding: 24px; display: grid; gap: 12px; }
.panel h1 { font-family: Georgia, serif; font-weight: normal; text-align: center; margin: 0; letter-spacing: .32em; color: var(--gold2); font-size: 26px; }
.panel input { background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; width: 100%; font-size: 15px; }
.err { color: var(--red); min-height: 1.2em; text-align: center; margin: 0; }

dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 20px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { margin: 0; }
dialog form { display: grid; gap: 12px; }
dialog label { display: grid; gap: 4px; font-size: 13px; color: var(--ink2); }
dialog label.chk { display: flex; }
dialog input, dialog select { background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-size: 15px; }
.icons { display: flex; flex-wrap: wrap; gap: 6px; }
.icons button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); display: grid; place-items: center; padding: 0; }
.icons button.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); color: var(--gold2); }
.icons svg { width: 19px; height: 19px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--gold); color: #17140c; padding: 9px 16px; border-radius: 8px; opacity: 0; transition: .2s; pointer-events: none; font-weight: 600; }
#toast.show { opacity: 1; }
#toast.bad { background: var(--red); }

.sort { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 14px; color: var(--ink); }
.trash { margin-top: 22px; }
.trash summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }
.trash summary:hover { color: var(--ink); }
.trashlist { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.trow:first-child { border-top: 0; }
.trow > div { flex: 1; min-width: 0; }
.trow .meta { font-size: 12.5px; color: var(--muted); }

@media (max-width: 520px) {
  .wrap { padding: 0 14px 50px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
