/* Girls Hostel Connect — single stylesheet, no framework. Mobile-first. */
:root {
    --navy: #16325c;
    --navy-2: #1f4580;
    --blue: #2563c9;
    --blue-soft: #eaf1fc;
    --ink: #172033;
    --ink-2: #4a5568;
    --muted: #64708a;
    --line: #dde3ee;
    --bg: #f6f8fb;
    --white: #fff;
    --red: #c62828;
    --red-dark: #9f1d1d;
    --red-soft: #fdecec;
    --green: #1d7a46;
    --green-soft: #e7f5ec;
    --amber: #8a5a00;
    --amber-soft: #fff4dc;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 32, 64, .06), 0 4px 14px rgba(16, 32, 64, .05);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.12rem; margin-top: .25rem; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.big { font-size: 1.4rem; }
.prewrap { white-space: normal; overflow-wrap: anywhere; }
.text-danger { color: var(--red); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Student shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .7rem 1rem; padding-top: max(.7rem, env(safe-area-inset-top)); background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--navy); text-decoration: none; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: .75rem; }
.topbar-sos { background: var(--red); color: #fff; font-weight: 700; text-decoration: none; padding: .45rem .9rem; border-radius: 999px; font-size: .9rem; }
.container { max-width: 640px; margin: 0 auto; padding: 1rem 1rem calc(88px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem .25rem .55rem; font-size: .72rem; color: var(--muted); text-decoration: none; min-height: 58px; justify-content: center; }
.bottom-nav a.active { color: var(--navy); font-weight: 600; }
.bottom-nav a.active .icon { stroke-width: 2.4; }
.bottom-nav a.nav-sos { color: var(--red); font-weight: 600; }

.hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.hero h1 { color: #fff; }
.hero p { margin: 0; opacity: .92; }
.page-head { margin: .25rem 0 1rem; }
.page-head p { color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 0; }

.action-grid { display: grid; gap: .65rem; margin-bottom: 1rem; }
.action-card { display: flex; align-items: center; gap: .85rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem; min-height: 72px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.action-card:hover { border-color: #b9c7df; }
.action-card:active { transform: scale(.995); }
.action-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); flex: none; }
.action-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.action-text strong { font-size: 1.02rem; }
.action-text small { color: var(--muted); }
.action-card > .icon { color: #9aa6bd; }
.card-emergency { border-color: #f1b8b8; background: #fff7f7; }
.card-emergency .action-icon { background: var(--red); color: #fff; }
.card-emergency strong { color: var(--red-dark); }
@media (min-width: 560px) { .action-grid { grid-template-columns: 1fr 1fr; } .card-emergency { grid-column: 1 / -1; } }

/* ---------- Cards, panels ---------- */
.card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card-success { border-color: #b8e0c6; background: var(--green-soft); }
.card-danger { border-color: #f1b8b8; background: #fff7f7; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.panel-head h2 { margin: 0; }
.empty { text-align: center; color: var(--ink-2); padding: 2rem 1rem; }
.empty-inline { color: var(--muted); margin: .25rem 0; }

/* ---------- Forms ---------- */
.form .field { margin-bottom: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 600; margin-bottom: .4rem; padding: 0; color: var(--ink); }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=url],
input[type=number], input[type=date], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
    width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #c9d2e1; border-radius: var(--radius-sm);
    padding: .7rem .8rem; min-height: 48px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(37, 99, 201, .18); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--red) !important; background: #fffafa; }
input[type=file] { width: 100%; padding: .6rem; border: 1.5px dashed #b6c2d6; border-radius: var(--radius-sm); background: #fbfcfe; font: inherit; }
.help { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
.field-error { color: var(--red); font-size: .875rem; font-weight: 600; margin: .35rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; cursor: pointer; margin: .25rem 0 1rem; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--navy); }
.field-pair { display: grid; gap: 0 .75rem; grid-template-columns: 1fr 1fr; }
.field-pair > legend { grid-column: 1 / -1; }
.field-pair > .field-error { grid-column: 1 / -1; margin-top: -.6rem; margin-bottom: .8rem; }
@media (max-width: 380px) { .field-pair { grid-template-columns: 1fr; } }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.segmented-wrap { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.segmented label { margin: 0; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: .4rem;
    border: 1.5px solid #c9d2e1; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; background: #fff; }
.segmented input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid #f0b429; outline-offset: 2px; }
@media (max-width: 420px) { .segmented:not(.segmented-wrap) { grid-template-columns: 1fr 1fr; } }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.rating label { position: relative; margin: 0; }
.rating input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.rating .star { display: block; text-align: center; font-size: 1.7rem; line-height: 1; padding: .55rem 0 .1rem; color: #c9d2e1;
    border: 1.5px solid #c9d2e1; border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: #fff; }
.rating .rating-num { display: block; text-align: center; font-size: .8rem; padding-bottom: .35rem; border: 1.5px solid #c9d2e1; border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: #fff; color: var(--muted); }
.rating input:checked ~ .star, .rating input:checked ~ .rating-num { background: var(--navy); border-color: var(--navy); color: #fff; }
.rating input:focus-visible ~ .star { outline: 3px solid #f0b429; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 180px; }
.inline-form select, .inline-form input { width: auto; min-width: 120px; min-height: 40px; padding: .45rem .6rem; }
.inline-form .field input { width: 100%; }
.field-narrow { flex: 0 0 110px !important; }
.input-narrow { min-width: 70px !important; max-width: 140px; min-height: 40px !important; padding: .4rem .5rem !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; text-decoration: none;
    border-radius: var(--radius-sm); border: 1.5px solid transparent; padding: .7rem 1.1rem; min-height: 48px; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: #c9d2e1; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-dark); }
.btn-outline-danger { background: #fff; color: var(--red); border-color: #e9a3a3; }
.btn-small { min-height: 36px; padding: .4rem .75rem; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy=true] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.btn-row.center { justify-content: center; }

/* Call buttons */
.call-buttons { display: grid; gap: .6rem; }
.btn-call { justify-content: flex-start; background: var(--navy); color: #fff; min-height: 60px; text-align: left; }
.btn-call span { display: flex; flex-direction: column; }
.btn-call small { font-weight: 400; opacity: .85; }
.btn-call-alt { background: var(--navy-2); }
.call-big .btn-call { background: var(--red); min-height: 68px; font-size: 1.08rem; }
.call-big .btn-call-alt { background: var(--red-dark); }
.call-big .btn-call-112 { background: #fff; color: var(--red-dark); border-color: #e9a3a3; }

/* ---------- Alerts & badges ---------- */
.alert { border-radius: var(--radius-sm); padding: .75rem .9rem; margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.alert-success { background: var(--green-soft); border-color: #b8e0c6; color: #135c33; }
.alert-error { background: var(--red-soft); border-color: #f1b8b8; color: var(--red-dark); }
.alert-warning { background: var(--amber-soft); border-color: #f2d38f; color: #6b4600; }
.alert-info { background: var(--blue-soft); border-color: #c4d6f3; color: #1c3f75; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; background: #eef1f6; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.badge-new { background: #e3ecfb; color: #1c4b9b; }
.badge-pending, .badge-draft, .badge-scheduled { background: var(--amber-soft); color: var(--amber); }
.badge-in_progress, .badge-acknowledged, .badge-departed { background: #e9e4fb; color: #4c2fa3; }
.badge-resolved, .badge-approved, .badge-returned, .badge-published, .badge-live { background: var(--green-soft); color: var(--green); }
.badge-closed, .badge-archived, .badge-expired { background: #eceff3; color: #556070; }
.badge-rejected, .badge-overdue { background: var(--red-soft); color: var(--red-dark); }
.badge-important { background: var(--red-soft); color: var(--red-dark); }
.badge-public { background: var(--blue-soft); color: #1c3f75; font-weight: 600; }
.badge-internal { background: #eceff3; color: #556070; font-weight: 600; }
.prio-low { background: #eceff3; color: #556070; }
.prio-normal { background: #eef1f6; color: var(--ink-2); }
.prio-high { background: var(--amber-soft); color: var(--amber); }
.prio-urgent { background: var(--red-soft); color: var(--red-dark); }

/* ---------- Success / tracking ---------- */
.success-card { text-align: center; }
.success-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); margin-bottom: .5rem; }
.success-icon .icon { width: 30px; height: 30px; }
.ref-box { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem; margin: .75rem 0; }
.ref-label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .3rem; }
.copy-row { display: flex; gap: .5rem; align-items: center; }
.copy-row code { font-size: 1.25rem; font-weight: 700; color: var(--navy); flex: 1; overflow-wrap: anywhere; }
.copy-row input { flex: 1; min-width: 0; font-size: .85rem; min-height: 40px; }
.details { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: .45rem .9rem; margin: 0; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 0; margin: 0 0 1rem; counter-reset: s; }
.stepper li { text-align: center; font-size: .72rem; color: var(--muted); padding-top: 12px; border-top: 4px solid var(--line); }
.stepper li.done { border-color: var(--green); color: var(--green); }
.stepper li.current { border-color: var(--navy); color: var(--navy); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .75rem; }
.timeline li::before { content: ""; position: absolute; left: -1.38rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); border: 2px solid #fff; }
.timeline time { display: block; font-size: .8rem; color: var(--muted); }
.timeline p { margin: .1rem 0; }
.timeline .note { background: var(--bg); border-radius: var(--radius-sm); padding: .5rem .7rem; font-size: .93rem; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: 2px; scrollbar-width: thin; }
.tabs a { white-space: nowrap; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); background: #fff; border: 1px solid var(--line); font-size: .9rem; font-weight: 600; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.back-link { text-decoration: none; font-weight: 600; font-size: .9rem; }

/* Notices */
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li a { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.notice-list li:last-child a { border-bottom: 0; }
.notice-list small { color: var(--muted); margin-left: auto; }
.notice h2 { margin: .25rem 0; }
.notice h2 a { color: var(--navy); text-decoration: none; }
.notice-important { border-left: 4px solid var(--red); }
.notice-body { margin-top: 1rem; overflow-wrap: anywhere; }

/* Emergency */
.emergency-banner { display: flex; gap: .9rem; align-items: flex-start; background: var(--red); color: #fff; border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; }
.emergency-banner h1 { color: #fff; margin: 0 0 .25rem; }
.emergency-banner p { margin: 0; font-weight: 600; }
.emergency-banner .icon { width: 34px; height: 34px; }
.emergency-page .call-buttons { margin-bottom: 1rem; }
.emergency-form { border-top: 4px solid var(--red); }

/* ---------- Error ---------- */
.error-card h1 { margin-top: .25rem; }

/* ---------- Auth ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 1rem; background: linear-gradient(160deg, #eef3fb, #f6f8fb); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.auth-brand { display: flex; gap: .6rem; align-items: center; color: var(--navy); margin-bottom: 1.25rem; }

/* ---------- Admin shell ---------- */
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: var(--navy); color: #fff; }
.admin-topbar .brand { color: #fff; }
.admin-topbar .brand-mark { background: #fff; color: var(--navy); }
.menu-toggle { background: transparent; border: 0; color: #fff; padding: .35rem; min-height: 40px; cursor: pointer; }
.em-pill { margin-left: auto; background: var(--red); color: #fff; font-weight: 700; padding: .35rem .8rem; border-radius: 999px; text-decoration: none; font-size: .85rem; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(198, 40, 40, .25); } }
@media (prefers-reduced-motion: reduce) { .em-pill { animation: none; } }
.admin-shell { display: block; }
.sidebar { display: none; background: #fff; border-bottom: 1px solid var(--line); }
.sidebar.open { display: block; }
.sidebar nav { display: flex; flex-direction: column; padding: .5rem; }
.sidebar a, .sidebar button { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font: inherit; font-weight: 600; font-size: .95rem; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.sidebar a:hover, .sidebar button:hover { background: var(--bg); color: var(--navy); }
.sidebar a.active { background: var(--blue-soft); color: var(--navy); }
.sidebar .count { margin-left: auto; background: var(--navy); color: #fff; font-size: .75rem; border-radius: 999px; padding: .05rem .5rem; }
.sidebar .count-danger { background: var(--red); }
.nav-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: .9rem .75rem .25rem; }
.logout-form { margin: 0; }
.admin-main { padding: 1rem; max-width: 1200px; }
.no-js .sidebar { display: block; }
@media (min-width: 960px) {
    .menu-toggle { display: none; }
    .admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 56px); }
    .sidebar { display: block; border-bottom: 0; border-right: 1px solid var(--line); position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
    .admin-main { padding: 1.5rem 2rem; }
}
.page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.page-title h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat:hover { border-color: #b9c7df; }
.stat-num { font-size: 1.8rem; font-weight: 750; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-new .stat-num { color: var(--blue); }
.stat-ok .stat-num { color: var(--green); }
.stat-warn { border-color: #f2d38f; } .stat-warn .stat-num { color: var(--amber); }
.stat-danger { border-color: #f1b8b8; background: #fff7f7; } .stat-danger .stat-num { color: var(--red); }
.grid-2 { display: grid; gap: 1rem; }
.grid-2 > * { min-width: 0; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-wide-left { grid-template-columns: 1.6fr 1fr; } }
.panel-emergency { border: 2px solid #f1b8b8; }
.panel-emergency h2 { color: var(--red-dark); }
.panel-emergency.has-new { background: #fff7f7; }
.em-list { list-style: none; margin: 0; padding: 0; }
.em-item { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .7rem 0; border-top: 1px solid #f4d4d4; }
.em-item:first-child { border-top: 0; }
.em-item.status-new .em-main a { color: var(--red-dark); }
.em-main { flex: 1 1 240px; display: flex; flex-direction: column; }
.em-main a { text-decoration: none; }
.em-item form { margin: 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; align-items: end; padding: .9rem; }
.filters .field { margin: 0; }
.filters label { font-size: .8rem; color: var(--ink-2); margin-bottom: .2rem; }
.filters input, .filters select { min-height: 40px; padding: .45rem .6rem; }
.filter-actions { display: flex; gap: .4rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfd; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td small { color: var(--muted); }
.table.compact th, .table.compact td { padding: .45rem .5rem; }
.panel .table { font-size: .9rem; }
.row-danger { background: #fff5f5; }
.row-muted td { opacity: .6; }
.actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.actions form { margin: 0; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] .inline-form { margin-top: .4rem; }
@media (max-width: 720px) {
    .table-wrap .table thead { display: none; }
    .table-wrap .table tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem 0; }
    .table-wrap .table td { display: flex; gap: .75rem; border: 0; padding: .3rem .8rem; }
    .table-wrap .table td[data-label]::before { content: attr(data-label); flex: 0 0 34%; font-size: .78rem; color: var(--muted); font-weight: 600; }
}
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; font-size: .9rem; color: var(--muted); }
.pagination a { font-weight: 600; text-decoration: none; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.activity { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.activity li { padding: .45rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.activity time { color: var(--muted); font-size: .8rem; margin-right: .4rem; }
.attachments { display: flex; flex-wrap: wrap; gap: .6rem; }
.attachments img { max-height: 320px; width: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
meter { width: 90px; height: 12px; vertical-align: middle; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.comment-list p { margin: .25rem 0 0; overflow-wrap: anywhere; }
.rating-pill { display: inline-block; font-weight: 700; font-size: .8rem; padding: .1rem .45rem; border-radius: 999px; background: var(--amber-soft); color: var(--amber); }
.rating-pill.r1, .rating-pill.r2 { background: var(--red-soft); color: var(--red-dark); }
.rating-pill.r4, .rating-pill.r5 { background: var(--green-soft); color: var(--green); }

.em-toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; background: var(--red); color: #fff; padding: .9rem 1.1rem; border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0,0,0,.25); max-width: 340px; }
.em-toast a { color: #fff; font-weight: 700; }

/* QR poster */
.qr-poster { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; max-width: 520px; margin: 0 auto; }
.qr-poster h2 { font-size: 1.8rem; }
.qr-lead { font-size: 1.05rem; color: var(--ink-2); }
.qr-box { width: min(320px, 80vw); margin: 1rem auto; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-url { word-break: break-all; font-size: .95rem; }
@media print {
    .admin-topbar, .sidebar, .no-print, .em-toast, .alert { display: none !important; }
    .admin-shell { display: block; }
    .admin-main { padding: 0; }
    body { background: #fff; }
    .qr-poster { border: 0; }
}
