/* Client portal additions to the Merrick Cyber dark glass theme */
.narrow { max-width: 520px; }
.panel {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.panel-title { font-size: 1.5rem; }
form label { display: block; color: var(--text); font-weight: 700; font-size: .93rem; margin: 16px 0 6px; }
form label .opt { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(125, 207, 194, .18); }
textarea { resize: vertical; }
select option { background: #0a0d10; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.btn.full { width: 100%; margin-top: 20px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.btn-danger { background: rgba(240, 125, 98, .14); color: #ffd2c6; border: 1px solid rgba(240, 125, 98, .55); }
.btn-danger:hover { background: rgba(240, 125, 98, .28); color: #fff; }
.linkish { background: none; border: 0; padding: 0; color: var(--mint); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: #fff; }
.sub-links { text-align: center; margin: 16px 0 0; color: var(--muted); font-size: .93rem; }
.err { background: rgba(240, 125, 98, .1); border: 1px solid rgba(240, 125, 98, .45); color: #ffd9cf; padding: 10px 13px; border-radius: 10px; margin: 14px 0 0; font-size: .94rem; }
.okmsg { background: rgba(125, 207, 194, .08); border: 1px solid rgba(125, 207, 194, .4); color: #d6f3ee; padding: 10px 13px; border-radius: 10px; margin: 14px 0 0; font-size: .94rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meter { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .3s, background .3s; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* questionnaire */
.qf { border: 0; padding: 0; margin: 22px 0 0; }
.qf legend { color: var(--text); font-weight: 700; margin-bottom: 10px; }
.choices-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: .93rem; transition: all .2s; background: rgba(0, 0, 0, .25); }
.choice input:checked + span { border-color: var(--mint); background: rgba(125, 207, 194, .15); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.glass-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 22px 26px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); margin-bottom: 30px; }
.big-num { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 0; font-variant-numeric: tabular-nums; }
.big-num .of { font-size: 1rem; color: var(--muted); font-weight: 400; }
.bar-outer { flex: 1 1 240px; height: 8px; background: rgba(255, 255, 255, .07); border-radius: 99px; overflow: hidden; }
.bar-outer span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--mint), #8c6eff); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.dash-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: start; }
.dash-grid > * { min-width: 0; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.todo li { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); transition: border-color .2s, opacity .3s; }
.todo li.done { opacity: .6; }
.todo li.done .t-title { text-decoration: line-through; text-decoration-color: rgba(125, 207, 194, .6); }
.todo .t-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; }
.todo input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--teal); cursor: pointer; margin: 0; }
.todo .t-title { color: var(--text); font-weight: 700; background: none; border: 0; text-align: left; font: inherit; font-weight: 700; padding: 0; cursor: pointer; }
.todo .t-detail { padding: 0 16px 16px 50px; }
.todo .t-detail p { margin: 0 0 8px; font-size: .95rem; }
.pri { font-size: .66rem; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pri-1 { color: #ffd2c6; border: 1px solid rgba(240, 125, 98, .55); }
.pri-2 { color: #cdf1ea; border: 1px solid rgba(125, 207, 194, .5); }
.pri-3 { color: #d8cfff; border: 1px solid rgba(140, 110, 255, .5); }
.custom-tag { color: var(--mint); font-size: .8rem; }
.pq-opts { display: grid; gap: 8px; margin-top: 14px; }
.pq-opts button { text-align: left; font: inherit; color: var(--text); padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .25); cursor: pointer; transition: all .2s; }
.pq-opts button:hover:not([disabled]) { border-color: var(--mint); }
.pq-opts button.right { border-color: rgba(125, 207, 194, .8); background: rgba(125, 207, 194, .14); }
.pq-opts button.wrong { border-color: rgba(240, 125, 98, .8); background: rgba(240, 125, 98, .12); }
.pq-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; color: var(--muted); font-size: .9rem; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; }
.tabs button[aria-selected=true] { color: #fff; border-bottom-color: var(--mint); }
.count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: rgba(125, 207, 194, .15); color: var(--mint); font-size: .8rem; }
.stack { display: grid; gap: 12px; }
.req { padding: 18px 20px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.req h3 { margin: 0 0 2px; }
.req .meta { color: var(--muted); font-size: .9rem; margin: 0; word-break: break-word; }
.req .msg-text { margin: 8px 0 0; font-size: .95rem; white-space: pre-wrap; word-break: break-word; }
.req .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .req { grid-template-columns: 1fr; } }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.mtable { width: 100%; border-collapse: collapse; font-size: .94rem; }
.mtable th, .mtable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtable th { color: var(--muted); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable .b { color: var(--text); font-weight: 700; }
.mtable .s { color: var(--muted); font-size: .86rem; word-break: break-all; }
.status { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-strong); white-space: nowrap; }
.status.active { color: var(--mint); border-color: rgba(125, 207, 194, .5); }
.status.invited { color: #ffd9a8; border-color: rgba(255, 190, 110, .5); }
.status.admin { color: #d8cfff; border-color: rgba(140, 110, 255, .5); }
.mini-bar { display: inline-block; width: 70px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--mint); }
.add-member { margin-bottom: 16px; }
.inline-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; margin-top: 12px; }
.inline-form label { margin-top: 0; }
@media (max-width: 760px) { .inline-form { grid-template-columns: 1fr; } }
dialog { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border-radius: 18px; border: 1px solid var(--line-strong); background: #0a0d10; color: var(--body); }
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.dlg-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 22px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #0a0d10; z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 1.5rem; }
.dlg-body { padding: 20px 24px 28px; }
.dlg-body h3 { margin-top: 26px; }
.dlg-body h4 { color: var(--text); margin: 18px 0 8px; }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.confirm { margin-top: 12px; padding: 14px; border-radius: 12px; border: 1px solid rgba(240, 125, 98, .5); background: rgba(240, 125, 98, .08); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin: 0; }
.answers dt { color: var(--muted); font-size: .88rem; }
.answers dd { margin: 0 0 8px; color: var(--text); }
@media (max-width: 640px) { .answers { grid-template-columns: 1fr; } }
.olist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.olist li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: .93rem; }
.olist li.off { opacity: .5; }
.olist li > span { min-width: 0; word-break: break-word; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .8rem; padding: 5px 10px; cursor: pointer; }
.seg button[aria-pressed=true] { background: rgba(125, 207, 194, .18); color: #fff; }
.mini-form { display: grid; gap: 8px; margin-top: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.opt-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.opt-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--teal); }
