/* Quriyat Divers — members' platform. Logical properties throughout so RTL/LTR mirror automatically. */
:root {
	--navy-950: #070B3A;
	--navy-900: #000040;
	--navy-800: #0E1556;
	--navy-700: #1B2470;
	--blue: #4D8CBF;
	--blue-300: #85B3D5;
	--blue-50: #EAF2F9;
	--link: #2B5C93;
	--coral: #C24A2F;
	--coral-50: #FBEDE9;
	--ok: #1F7A4D;
	--ok-50: #E5F4EC;
	--warn: #9A6400;
	--warn-50: #FCF3E1;
	--ink: #0B1033;
	--ink-2: #2F3A5C;
	--muted: #5B6585;
	--line: #DCE2EC;
	--line-2: #EDF1F6;
	--bg: #F2F5F9;
	--card: #FFFFFF;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(7, 11, 58, .06), 0 4px 16px rgba(7, 11, 58, .05);
	--font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--font-head: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
	--side-w: 264px;
	color-scheme: light;
}
.lang-en { --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-head: 'IBM Plex Sans', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.qdp { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
img, video { max-width: 100%; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; color: var(--navy-900); margin: 0 0 .5em; }
.lang-en h1, .lang-en h2, .lang-en h3 { font-weight: 700; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.qdp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.qdp-ic { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* Splash / loading */
.qdp-splash { min-height: 100vh; display: grid; place-items: center; }
.qdp-splash img { animation: qdp-pulse 1.4s ease-in-out infinite; }
@keyframes qdp-pulse { 50% { opacity: .45; transform: scale(.96); } }
.qdp-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; justify-content: center; }
.qdp-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: qdp-rot .8s linear infinite; }
@keyframes qdp-rot { to { transform: rotate(360deg); } }
.qdp-error, .qdp-empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.qdp-empty p { margin-bottom: 12px; }

/* ============ Shell ============ */
.qdp-shell { min-height: 100vh; display: flex; }
.qdp-side { position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none; background: var(--navy-950); color: #DCE6F5; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.qdp-side__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; }
.qdp-side__logo { background: #fff; border-radius: 12px; padding: 4px; display: inline-flex; }
.qdp-side__brand strong { display: block; font-family: var(--font-head); font-size: .98rem; line-height: 1.3; }
.qdp-side__brand small { display: block; color: var(--blue-300); font-size: .78rem; }
.qdp-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.qdp-nav__a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #C9D5EA; text-decoration: none; font-weight: 500; }
.qdp-nav__a:hover { background: rgba(255,255,255,.06); color: #fff; }
.qdp-nav__a.is-on { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--blue-300); }
[dir="rtl"] .qdp-nav__a.is-on { box-shadow: inset -3px 0 0 var(--blue-300); }
.qdp-nav__a span:first-of-type { flex: 1; }
.qdp-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.qdp-badge--urgent { background: var(--coral); }
.qdp-side__foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; display: grid; gap: 10px; }
.qdp-langsw { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.06); border-radius: 10px; padding: 3px; }
.qdp-langsw button { border: 0; background: transparent; color: #C9D5EA; padding: 6px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.qdp-langsw button[aria-pressed="true"] { background: #fff; color: var(--navy-900); }
.qdp-user { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 6px; border-radius: 10px; }
.qdp-user:hover { background: rgba(255,255,255,.06); }
.qdp-user strong { display: block; font-size: .9rem; }
.qdp-user small { display: block; color: var(--blue-300); font-size: .76rem; line-height: 1.4; }
.qdp-side__links { display: flex; justify-content: space-between; gap: 6px; }
.qdp-side__links a, .qdp-side__links button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #AFC0DC; font-size: .82rem; text-decoration: none; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.qdp-side__links a:hover, .qdp-side__links button:hover { color: #fff; background: rgba(255,255,255,.06); }
.qdp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qdp-top { display: none; }
.qdp-main { padding: 26px 30px 60px; max-width: 1280px; width: 100%; margin-inline: auto; outline: none; }
.qdp-scrim { display: none; }

@media (max-width: 960px) {
	.qdp-side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
	[dir="rtl"] .qdp-side { transform: translateX(105%); }
	.qdp-side.is-open { transform: none !important; }
	.qdp-scrim.is-on { display: block; position: fixed; inset: 0; background: rgba(7,11,58,.45); z-index: 55; }
	.qdp-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: var(--navy-950); color: #fff; padding: 8px 12px; }
	.qdp-top .qdp-iconbtn { color: #fff; }
	.qdp-top__brand { font-family: var(--font-head); font-weight: 700; }
	.qdp-main { padding: 18px 16px 50px; }
}

/* ============ Page head, tabs, crumbs ============ */
.qdp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.qdp-head__t h1 { margin: 0; }
.qdp-head__t p { margin: 4px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qdp-head__a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qdp-crumbs { display: flex; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.qdp-crumbs a { color: var(--link); text-decoration: none; }
.qdp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; }
.qdp-tabs a, .qdp-tabs button { flex: none; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border: 0; background: none; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.qdp-tabs a:hover, .qdp-tabs button:hover { color: var(--navy-900); }
.qdp-tabs a.is-on, .qdp-tabs [aria-selected="true"] { color: var(--navy-900); border-bottom-color: var(--blue); }
.qdp-tabs__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--coral); color: #fff; font-size: .72rem; padding: 0 6px; }
.qdp-tabs--in { margin: -4px 0 16px; }

/* ============ Cards & layout ============ */
.qdp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.qdp-card--flush { padding: 0; overflow: hidden; }
.qdp-card--soft { background: var(--blue-50); border-color: transparent; box-shadow: none; }
.qdp-card--inset { background: var(--bg); box-shadow: none; }
.qdp-card__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.qdp-card__h h2, .qdp-card__h h3 { margin: 0; }
.qdp-stack-col { display: flex; flex-direction: column; min-width: 0; }
.qdp-stack-col > .qdp-card:last-child { margin-bottom: 18px; }
.qdp-grid2, .qdp-grid3 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qdp-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qdp-grid2--top { align-items: start; }
.qdp-grid2 > .qdp-card, .qdp-grid3 > .qdp-card { margin-bottom: 0; }
.qdp-grid2.qdp-grid2--top > .qdp-card { margin-bottom: 18px; }
.qdp-grid-dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qdp-grid-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qdp-grid-inbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qdp-grid-news { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.qdp-grid-export { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.qdp-grid-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.qdp-grid-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.qdp-grid-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) {
	.qdp-grid-dash, .qdp-grid-form, .qdp-grid-inbox, .qdp-grid-news, .qdp-grid-export, .qdp-grid-profile, .qdp-grid-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.qdp-grid-side, .qdp-grid2, .qdp-grid3 { grid-template-columns: minmax(0, 1fr); }
	.qdp-card { padding: 16px; }
}
.qdp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.qdp-inline > input, .qdp-inline > select { flex: 1; min-width: 0; }
.qdp-wrap { flex-wrap: wrap; }
.qdp-grow { flex: 1; }
.qdp-mb { margin-bottom: 16px; }
.qdp-mt { margin-top: 12px; }
.qdp-pad { padding: 10px 14px; margin: 0; }
.qdp-center { text-align: center; }
.qdp-nowrap { white-space: nowrap; }
.qdp-break { word-break: break-all; }
.qdp-hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.qdp-h2 { margin: 0; }
.qdp-narrowform { max-width: 860px; }
.qdp-muted { color: var(--muted); }
.qdp-hint { color: var(--muted); font-size: .84rem; display: block; line-height: 1.55; }
p.qdp-hint { margin: 4px 0 10px; }
.qdp-warn-txt { color: var(--warn); }
.qdp-static { display: block; padding: 9px 0; }
.qdp-prose { line-height: 1.85; white-space: pre-line; color: var(--ink-2); }
.qdp-link { color: var(--link); font-weight: 600; text-decoration: none; font-size: .9rem; }
.qdp-link:hover { text-decoration: underline; }
.qdp-link-btn { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.qdp-link-btn input[type="file"] { display: none; }

/* ============ Buttons ============ */
.qdp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.qdp-btn:disabled { opacity: .55; cursor: not-allowed; }
.qdp-btn.is-busy { position: relative; color: transparent !important; }
.qdp-btn.is-busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: qdp-rot .8s linear infinite; }
.qdp-btn--ghost.is-busy::after, .qdp-btn--soft.is-busy::after { border-color: var(--line); border-top-color: var(--navy-900); }
.qdp-btn--primary { background: var(--navy-900); color: #fff; }
.qdp-btn--primary:hover:not(:disabled) { background: var(--navy-700); }
.qdp-btn--ghost { background: #fff; color: var(--navy-900); border-color: var(--line); }
.qdp-btn--ghost:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-50); }
.qdp-btn--soft { background: var(--blue-50); color: var(--navy-900); }
.qdp-btn--soft:hover { background: #DCEAF6; }
.qdp-btn--danger { background: var(--coral); color: #fff; }
.qdp-btn--danger:hover { background: #A63D25; }
.qdp-btn--danger-ghost { background: #fff; color: var(--coral); border-color: #F0C8BE; }
.qdp-btn--danger-ghost:hover { background: var(--coral-50); }
.qdp-btn--dashed { background: transparent; border: 1.5px dashed var(--line); color: var(--link); width: 100%; }
.qdp-btn--dashed:hover { border-color: var(--blue); }
.qdp-btn--sm { min-height: 32px; padding: 5px 11px; font-size: .84rem; }
.qdp-btn--lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.qdp-btn--block { width: 100%; }
.qdp-btn input[type="file"] { display: none; }
.qdp-iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.qdp-iconbtn:hover { background: var(--line-2); color: var(--navy-900); }
.qdp-iconbtn:disabled { opacity: .35; cursor: default; }
.qdp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.qdp-btnstack { display: grid; gap: 8px; }
.qdp-btnstack .qdp-btn { justify-content: flex-start; }
.qdp-sticky-actions { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 -6px 24px rgba(7,11,58,.08); margin-top: 6px; }

/* ============ Forms ============ */
.qdp-form { display: grid; gap: 14px; }
.qdp-form > h2 { margin-bottom: 0; }
.qdp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qdp-field > label, .qdp-field__row label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.qdp-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.qdp-req { color: var(--coral); }
.qdp-opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea {
	width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #C9D2E0; border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
select { padding-inline-end: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B6585' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; }
[dir="ltr"] select { background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77,140,191,.22); }
input[readonly] { background: var(--bg); color: var(--muted); }
input[type="color"] { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.qdp-field.is-invalid input, .qdp-field.is-invalid select, .qdp-field.is-invalid textarea { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(194,74,47,.15); }
.qdp-field.is-invalid > label { color: var(--coral); }
.qdp-field--title input { font-size: 1.12rem; font-weight: 600; }
.qdp-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 16px; margin: 0; display: grid; gap: 14px; min-width: 0; }
.qdp-fieldset legend { font-weight: 700; color: var(--navy-900); padding: 0 6px; }
.qdp-bi { gap: 12px; }
.qdp-coord { max-width: 110px; }

.qdp-check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; line-height: 1.5; }
.qdp-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy-900); flex: none; }
.qdp-checklist { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qdp-checklist .qdp-check { padding: 6px 8px; border-radius: 8px; align-items: center; }
.qdp-checklist .qdp-check:hover { background: var(--bg); }
.qdp-checks3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
@media (max-width: 600px) { .qdp-checks3 { grid-template-columns: 1fr 1fr; } }

.qdp-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.qdp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qdp-switch__ui { width: 42px; height: 24px; border-radius: 12px; background: #C9D2E0; position: relative; flex: none; transition: background .15s; }
.qdp-switch__ui::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.qdp-switch input:checked + .qdp-switch__ui { background: var(--ok); }
.qdp-switch input:checked + .qdp-switch__ui::after { inset-inline-start: 21px; }
.qdp-switch input:focus-visible + .qdp-switch__ui { outline: 3px solid var(--blue); outline-offset: 2px; }
.qdp-switch input:disabled + .qdp-switch__ui { opacity: .5; }
.qdp-switch--compact .qdp-switch__ui { width: 36px; height: 20px; }
.qdp-switch--compact .qdp-switch__ui::after { width: 14px; height: 14px; }
.qdp-switch--compact input:checked + .qdp-switch__ui::after { inset-inline-start: 19px; }

.qdp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qdp-chip { position: relative; cursor: pointer; }
.qdp-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qdp-chip span { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 13px; border-radius: 17px; border: 1px solid #C9D2E0; background: #fff; font-size: .88rem; font-weight: 500; }
.qdp-chip input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.qdp-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.qdp-chip:hover span { border-color: var(--blue); }

.qdp-optcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.qdp-optcard { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; background: #fff; }
.qdp-optcard input { margin-top: 4px; accent-color: var(--navy-900); }
.qdp-optcard strong { display: block; }
.qdp-optcard small { display: block; color: var(--muted); font-size: .84rem; }
.qdp-optcard:has(input:checked) { border-color: var(--navy-900); background: var(--blue-50); }

/* Segmented control (buttons/links with aria state, or labels wrapping radios) */
.qdp-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; background: var(--line-2); border-radius: 11px; padding: 3px; max-width: 100%; }
.qdp-seg > a, .qdp-seg > button, .qdp-seg > label > span { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 13px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: .88rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.qdp-seg > label { position: relative; display: inline-flex; }
.qdp-seg > label input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qdp-seg > a:hover, .qdp-seg > button:hover { color: var(--navy-900); }
.qdp-seg > [aria-pressed="true"], .qdp-seg > [aria-selected="true"], .qdp-seg > .is-on, .qdp-seg > label input:checked + span { background: #fff; color: var(--navy-900); box-shadow: 0 1px 3px rgba(7,11,58,.12); }
.qdp-seg > label input:focus-visible + span { outline: 3px solid var(--blue); }
.qdp-seg--sm > a, .qdp-seg--sm > button, .qdp-seg--sm > label > span { min-height: 30px; padding: 4px 11px; font-size: .84rem; }
.qdp-seg--wide { display: flex; }
.qdp-seg--wide > label { flex: 1; }
.qdp-seg--wide > label > span { width: 100%; }
.qdp-seg--xs { padding: 2px; }
.qdp-seg--xs > label > span, .qdp-seg--xs > button { min-height: 26px; padding: 2px 9px; font-size: .78rem; }
.qdp-seg--xs > label input:checked + span[data-v="allow"], .qdp-seg--xs > label:has(input[value="allow"]:checked) > span { background: var(--ok-50); color: var(--ok); }
.qdp-seg--xs > label:has(input[value="deny"]:checked) > span { background: var(--coral-50); color: var(--coral); }

/* Filters bar */
.qdp-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.qdp-filters input, .qdp-filters select { width: auto; min-width: 140px; flex: 0 1 auto; min-height: 36px; padding-block: 6px; }
.qdp-filters input[type="search"] { flex: 1 1 220px; }

/* ============ Chips, badges, tags ============ */
.qdp-chipS { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: .78rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.qdp-chipS--neutral { background: var(--line-2); color: var(--ink-2); }
.qdp-chipS--ok { background: var(--ok-50); color: var(--ok); }
.qdp-chipS--pending { background: var(--warn-50); color: var(--warn); }
.qdp-chipS--urgent { background: var(--coral-50); color: var(--coral); }
.qdp-chipS--info { background: var(--blue-50); color: var(--link); }
.qdp-tag { display: inline-flex; align-items: center; gap: 2px; padding: 1px 9px; border-radius: 10px; background: var(--line-2); font-size: .78rem; margin: 2px; }
.qdp-tag--btn { padding: 0; overflow: hidden; }
.qdp-tag--btn button { border: 0; background: transparent; padding: 3px 9px; cursor: pointer; font-size: .82rem; }
.qdp-tag--btn button:hover { background: var(--blue-50); }
.qdp-tpls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.qdp-exp { font-size: .78rem; font-weight: 600; }
.qdp-exp--ok { color: var(--muted); }
.qdp-exp--soon { color: var(--warn); }
.qdp-exp--expired { color: var(--coral); }

/* ============ Alerts, banners, notes ============ */
.qdp-alerts { display: grid; gap: 8px; margin-bottom: 16px; }
.qdp-alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-50); color: #6E4700; text-decoration: none; font-weight: 600; border: 1px solid #F1DDB1; }
.qdp-alert:hover { background: #F9EBCB; }
.qdp-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blue-50); color: #1B3F6B; margin-bottom: 14px; }
.qdp-banner--warn { background: var(--warn-50); color: #6E4700; border: 1px solid #F1DDB1; }
.qdp-banner > span { flex: 1; }
.qdp-note { background: var(--blue-50); color: #1B3F6B; border-radius: var(--radius-sm); padding: 10px 14px; font-size: .9rem; margin: 8px 0; }
.qdp-note--row { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.qdp-pubbar { display: none; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--warn-50); color: #6E4700; border: 1px solid #F1DDB1; font-weight: 600; }
.qdp-pubbar.is-on { display: flex; }
.qdp-pubbar > span { flex: 1; display: inline-flex; gap: 8px; align-items: center; }

/* ============ KPIs & charts ============ */
.qdp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.qdp-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.qdp-kpis--sm { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.qdp-kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.qdp-kpi span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.qdp-kpi b { font-family: var(--font-head); font-size: 1.6rem; color: var(--navy-900); line-height: 1.25; }
.qdp-kpi b.is-warn { color: var(--coral); }
.qdp-kpi small { color: var(--muted); font-size: .78rem; }
.qdp-kpis--sm .qdp-kpi { padding: 10px 12px; box-shadow: none; background: var(--bg); }
.qdp-kpis--sm .qdp-kpi b { font-size: 1.25rem; }
.qdp-kpi--ok { background: var(--ok-50) !important; border-color: transparent; }
.qdp-kpi--ok b { color: var(--ok); }
.qdp-kpi--bad { background: var(--coral-50) !important; border-color: transparent; }
.qdp-kpi--bad b { color: var(--coral); }
.qdp-kpi--warn { background: var(--warn-50) !important; border-color: transparent; }
.qdp-kpi--warn b { color: var(--warn); }
@media (max-width: 960px) { .qdp-kpis, .qdp-kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.qdp-cols { display: flex; align-items: flex-end; gap: 4px; height: 210px; padding: 24px 2px 0; border-bottom: 1px solid var(--line); }
.qdp-cols__c { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.qdp-cols__b { width: 70%; max-width: 46px; background: linear-gradient(180deg, var(--blue) 0%, var(--navy-700) 100%); border-radius: 6px 6px 0 0; min-height: 2px; }
.qdp-cols__v { font-size: .68rem; color: var(--ink-2); font-weight: 600; margin-bottom: 3px; white-space: nowrap; }
.qdp-cols__l { position: absolute; bottom: -22px; font-size: .68rem; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: clip; }
.qdp-cols { margin-bottom: 26px; }

.qdp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--ink-2); margin: 6px 0 12px; }
.qdp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.qdp-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.qdp-legend--lv { gap: 6px; }
.qdp-stack { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.qdp-stack__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line-2); min-width: 6px; }
.qdp-stack__bar span { display: block; height: 100%; }
.qdp-stack b { font-size: .88rem; }
.qdp-hbars { display: grid; gap: 10px; }
.qdp-hbar { display: grid; grid-template-columns: minmax(80px, 130px) 1fr 36px; align-items: center; gap: 10px; font-size: .88rem; }
.qdp-hbar__track { height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.qdp-hbar__track i { display: block; height: 100%; border-radius: 6px; }
.qdp-hbar b { text-align: end; }
.qdp-scols { display: flex; align-items: flex-end; gap: 4px; height: 180px; border-bottom: 1px solid var(--line); padding-top: 10px; margin-bottom: 26px; }
.qdp-scols__c { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.qdp-scols__stack { width: 70%; max-width: 34px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 0 0; overflow: hidden; min-height: 0; }
.qdp-scols__stack > * { display: block; width: 100%; }
.qdp-scols__c > small, .qdp-scols__c > span:last-child:not(.qdp-scols__stack) { position: absolute; bottom: -20px; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.qdp-avail { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.qdp-avail > span { width: 60px; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; display: inline-block; }
.qdp-avail i { display: block; height: 100%; background: var(--ok); }
.qdp-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.qdp-meter i { height: 5px; border-radius: 3px; background: var(--line); }
.qdp-meter[data-s="1"] i:nth-child(-n+1) { background: var(--coral); }
.qdp-meter[data-s="2"] i:nth-child(-n+2) { background: #D99A1E; }
.qdp-meter[data-s="3"] i:nth-child(-n+3) { background: var(--blue); }
.qdp-meter[data-s="4"] i { background: var(--ok); }
.qdp-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: .84rem; color: var(--muted); }
.qdp-rules li::before { content: '○ '; }
.qdp-rules li.is-ok { color: var(--ok); }
.qdp-rules li.is-ok::before { content: '✓ '; }

.qdp-flow { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); font-size: .84rem; }
.qdp-flow > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.qdp-flow span { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px; }
.qdp-flow span.is-last { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.qdp-flow i { color: var(--muted); font-style: normal; }

/* ============ Tables ============ */
.qdp-table-wrap { overflow-x: auto; margin: 0 -2px; }
.qdp-table-wrap--short { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qdp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.qdp-table th { text-align: start; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; }
.lang-ar .qdp-table th { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.qdp-table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.qdp-table tr[data-href] { cursor: pointer; }
.qdp-table tbody tr:hover { background: #F8FAFD; }
.qdp-table td a { text-decoration: none; font-weight: 600; }
.qdp-table td.is-bad { color: var(--coral); font-weight: 600; background: var(--coral-50); }
.qdp-row--error td:first-child { box-shadow: inset 3px 0 0 var(--coral); }
.qdp-row--dupe td:first-child { box-shadow: inset 3px 0 0 #D99A1E; }
.qdp-row--ready td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.qdp-who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.qdp-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }

.qdp-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; margin: 0 0 12px; }
.qdp-dl > div { min-width: 0; }
.qdp-dl dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.qdp-dl dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }

/* ============ Lists ============ */
.qdp-list { display: flex; flex-direction: column; }
.qdp-list__item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.qdp-list__item:last-child { border-bottom: 0; }
.qdp-list__item:hover, .qdp-list__item.is-on { background: #F6F9FC; }
.qdp-list__item.is-click { cursor: pointer; }
.qdp-list__item > span:not(.qdp-datebox):not(.qdp-list__chips), .qdp-list__main { flex: 1; min-width: 0; }
.qdp-list__item strong { display: block; }
.qdp-list__item small { display: block; color: var(--muted); font-size: .82rem; }
.qdp-list__chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; }
.qdp-datebox { flex: none; width: 48px; text-align: center; border-radius: 10px; background: var(--blue-50); color: var(--navy-900); padding: 4px 0; line-height: 1.15; }
.qdp-datebox b { display: block; font-size: 1.2rem; font-family: var(--font-head); }
.qdp-datebox small { display: block; font-size: .7rem; color: var(--link) !important; }
.qdp-people { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.qdp-people li { display: flex; align-items: center; gap: 10px; }
.qdp-people li a { font-weight: 600; text-decoration: none; }
.qdp-newslist { display: flex; flex-direction: column; }
.qdp-newsrow { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.qdp-newsrow:hover { background: #F6F9FC; }
.qdp-newsrow > img, .qdp-newsrow__ph { width: 84px; height: 58px; border-radius: 9px; object-fit: cover; flex: none; background: var(--line-2); display: grid; place-items: center; color: var(--muted); }
.qdp-newsrow__main { flex: 1; min-width: 0; }
.qdp-newsrow__main strong { display: block; }
.qdp-newsrow__main small { color: var(--muted); font-size: .82rem; }
.qdp-newsrow__chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .qdp-newsrow { flex-wrap: wrap; } .qdp-newsrow__chips { width: 100%; justify-content: flex-start; } }
.qdp-logrow { display: grid; grid-template-columns: 90px 160px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: .9rem; }
.qdp-logrow:hover { background: #F6F9FC; }
.qdp-logrow > span:first-child { color: var(--muted); }
.qdp-logrow__t { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.qdp-logrow__t i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
@media (max-width: 700px) { .qdp-logrow { grid-template-columns: 80px minmax(0, 1fr); } }
.qdp-log { max-height: 520px; overflow: auto; }

.qdp-sidenav { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.qdp-sidenav__h { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 10px 8px; }
.qdp-sidenav a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.qdp-sidenav a:hover { background: var(--bg); }
.qdp-sidenav a.is-on { background: var(--blue-50); color: var(--navy-900); font-weight: 700; }
.qdp-sidenav a span { color: var(--muted); font-size: .82rem; }
.qdp-sidenav .qdp-btn--dashed { margin-top: 8px; }

.qdp-userpick { padding: 12px; }
.qdp-userpick input { margin-bottom: 8px; }
.qdp-userpick__list { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow: auto; }
.qdp-userpick__list a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.qdp-userpick__list a:hover { background: var(--bg); }
.qdp-userpick__list a.is-on { background: var(--blue-50); font-weight: 700; }

/* Sortable lists (sections, lookups, partners) */
.qdp-sortable { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qdp-sortable li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; flex-wrap: wrap; }
.qdp-sortable li.is-drag { opacity: .45; }
.qdp-sortable li.is-over { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(77,140,191,.25); }
.qdp-sortable li.is-archived, .qdp-sortable li.is-hidden { background: var(--bg); }
.qdp-sortable li.is-archived input { color: var(--muted); }
.qdp-sortable li strong { display: block; }
.qdp-drag { cursor: grab; color: var(--muted); display: inline-flex; }
.qdp-lookups li > input[name^="name_"] { flex: 1 1 160px; min-height: 36px; padding-block: 6px; }
.qdp-lookups li > input.qdp-coord { flex: 0 0 100px; min-height: 36px; padding-block: 6px; }
.qdp-usage { white-space: nowrap; }
.qdp-lookups__new { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding: 10px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); }
.qdp-lookups__new > span { width: 16px; }
.qdp-lookups__new input[name^="name_"] { flex: 1 1 160px; }
.qdp-partners__logo { width: 64px; height: 44px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; flex: none; }
.qdp-partners__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qdp-partners__logo small { color: var(--muted); font-size: .7rem; text-align: center; }
.qdp-orglogo { max-width: 140px; max-height: 80px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin-bottom: 10px; background: #fff; }

/* Timeline */
.qdp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.qdp-timeline li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.qdp-timeline li:not(:last-child)::before { content: ''; position: absolute; inset-inline-start: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.qdp-timeline__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); flex: none; margin-top: 5px; box-shadow: 0 0 0 3px var(--blue-50); }
.qdp-timeline li.is-private .qdp-timeline__dot { background: #A9B3C7; box-shadow: 0 0 0 3px var(--line-2); }
.qdp-timeline li.is-requester .qdp-timeline__dot { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-50); }
.qdp-timeline li > div { flex: 1; min-width: 0; }
.qdp-timeline__h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.qdp-timeline__h small { color: var(--muted); font-size: .8rem; }
.qdp-timeline p { margin: 4px 0 0; padding: 8px 12px; background: var(--bg); border-radius: 8px; font-size: .9rem; white-space: pre-line; }
.qdp-timeline li.is-private p { background: #FFF8E8; }
.qdp-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.qdp-files a { display: block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--line-2); }
.qdp-files img { width: 100%; height: 100%; object-fit: cover; }
.qdp-filecard { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-size: .86rem; word-break: break-all; }
.qdp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.qdp-gallery > a, .qdp-gallery > img, .qdp-gallery > video, .qdp-gallery > .qdp-filecard { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; object-fit: cover; background: var(--line-2); }
.qdp-gallery a img, .qdp-gallery a video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qdp-gallery > .qdp-filecard { aspect-ratio: auto; }

/* Review steps (news) */
.qdp-review { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; counter-reset: rv; }
.qdp-review li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; background: var(--bg); counter-increment: rv; }
.qdp-review li span::before { content: counter(rv) '. '; color: var(--muted); }
.qdp-review li b { font-weight: 600; color: var(--muted); font-size: .86rem; }
.qdp-review li.is-done { background: var(--ok-50); }
.qdp-review li.is-done b { color: var(--ok); }
.qdp-sends { display: grid; gap: 4px; font-size: .84rem; color: var(--muted); margin-top: 8px; }
.qdp-sends > div { display: flex; align-items: center; gap: 6px; }
.qdp-details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0; }
.qdp-details summary { cursor: pointer; font-weight: 600; color: var(--link); }

/* Steps (import) & howto */
.qdp-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; counter-reset: st; flex-wrap: wrap; }
.qdp-steps li { counter-increment: st; flex: 1; min-width: 110px; padding: 8px 10px; border-radius: 9px; background: var(--line-2); color: var(--muted); font-weight: 600; font-size: .86rem; }
.qdp-steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; margin-inline-end: 8px; font-size: .78rem; }
.qdp-steps li.is-on { background: var(--navy-900); color: #fff; }
.qdp-steps li.is-on::before { color: var(--navy-900); }
.qdp-steps li.is-done { background: var(--ok-50); color: var(--ok); }
.qdp-howto { margin: 0 0 18px; padding-inline-start: 22px; display: grid; gap: 10px; }
.qdp-howto small { display: block; }
.qdp-mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.qdp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px 16px; border: 2px dashed #C9D2E0; border-radius: var(--radius); text-align: center; color: var(--ink-2); cursor: pointer; background: #FAFCFE; }
.qdp-drop:hover, .qdp-drop.is-over { border-color: var(--blue); background: var(--blue-50); }
.qdp-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qdp-drop small { color: var(--muted); }
.qdp-drop--row { flex-direction: row; justify-content: flex-start; padding: 14px 16px; text-align: start; gap: 12px; }
.qdp-drop--row span { display: flex; flex-direction: column; }
.qdp-licup { display: grid; gap: 8px; }
.qdp-licfiles { display: flex; flex-wrap: wrap; gap: 6px; }
.qdp-licfiles > * { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; background: var(--line-2); font-size: .82rem; }

/* ============ Location input ============ */
.qdp-loc { display: grid; gap: 12px; }
.qdp-loc .qdp-seg { display: flex; }
.qdp-loc .qdp-seg > button { flex: 1 0 auto; }
.qdp-loc__panel { min-width: 0; }
.qdp-loc__map, .qdp-map-md { height: 300px; border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.qdp-loc__map { cursor: crosshair; }
.qdp-map-lg { height: 560px; z-index: 0; }
.qdp-minimap { height: 220px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); z-index: 0; }
.qdp-loc__ok { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-50); color: var(--ok); font-size: .9rem; }
.qdp-loc__ok.is-err { background: var(--coral-50); color: var(--coral); }
.qdp-loc__ok b { color: var(--ink); }
.qdp-loc__ok span { color: var(--ink-2); }
.qdp-loc__save { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.qdp-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.leaflet-container { font-family: var(--font); }
.leaflet-container a { color: var(--link); }

/* Participants */
.qdp-parts { display: grid; gap: 8px; }
.qdp-parts__list { display: grid; gap: 6px; }
.qdp-part { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap; }
.qdp-part__who { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 160px; min-width: 0; }
.qdp-part__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qdp-part select { width: auto; min-height: 34px; padding-block: 4px; flex: 0 1 150px; }
.qdp-part input[type="number"] { width: 84px; min-height: 34px; padding-block: 4px; }
.qdp-parts__add { display: flex; gap: 8px; align-items: center; }
.qdp-parts__add input { flex: 1; }

/* Avatars */
.qdp-avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; background: var(--line-2); }
.qdp-avatar--txt { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--blue) 0%, var(--navy-700) 100%); color: #fff; font-weight: 700; font-family: var(--font-head); }
.qdp-photo-edit { display: flex; align-items: center; gap: 14px; }

/* Profile */
.qdp-profile { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qdp-profile__photo { position: relative; flex: none; }
.qdp-profile__cam { position: absolute; bottom: 0; inset-inline-end: 0; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--navy-900); color: #fff; display: grid; place-items: center; cursor: pointer; }
.qdp-profile__info { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.qdp-licard { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--bg); flex: 1 1 320px; flex-wrap: wrap; }
.qdp-licard__img { width: 120px; height: 76px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.qdp-licard__img img { width: 100%; height: 100%; object-fit: cover; }
.qdp-licard__img small { color: var(--muted); font-size: .76rem; }
.qdp-licard__a { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.qdp-licard__a input[type="file"] { display: none; }

/* ============ Media ============ */
.qdp-media { display: grid; gap: 10px; }
.qdp-media__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.qdp-media__grid:empty { display: none; }
.qdp-media__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qdp-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line-2); cursor: grab; }
.qdp-thumb img, .qdp-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qdp-thumb__tag { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--navy-900); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 9px; }
.qdp-thumb__x, .qdp-thumb__first { position: absolute; top: 5px; inset-inline-end: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(7,11,58,.75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.qdp-thumb__first { top: auto; bottom: 5px; }
.qdp-thumb.is-over { outline: 3px solid var(--blue); }
.qdp-imgfield { display: grid; gap: 8px; }
.qdp-imgfield__prev { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--line-2); border: 1px solid var(--line); cursor: crosshair; }
.qdp-imgfield__prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qdp-imgfield--sm .qdp-imgfield__prev { aspect-ratio: 1; width: 110px; cursor: default; }
.qdp-imgfield__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); }
.qdp-imgfield__a { display: flex; gap: 8px; flex-wrap: wrap; }
.qdp-focal { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--coral), 0 2px 8px rgba(0,0,0,.4); pointer-events: none; }
.qdp-imgfield--sm { grid-template-columns: auto 1fr; align-items: center; }
.qdp-medialib { display: grid; gap: 12px; }
.qdp-medialib__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qdp-medialib__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
.qdp-medialib.is-over { outline: 3px dashed var(--blue); outline-offset: 4px; }
.qdp-libitem { position: relative; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--line-2); cursor: pointer; }
.qdp-libitem img, .qdp-libitem video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qdp-libitem__check { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: transparent; display: grid; place-items: center; border: 2px solid var(--line); }
.qdp-libitem.is-on { border-color: var(--navy-900); }
.qdp-libitem.is-on .qdp-libitem__check { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.qdp-iggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.qdp-igpost { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--line-2); }
.qdp-igpost img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qdp-igpost span { display: none; position: absolute; inset: 0; background: rgba(7,11,58,.65); color: #fff; font-weight: 700; place-items: center; }
.qdp-igpost.is-hidden img { filter: grayscale(1); opacity: .5; }
.qdp-igpost.is-hidden span { display: grid; }

/* Rich text editor */
.qdp-rte { border: 1px solid #C9D2E0; border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qdp-rte:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77,140,191,.22); }
.qdp-rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: var(--bg); }
.qdp-rte__bar button { min-width: 32px; height: 30px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-weight: 700; color: var(--ink-2); display: inline-grid; place-items: center; padding: 0 6px; }
.qdp-rte__bar button:hover { background: #fff; color: var(--navy-900); }
.qdp-rte__area { min-height: 260px; padding: 14px 16px; outline: none; line-height: 1.85; overflow-wrap: anywhere; }
.qdp-rte__area h2 { font-size: 1.2rem; margin: .8em 0 .3em; }
.qdp-rte__area h3 { font-size: 1.05rem; margin: .8em 0 .3em; }
.qdp-rte__area blockquote { margin: .8em 0; padding: 4px 14px; border-inline-start: 4px solid var(--blue); color: var(--ink-2); background: var(--bg); }
.qdp-rte__area img { max-width: 100%; height: auto; border-radius: 8px; }
.qdp-rte__area iframe { max-width: 100%; aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; border-radius: 8px; }
.qdp-rte__area:empty::before { content: attr(data-ph); color: var(--muted); }

/* ============ CMS ============ */
.qdp-missions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.qdp-missions > .qdp-card { margin-bottom: 0; display: grid; gap: 12px; }
.qdp-preview .qdp-paper { max-height: 70vh; overflow: auto; }
.qdp-paper { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; font-size: .88rem; box-shadow: inset 0 0 0 6px var(--bg); }
.qdp-paper__top { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--navy-900); padding-bottom: 12px; margin-bottom: 14px; }
.qdp-paper__top img { width: 64px; height: auto; }
.qdp-paper h3 { margin: 4px 0 8px; }
.qdp-footprev { border-radius: var(--radius-sm); overflow: hidden; }
.qdp-footprev__in { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 16px; background: var(--navy-950); color: #C9D5EA; padding: 20px; font-size: .86rem; line-height: 1.7; }
.qdp-footprev__in b { color: #fff; }
.qdp-footprev__logo { background: #fff; border-radius: 10px; padding: 4px; display: inline-flex; align-self: start; }
@media (max-width: 760px) { .qdp-footprev__in { grid-template-columns: 1fr; } }
.qdp-socrow { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; }
@media (max-width: 600px) { .qdp-socrow { grid-template-columns: 1fr; } }

/* Templates */
.qdp-tpllist { display: grid; gap: 6px; }
.qdp-tplrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap; }
.qdp-tplrow > span:first-child { flex: 1; min-width: 200px; }
.qdp-tplrow b { display: block; }
.qdp-tpledit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .qdp-tpledit { grid-template-columns: 1fr; } }
.qdp-mailframe { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }

/* Matrix */
.qdp-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .86rem; }
.qdp-matrix th, .qdp-matrix td { padding: 6px; border-bottom: 1px solid var(--line-2); text-align: center; }
.qdp-matrix th:first-child, .qdp-matrix td:first-child { text-align: start; position: sticky; inset-inline-start: 0; background: #fff; min-width: 190px; z-index: 1; }
.qdp-matrix thead th { font-size: .76rem; color: var(--muted); vertical-align: bottom; min-width: 82px; }
.qdp-matrix td:first-child small { display: block; color: var(--muted); font-size: .76rem; }
.qdp-lv { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 4px 8px; border-radius: 8px; border: 0; font-size: .78rem; font-weight: 700; cursor: pointer; }
.qdp-lv:disabled { cursor: default; }
.qdp-lv--none { background: var(--line-2); color: #8A93AB; }
.qdp-lv--view { background: var(--blue-50); color: var(--link); }
.qdp-lv--limited { background: var(--warn-50); color: var(--warn); }
.qdp-lv--full { background: var(--ok-50); color: var(--ok); }
span.qdp-lv { cursor: default; }
.qdp-table--eff td:first-child { min-width: 200px; }

/* ============ Modal & toasts ============ */
.qdp-modal { border: 0; padding: 0; border-radius: 16px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(7,11,58,.35); color: var(--ink); display: flex; flex-direction: column; }
.qdp-modal:not([open]) { display: none; }
.qdp-modal--wide { width: min(980px, calc(100vw - 24px)); }
.qdp-modal::backdrop { background: rgba(7,11,58,.5); }
.qdp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.qdp-modal__head h2 { margin: 0; font-size: 1.08rem; }
.qdp-modal__body { padding: 18px 20px; overflow: auto; flex: 1; }
.qdp-modal__body > p:last-child { margin-bottom: 0; }
.qdp-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.qdp-toasts { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
[dir="rtl"] .qdp-toasts { transform: translateX(50%); }
.qdp-toast { padding: 12px 16px; border-radius: 12px; background: var(--navy-900); color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(7,11,58,.3); animation: qdp-in .2s ease; transition: opacity .4s, transform .4s; pointer-events: auto; }
.qdp-toast--ok { background: var(--navy-900); }
.qdp-toast--err { background: var(--coral); }
.qdp-toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes qdp-in { from { opacity: 0; transform: translateY(8px); } }

/* ============ Auth ============ */
.qdp-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.qdp-auth__form { display: flex; flex-direction: column; padding: 24px clamp(20px, 6vw, 72px); background: #fff; }
.qdp-auth__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: auto; }
.qdp-auth__top a { color: var(--link); text-decoration: none; font-weight: 600; font-size: .9rem; }
.qdp-auth__card { width: 100%; max-width: 420px; margin: 40px auto; }
.qdp-auth__card h1 { font-size: 1.6rem; }
.qdp-auth__card .qdp-form { margin-top: 18px; }
.qdp-auth__card .qdp-btn--block { margin-top: 4px; }
.qdp-auth__brand { background: radial-gradient(circle at 30% 20%, var(--navy-700) 0%, var(--navy-900) 45%, var(--navy-950) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px; text-align: center; position: relative; overflow: hidden; }
.qdp-auth__brand::after { content: ''; position: absolute; inset: auto -10% -30% -10%; height: 60%; background: radial-gradient(ellipse at center, rgba(77,140,191,.35) 0%, transparent 70%); }
.qdp-auth__logo { background: #fff; border-radius: 28px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); position: relative; z-index: 1; }
.qdp-auth__logo img { display: block; width: 180px; height: auto; }
.qdp-auth__brand strong { font-family: var(--font-head); font-size: 1.5rem; position: relative; z-index: 1; }
@media (max-width: 860px) { .qdp-auth { grid-template-columns: 1fr; } .qdp-auth__brand { display: none; } }
.qdp-done { text-align: center; }
.qdp-done__ic { width: 70px; height: 70px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--blue-50); color: var(--link); margin-bottom: 14px; }
.qdp-done__ic--ok { background: var(--ok-50); color: var(--ok); }
.qdp-done__ic--warn { background: var(--coral-50); color: var(--coral); }
.qdp-done .qdp-btn { margin-top: 10px; }
.qdp-qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); width: fit-content; margin: 10px auto; }
.qdp-qr img, .qdp-qr svg, .qdp-qr canvas { display: block; width: 180px; height: 180px; image-rendering: pixelated; }
.qdp-2fa-setup { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 10px 0; }
.qdp-2fa-setup > div:last-child { flex: 1; min-width: 220px; }

/* Print-friendly: hide chrome */
@media print {
	.qdp-side, .qdp-top, .qdp-head__a, .qdp-sticky-actions, .qdp-toasts { display: none !important; }
	.qdp-main { padding: 0; }
	.qdp-card { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Month labels: keep them legible when 12 columns share a narrow card */
.qdp-scols__c > small { max-width: none; }
@media (max-width: 1100px) {
	.qdp-cols__c:nth-child(even) .qdp-cols__l, .qdp-scols__c:nth-child(even) > small { visibility: hidden; }
}
@media (max-width: 420px) {
	.qdp-cols__c:not(:nth-child(3n+1)) .qdp-cols__l, .qdp-scols__c:not(:nth-child(3n+1)) > small { visibility: hidden; }
	.qdp-cols__c:nth-child(3n+1) .qdp-cols__l, .qdp-scols__c:nth-child(3n+1) > small { visibility: visible; }
	.qdp-cols__v { display: none; }
}
.qdp-teamframe { width: 100%; height: 75vh; min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.qdp-part input[data-k="minutes"] { width: 96px !important; flex: 0 0 96px; min-height: 34px !important; padding-block: 4px !important; }
.qdp-part select { min-height: 34px !important; padding-block: 4px !important; }
.qdp-table td select { width: auto !important; min-width: 120px; min-height: 34px !important; padding-block: 4px !important; }

/* 1.1.4 — version label, temporary password */
.qdp-ver { display: block; text-align: center; color: #8FA3C4; font-size: .74rem; letter-spacing: .02em; }
.qdp-temppw { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin: 12px 0 6px; border: 1px dashed var(--line-2, #C9D6E4); border-radius: 12px; background: #F6F9FC; }
.qdp-temppw code { font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.qdp-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button.qdp-link { background: none; border: 0; cursor: pointer; font: inherit; }
