/* FixDesk app additions: components the static design did not need (forms errors,
   flash messages, modals, demo banner, installer, PWA hints). Same tokens. */

.logo-mark-fill { fill: var(--brand); }
.logo img { height: 32px; width: auto; }

/* alerts */
.alert.bad { background: var(--bad-soft); color: var(--text); }
.alert.bad .bi { color: var(--bad); }
.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash-stack .alert .close { margin-left: auto; width: 30px; height: 30px; font-size: 14px; }

/* form validation */
.input.is-invalid, .input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { font-size: 12.5px; color: var(--bad); margin-top: 6px; font-weight: 500; }
.req { color: var(--bad); margin-left: 2px; }

/* empty state */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 20px; }
.empty-state h3 { margin: 6px 0 0; font-size: 16.5px; }
.empty-state p { margin: 0; max-width: 420px; font-size: 14px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 16, 32, .55); }
.modal-box { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-box.lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
body.modal-open { overflow: hidden; }

/* pagination links (Laravel paginator) */
.pager .pg a, .pager .pg span.pg-item { min-width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 600 13px var(--font-ui); display: inline-grid; place-items: center; padding: 0 8px; text-decoration: none; }
.pager .pg a:hover { border-color: var(--brand); color: var(--brand-ink); }
.pager .pg .on { background: var(--brand); color: var(--on-brand, #fff); border-color: var(--brand); }
.pager .pg .disabled { opacity: .45; pointer-events: none; }

/* demo banner */
.demo-banner { background: var(--accent-fill); color: var(--on-accent, #fff); font-size: 13px; text-align: center; padding: 7px 16px; font-weight: 600; }
.demo-banner a { color: inherit; text-decoration: underline; }
.demo-logins { display: grid; gap: 8px; }
.demo-logins .row { justify-content: space-between; flex-wrap: wrap; }
.demo-logins .row > span { min-width: 0; overflow-wrap: anywhere; }

/* iOS add-to-home-screen hint */
.ios-hint { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 14px; }
.ios-hint.show { display: flex; }
.ios-hint .icon-btn { margin-left: auto; width: 32px; height: 32px; }

/* notifications menu */
.notif-menu { width: 340px; max-width: calc(100vw - 32px); padding: 6px 0; }
.notif-menu .n-item { display: flex; gap: 10px; padding: 10px 14px; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.notif-menu .n-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-menu .n-item .bi { color: var(--brand-ink); font-size: 16px; margin-top: 2px; }
.notif-menu .n-item b { color: var(--text); display: block; font-size: 13.5px; }
.notif-menu .n-item.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.notif-menu .n-empty { padding: 18px 14px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* installer */
.installer { min-height: 100vh; display: grid; place-items: start center; padding: 48px 16px; background: var(--bg); }
.installer .inst-box { width: 100%; max-width: 680px; }
.installer .inst-steps { display: flex; gap: 6px; margin: 22px 0; flex-wrap: wrap; }
.installer .inst-steps span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.installer .inst-steps span.on { background: var(--brand); color: var(--on-brand, #fff); }
.installer .inst-steps span.done { background: var(--ok-soft); color: var(--ok); }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .bi-check-circle-fill { color: var(--ok); }
.req-list .bi-x-circle-fill { color: var(--bad); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }

/* placeholder pages (removed by the page builders) */
.placeholder-note { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 28px; color: var(--muted); text-align: center; background: var(--surface); }

/* offline page */
.offline-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prose p:last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.break-any { overflow-wrap: anywhere; }

.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light:has(+ .logo-dark) { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }
.notif-menu .dd-title { display: flex; align-items: center; }
.notif-menu .dd-title .btn { margin-left: auto; text-transform: none; letter-spacing: 0; width: auto; }
.lang-form { margin: 0; }
.status-pill.off i { background: var(--faint); }
