/* Supervisor (admin) page only. Loaded by admin.html after style.css. Provider pages never load this file.
   Shapes: square cards/buttons, pill chips/search/switch. No squovals. */

/* ---- Top navigation: 3 big sections + a small row of tools ---- */
.section-nav { display: block; margin-bottom: 1.2rem; }
.section-nav .nav-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .6rem; }
.section-nav .nav-more { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .7rem; border-top: 1.5px solid rgba(0,0,0,.25); }
.section-nav .nav-main .tab { font-size: clamp(1rem, 3.2vw, 1.3rem); min-height: 3.6rem; padding: .6rem .5rem; }
.section-nav .nav-more .tab { font-family: var(--body); font-weight: 600; text-transform: none; font-size: .95rem; min-height: 2.6rem; padding: .45rem .9rem; flex: 1 1 auto; }
@media (max-width: 560px) { .section-nav .nav-main { grid-template-columns: 1fr; } }

/* ---- Group labels ---- */
.grp-label { margin: .9rem 0 .35rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---- Supervisor chips = pills ---- */
.tabs.pills .tab { border-radius: 999px; padding: .55rem 1.1rem; }
.tabs.pills.small .tab { font-size: .88rem; padding: .4rem .9rem; min-height: 2.4rem; background: transparent; }
.tabs.pills.small .tab[aria-pressed="true"] { background: var(--ink); }
.tabs.pills.small { margin: .2rem 0 .9rem; }
.tabs.dim { opacity: .45; }

/* ---- Status = one connected square bar ---- */
.tabs.segs { gap: 0; flex-wrap: nowrap; }
.tabs.segs .tab { flex: 1 1 0; margin-left: -1.5px; font-size: .95rem; padding: .6rem .4rem; }
.tabs.segs .tab:first-child { margin-left: 0; }
@media (max-width: 560px) { .tabs.segs .tab { font-size: .82rem; } .tabs.segs .tab .n { margin-left: .3rem; min-width: 1.2rem; } }

/* ---- Search + new message ---- */
.msg-tools { display: flex; gap: .6rem; margin: .2rem 0 .8rem; align-items: stretch; }
.msg-tools input[type="search"] { flex: 1; min-width: 0; border-radius: 999px; padding: .6rem 1.1rem; border: 1.5px solid var(--ink); background: #fff; font-size: 1rem; }
.msg-tools .btn { white-space: nowrap; }
.search-note { margin: 0 0 .6rem; font-weight: 600; }
#newMsgPanel { margin-bottom: 1rem; }
#dmBox [role="radiogroup"] { display: none; }

/* ---- Notification settings tucked away ---- */
.notify-details { border: 1.5px solid var(--ink); background: #fff; margin-bottom: .9rem; }
.notify-details > summary { cursor: pointer; padding: .75rem 1.1rem; font-weight: 700; list-style: none; }
.notify-details > summary::-webkit-details-marker { display: none; }
.notify-details > summary::after { content: "Show"; float: right; font-weight: 600; color: var(--muted); }
.notify-details[open] > summary::after { content: "Hide"; }
.notify-details .notify-bar { border: 0; border-top: 1px solid var(--hair); margin: 0; }

/* ---- Message rows (like a messaging app) ---- */
.req summary { display: flex; gap: .85rem; align-items: flex-start; }
.req .sum-main { flex: 1; min-width: 0; }
.req .avatar { flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--teal); border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; }
.req .avatar.group { background: var(--orange); }
.req .avatar.direct { background: #f2cf2e; }
.req .kind { font-size: .88rem; font-weight: 600; color: var(--muted); margin: .1rem 0 .15rem; }
.req .preview { font-size: .95rem; }

/* ---- Notifications tab ---- */
.nt-how { background: #fff; border: 1.5px solid var(--ink); margin-bottom: .9rem; }
.nt-how > summary { cursor: pointer; padding: .7rem 1.1rem; font-weight: 700; }
.nt-how .nt-intro { padding: 0 1.1rem 1rem; margin: 0; }
.bday-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #fff; border: 1.5px solid var(--ink); padding: .9rem 1.1rem; margin-bottom: .9rem; }
.bday-row .name { font-weight: 700; font-size: 1.05rem; }

/* ---- On/off switch (pill) ---- */
.switch { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; font-weight: 600; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 3.6rem; height: 2rem; border-radius: 999px; background: #8a8a8a; border: 1.5px solid var(--ink); position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); transition: transform .15s; }
.switch input:checked + .track { background: var(--open); }
.switch input:checked + .track::after { transform: translateX(1.6rem); }
.switch input:focus-visible + .track { outline: 3px solid var(--orange); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }

/* ---- Opened message: calm, chat-first ---- */
.more-info, .more-reply, .more-actions { margin: .6rem 0; }
.more-info > summary, .more-reply > summary, .more-actions > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); padding: .35rem 0; list-style: none; }
.more-info > summary::-webkit-details-marker, .more-reply > summary::-webkit-details-marker, .more-actions > summary::-webkit-details-marker { display: none; }
.more-info > summary::before, .more-reply > summary::before { content: "+ "; }
.more-info[open] > summary::before, .more-reply[open] > summary::before { content: "\2212 "; }
.req .actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.more-actions { margin: 0; }
.more-actions > summary { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); padding: .55rem 1rem; font-size: .95rem; }
.more-actions-body { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.req .msg.first-bubble { background: var(--tint); border-left: 4px solid var(--teal); padding: .7rem 1rem; margin: .8rem 0; white-space: pre-wrap; }
.first-bubble .chat-meta { font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.chat-head { margin-bottom: .3rem; }

/* ===== Simple, text-message look (appended) ===== */
.req .body { display: flex; flex-direction: column; }
.req .body > * { order: 5; }
.req .msg.first-bubble { order: 1; }
.req .chat-panel { order: 2; }
.req .more-info { order: 8; }
.req .actions { order: 9; }

/* First message + replies look like texts */
.req .msg.first-bubble, .chat-msg {
  border: 0; border-radius: 1.3rem; padding: .8rem 1.1rem; max-width: 82%;
  font-size: 1.1rem; line-height: 1.4; margin: .4rem 0; white-space: pre-wrap;
}
.req .msg.first-bubble { background: #e8e8ea; color: #000; border-bottom-left-radius: .3rem; align-self: flex-start; }
.chat-msg.from-provider { background: #e8e8ea !important; border-bottom-left-radius: .3rem; align-self: flex-start; }
.chat-msg.from-sup { background: var(--teal) !important; border-bottom-right-radius: .3rem; align-self: flex-end; }
.chat-meta { font-size: .8rem; opacity: .65; margin-bottom: .15rem; }
.req .msg.first-bubble .chat-meta { font-size: .8rem; }

/* Calm reply area: no box inside a box, no "Replies (1)" title */
.chat-panel { border: 0 !important; background: transparent !important; padding: 0 !important; }
.chat-title2, .chat-head:not(:has(button)) { display: none; }
.chat-list { max-height: none; }
.no-response { font-weight: 700; color: var(--orange); }

/* Big, simple reply row */
.chat-send-row { margin-top: .6rem; }
.chat-send-row textarea { font-size: 1.1rem; border-radius: 999px; padding: .8rem 1.2rem; min-height: 3.4rem; }
.chat-send-row .btn { min-height: 3.4rem; font-size: 1.1rem; padding: 0 1.6rem; }

/* Bottom buttons: one obvious main button */
.req .actions .btn { min-height: 3.4rem; font-size: 1.1rem; padding: 0 1.6rem; }
.more-info > summary, .more-reply > summary { font-size: 1rem; }

/* New message form: less clutter */
#dmPrivHelp, #dmChips, #dmWays, #dmStatus { display: none !important; }
#dmBox label { font-size: 1.1rem; margin-top: .8rem; }
#dmBox input[type=text], #dmBox select, #dmBox textarea { font-size: 1.1rem; padding: .8rem 1rem; }
#dmBox #dmSend { min-height: 3.4rem; font-size: 1.15rem; width: 100%; }
#dmBox .actions { margin-top: 1rem; }

/* ===== Simple top screen (appended) ===== */
.section-nav .nav-menu { margin: .6rem 0 0; }
.section-nav .nav-menu > summary { cursor: pointer; list-style: none; text-align: center; font-weight: 700; font-size: 1rem; padding: .5rem; }
.section-nav .nav-menu > summary::-webkit-details-marker { display: none; }
.section-nav .nav-menu > summary::after { content: " \25BE"; }
.section-nav .nav-menu[open] > summary::after { content: " \25B4"; }
.section-nav .nav-more { border-top: 0; padding-top: .2rem; }
.grp-label, #typeTabs { display: none; }
.notify-details { background: transparent; border: 0; margin: 0 0 .4rem; }
.notify-details > summary { padding: .3rem 0; font-size: .9rem; font-weight: 600; opacity: .7; }
.notify-details > summary::after { content: ""; }
.tabs.pills .tab, .tabs.segs .tab { min-height: 3.2rem; font-size: 1.1rem; }
.msg-tools .btn, .msg-tools input[type=search] { min-height: 3.4rem; font-size: 1.1rem; }

/* "See details" = a clear button right under the message */
.req .more-info { order: 2; margin: .2rem 0 .6rem; }
.req .more-info > summary { display: inline-block; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); padding: .55rem 1.1rem; font-size: 1rem; border-radius: 999px; }
.req .more-info > summary::before { content: "\2139\FE0F  "; }
.req .more-info[open] > summary::before { content: "\2715  "; }
.req .more-info[open] > summary { background: var(--tint); }
.req .more-info > *:not(summary) { margin-top: .6rem; background: #fff; border: 1.5px solid var(--hair); padding: .8rem 1rem; font-size: 1.05rem; }
.req .chat-panel { order: 3; }

/* ===== Texting-app layout (appended) ===== */
/* Details = the first text, then the message, then replies */
.req .more-info.first-text { order: 1; margin: .4rem 0 0; align-self: flex-start; max-width: 85%; }
.req .more-info.first-text > summary { display: none; }
.req .more-info.first-text > *:not(summary) { margin: 0; background: #e8e8ea; border: 0; border-radius: 1.1rem; border-bottom-left-radius: .3rem; padding: .6rem .95rem; font-size: .95rem; }
.req .more-info.first-text dl, .req .more-info.first-text .facts { margin: 0; }
.req .msg.first-bubble { order: 2; }
.req .chat-panel { order: 3; }

/* Smaller bubbles */
.req .msg.first-bubble, .chat-msg { padding: .5rem .9rem; font-size: 1rem; max-width: 78%; margin: .25rem 0; border-radius: 1.1rem; }
.chat-meta { font-size: .72rem; }

/* Scrollable thread, newest at the bottom */
.chat-list { display: flex; flex-direction: column; max-height: 45vh; overflow-y: auto; padding: .3rem .1rem; -webkit-overflow-scrolling: touch; }
.chat-preview { display: none; }
.chat-list[hidden] { display: flex !important; }

/* ===== One flat conversation: no boxes (appended) ===== */
.req .chat-main, .chat-main { border: 0 !important; background: transparent !important; padding: 0 !important; margin: .2rem 0 0 !important; border-radius: 0 !important; }
.chat-main .chat-list, .chat-list { background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
.chat-list:empty, .chat-preview:empty { display: none !important; }
.chat-main .handled { display: none; }
.req .more-info.first-text { margin: .6rem 0 0; }
.req .body { padding-top: .3rem; }

/* ===== Smaller text area + bring back message-type filter (appended) ===== */
#typeTabs { display: flex !important; margin: .2rem 0 .8rem; }
#typeTabs .tab { font-size: .9rem; min-height: 2.3rem; padding: .35rem .9rem; }
.req .msg.first-bubble, .chat-msg { font-size: .9rem; padding: .4rem .8rem; max-width: 72%; }
.chat-meta { font-size: .68rem; }
.req .more-info.first-text > *:not(summary) { font-size: .85rem; padding: .5rem .8rem; }
.req .more-info.first-text dl, .req .more-info.first-text .facts { font-size: .85rem; }
.chat-send-row textarea { font-size: .95rem; min-height: 2.8rem; padding: .55rem 1rem; }
.chat-send-row .btn, .req .actions .btn, .more-actions > summary { min-height: 2.8rem; font-size: .95rem; padding: 0 1.2rem; }
.more-info > summary, .more-reply > summary { font-size: .9rem; }

/* ===== "More" looks like the other buttons (appended) ===== */
.req .actions { align-items: flex-start; }
.more-actions > summary { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 2.8rem; padding: 0 1.2rem; font-family: inherit; font-size: .95rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); line-height: 1; }
.more-actions-body { flex-direction: column; align-items: stretch; min-width: 12rem; }
.more-actions-body .btn, .more-actions-body select { width: 100%; min-height: 2.6rem; }

/* ===== Polish (appended) ===== */
.req { border-radius: 1rem; }
.req .body { padding: .4rem 1.1rem 1.1rem; }

/* thread: details + message + replies scroll together */
.chat-list { gap: .15rem; max-height: 50vh; scroll-behavior: smooth; padding: .4rem 0 !important; }
.chat-list .more-info.first-text, .chat-list .msg.first-bubble { order: 0; margin: .2rem 0; }
.chat-list .more-info.first-text { align-self: flex-start; max-width: 80%; }
.chat-list .more-info.first-text > *:not(summary) { margin: 0; }
.chat-list .facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; margin: 0; }
.chat-list .facts dt { opacity: .6; } .chat-list .facts dd { margin: 0; }
.chat-list .attachment { align-self: flex-start; }
.chat-list .attachment img { max-width: 12rem; border-radius: .9rem; }

/* reply bar: one clean pill row */
.chat-send-row { align-items: center; gap: .5rem; margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--hair); }
.chat-send-row textarea { border-radius: 999px; border-width: 1.5px; }
.chat-send-row .btn { border-radius: 999px; }
.chat-send-row .btn.secondary { width: 2.8rem; padding: 0; min-width: 2.8rem; }

/* buttons: pills, even sizes */
.req .actions { gap: .5rem; margin-top: .9rem; }
.req .actions .btn, .more-actions > summary { border-radius: 999px; }

/* More = popup menu */
.more-actions { position: relative; }
.more-actions-body { position: absolute; bottom: calc(100% + .4rem); left: 0; z-index: 20; background: #fff; border: 1.5px solid var(--ink); border-radius: 1rem; padding: .5rem; gap: .4rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); min-width: 13rem; }
.more-actions-body .btn, .more-actions-body select { border-radius: 999px; }

/* ===== FINAL LAYOUT PASS: one spacing scale (1rem sides, .6rem gaps), clear order: header > thread > reply > actions ===== */
.req { border-radius: 1rem; background: #fff; margin-bottom: .9rem; }

/* 1. Header */
.req summary { padding: .9rem 1rem; gap: .8rem; align-items: center; }
.req .avatar { width: 2.6rem; height: 2.6rem; font-size: .9rem; }
.req .top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.req .top .name { font-size: 1.05rem; font-weight: 700; }
.req .top .when { font-size: .8rem; color: var(--muted); font-weight: 400; }
.req .kind { font-size: .85rem; font-weight: 500; margin: .15rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.req .badge-noresp { font-size: .68rem; padding: .15rem .5rem; border-radius: 999px; }
.req .preview { display: none; }
.req[open] > summary { border-bottom: 1px solid var(--hair); }

/* 2. Thread */
.req .body { padding: .6rem 1rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.req .body > * { order: 0; margin: 0; }
.req .chat-main { order: 1; }
.req .actions { order: 2; }
.req .handled { order: 3; font-size: .8rem; color: var(--muted); }
.req .notes-panel, .req [class*="notes"] { order: 3; }
.chat-list { padding: .2rem 0 !important; gap: .35rem; max-height: 55vh; }
.chat-list .msg.first-bubble, .chat-msg, .chat-list .more-info.first-text > *:not(summary) {
  font-size: .95rem; line-height: 1.35; padding: .55rem .85rem; border-radius: 1.1rem; margin: 0; }
.chat-msg.from-provider, .chat-list .msg.first-bubble, .chat-list .more-info.first-text > *:not(summary) { border-bottom-left-radius: .3rem; }
.chat-msg.from-sup { border-bottom-right-radius: .3rem; }
.chat-meta { font-size: .72rem; opacity: .6; margin: 0 0 .15rem; }
.chat-list .facts { gap: .2rem 1rem; font-size: .9rem; }
.chat-list .facts dt { font-size: .8rem; }
.chat-list .more-info.first-text { margin: 0; }

/* 3. Reply bar: single clean row, no divider */
.chat-send-row { border: 0; padding: 0; margin: .4rem 0 0; gap: .5rem; }
.chat-send-row textarea { font-size: .95rem; min-height: 2.7rem; padding: .6rem 1rem; line-height: 1.3; }
.chat-send-row .btn { min-height: 2.7rem; height: 2.7rem; font-size: .85rem; padding: 0 1.2rem; }
.chat-send-row .btn.secondary { width: 2.7rem; min-width: 2.7rem; padding: 0; }

/* 4. Actions: one primary + More, same size, left aligned */
.req .actions { display: flex; gap: .5rem; margin: 0; padding-top: .2rem; }
.req .actions .btn, .more-actions > summary { height: 2.7rem; min-height: 2.7rem; font-size: .85rem; padding: 0 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
.more-actions { margin: 0; }
.more-actions-body { min-width: 12rem; }
.more-actions-body .btn, .more-actions-body select { height: 2.5rem; min-height: 2.5rem; font-size: .85rem; }

/* ===== Fix: "More" reply options (automated reply) ===== */
.more-reply { order: 0; margin: .2rem 0 0; }
.more-reply > .chat-send-row, .more-reply .chat-send-row { flex-direction: column; align-items: stretch; gap: .5rem; border: 0; padding: 0; margin: .5rem 0 0 !important; }
.more-reply select { width: 100%; height: 2.7rem; min-height: 2.7rem; font-size: .95rem; border-radius: 999px; padding: 0 1.2rem; box-sizing: border-box; }
.more-reply .btn { width: 100%; height: 2.7rem; min-height: 2.7rem; white-space: nowrap; padding: 0 1.2rem; border-radius: 999px; font-size: .85rem; }
.more-reply .add-people { margin-top: .6rem; }
.more-reply .add-people-row { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.more-reply .add-people-row input { width: 100%; height: 2.7rem; border-radius: 999px; padding: 0 1.2rem; box-sizing: border-box; }
.more-reply .add-people .btn { width: 100%; }

/* ===== Top screen: even spacing ===== */
.section-nav { margin-bottom: .5rem; }
.section-nav .nav-menu { margin: .2rem 0 0; }
.notify-details { margin: 0 0 .6rem; }
.msg-tools { margin: 0 0 .6rem; }
.tabs.pills.small, .tabs.pills { margin: 0 0 .6rem; }
.tabs.segs { margin: 0 0 .6rem; }
#typeTabs { margin: 0 0 1rem; gap: .4rem; }

/* ===== Calmer top screen (appended) ===== */
.section-nav .nav-main .tab { min-height: 2.8rem; font-size: clamp(.9rem, 2.6vw, 1.05rem); padding: .4rem; }
.section-nav .nav-more .tab { min-height: 2.4rem; font-size: .85rem; }
.pick-row { display: flex; gap: .5rem; margin: 0 0 1rem; }
.pick-row > div { flex: 1 1 0; min-width: 0; margin: 0 !important; display: block !important; }
.pick-row select { width: 100%; height: 2.7rem; font-size: .95rem; font-weight: 600; border-radius: 999px; padding: 0 1.1rem; background-color: #fff; border: 1.5px solid var(--ink); }
.tabs.segs .tab { min-height: 2.7rem; font-size: .95rem; }
.msg-tools .btn, .msg-tools input[type=search] { min-height: 2.7rem; font-size: 1rem; }
.msg-tools .btn { font-size: .85rem; }

/* automated reply button was shrinking to a square */
.more-reply .chat-send-row .btn, .more-reply .chat-send-row .btn.secondary { width: 100%; min-width: 0; height: 2.7rem; padding: 0 1.2rem; white-space: normal; text-align: center; flex-shrink: 1; }

/* Request details + message sit above the thread (restored) */
.req .body > .more-info.first-text, .req .body > .msg.first-bubble, .req .body > .attachment { order: 0; max-width: 85%; }
.req .body > .chat-main { order: 1; }
.req .body > .actions { order: 2; }

/* ===== Clear hierarchy: 1 sections > 2 search/new > 3 status > 4 filters > rest tucked away (appended) ===== */
.page-title { font-size: 1.5rem !important; margin: .2rem 0 .8rem !important; }

/* tools menu = small popover, doesn't push the page around */
.section-nav { position: relative; display: flex; flex-direction: column; margin-bottom: .8rem; }
.section-nav .nav-menu { align-self: flex-end; margin: .35rem 0 0; }
.section-nav .nav-menu > summary { text-align: right; padding: .2rem .3rem; font-size: .85rem; font-weight: 600; opacity: .8; }
.section-nav .nav-menu .nav-more { position: absolute; right: 0; top: calc(100% - .2rem); z-index: 30; flex-direction: column; flex-wrap: nowrap; gap: .3rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 1rem; padding: .5rem; min-width: 13rem; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.section-nav .nav-menu .nav-more .tab { border-radius: 999px; width: 100%; text-align: left; justify-content: flex-start; }

/* messages page order */
#requestsView { display: flex; flex-direction: column; }
#requestsView > .msg-tools { order: 1; margin: 0 0 .6rem; }
#requestsView > #newMsgPanel { order: 2; }
#requestsView > #statusTabs { order: 3; margin: 0 0 .6rem; }
#requestsView > .pick-row { order: 4; margin: 0 0 .4rem; }
#requestsView > .notify-details { order: 5; margin: 0 0 .8rem; }
#requestsView > #searchNote { order: 6; }
#requestsView > #list { order: 7; }

/* filters are secondary: lighter and smaller */
.pick-row select { height: 2.4rem; font-size: .9rem; font-weight: 500; background-color: rgba(255,255,255,.75); }
.notify-details > summary { font-size: .8rem; opacity: .65; }

/* ===== Designer pass: bigger sections, obvious tools button, no stray gaps (appended) ===== */
.section-nav .nav-main { gap: .7rem; }
.section-nav .nav-main .tab { min-height: 4rem; font-size: clamp(1.05rem, 3.4vw, 1.4rem); padding: .6rem .5rem; }

/* More tools = a real button */
.section-nav .nav-menu { align-self: flex-end; margin: .7rem 0 0; }
.section-nav .nav-menu > summary { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 999px; padding: .6rem 1.2rem; font-size: 1rem; font-weight: 700; color: var(--ink); opacity: 1; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.section-nav .nav-menu > summary::before { content: "\2630"; font-size: 1.05rem; }
.section-nav .nav-menu > summary::after { content: "\25BE"; }
.section-nav .nav-menu[open] > summary { background: var(--ink); color: #fff; }
.section-nav .nav-menu[open] > summary::after { content: "\25B4"; }
.section-nav .nav-menu .nav-more { top: calc(100% + .4rem); border-radius: 1rem; padding: .6rem; gap: .4rem; min-width: 14rem; }
.section-nav .nav-menu .nav-more .tab { font-size: 1rem; min-height: 2.8rem; padding: 0 1rem; }

/* spacing rhythm: .6rem between controls, 1rem before the list */
.section-nav { margin-bottom: 1rem; }
#requestsView > .msg-tools { margin: 0 0 .7rem; }
#requestsView > #statusTabs { margin: 0 0 .7rem; }
#requestsView > .pick-row { margin: 0 0 .5rem; }
#requestsView > .notify-details { margin: 0 0 .9rem; }
#requestsView > #searchNote[hidden] { display: none !important; }
#requestsView > #list { margin-top: 0; }
#list > .req:first-child { margin-top: 0; }
.notify-details > summary { display: inline-block; font-size: .85rem; opacity: .75; }

/* ===== One system for all three sections (appended) ===== */
/* More tools: full-width bar under the section tabs */
.section-nav .nav-menu { align-self: stretch; margin: .7rem 0 0; }
.section-nav .nav-menu > summary { display: flex; justify-content: center; width: 100%; box-sizing: border-box; border-radius: 0; }
.section-nav .nav-menu .nav-more { left: 0; right: 0; min-width: 0; }

/* Travel + Medical Leave use the same order as Messages: status, then supervisor */
#travelView, #sickView { display: block; }
#travelView > .tabs.segs, #sickView > .tabs.segs { margin: 0 0 .7rem; }
#travelView .pick-row, #sickView .pick-row { margin: 0 0 1rem; }

/* ===== New message form: compact + person picker (appended) ===== */
#dmChips { display: block !important; margin: .4rem 0 !important; font-size: .85rem; }
#dmBox #dmName { display: block; }
#dmBox .body { padding: .8rem 1rem 1rem; }
#dmBox label { font-size: .9rem; margin: .6rem 0 .25rem; }
#dmBox input[type=text], #dmBox select, #dmBox textarea { font-size: 1rem; padding: 0 1rem; height: 2.6rem; border-radius: 999px; box-sizing: border-box; width: 100%; }
#dmBox textarea { height: 5.5rem; padding: .6rem 1rem; border-radius: 1rem; }
#dmBox #dmSend { height: 2.7rem; min-height: 2.7rem; font-size: .9rem; border-radius: 999px; }
#dmBox .top { padding: .7rem 1rem; }

/* New message: type-to-search person, chips above the message */
#dmBox .body { display: flex !important; flex-direction: column !important; }
#dmBox .body > #dmFromRow { order: 1 !important; }
#dmBox .body > label[for="dmName"] { order: 2 !important; }
#dmBox .body > #dmName { order: 3 !important; }
#dmBox .body > #dmSug { order: 4 !important; }
#dmBox .body > #dmChips { order: 5 !important; }
#dmBox .body > #dmAllRow { order: 6 !important; }
#dmBox .body > label[for="dmMsg"] { order: 7 !important; }
#dmBox .body > #dmMsg { order: 8 !important; }
#dmBox .body > #dmWays { order: 9 !important; }
#dmBox .body > #dmErr { order: 10 !important; }
#dmBox .body > #dmStatus { order: 11 !important; }
#dmBox .body > .actions { order: 12 !important; }
#dmSug { display: block; }
#dmSug:empty { display: none; }
.dm-sug-item { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--ink); border-top: 0; padding: .6rem 1rem; font: inherit; cursor: pointer; }
.dm-sug-item:hover { background: #eee; }

#dmBox .body > #dmSearch { order: 3 !important; position: relative; }
#dmSearch #dmSug { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.2); }

/* More tools: highlights when one of its tools is active; closes itself after a pick */
.section-nav .nav-menu.on > summary { background: var(--ink); color: #fff; }

/* One white divider under the top tabs; even .6rem spacing below it */
.section-nav { border-bottom: 2px solid #fff !important; padding-bottom: .9rem !important; margin: 0 0 .9rem !important; }
.section-nav .nav-main { margin-bottom: 0 !important; }
.section-nav .nav-menu { margin: .7rem 0 0 !important; }
.section-nav .nav-menu > summary { user-select: none; -webkit-user-select: none; }
.section-nav .nav-menu .nav-more { top: calc(100% + .4rem); }
#requestsView > .msg-tools,
#requestsView > #statusTabs,
#requestsView > .pick-row,
#requestsView > .notify-details { border: 0 !important; padding: 0 !important; margin: 0 0 .6rem !important; }
#requestsView > #newMsgPanel:not([hidden]) { margin: 0 0 .6rem; }
#requestsView > .notify-details > summary { padding: .2rem 0 !important; }

/* Notification settings: bell button beside the supervisor picker, opens a lightbox */
#requestsView > .notify-details { display: none !important; }

#notifyModal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
#notifyModal[hidden] { display: none; }
#notifyModal .nm-card { background: #fff; border: 1.5px solid var(--ink); border-radius: 1rem; width: 100%; max-width: 26rem; max-height: 90vh; overflow-y: auto; padding: 1rem 1.2rem 1.2rem; box-sizing: border-box; }
#notifyModal .nm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; font-size: 1.1rem; }
#notifyModal #nmClose { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; }
#notifyModal .notify-bar { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; padding: 0; border: 0; background: none; }
#notifyModal .notify-bar .bell { display: none; }
#notifyModal .notify-bar label { margin: .5rem 0 0; white-space: normal; }
#notifyModal .notify-bar select { width: 100%; }
#notifyModal .notify-bar .btn { width: 100%; margin-top: .4rem; }
#notifyModal .notify-bar .status-text { flex: none; display: block; margin-top: .3rem; }

#whoBar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 0 0 1rem; padding: .7rem 1rem; background: #fff; border: 1.5px solid var(--ink); border-left: 8px solid #c77a35; }
#whoText { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
#whoText small { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #555; }
#whoText strong { font-size: 1.45rem; }
#notifyBtn { flex: none; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
#notifyBtn:hover { background: #f2f2f2; }
#appView .page-title { font-size: 2.6rem !important; }
.section-nav .nav-menu.aud > summary { display: none; }
.section-nav .nav-menu.aud .nav-more { position: static; box-shadow: none; display: flex; gap: .7rem; }

#requestsView #supTabs { display: none !important; }
#requestsView > .pick-row { display: block !important; }
#requestsView > .pick-row #typeTabs { width: 100%; }

.badge-noresp .noresp-x { display: inline; -webkit-appearance: none; appearance: none; background: none; border: 0; box-shadow: none; color: #fff; opacity: .85; font: inherit; font-weight: 700; line-height: inherit; letter-spacing: 0; text-transform: none; padding: 0; margin: 0 0 0 .6rem; min-height: 0; min-width: 0; width: auto; height: auto; cursor: pointer; vertical-align: baseline; }
.badge-noresp .noresp-x:hover { opacity: 1; }

/* Course test: two clear ways to add it, only one open at a time */
.oc-way { border: 1.5px solid var(--ink); background: #fff; margin: .6rem 0; }
.oc-way > summary { padding: .7rem 1rem; font-weight: 700; cursor: pointer; }
.oc-way[open] > summary { border-bottom: 1.5px solid var(--ink); background: #fdf3e7; }
.oc-way > *:not(summary) { margin-left: 1rem; margin-right: 1rem; }
.oc-way > :last-child { margin-bottom: 1rem; }
.oc-yourtest { margin-top: 1rem; padding-top: .8rem; border-top: 2px solid #fff; }
