@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    color-scheme: light;
    supported-color-schemes: light;
    --primary-50: #f1f8f7;
    --primary-100: #ddeceb;
    --primary-500: #569e9a;
    --primary-600: #3d7a76;
    --primary-700: #32625f;
    --primary-800: #274f4c;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --error-600: #dc2626;
    --success-700: #15803d;
    --surface-0: #ffffff;
    --surface-1: #f8fbfc;
    --surface-2: #eef4f7;
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.09);
    --radius-md: 14px;
    --radius-lg: 20px;
    --z-sidebar: 1000;
    --z-overlay: 1400;

    /* مقياس الخط المكثّف: عنوان صفحة / قسم / واجهة / جدول / ثانوي / شارة */
    --fs-title: 20px;
    --fs-section: 15px;
    --fs-body: 15px;
    --fs-ui: 14px;
    --fs-table: 13px;
    --fs-small: 12px;
    --fs-badge: 11px;
    --fs-label: var(--fs-ui);
    --fs-button: var(--fs-ui);
    --fs-title-xl: var(--fs-title);
    --fs-title-lg: var(--fs-title);
    --fs-title-md: var(--fs-section);
    --fs-title-sm: var(--fs-section);
    --fs-title-xs: var(--fs-section);
    --line-body: 1.7;
    --line-title: 1.35;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--site-font-family, "Cairo"), Tahoma, sans-serif;
    background: #eef3f7;
    color: var(--slate-900);
    font-size: var(--fs-body);
    line-height: var(--line-body);
    min-height: 100vh;
    min-height: 100dvh;
    color-scheme: light;
}

img, video {
    max-width: 100%;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    color-scheme: light;
}

summary {
    list-style: none;
}
summary::-webkit-details-marker {
    display: none;
}

/* توحيد عام لأحجام الخطوط */
h1, .overview-title { font-size: var(--fs-title); line-height: var(--line-title); }
h2 { font-size: var(--fs-title); line-height: var(--line-title); }
h3, h4, h5, h6 { font-size: var(--fs-section); line-height: var(--line-title); }
label, .field > label { font-size: var(--fs-label); }
small, .muted, .hint { font-size: var(--fs-small); }
.btn, a.btn, button.btn, input[type="submit"].btn, input[type="button"].btn, .btn-sm {
    font-size: var(--fs-button);
}

a {
    color: var(--primary-600);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
}

.auth-wrap {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card,
.panel-card {
    width: 100%;
    max-width: 470px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.panel-card {
    max-width: 100%;
}

.brand-chip {
    display: inline-block;
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: var(--fs-small);
    font-weight: 700;
    margin-bottom: 14px;
}

h1, h2, h3 {
    margin: 0;
}

.muted {
    color: var(--slate-500);
    margin: 10px 0 18px;
}

.field {
    margin-bottom: 10px;
}

/* علامة الإلزام بجانب عنوان الحقل. */
.req {
    color: #dc2626;
    font-weight: 700;
    margin-inline-start: 2px;
}

/* رسالة الخطأ تظهر تحت الخانة. */
.field-error {
    display: block;
    margin-top: 6px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: var(--fs-ui);
    font-weight: 600;
    line-height: 1.5;
}

/* إبراز الخانة التي تحتوي خطأ. */
.field.has-error > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field.has-error > textarea,
.field.has-error > select,
.field.has-error .combo-wrap > input {
    border-color: #ef4444;
    background: #fff5f5;
}

.field.has-error > input:focus,
.field.has-error > textarea:focus,
.field.has-error > select:focus,
.field.has-error .combo-wrap > input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.combo-wrap {
    position: relative;
}

.combo-wrap input {
    width: 100%;
}

.combo-list {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--slate-300, #cbd5e1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 30;
}

.combo-item {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #0f172a;
    line-height: 1.5;
}

.combo-item + .combo-item {
    margin-top: 2px;
}

.combo-item:hover,
.combo-item.is-active {
    background: #eef6f5;
    color: #0f172a;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-700);
    font-weight: 600;
    font-size: var(--fs-label);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="date"]):not([type="time"]):not([type="datetime-local"]):not([type="month"]),
textarea,
select {
    width: 100%;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    background: #fff;
    color: var(--slate-900);
    color-scheme: light;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
    width: auto;
    height: auto;
    min-width: 18px;
    min-height: 18px;
    max-width: none;
    padding: 0;
    margin: 0;
    border: initial;
    border-radius: initial;
    background: initial;
    box-shadow: none;
    flex-shrink: 0;
    accent-color: var(--primary-600);
    color-scheme: light;
}

input[type="hidden"] {
    display: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
}

select:not([multiple]) {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5L6 6l4.5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 34px;
}
html[dir="rtl"] select:not([multiple]),
[dir="rtl"] select:not([multiple]) {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 34px;
}

.native-date-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    direction: ltr;
    unicode-bidi: isolate;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    padding: 0 12px;
    padding-inline-end: 38px;
    line-height: 46px;
    font-size: var(--fs-ui);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    writing-mode: horizontal-tb;
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    font-family: inherit;
    background: #fff;
    color: var(--slate-900);
    color-scheme: light;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
    display: inline-flex;
    flex-flow: row nowrap;
    flex-direction: row;
    direction: ltr;
    unicode-bidi: isolate;
    align-items: center;
    height: 46px;
    max-height: 46px;
    min-width: 12ch;
    padding: 0;
    line-height: 46px;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
input[type="month"]::-webkit-datetime-edit-fields-wrapper {
    display: inline-flex;
    flex-flow: row nowrap;
    flex-direction: row;
    direction: ltr;
    unicode-bidi: isolate;
    align-items: center;
    padding: 0;
    white-space: nowrap;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    display: block;
    min-width: 12ch;
    padding: 0;
    line-height: 46px;
    text-align: left;
    white-space: nowrap;
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="month"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field,
input[type="time"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field {
    padding: 0 2px;
    white-space: nowrap;
}
input[type="date"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-inner-spin-button,
input[type="datetime-local"]::-webkit-inner-spin-button,
input[type="month"]::-webkit-inner-spin-button {
    display: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 1;
    flex-shrink: 0;
}

button {
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.16);
}

.btn {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: var(--fs-button);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.btn-sm {
    min-height: 38px;
    padding: 8px 14px;
    font-size: var(--fs-button);
    border-radius: 12px;
}

.btn-with-icon svg,
.btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-primary {
    width: auto;
    color: #fff;
    background: var(--primary-600);
    box-shadow: 0 6px 14px rgba(61, 122, 118, 0.16);
}

.btn-primary:hover {
    background: var(--primary-700);
}

.btn-secondary {
    background: #fff;
    color: #334155;
    border-color: var(--slate-200);
}

.btn-secondary:hover {
    background: #f8fafc;
}

.btn-success {
    color: #fff;
    background: #16a34a;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.15);
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    color: #fff;
    background: #dc2626;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.15);
}

.btn-danger:hover {
    background: #b91c1c;
}

.alert {
    margin: 16px 0;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
    font-size: var(--fs-ui);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.alert[hidden] {
    display: none !important;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-right: 4px solid #ef4444;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-right: 4px solid #22c55e;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.status-pill {
    display: inline-block;
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    border-radius: 10px;
    padding: 8px 10px;
    margin: 12px 0;
    font-weight: 600;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.grid-2 .field {
    margin-bottom: 0;
}

.actions-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: center;
}

.admin-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: transparent;
}

.admin-sidebar {
    width: 270px;
    flex: 0 0 270px;
    position: relative;
    /* نفس نسبة نقش الدليل: الأعلى أضعف (٥٪) والأسفل أقوى (١٠٪) */
    background: linear-gradient(to bottom, #4c9791 0%, #3e827d 40%, #2f6d69 100%);
    color: #fff;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-sidebar, 1000);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.admin-sidebar::before,
.admin-main::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background-image: url("/public/assets/hb-pattern.png?v=2");
    background-repeat: repeat;
    background-size: 520px 300px;
    opacity: 0.16;
    filter: brightness(0) invert(1);
}

.admin-sidebar::before {
    inset: 0;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 1) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 1) 100%);
}

.admin-sidebar > * {
    position: relative;
    z-index: 1;
}

/* على الشاشات العريضة القائمة بمحاذاة المحتوى وليست طبقة عائمة،
   حتى لا تغطي نوافذ الحوار ذات position:fixed. */
@media (min-width: 901px) {
    .admin-sidebar {
        z-index: 0;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-brand {
    margin-bottom: 18px;
    padding: 8px 8px 16px;
    text-align: center;
}

.admin-brand h2 {
    font-size: var(--fs-section);
    margin-bottom: 3px;
}

.admin-brand p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.brand-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
    border-radius: 18px;
    background: transparent;
    padding: 0;
}

.brand-title--image {
    margin: 0 0 6px;
    line-height: 0;
}
.brand-title-img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 52px;
    margin: 0 auto;
    object-fit: contain;
}
/* خلفية غامقة → أبيض · خلفية فاتحة → لون الموقع */
.brand-title-img--dark,
.admin-sidebar .brand-title-img {
    filter: brightness(0) invert(1);
}
.brand-title-img--light {
    /* تقريب لـ #32625f */
    filter: brightness(0) saturate(100%) invert(32%) sepia(24%) saturate(720%) hue-rotate(131deg) brightness(92%) contrast(90%);
}
.agenda-doc-title-img,
.agenda-cover-title-img {
    display: block;
    max-width: 34mm;
    max-height: 42px;
    width: 120px;
    height: auto;
    margin: 4px auto 0;
    object-fit: contain;
}
.agenda-doc-title-img {
    filter: brightness(0) saturate(100%) invert(32%) sepia(24%) saturate(720%) hue-rotate(131deg) brightness(92%) contrast(90%);
    width: auto;
    height: auto;
    max-height: 28px;
    max-width: 140px;
}
.agenda-cover-title-img {
    filter: none;
    width: 120px;
    max-width: 34mm;
    height: auto;
    max-height: 42px;
    margin: 0 auto;
}
.agenda-cover-top {
    flex-direction: column;
    gap: 6px;
}
.agenda-cover-top-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: flex-start;
    gap: 8px;
    width: auto;
    margin: 0 16mm;
}
.agenda-cover-top-bar--n1.agenda-cover-top-bar--only-center .agenda-cover-slot--center {
    grid-column: 1 / -1;
}
.agenda-cover-top-bar--n1.agenda-cover-top-bar--only-center .agenda-cover-slot--right,
.agenda-cover-top-bar--n1.agenda-cover-top-bar--only-center .agenda-cover-slot--left {
    display: none;
}
.agenda-cover-slot {
    text-align: center;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.agenda-cover-slot--right {
    justify-content: flex-start;
    padding-right: 8mm;
}
.agenda-cover-slot--left {
    justify-content: flex-end;
    padding-left: 8mm;
}
.agenda-cover-site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: max-content;
    max-width: 100%;
    text-align: center;
}
.agenda-cover-brand-gap {
    display: block;
    width: 100%;
    height: 10px;
    min-height: 10px;
    max-height: 10px;
    flex: 0 0 10px;
    margin: 0;
    padding: 0;
    line-height: 10px;
    font-size: 1px;
    overflow: hidden;
    visibility: hidden;
}
.agenda-cover-partner-logo {
    width: 120px;
    height: 120px;
    max-width: 34mm;
    max-height: 34mm;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background: transparent !important;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.agenda-cover-top-bar .agenda-cover-logo,
.agenda-cover-top-bar .agenda-cover-partner-logo {
    width: 32mm !important;
    height: 32mm !important;
    max-width: 32mm !important;
    max-height: 32mm !important;
    object-fit: contain !important;
    object-position: center center !important;
}
.agenda-cover--en .agenda-cover-top-bar .agenda-cover-logo,
.agenda-cover--en .agenda-cover-top-bar .agenda-cover-partner-logo {
    width: 26mm !important;
    height: 26mm !important;
    max-width: 26mm !important;
    max-height: 26mm !important;
}
.agenda-cover-top-bar .agenda-cover-site-brand,
.agenda-cover-top-bar .agenda-cover-partner {
    width: 32mm;
    max-width: 32mm;
}
.agenda-cover--en .agenda-cover-top-bar .agenda-cover-site-brand,
.agenda-cover--en .agenda-cover-top-bar .agenda-cover-partner {
    width: 26mm;
    max-width: 26mm;
}
.agenda-cover-partner-name-img {
    display: block;
    width: 120px;
    max-width: 34mm;
    height: auto;
    max-height: 42px;
    margin: 0 auto;
    object-fit: contain;
    filter: none;
    background: transparent !important;
}
.agenda-cover-partner-name {
    margin: 0 auto;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    max-width: 34mm;
    width: 100%;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.agenda-cover--light .agenda-cover-partner-name,
.agenda-cover--light .agenda-cover-site-title {
    color: #32625f;
    text-shadow: none;
}
.agenda-cover-partners {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.agenda-cover-partners-hint {
    margin: 6px 0 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}
.agenda-cover-site-title {
    margin: 0 auto;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    max-width: 34mm;
    width: 100%;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.agenda-cover-title-img {
    filter: none;
    width: 120px;
    max-width: 34mm;
    height: auto;
    max-height: 42px;
    margin: 0 auto;
}
.agenda-cover-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}
.agenda-cover-foot {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
}
.agenda-cover-foot-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    text-align: center;
    gap: 4px;
}
.agenda-cover-foot-role {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    max-width: 42mm;
    margin: 0;
}
.agenda-cover-foot-logo,
.agenda-cover-foot .agenda-cover-logo,
.agenda-cover-foot .agenda-cover-partner-logo {
    width: 72px;
    height: 72px;
    max-width: 22mm;
    max-height: 22mm;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background: transparent;
    border: 0;
}
.agenda-cover-foot .agenda-cover-title-img,
.agenda-cover-foot .agenda-cover-partner-name-img {
    width: 72px !important;
    max-width: 22mm !important;
    max-height: 28px !important;
    margin: 0 auto !important;
}
.agenda-cover-foot .agenda-cover-site-title,
.agenda-cover-foot .agenda-cover-partner-name {
    max-width: 22mm;
    width: 100%;
    font-size: 13px;
    margin: 0 auto;
    text-align: center;
}
.agenda-cover-foot .agenda-cover-brand-gap {
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    flex: 0 0 6px;
    line-height: 6px;
}
.settings-title-preview {
    display: block;
    max-width: min(100%, 320px);
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    padding-inline-end: 36px;
    border-radius: 14px;
    margin-bottom: 10px;
    color: #e7f5f4;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--fs-ui);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.34);
    text-decoration: none;
    transform: translateX(-2px);
}
html[dir="ltr"] .admin-nav a:hover {
    transform: translateX(2px);
}

.admin-nav a.active {
    background: rgba(10, 24, 24, 0.46);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 22px rgba(9, 27, 26, 0.24);
}

.admin-nav .nav-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-nav .nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #f2fbfa;
    flex: 0 0 auto;
}

.admin-nav .nav-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-nav .nav-badge {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #ff2d55;
    color: #fff;
    font-size: var(--fs-badge);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.admin-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 190px;
    background: linear-gradient(to right, #4c9791 0%, #3e827d 40%, #2f6d69 100%);
    z-index: 0;
    pointer-events: none;
}

.admin-main::after {
    top: 0;
    left: 0;
    right: 0;
    height: 190px;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 1) 100%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 1) 100%);
}

.admin-topbar {
    position: relative;
    z-index: 1;
    background: transparent;
    border-bottom: 0;
    padding: 20px 28px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #fff;
    min-width: 0;
    flex-wrap: nowrap;
}

.admin-topbar .top-datetime,
.top-datetime {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 7px 14px;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-inline-start: auto;
}
.top-datetime .dt-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}
.top-datetime .dt-ico svg {
    width: 13px;
    height: 13px;
    stroke: #f4fffe;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.top-datetime .dt-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.top-datetime .dt-date {
    font-weight: 700;
    font-size: 12px;
    opacity: .95;
}
.top-datetime .dt-time {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .3px;
    direction: ltr;
    unicode-bidi: isolate;
}
.top-datetime .dt-tz {
    opacity: .75;
    font-size: 11px;
    margin-inline-start: 4px;
}
@media (max-width: 760px) {
    .top-datetime {
        padding: 5px 8px;
        gap: 6px;
    }
    .top-datetime .dt-tz,
    .top-datetime .dt-date {
        display: none;
    }
    .top-datetime .dt-time {
        font-size: 12px;
    }
}

.admin-topbar > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.overview-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-title .top-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f4fffe;
}

.overview-title .top-icon svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-content {
    position: relative;
    z-index: 1;
    padding: 12px 28px 30px;
    min-width: 0;
    max-width: 100%;
}

.content-wrap {
    max-width: 1040px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    position: relative;
    min-height: 86px;
}

.stat-label {
    color: var(--slate-500);
    font-size: 13px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 33px;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.1;
}

.stat-icon {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf7f6;
    color: #2f6f6a;
}

.stat-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-icon.teal {
    background: #ecf9f7;
    color: #2f6f6a;
}

.stat-icon.blue {
    background: #edf6ff;
    color: #2563eb;
}

.stat-icon.purple {
    background: #f4efff;
    color: #7c3aed;
}

.stat-icon.amber {
    background: #fff5e6;
    color: #d97706;
}

.surface-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.chart-box {
    height: 280px;
    border: 1px solid #ecf0f4;
    border-radius: 12px;
    background:
        linear-gradient(to bottom, transparent 24%, #f2f5f8 24%, #f2f5f8 25%, transparent 25%) 0 0/100% 25%,
        #fff;
}

.chart-placeholder {
    height: 100%;
    position: relative;
}

.chart-x-label {
    position: absolute;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    color: #8b98aa;
    font-size: 12px;
}

.chart-legend {
    position: absolute;
    bottom: 8px;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    gap: 14px;
    color: #62748a;
    font-size: 12px;
}

.legend-item::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    margin-left: 6px;
}

.legend-accepted::before { background: #16a34a; }
.legend-declined::before { background: #f59e0b; }
.legend-pending::before { background: #8b5cf6; }

.chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
    font-weight: 700;
    margin-bottom: 10px;
}

.chart-head svg {
    width: 16px;
    height: 16px;
    stroke: #64748b;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-footer-links a {
    display: block;
    color: #e8fbfa;
    opacity: 0.95;
    font-size: 12px;
    margin-top: 10px;
}

.settings-logo-preview {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    background: #fff;
    padding: 6px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.multi-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    padding: 9px 10px;
    background: #fff;
}

.check-item input {
    width: auto;
    margin: 0;
}

.badge-photo-consent {
    align-items: flex-start;
    margin-top: 10px;
    max-width: 36em;
    line-height: 1.45;
    font-size: 13px;
}

.badge-photo-consent input {
    margin-top: 3px;
}

.table-wrap {
    overflow: visible;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.names-page-card {
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

.names-page-card .toolbar {
    margin-bottom: 0;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    padding: 18px 18px 14px;
}

.names-title {
    margin: 0;
    color: #fff;
    font-size: 34px;
    font-weight: 800;
}

.names-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 130px;
    height: 38px;
    padding: 6px 14px;
    border-radius: 12px;
    color: #334155;
    text-decoration: none;
    font-size: var(--fs-button);
    font-weight: 700;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe3ea;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toolbar-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
}

.toolbar-btn.dark {
    color: #334155;
    background: #f1f5f9;
    border-color: #dbe3ea;
}

.toolbar-btn.blue {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.toolbar-btn.orange {
    color: #b45309;
    background: #fff7ed;
    border-color: #fed7aa;
}

.toolbar-btn.green {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.names-inline-alert {
    margin: 8px 18px 0;
    padding: 6px 8px;
    font-size: var(--fs-ui);
    line-height: 1.25;
}

/* إشعارات مؤقتة (قائمة الأعضاء وغيرها) */
.alert.auto-dismiss {
    transition: opacity 0.6s ease, transform 0.6s ease, margin 0.6s ease, padding 0.6s ease, max-height 0.6s ease;
    overflow: hidden;
}

.alert.auto-dismiss.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
}

/* شريط أدوات قائمة الأعضاء — أيقونات فقط */
.names-actions-icons {
    align-items: center;
}

.names-actions-icons .toolbar-btn-icon {
    min-width: 40px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    gap: 0;
}

.names-actions-icons .toolbar-btn-icon span {
    display: none;
}

.names-actions-icons .toolbar-btn-icon svg {
    flex-shrink: 0;
    display: block;
}

.file-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.inline-upload-form {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.inline-upload-form input[type="file"] {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.segment-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid var(--slate-200);
    overflow-x: auto;
}

.segment-tab {
    background: #fff;
    flex: 1 1 auto;
    min-width: max-content;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    border-inline-start: 1px solid rgba(15, 23, 42, 0.05);
    transition: background-color 0.18s ease, color 0.18s ease;
}
.segment-tab:first-child { border-inline-start: 0; }

.segment-tab:hover {
    text-decoration: none;
    background: #f8fafc;
}

.segment-tab.active {
    color: #0f766e;
    border-bottom-color: #0f766e;
}

.names-filters {
    display: grid;
    grid-template-columns: minmax(130px, 0.9fr) minmax(120px, 0.8fr) minmax(140px, 1fr) minmax(0, 1.2fr) auto;
    gap: 10px;
    padding: 5px 10px 5px 10px;
    border-bottom: 1px solid var(--slate-200);
    background: #fff;
}
.names-filters--no-expertise {
    grid-template-columns: minmax(130px, 0.9fr) minmax(140px, 1fr) minmax(0, 1.2fr) auto;
}
.names-filters--no-expertise select[name="expertise"] {
    display: none;
}

.names-filters input,
.names-filters select {
    height: 44px;
}

.names-filters .filter-clear-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    border-radius: 12px;
}

.names-filters .filter-clear-btn svg {
    width: 20px;
    height: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto auto;
    gap: 8px;
    width: 100%;
}

.admin-table,
.admins-table,
.audit-table,
.eval-table,
.changes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.admin-table thead th,
.admins-table thead th,
.audit-table thead th,
.eval-table thead th,
.changes-table thead th {
    padding: 14px 14px 12px;
    background: transparent;
    color: var(--slate-500);
    font-size: var(--fs-table);
    font-weight: 800;
    text-align: right;
    border: 0;
    white-space: nowrap;
}

.admin-table tbody tr,
.admins-table tbody tr,
.audit-table tbody tr,
.eval-table tbody tr,
.changes-table tbody tr {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.admin-table tbody td,
.admins-table tbody td,
.audit-table tbody td,
.eval-table tbody td,
.changes-table tbody td {
    padding: 14px;
    text-align: right;
    font-size: var(--fs-table);
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255, 255, 255, 0.97);
}

.admin-table tbody td:first-child,
.admins-table tbody td:first-child,
.audit-table tbody td:first-child,
.eval-table tbody td:first-child,
.changes-table tbody td:first-child {
    border-right: 1px solid var(--slate-200);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.admin-table tbody td:last-child,
.admins-table tbody td:last-child,
.audit-table tbody td:last-child,
.eval-table tbody td:last-child,
.changes-table tbody td:last-child {
    border-left: 1px solid var(--slate-200);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.admin-table tbody tr + tr td,
.admins-table tbody tr + tr td,
.audit-table tbody tr + tr td,
.eval-table tbody tr + tr td,
.changes-table tbody tr + tr td {
    border-top-width: 1px;
}

.names-page-card .admin-table td {
    font-size: var(--fs-table);
}

/* قائمة الأعضاء: لقب صغير فوق الاسم، والمسمى تحته */
.members-list-table .member-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: right;
}
.members-list-table .member-title-line {
    font-size: 12px;
    line-height: 1.3;
    color: var(--slate-500, #64748b);
    font-weight: 600;
}
.members-list-table .member-name-line {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}
.members-list-table .member-job-line {
    font-size: 12px;
    line-height: 1.35;
    color: var(--slate-500, #64748b);
}
/* أعمدة ثابتة: العرض لا يتغيّر بطول المحتوى */
.members-list-table {
    table-layout: fixed;
    width: 100%;
}
.members-list-table .col-member-check {
    width: 42px;
}
.members-list-table .col-member-photo {
    width: 72px;
}
.members-list-table .col-member-identity {
    width: 36%;
}
.members-list-table .col-member-nationality {
    width: 108px;
}
.members-list-table .col-member-expertise {
    width: 14%;
}
.members-list-table .col-member-actions {
    width: 204px;
}
.members-list-table--no-expertise .col-member-identity {
    width: auto;
}
.members-list-table--no-expertise .col-member-expertise,
.members-list-table--no-expertise .th-member-expertise,
.members-list-table--no-expertise .td-member-expertise {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
.members-list-table .th-member-photo,
.members-list-table .td-member-photo,
.members-list-table .th-member-identity,
.members-list-table .td-member-identity,
.members-list-table .th-member-nationality,
.members-list-table .td-member-nationality,
.members-list-table .th-member-expertise,
.members-list-table .td-member-expertise {
    overflow: hidden;
}
.admin-table.members-list-table thead th.th-member-photo,
.admin-table.members-list-table tbody td.td-member-photo {
    width: 72px;
    text-align: center;
    vertical-align: middle;
    padding: 8px;
}
.admin-table.members-list-table thead th.th-member-photo {
    white-space: normal;
    line-height: 1.25;
}
.admin-table.members-list-table tbody td.td-member-photo .thumb-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}
.members-list-table .th-member-identity,
.members-list-table .td-member-identity,
.members-list-table .th-member-expertise,
.members-list-table .td-member-expertise {
    min-width: 0;
}
.members-list-table .td-member-identity {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.members-list-table .td-member-expertise {
    overflow-wrap: break-word;
    word-break: normal;
    max-width: 0;
}
/* الجنسية والخبرات: نفس حجم خط اللقب، بدون عريض، في منتصف الخانة */
.admin-table.members-list-table thead th.th-member-nationality,
.admin-table.members-list-table tbody td.td-member-nationality,
.admin-table.members-list-table thead th.th-member-expertise,
.admin-table.members-list-table tbody td.td-member-expertise {
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 400;
    color: var(--slate-500, #64748b);
    white-space: normal;
}
.admin-table.members-list-table thead th.th-member-nationality,
.admin-table.members-list-table tbody td.td-member-nationality {
    width: 108px;
}
.members-list-table .member-expertise-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 6px;
}
.members-list-table .member-expertise-item {
    display: inline-block;
    white-space: nowrap;
}
.members-list-table .member-expertise-item:not(:last-child)::after {
    content: "،";
}
.admin-table.members-list-table thead th.th-member-actions {
    width: 204px;
    vertical-align: middle;
    padding-inline: 8px;
    overflow: hidden;
    text-align: center;
}
.admin-table.members-list-table tbody td.td-member-actions {
    width: 204px;
    vertical-align: middle;
    padding-inline: 8px;
    overflow: hidden;
    text-align: left;
}
.admin-table.members-list-table tbody td.td-member-actions .actions-cell {
    flex-wrap: nowrap;
    flex-direction: row;
    white-space: nowrap;
    gap: 4px;
    justify-content: flex-start;
    direction: ltr;
}
.admin-table.members-list-table tbody td.td-member-actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.admin-table.members-list-table tbody td.td-member-actions .icon-btn {
    flex: 0 0 auto;
}
.members-list-table .member-no-photo {
    color: #94a3b8;
    display: inline-block;
    min-width: 1em;
}

.members-list-table tbody tr.is-vip td,
.members-pool-table tbody tr.is-vip td {
    background: #fffbeb;
}
.members-list-table tbody tr.is-vip td:first-child,
.members-pool-table tbody tr.is-vip td:first-child {
    border-inline-start: 3px solid #eab308;
}
.members-list-table tr.is-vip .member-name-line::after,
.members-pool-table tr.is-vip .mp-name::after {
    content: "★";
    color: #eab308;
    margin-inline-start: 6px;
    font-size: 14px;
}

.actions-cell {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.tabs-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-chip {
    border: 1px solid var(--slate-200);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.tab-chip:hover {
    text-decoration: none;
    background: #f8fafc;
}

.tab-chip.active {
    background: var(--primary-600);
    color: #fff;
    border-color: var(--primary-600);
}

.btn-link {
    border-color: var(--slate-200);
    background: #fff;
    color: var(--slate-700);
}

.btn-link:hover {
    background: #f8fafc;
}

.btn-danger-outline {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.btn-danger-outline:hover {
    background: #ffe4e6;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn.edit {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

/* متغيّر مضغوط لأيقونات تعديل/حذف داخل الجداول — حجم أصغر وألطف. */
.icon-btn.icon-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}
.icon-btn.icon-btn-sm svg {
    width: 14px;
    height: 14px;
}
.icon-btn.js-pal-copy.is-success,
.icon-btn.js-pal-wa.is-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.icon-btn.js-pal-copy.is-loading,
.icon-btn.js-pal-wa.is-loading {
    opacity: 0.65;
    cursor: wait;
}
.actions-cell.actions-cell-compact {
    gap: 4px;
}

/* تسمية الحقل مع أيقونة (مثال: واتساب). */
.label-with-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.whatsapp-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #25D366;
    line-height: 0;
}
.whatsapp-ico svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
}

/* شارة صغيرة جدًا بجانب العنوان — بدون SVG حتى لا تتشوّه الصفحة */
.passport-from-mark {
    display: inline;
    margin-inline-start: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    font-size: var(--fs-badge) !important;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    vertical-align: 1px;
    white-space: nowrap;
    cursor: help;
    box-sizing: border-box;
    max-width: none;
    width: auto !important;
    height: auto !important;
}
.passport-from-mark svg {
    display: none !important;
}
.passport-upload-hints {
    margin: 8px 0 0;
    padding: 8px 14px 8px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.7;
    color: #334155;
}
.passport-upload-hints li { margin: 0 0 4px; }
.passport-upload-hints li:last-child { margin-bottom: 0; }
.passport-upload-hints__emphasis {
    color: #9a3412;
    font-weight: 600;
}
.passport-ocr-status {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #0f766e;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f0fdfa;
}
.passport-ocr-status.is-error {
    color: #b91c1c;
    background: #fef2f2;
}
.passport-file-chosen {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}
.passport-file-chosen[hidden] {
    display: none !important;
}
.passport-expiry-warn {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #b91c1c;
}
.passport-expiry-warn[hidden] {
    display: none !important;
}
button.is-passport-expiry-blocked,
button.is-passport-expiry-blocked:hover,
.btn.is-passport-expiry-blocked,
.btn.is-passport-expiry-blocked:hover,
input.is-passport-expiry-blocked {
    pointer-events: none !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.2);
}

.profile-from-passport-preview {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.profile-from-passport-preview[hidden] {
    display: none !important;
}
/* صورة شخصية موحّدة (مربعة مقصوصة) */
.mf-photo-thumb,
.profile-from-passport-img,
.field img.mf-photo-thumb {
    display: block;
    width: 96px !important;
    height: 96px !important;
    max-width: 96px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-sizing: border-box;
}
.mf-photo-thumb--round,
.field img.mf-photo-thumb--round {
    border-radius: 50%;
}
.profile-from-passport-cap {
    font-size: var(--fs-small);
    color: #0f766e;
    line-height: 1.4;
    max-width: 220px;
}

/* معاينة الصورة الشخصية — فورية + تكبير + حذف */
.profile-upload-preview {
    margin-top: 10px;
}
.profile-upload-preview[hidden] {
    display: none !important;
}
.profile-upload-preview-frame {
    position: relative;
    display: inline-block;
    width: 96px;
    height: 96px;
}
.profile-upload-preview-btn {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
}
.profile-upload-preview-btn:hover .profile-upload-preview-img,
.profile-upload-preview-btn:focus-visible .profile-upload-preview-img {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.28);
}
.profile-upload-preview-img {
    display: block;
    width: 96px !important;
    height: 96px !important;
    max-width: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-sizing: border-box;
}
.profile-upload-preview-remove {
    position: absolute;
    top: -6px;
    inset-inline-start: -6px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    z-index: 2;
}
.profile-upload-preview-remove:hover,
.profile-upload-preview-remove:focus-visible {
    background: #b91c1c;
}
.profile-upload-preview-cap {
    display: block;
    margin-top: 6px;
    font-size: var(--fs-small);
    color: #64748b;
    line-height: 1.4;
    max-width: 220px;
}
.profile-upload-preview-cap--passport {
    color: #0f766e;
}

.comp-photo-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.comp-photo-upload .profile-upload-preview {
    margin-top: 0;
}

/* معاينة صورة الجواز — مقاس ثابت أفقي */
.passport-upload-preview {
    margin-top: 8px;
}
.passport-upload-preview[hidden] {
    display: none !important;
}
.passport-upload-preview-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
    max-width: 180px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.passport-upload-preview-btn:hover {
    border-color: #99f6e4;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .12);
}
.passport-upload-preview-img {
    display: block;
    width: 160px;
    height: 110px;
    max-width: 160px;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
}
.passport-upload-preview-btn--pdf {
    max-width: 180px;
}
.passport-upload-preview-pdf-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 160px;
    height: 110px;
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
    color: #b91c1c;
    box-sizing: border-box;
}
.passport-upload-preview-pdf-thumb svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.passport-upload-preview-pdf-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.passport-upload-preview-cap {
    display: block;
    width: 100%;
    padding: 3px 6px 5px;
    font-size: var(--fs-small);
    color: #64748b;
    text-align: center;
    box-sizing: border-box;
}
.passport-upload-preview-pdf {
    display: none;
}

.mf-passport-lightbox {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.mf-passport-lightbox.is-open {
    display: flex;
}
.mf-passport-lightbox[hidden] {
    display: none !important;
}
.mf-passport-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.72);
    cursor: zoom-out;
}
.mf-passport-lightbox-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    max-width: calc(100vw - 24px);
    max-height: min(calc(100dvh - 24px), calc(100vh - 24px));
    background: transparent;
}
.mf-passport-lightbox.is-pdf .mf-passport-lightbox-body {
    width: min(920px, 96vw);
    height: min(90vh, 860px);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.mf-passport-lightbox img.mf-passport-lightbox-img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 24px);
    max-height: min(calc(100dvh - 24px), calc(100vh - 24px));
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    background: transparent;
}
.mf-passport-lightbox-img[hidden],
.mf-passport-lightbox-frame[hidden] {
    display: none !important;
}
.mf-passport-lightbox-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.mf-passport-lightbox-close {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}
body.mf-passport-lightbox-open {
    overflow: hidden;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn:hover {
    background: #f8fafc;
}

.icon-btn.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.filter-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.filter-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: #475569;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-section {
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.settings-section-title {
    font-size: var(--fs-section);
    font-weight: 800;
    color: #334155;
    margin: 0 0 10px;
}

/* ── Collapsible EPV Sections ──────────────────────────────── */
.epv-section {
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    margin-bottom: 12px;
    overflow: hidden;
}
.epv-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background .15s;
}
.epv-section-head:hover { background: #f8fafc; }
.epv-section-head h4 {
    font-size: 15px;
    font-weight: 800;
    color: #334155;
    margin: 0;
}
.epv-toggle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    line-height: 1;
    transition: transform .2s;
}
.epv-toggle::after { content: '+'; }
.epv-section[data-collapsed="false"] .epv-toggle::after { content: '\2212'; }
.epv-section-body {
    padding: 0 16px 16px;
}
.epv-section[data-collapsed="true"] .epv-section-body {
    display: none;
}

/* —— صفحة معاينة المشارك —— */
.epv-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.epv-hero {
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #f1f5f9 100%);
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.epv-hero-body {
    flex: 1 1 320px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.epv-hero-main { flex: 1 1 240px; min-width: 0; }
.epv-hero-kicker {
    margin: 0 0 4px;
    font-size: var(--fs-small);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}
.epv-hero-title {
    margin: 0;
    font-size: var(--fs-title);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}
.epv-hero-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: #64748b;
}
.epv-hero-sub a { color: #2563eb; text-decoration: none; }
.epv-hero-sub a:hover { text-decoration: underline; }
.epv-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.epv-role-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: var(--fs-badge);
    font-weight: 700;
}
.epv-role-chip--vip {
    background: #fef3c7;
    color: #b45309;
}
.epv-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}
.epv-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}
.epv-stat-badge--ok {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #15803d;
}
.epv-stat-badge--need {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.epv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.epv-inline-form { margin: 0; display: inline; }
.epv-quick-nav {
    display: none;
}
.epv-page,
.epv-page button,
.epv-page input,
.epv-page select,
.epv-page textarea {
    font-family: var(--site-font-family, "Cairo"), Tahoma, sans-serif;
}
.epv-tabs {
    margin-top: 2px;
}
.epv-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 14px;
    position: sticky;
    top: 0;
    z-index: 6;
    background: rgba(248, 250, 252, 0.97);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e2e8f0;
}
.epv-tab-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-family: var(--site-font-family, "Cairo"), Tahoma, sans-serif;
    font-size: var(--fs-ui);
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.epv-tab-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.epv-tab-btn.is-active {
    background: var(--primary-700, #32625f);
    border-color: var(--primary-700, #32625f);
    color: #fff;
    box-shadow: 0 2px 8px rgba(50, 98, 95, .25);
}
.epv-tab-panels {
    padding: 4px 0 8px;
}
.epv-tab-panel[hidden] { display: none !important; }
.epv-panel-body,
.epv-tab-panel .epv-panel-body {
    font-size: var(--fs-ui);
    line-height: var(--line-body);
}
.epv-panel-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.epv-section-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.epv-section-card {
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.epv-section-card--muted {
    background: #f8fafc;
}
.epv-file-activity {
    padding: 0;
    overflow: hidden;
    border-color: #99c4c1;
    background: #f3faf9;
}
.epv-file-activity--open {
    padding: 16px 18px;
}
.epv-file-activity-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 800;
    color: #334155;
}
.epv-file-activity-summary::-webkit-details-marker {
    display: none;
}
.epv-file-activity-chevron {
    width: 10px;
    height: 10px;
    border-left: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform .15s ease;
    flex-shrink: 0;
}
.epv-file-activity[open] .epv-file-activity-chevron {
    transform: rotate(-135deg);
}
.epv-file-activity-count {
    margin-inline-start: auto;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}
.epv-file-activity-body {
    padding: 0 16px 16px;
    border-top: 1px solid #d7e6e4;
    background: #fff;
}
.epv-file-activity-scroll {
    overflow-x: auto;
    margin-top: 12px;
}
.epv-file-activity-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
.epv-file-activity-col-when,
.epv-file-activity-col-actor {
    width: 1%;
}
.epv-file-activity-col-event {
    width: auto;
}
.epv-file-activity-table thead th {
    padding: 8px 10px;
    background: #f1f5f4;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    border-bottom: 1px solid #d7e6e4;
    white-space: nowrap;
}
.epv-file-activity-table tbody td {
    padding: 9px 10px;
    text-align: right;
    font-size: 13px;
    line-height: 1.55;
    vertical-align: top;
    border-bottom: 1px solid #eef2f1;
    color: #0f172a;
    background: #fff;
}
.epv-file-activity-table tbody tr:nth-child(even) td {
    background: #f8fbfb;
}
.epv-file-activity-table tbody tr:last-child td {
    border-bottom: 0;
}
.epv-file-activity-when {
    width: 1%;
    white-space: nowrap;
    padding-inline-end: 14px;
}
.epv-file-activity-date,
.epv-file-activity-time {
    display: block;
    font-variant-numeric: tabular-nums;
    color: #475569;
}
.epv-file-activity-time {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}
.epv-file-activity-actor {
    width: 1%;
    white-space: nowrap;
    padding-inline-end: 14px;
}
.epv-file-activity-who {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
}
.epv-file-activity-who--participant {
    background: #dceeed;
    color: #215956;
}
.epv-file-activity-who--admin {
    background: #e2e8f0;
    color: #334155;
}
.epv-file-activity-who-name {
    display: block;
    margin-top: 4px;
    font-weight: 700;
    color: #0f172a;
}
.epv-file-activity-event {
    width: auto;
    overflow-wrap: break-word;
    word-break: normal;
}
.epv-file-activity-empty td {
    text-align: center;
    color: #64748b;
    font-weight: 600;
}
.member-file-activity-wrap {
    padding: 0;
    overflow: hidden;
}
.member-file-activity-wrap .epv-file-activity {
    border: 0;
    border-radius: inherit;
}
.epv-section-title {
    margin: 0 0 12px;
    font-size: var(--fs-section);
    font-weight: 800;
    color: #334155;
    line-height: var(--line-title, 1.4);
}
.epv-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    transition: border-color .15s, background .15s;
}
.epv-check-row:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.epv-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--primary-600, #3d7a76);
}
.epv-meta-line {
    margin: 10px 0 0;
    font-size: 12px;
    color: #64748b;
}
.epv-empty-note {
    margin: 0;
    font-size: var(--fs-small);
    color: #64748b;
    text-align: center;
}
.epv-companion-card > summary {
    list-style: none;
}
.epv-companion-card > summary::-webkit-details-marker { display: none; }
.epv-companion-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #334155;
    font-size: var(--fs-ui);
}
.epv-companion-summary--add {
    color: var(--primary-700, #32625f);
}
.epv-companion-perm-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 320px;
}
.epv-companion-perm-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.epv-companion-perm-fieldset:disabled {
    opacity: 0.55;
    pointer-events: none;
}
.epv-check-row:has(input:disabled) {
    cursor: not-allowed;
}
.epv-companion-perm-fields .field input[type="number"] {
    max-width: 120px;
}
.epv-companion-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}
.epv-companion-flight-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin: 4px 0 8px;
}
.epv-companion-flight-head .epv-section-title {
    margin: 0;
}
.epv-companion-flight-head .js-epv-copy-host-ticket.is-copied {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}
.epv-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}
.epv-hint--inline {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.epv-acc-resp {
    margin: 6px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.65;
}
.epv-acc-resp--organizer {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
}
.epv-acc-resp--participant {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.epv-acc-resp--review {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

/* —— معاينة المشارك: قسم التذكرة —— */
#epv-ticket .epv-tk-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#epv-ticket form[data-doc="ticket"] {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#epv-ticket .epv-tk-card {
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    position: relative;
    z-index: 1;
    overflow: visible;
}
#epv-ticket .epv-admin-notes-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px;
    max-height: 260px;
    overflow: auto;
    padding: 2px 1px 4px;
}
#epv-ticket .epv-admin-notes-log__item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
}
#epv-ticket .epv-admin-notes-log__meta {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    color: #0f766e;
    line-height: 1.4;
}
#epv-ticket .epv-admin-notes-log__text {
    margin: 0;
    font-size: 13px;
    color: #0f172a;
    line-height: 1.55;
    white-space: pre-wrap;
}
#epv-ticket .epv-admin-notes-log__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#epv-ticket .epv-admin-notes-log__head .epv-admin-notes-log__meta {
    flex: 1;
    min-width: 0;
}
#epv-ticket .epv-admin-notes-log__actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
}
#epv-ticket .epv-admin-notes-log__item.is-editing .epv-admin-notes-log__text,
#epv-ticket .epv-admin-notes-log__item.is-editing .epv-admin-notes-log__actions {
    display: none;
}
#epv-ticket .epv-admin-notes-log__editor {
    margin-top: 6px;
}
#epv-ticket .epv-admin-notes-log__editor textarea {
    width: 100%;
    min-height: 72px;
    margin: 0 0 8px;
    resize: vertical;
}
#epv-ticket .epv-admin-notes-log__editor-actions {
    display: flex;
    gap: 6px;
}
#epv-ticket .epv-tk-card:focus-within,
#epv-ticket .epv-tk-card:has(.combo-list:not([hidden])) {
    z-index: 40;
}
#epv-ticket .epv-tk-card--muted {
    background: #f8fafc;
}
#epv-ticket .epv-tk-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 12px;
}
#epv-ticket .epv-tk-card-head .epv-section-title {
    margin: 0;
}
#epv-ticket .epv-tk-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-badge);
    font-weight: 800;
    letter-spacing: 0.01em;
}
#epv-ticket .epv-tk-chip--ok {
    background: #dcfce7;
    color: #166534;
}
#epv-ticket .epv-tk-chip--wait {
    background: #fef3c7;
    color: #92400e;
}
#epv-ticket .epv-tk-chip--off {
    background: #fee2e2;
    color: #b91c1c;
}
#epv-ticket .epv-tk-chip--file {
    background: #e0f2fe;
    color: #075985;
}
#epv-ticket .epv-tk-chip--empty {
    background: #f1f5f9;
    color: #64748b;
}
#epv-ticket .epv-tk-status-row {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 16px 20px;
    align-items: start;
}
#epv-ticket .epv-tk-file {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
#epv-ticket .epv-tk-file-copy {
    min-width: 0;
    flex: 1;
}
#epv-ticket .epv-tk-file-copy strong {
    display: block;
    font-size: var(--fs-ui);
    color: #334155;
    margin-bottom: 4px;
}
#epv-ticket .epv-tk-file-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 4px 0 6px;
}
#epv-ticket .epv-tk-file-hint,
#epv-companions .epv-tk-file-hint {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.55;
}
#epv-ticket .epv-tk-admin-files,
#epv-companions .epv-tk-admin-files {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}
#epv-ticket .epv-tk-admin-files + .epv-tk-admin-files,
#epv-companions .epv-tk-admin-files + .epv-tk-admin-files {
    margin-top: 18px;
}
#epv-ticket .epv-tk-admin-files__label,
#epv-companions .epv-tk-admin-files__label {
    margin: 0 0 4px;
    font-size: var(--fs-ui);
    font-weight: 800;
    color: #334155;
}
#epv-ticket .epv-tk-admin-files__row,
#epv-companions .epv-tk-admin-files__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 10px;
}
#epv-ticket .epv-tk-admin-files__title,
#epv-companions .epv-tk-admin-files__title {
    flex: 1 1 220px;
    min-width: 0;
    margin: 0;
}
#epv-ticket .epv-tk-admin-files__list,
#epv-companions .epv-tk-admin-files__list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#epv-ticket .epv-tk-admin-files__item,
#epv-companions .epv-tk-admin-files__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
#epv-ticket .epv-tk-admin-files__name,
#epv-companions .epv-tk-admin-files__name {
    flex: 1 1 160px;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    overflow-wrap: anywhere;
}
#epv-ticket .epv-tk-admin-files__item-title,
#epv-companions .epv-tk-admin-files__item-title {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
}
.epv-tk-apply {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.epv-tk-apply[hidden] {
    display: none !important;
}
.epv-tk-apply__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .52);
}
.epv-tk-apply__dialog {
    position: relative;
    width: min(780px, 96vw);
    max-height: min(88vh, 740px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, .28);
    overflow: hidden;
}
.epv-tk-apply__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.epv-tk-apply__head-copy {
    min-width: 0;
    flex: 1;
}
.epv-tk-apply__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}
.epv-tk-apply__hint {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
}
.epv-tk-apply__hint.is-arrival,
.epv-tk-apply__hint.is-departure {
    color: #0f766e;
}
.epv-tk-apply__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #d7efec;
    color: #115e59;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}
.epv-tk-apply__close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    flex-shrink: 0;
}
.epv-tk-apply__close:hover {
    background: #eef2f6;
    color: #334155;
}
.epv-tk-apply__grid-head,
.epv-tk-apply__row {
    display: grid;
    grid-template-columns: 28px minmax(132px, 1.05fr) minmax(140px, 1fr) minmax(140px, 1fr);
    gap: 10px;
    align-items: start;
}
.epv-tk-apply__check-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
}
.epv-tk-apply__check-col input,
.epv-tk-apply__group input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0f766e;
    cursor: pointer;
}
.epv-tk-apply__grid-head {
    padding: 10px 18px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.epv-tk-apply__body {
    overflow: auto;
    padding: 8px 18px 14px;
    flex: 1 1 auto;
}
.epv-tk-apply__group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 6px;
    font-size: 12px;
    font-weight: 800;
    color: #1f4f4c;
    cursor: pointer;
    user-select: none;
}
.epv-tk-apply__row {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 8px;
    cursor: pointer;
}
.epv-tk-apply__row.is-changed {
    border-color: #99d5cf;
    background: #f3fbfa;
}
.epv-tk-apply__row:not(.is-picked) {
    opacity: .62;
}
.epv-tk-apply__row.is-picked {
    opacity: 1;
}
.epv-tk-apply__field {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}
.epv-tk-apply__val {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.epv-tk-apply__val--before {
    color: #64748b;
}
.epv-tk-apply__val--after {
    color: #0f172a;
}
.epv-tk-apply__row.is-changed .epv-tk-apply__val--after {
    color: #115e59;
}
.epv-tk-apply__empty {
    color: #94a3b8;
    font-weight: 600;
}
.epv-tk-apply__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.epv-tk-apply__foot-tools,
.epv-tk-apply__foot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
@media (max-width: 640px) {
    .epv-tk-apply__grid-head {
        display: none;
    }
    .epv-tk-apply__row {
        grid-template-columns: 28px 1fr;
        gap: 6px;
    }
    .epv-tk-apply__check-col {
        grid-row: 1 / span 3;
        align-self: center;
    }
    .epv-tk-apply__field,
    .epv-tk-apply__val {
        grid-column: 2;
    }
    .epv-tk-apply__val--before::before,
    .epv-tk-apply__val--after::before {
        display: block;
        font-size: 11px;
        font-weight: 800;
        margin-bottom: 2px;
        color: #94a3b8;
    }
    .epv-tk-apply__val--before::before {
        content: "قبل";
    }
    .epv-tk-apply__val--after::before {
        content: "بعد";
    }
    .epv-tk-apply__foot {
        align-items: stretch;
        flex-direction: column;
    }
    .epv-tk-apply__foot-tools,
    .epv-tk-apply__foot-actions {
        width: 100%;
    }
    .epv-tk-apply__foot-actions .btn {
        flex: 1 1 auto;
    }
}
#epv-ticket .epv-tk-pending {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 12px;
    padding: 14px 16px;
}
#epv-ticket .epv-tk-pending p {
    margin: 6px 0 10px;
}
#epv-ticket .epv-tk-pending ul {
    margin: 0 0 10px;
    padding: 0 18px;
}
#epv-ticket .epv-tk-pending-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}
#epv-ticket .epv-tk-pending-actions textarea {
    flex: 1 1 220px;
}
#epv-ticket .epv-tk-exempt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
}
#epv-ticket .epv-tk-exempt .travel-req-reason {
    margin: 0;
}
#epv-ticket .epv-tk-meta {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}
#epv-ticket .epv-tk-legs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
#epv-ticket .epv-tk-leg {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 14px 14px;
    position: relative;
    z-index: 1;
    overflow: visible;
}
#epv-ticket .epv-tk-leg:focus-within,
#epv-ticket .epv-tk-leg:has(.combo-list:not([hidden])) {
    z-index: 50;
}
#epv-ticket .epv-tk-leg--in {
    border-top: 3px solid #0f766e;
}
#epv-ticket .epv-tk-leg--out {
    border-top: 3px solid #b45309;
}
#epv-ticket .epv-tk-leg-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
#epv-ticket .epv-tk-leg-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    background: #e2e8f0;
    color: #475569;
}
#epv-ticket .epv-tk-leg--in .epv-tk-leg-title span {
    background: #ccfbf1;
    color: #0f766e;
}
#epv-ticket .epv-tk-leg--out .epv-tk-leg-title span {
    background: #ffedd5;
    color: #c2410c;
}
#epv-ticket .epv-tk-leg-grid {
    display: grid;
    gap: 10px;
}
#epv-ticket .epv-tk-issued .epv-tk-pax {
    margin-bottom: 12px;
}
#epv-ticket .epv-tk-issued .epv-tk-legs,
#epv-ticket .epv-tk-issued .epv-tk-leg,
#epv-ticket .epv-tk-issued .epv-tk-leg-grid,
#epv-ticket .epv-tk-issued .epv-tk-field {
    min-width: 0;
    max-width: 100%;
}
#epv-ticket .epv-tk-issued .epv-tk-legs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}
#epv-ticket .epv-tk-issued .epv-tk-leg-grid {
    grid-template-columns: 6.2rem minmax(0, 1fr) 5.4rem minmax(7.6rem, max-content);
    align-items: end;
}
#epv-ticket .epv-tk-issued .epv-tk-field--when,
#epv-ticket .epv-tk-issued .epv-tk-field--transport,
#epv-ticket .epv-tk-issued .epv-tk-field--note {
    grid-column: 1 / -1;
}
#epv-ticket .epv-tk-issued .epv-tk-field--terminal {
    width: 5.4rem;
    max-width: 100%;
}
#epv-ticket .epv-tk-issued .epv-tk-field--vip {
    width: auto;
    max-width: 100%;
}
#epv-ticket .epv-tk-issued .epv-tk-field--transport,
#epv-companions .epv-tk-field--transport {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
#epv-ticket .epv-tk-issued .epv-tk-leg-title,
#epv-companions .epv-tk-leg-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}
.tk-check,
.field .tk-check,
.epv-tab-panel .field .tk-check,
.tk-field .tk-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    color: #475569;
    line-height: 1.3;
    box-sizing: border-box;
}
.tk-check.is-on,
.tk-check:has(input[type="checkbox"]:checked) {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}
.tk-check--need {
    flex: 1 1 13rem;
    max-width: 100%;
}
.tk-leg .js-tk-leg-body,
.epv-tk-leg > .js-tk-leg-body {
    display: grid;
    gap: 10px;
}
.tk-uncovered-note,
.js-tk-uncovered-note {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    grid-column: 1 / -1;
}
.tk-uncovered-note[hidden],
.js-tk-uncovered-note[hidden] {
    display: none !important;
}
.tk-check input[type="hidden"] { display: none; }
.tk-check input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px;
    max-width: 18px;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    accent-color: #0f766e;
    cursor: pointer;
}
.tk-vip-toggle,
.tk-field label.tk-vip-toggle,
.field label.tk-vip-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
    color: inherit;
}
.tk-vip-toggle:has(input[type="checkbox"]:checked) {
    border-color: #f59e0b;
    background: #fffbeb;
}
.tk-vip-toggle input[type="hidden"] { display: none; }
.tk-vip-toggle input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    max-width: 16px;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    accent-color: #d97706;
}
.tk-vip-toggle__box { display: none; }
#epv-companions .epv-companion-tk-legs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
#epv-companions .epv-tk-leg {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 14px 14px;
    position: relative;
    z-index: 1;
    overflow: visible;
    min-width: 0;
}
#epv-companions .epv-tk-leg:focus-within,
#epv-companions .epv-tk-leg:has(.combo-list:not([hidden])) {
    z-index: 50;
}
#epv-companions .epv-tk-leg--in { border-top: 3px solid #0f766e; }
#epv-companions .epv-tk-leg--out { border-top: 3px solid #b45309; }
#epv-companions .epv-tk-leg-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
#epv-companions .epv-tk-leg-title span {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}
#epv-companions .epv-tk-leg--in .epv-tk-leg-title span {
    background: #ccfbf1;
    color: #0f766e;
}
#epv-companions .epv-tk-leg--out .epv-tk-leg-title span {
    background: #ffedd5;
    color: #c2410c;
}
#epv-companions .epv-tk-leg-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 6.2rem minmax(0, 1fr) 5.4rem minmax(7.6rem, max-content);
    align-items: end;
}
#epv-companions .epv-tk-field--when,
#epv-companions .epv-tk-field--transport,
#epv-companions .epv-tk-field--note {
    grid-column: 1 / -1;
}
#epv-companions .epv-tk-field--terminal {
    width: 5.4rem;
    max-width: 100%;
}
#epv-companions .epv-tk-field--vip {
    width: auto;
    max-width: 100%;
}
#epv-ticket .epv-tk-issued .tk-term-wrap {
    position: relative;
    min-width: 0;
}
#epv-ticket .epv-tk-issued .tk-term-wrap input {
    text-align: center;
}
#epv-ticket .epv-tk-issued .tk-term-spin {
    display: none;
    position: absolute;
    inset-inline-start: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    box-sizing: border-box;
    border: 2px solid #d1d5db;
    border-top-color: var(--primary-500, #569e9a);
    border-radius: 50%;
    animation: tk-term-spin .7s linear infinite;
    pointer-events: none;
    z-index: 2;
}
#epv-ticket .epv-tk-issued .tk-term-wrap.is-looking .tk-term-spin {
    display: block;
}
#epv-ticket .epv-tk-issued .tk-term-wrap.is-looking input {
    color: transparent;
    caret-color: transparent;
}
@keyframes tk-term-spin {
    to { transform: rotate(360deg); }
}
#epv-ticket .epv-tk-issued .epv-tk-field--flight input {
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-inline: 8px;
}
#epv-ticket .epv-tk-issued .epv-tk-field--airport .combo-wrap {
    min-width: 0;
    max-width: 100%;
}
#epv-ticket .epv-tk-issued .epv-tk-field--airport .combo-wrap input {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
#epv-ticket .epv-tk-issued input[type="datetime-local"].time24-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
#epv-ticket .epv-tk-issued input.time24-date-native {
    position: absolute !important;
    inset-block: 0 !important;
    inset-inline-end: 0 !important;
    left: auto !important;
    width: 2rem !important;
    min-width: 2rem !important;
    max-width: 2rem !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: .011 !important;
    pointer-events: auto !important;
    clip: auto !important;
    overflow: hidden !important;
    z-index: 3;
    font-size: 16px !important;
    color: transparent !important;
    background: transparent !important;
    cursor: pointer !important;
}
#epv-ticket .epv-tk-issued .time24-host--dt {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.2rem;
    direction: rtl;
    box-sizing: border-box;
    border: 1px solid var(--slate-300, #cbd5e1);
    border-radius: 12px;
    background: #fff;
    padding: 0;
    gap: 0;
    overflow: visible;
    min-width: 0;
}
#epv-ticket .epv-tk-issued .time24-host--dt:focus-within {
    border-color: var(--primary-500, #569e9a);
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.16);
}
#epv-ticket .epv-tk-issued .time24-date-wrap {
    position: relative;
    grid-column: 1;
    width: auto;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: stretch;
    direction: ltr;
    unicode-bidi: isolate;
}
#epv-ticket .epv-tk-issued .time24-date-btn {
    flex: 0 0 2rem;
    width: 2rem;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
    pointer-events: none;
}
#epv-ticket .epv-tk-issued .time24-host--dt input.time24-date,
#epv-ticket .epv-tk-issued .time24-host--dt input.time24-face {
    padding: 12px 8px;
    font-size: var(--fs-ui, 14px);
    font-weight: 600;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}
#epv-ticket .epv-tk-issued .time24-host--dt input.time24-date {
    width: auto !important;
    max-width: 100%;
    flex: 1 1 auto;
    padding-inline: 12px 6px !important;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
    cursor: text;
}
#epv-ticket .epv-tk-issued .time24-host--dt input.time24-face {
    grid-column: 2;
    width: 5.2rem !important;
    min-width: 5.2rem !important;
    max-width: 5.2rem !important;
    padding-inline: 6px !important;
    border-inline-start: 1px solid #e2e8f0 !important;
}
#epv-ticket .epv-tk-issued textarea {
    min-height: 58px;
}
#epv-ticket .epv-tk-route {
    display: grid;
    grid-template-columns: 1fr 28px 1fr;
    gap: 8px;
    align-items: end;
}
#epv-ticket .epv-tk-route-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    color: #94a3b8;
}
#epv-ticket .epv-tk-route-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: scaleX(-1);
}
#epv-ticket .epv-tk-req {
    color: #b91c1c;
    font-weight: 800;
}
#epv-ticket .epv-tk-pax {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 14px;
}
#epv-ticket .epv-ticket-name-check {
    margin: 8px 0 0;
    padding: 8px 10px;
    font-size: 12px;
}
#epv-ticket .epv-form-actions {
    margin-top: 2px;
    padding: 12px 4px 0;
}
@media (max-width: 980px) {
    #epv-ticket .epv-tk-issued .epv-tk-legs,
    #epv-companions .epv-companion-tk-legs {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 860px) {
    #epv-ticket .epv-tk-status-row,
    #epv-ticket .epv-tk-legs,
    #epv-ticket .epv-tk-pax,
    #epv-ticket .epv-tk-route {
        grid-template-columns: 1fr;
    }
    #epv-ticket .epv-tk-issued .epv-tk-leg-grid,
    #epv-companions .epv-tk-leg-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    #epv-ticket .epv-tk-issued .epv-tk-field--when,
    #epv-ticket .epv-tk-issued .epv-tk-field--transport,
    #epv-ticket .epv-tk-issued .epv-tk-field--airport,
    #epv-ticket .epv-tk-issued .epv-tk-field--note,
    #epv-companions .epv-tk-field--when,
    #epv-companions .epv-tk-field--transport,
    #epv-companions .epv-tk-field--airport,
    #epv-companions .epv-tk-field--note {
        grid-column: 1 / -1;
    }
    #epv-ticket .epv-tk-issued .time24-host--dt {
        width: 100%;
    }
    #epv-ticket .epv-tk-issued .time24-date-wrap {
        width: auto;
        min-width: 0;
    }
    #epv-ticket .epv-tk-issued .epv-tk-field--terminal,
    #epv-companions .epv-tk-field--terminal {
        width: 100%;
    }
    .epv-page .time24-host,
    .epv-page .time24-host--dt {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .epv-page .time24-date-wrap {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
    .epv-page input[type="date"]:not(.time24-date-native):not(.time24-native) {
        font-size: 16px;
        padding-inline: 10px;
    }
    #epv-ticket .epv-tk-route-arrow {
        height: 20px;
        transform: rotate(90deg);
    }
}
.epv-form-grid .field label,
.epv-tab-panel .field label {
    font-size: var(--fs-label);
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.epv-form-grid input,
.epv-form-grid select,
.epv-form-grid textarea,
.epv-tab-panel input:not([type="file"]),
.epv-tab-panel select,
.epv-tab-panel textarea {
    font-size: var(--fs-ui);
}
.epv-form-grid {
    gap: 14px 16px;
}
.epv-page .field,
.epv-page .grid-2 > *,
.epv-page .epv-form-grid > *,
.epv-page .epv-part-grid > * {
    min-width: 0;
    max-width: 100%;
}
.epv-page .pal-date {
    width: 100%;
    max-width: 100%;
}
.epv-page input[type="date"]:not(.time24-date-native):not(.time24-native),
.epv-page input[type="datetime-local"]:not(.time24-native),
.epv-page input[type="time"]:not(.time24-native):not(.time24-face) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.epv-page input[type="date"]::-webkit-datetime-edit,
.epv-page input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.epv-page input[type="date"]::-webkit-date-and-time-value {
    min-width: 8ch;
    max-width: 100%;
}
.epv-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}
/* أزرار صفحة المعاينة — مربعة مثل icon-btn في باقي لوحة الإدارة */
.epv-hero-actions .icon-btn,
.epv-form-actions .icon-btn,
.epv-panel-toolbar .icon-btn,
.epv-part-edit-actions .icon-btn,
.trk-actions .icon-btn,
.trk-pax .icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    position: relative;
    flex-shrink: 0;
    border-radius: 12px;
}
.epv-icon-btn--save {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}
.epv-icon-btn--save:hover:not(:disabled) {
    background: #dcfce7;
    border-color: #86efac;
}
.epv-icon-btn--cancel {
    border-color: #e2e8f0;
    background: #fff;
    color: #64748b;
}
.epv-icon-btn--cancel:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
.epv-icon-btn--back {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}
.epv-icon-btn--add {
    border-color: #bfe3dd;
    background: #ecfdf5;
    color: #0f766e;
}
.epv-icon-btn--add:hover:not(:disabled) {
    background: #d1fae5;
    border-color: #6ee7b7;
}
.epv-icon-btn--whatsapp,
.icon-btn.whatsapp {
    color: #25D366;
}
.epv-icon-btn--whatsapp .epv-icon-btn__main,
.icon-btn.whatsapp svg {
    fill: currentColor;
    stroke: none;
}
.icon-btn.impersonate,
.epv-icon-btn--login_as {
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}
.icon-btn.impersonate:hover,
.epv-icon-btn--login_as:hover {
    background: #ccfbf1;
    color: #115e59;
    border-color: #5eead4;
}
.epv-icon-btn__spin,
.epv-icon-btn__check,
.epv-upload-slot__spin,
.epv-upload-slot__check {
    display: none;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
}
.epv-icon-btn.is-loading .epv-icon-btn__main,
.epv-upload-slot.is-loading .epv-upload-slot__main { opacity: 0; }
.epv-icon-btn.is-loading .epv-icon-btn__spin,
.epv-upload-slot.is-loading .epv-upload-slot__spin {
    display: block;
    animation: admin-btn-spin .9s linear infinite;
}
.epv-icon-btn.is-success .epv-icon-btn__main,
.epv-upload-slot.is-success .epv-upload-slot__main { opacity: 0; }
.epv-icon-btn.is-success .epv-icon-btn__check,
.epv-upload-slot.is-success .epv-upload-slot__check {
    display: block;
}
.epv-icon-btn.is-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.epv-icon-btn.is-success .epv-icon-btn__check { stroke: #fff; }
.epv-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.epv-upload-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #dbe5ea;
    background: #fff;
    color: #475569;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background .15s, box-shadow .15s;
    flex-shrink: 0;
}
.epv-upload-slot:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, .15);
}
.epv-upload-slot.is-loading {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.epv-upload-slot.is-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.epv-upload-slot.is-success .epv-upload-slot__check { stroke: #fff; }
.epv-upload-slot input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.epv-upload-slot svg { width: 20px; height: 20px; }
.epv-file-link {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}
.epv-file-link:hover { text-decoration: underline; }
.epv-quick-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.epv-quick-nav-link:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.epv-section[id] { scroll-margin-top: 72px; }
.epv-section-head--with-action {
    cursor: pointer;
}
.epv-section-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.epv-info-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 860px) {
    .epv-info-groups { grid-template-columns: 1fr; }
    .epv-info-dl > div.epv-doc-uploads { grid-template-columns: 1fr; }
}
.epv-info-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}
.epv-info-group--wide { grid-column: 1 / -1; }
.epv-info-group-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.02em;
}
.epv-info-dl {
    margin: 0;
    display: grid;
    gap: 8px;
}
.epv-info-dl > div {
    display: grid;
    grid-template-columns: minmax(100px, 38%) 1fr;
    gap: 8px 12px;
    align-items: baseline;
    font-size: 13px;
}
.epv-info-dl > div.epv-doc-uploads {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
.epv-doc-uploads > div {
    display: grid;
    grid-template-columns: minmax(88px, 42%) 1fr;
    gap: 6px 8px;
    align-items: start;
}
.epv-info-dl dt {
    margin: 0;
    color: #64748b;
    font-weight: 600;
}
.epv-info-dl dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}
.epv-ltr { text-align: left; direction: ltr; unicode-bidi: plaintext; }
.epv-date {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}
input[name="english_name_passport"] {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}
.epv-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.epv-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: var(--fs-small);
    font-weight: 700;
}
.epv-member-card.is-editing .js-epv-member-edit { display: none; }
.epv-member-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.epv-field-wide { grid-column: 1 / -1; }
.pdata-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pdata-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px 16px 16px;
}
.panel-card > form .pdata-section {
    background: #f8fafc;
}
.pdata-section-title,
.pdata-section > h4.pdata-section-title,
.pdata-section > h5.pdata-section-title {
    margin: 0 0 12px;
    padding: 0 0 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 800;
    color: #0f3d4c;
    letter-spacing: 0;
    line-height: 1.4;
}
.pdata-section .grid-2 {
    align-items: start;
}
.pdata-photo-lead {
    margin-bottom: 12px;
}
.pdata-span-field {
    grid-column: 1 / -1;
}
.pdata-section .epv-info-dl {
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
}
.pdata-section .epv-info-dl > div.epv-doc-uploads,
.pdata-section .epv-info-dl > div.pdata-span {
    grid-column: 1 / -1;
}
@media (max-width: 860px) {
    .pdata-section .epv-info-dl { grid-template-columns: 1fr; }
}
#epv-member .pdata-photo-row,
#epv-member .pdata-doc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
}
#epv-member .pdata-photo-box {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: grid;
    place-items: center;
}
#epv-member .pdata-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#epv-member .pdata-photo-zoom,
#epv-member .pdata-doc-zoom {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
#epv-member .pdata-doc-zoom {
    width: auto;
    height: auto;
}
#epv-member .pdata-photo-empty {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    padding: 0 6px;
}
#epv-member .pdata-photo-meta,
#epv-member .pdata-doc-row {
    min-width: 0;
}
#epv-member .pdata-doc-row {
    align-items: flex-start;
}
#epv-member .pdata-k {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
#epv-member .pdata-photo-meta strong {
    color: #0f172a;
    font-size: 13px;
}
#epv-member .pdata-doc-preview img {
    display: block;
    max-height: 92px;
    max-width: min(100%, 220px);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
}
#epv-member .pdata-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    margin: 0;
}
#epv-member .pdata-fields > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 4px 10px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    min-width: 0;
}
#epv-member .pdata-fields > div.pdata-span {
    grid-column: 1 / -1;
}
.pdata-date {
    display: inline-flex;
    flex-direction: row;
    direction: rtl;
    unicode-bidi: isolate;
    align-items: baseline;
    gap: 0.35em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
html[dir="ltr"] .pdata-date {
    direction: ltr;
}
.pdata-date-d,
.pdata-date-y {
    direction: ltr;
    unicode-bidi: isolate;
}
.pdata-date-m {
    unicode-bidi: isolate;
}
#epv-member .pdata-fields--stack {
    grid-template-columns: 1fr;
}
#epv-member .pdata-fields dt {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
#epv-member .pdata-fields dd {
    margin: 0;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
    min-width: 0;
    word-break: break-word;
}
#epv-member .pdata-legs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
#epv-member .pdata-leg {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px 4px;
}
#epv-member .pdata-leg h6 {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 800;
    color: #0f3d4c;
}
#epv-member .pdata-align-end {
    display: flex;
    align-items: flex-end;
}
#epv-member .pdata-align-end .check-item {
    width: auto;
    margin: 0 0 8px;
}
.pal-date {
    position: relative;
    width: 100%;
}
.pal-date-face {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 46px;
    min-height: 46px;
    padding: 0 12px;
    padding-inline-end: 40px;
    border: 1px solid var(--slate-300, #cbd5e1);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.35em;
    direction: rtl;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-ui);
    line-height: 1.2;
}
html[dir="ltr"] .pal-date-face {
    direction: ltr;
}
.pal-date-face.is-empty {
    color: #94a3b8;
}
.pal-date::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='5.5' width='17' height='15' rx='2'/%3E%3Cpath d='M8 3.5v4M16 3.5v4M3.5 10.5h17'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
input.pal-date-input[type="date"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    background: transparent;
}
.p-review-field .pal-date-face,
.pal-profile-only .pal-date-face {
    height: 42px;
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
}
@media (max-width: 860px) {
    #epv-member .pdata-fields,
    #epv-member .pdata-legs {
        grid-template-columns: 1fr;
    }
    #epv-member .pdata-fields > div {
        grid-template-columns: 7.25rem minmax(0, 1fr);
    }
}
.epv-audit-note,
.epv-form-hint {
    display: block;
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
}
.epv-form-hint { margin-top: 8px; margin-bottom: 0; }

/* —— متطلبات السفر (تأشيرة / تعبئة الوصول / تذكرة) —— */
.travel-req-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.travel-req-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}
.travel-req-grid--three .travel-req-card {
    display: flex;
    flex-direction: column;
}
.travel-req-mode {
    margin: 0;
}
.travel-req-grid--three .travel-req-mode {
    margin-top: auto;
}
.travel-req-grid--compact {
    gap: 10px;
}
.travel-req-form-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
}
@media (max-width: 980px) {
    .travel-req-grid--three {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .travel-req-grid {
        grid-template-columns: 1fr;
    }
}
.travel-req-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.travel-req-card--compact {
    padding: 10px 12px;
}
.travel-req-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.travel-req-card-head strong {
    font-size: 14px;
    color: #334155;
}
.travel-req-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-badge);
    font-weight: 800;
    letter-spacing: 0.01em;
}
.travel-req-badge--need {
    background: #fee2e2;
    color: #b91c1c;
}
.travel-req-badge--exempt {
    background: #dcfce7;
    color: #15803d;
}
.travel-req-reason {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}
.pre-arrival-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid #99f6e4;
    border-radius: 16px;
    background: linear-gradient(180deg, #f0fdfa 0%, #fff 72%);
}
.pre-arrival-box__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.pre-arrival-box__title h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    color: #134e4a;
}
.pre-arrival-box__title p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}
.pre-arrival-box__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 8px;
}
.pre-arrival-box__facts div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.pre-arrival-box__facts span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #64748b;
}
.pre-arrival-box__facts strong {
    display: block;
    font-size: 15px;
    line-height: 1.4;
    color: #0f172a;
    overflow-wrap: anywhere;
}
.pre-arrival-box__btn {
    width: 100%;
    min-height: 48px;
    text-decoration: none;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
}
.pre-arrival-box__note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.5;
}
@media (max-width: 640px) {
    .pre-arrival-box {
        padding: 14px;
        border-radius: 14px;
    }
    .pre-arrival-box__head {
        flex-direction: column;
        align-items: stretch;
    }
    .pre-arrival-box__head .travel-req-badge {
        align-self: flex-start;
    }
    .pre-arrival-box__facts {
        grid-template-columns: 1fr;
    }
}
.epv-visa-pair {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.epv-visa-pair > .pre-arrival-box,
.epv-visa-pair > .epv-visa-card {
    margin: 0;
    min-width: 0;
}
.epv-visa-card__head {
    margin-bottom: 12px;
}
.epv-visa-card__head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    color: #0f172a;
}
.epv-visa-card__head p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}
@media (min-width: 768px) {
    .epv-visa-pair--both {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 14px;
    }
    .epv-visa-pair--both .grid-2 {
        grid-template-columns: 1fr;
    }
}
.country-pick-item--event {
    background: #f0fdf4;
    border-radius: 8px;
}
.visa-policy-ai-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 4px 0 8px;
}
.visa-policy-ai-bar .settings-hint {
    flex: 1 1 240px;
}
#visaCountryList,
#preArrivalCountryList {
    max-height: 220px;
}

/* —— معاينة المشارك: بيانات المشاركة (تعديل نيابة) —— */
.epv-part-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background: #fff;
}
.epv-part-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.epv-part-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.epv-part-topic {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.epv-vip-badge { color: #d97706; font-size: var(--fs-small); }
.epv-part-edit-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.2s ease;
}
.epv-part-edit-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.epv-part-edit-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.epv-part-grid { gap: 6px 16px; font-size: 13px; }
.epv-inv-status.is-accepted { color: #166534; }
.epv-inv-status.is-declined { color: #991b1b; }
.epv-inv-status.is-pending { color: #92400e; }
.epv-muted { font-size: var(--fs-small); color: #94a3b8; margin-inline-start: 4px; }
.epv-by-line { font-size: var(--fs-small); color: #64748b; margin-top: 4px; }
.epv-part-files-view { margin-top: 10px; }
.epv-letter-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.epv-file-block { margin-top: 12px; }
.epv-file-block-head {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.epv-file-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 6px;
}
.epv-file-meta-row--view { flex-direction: column; gap: 4px; }
.epv-file-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-small);
    color: #64748b;
    min-height: 20px;
}
.epv-file-meta-text { line-height: 1.4; }
.epv-part-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.epv-part-save-state { font-size: 12px; color: #16a34a; }
.epv-part-card.is-editing .epv-part-edit-btn { display: none; }

.epv-files-area {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #dbe5ea;
    border-radius: 12px;
    background: #f8fafc;
}
.epv-part-edit .epv-files-area {
    margin-top: 14px;
}
.epv-files-area-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.epv-files-area-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
}
.epv-files-area .epv-file-block:first-of-type { margin-top: 4px; }
.epv-files-area .rev-upload-bar,
.epv-part-card .rev-upload-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}
.epv-files-area .rev-file-icon,
.epv-part-card .rev-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #dbe5ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    background: #fff;
}
.epv-files-area .rev-file-icon input,
.epv-part-card .rev-file-icon input { display: none; }
.epv-files-area .rev-file-icon__main,
.epv-files-area .rev-file-icon__spin,
.epv-files-area .rev-file-icon__check,
.epv-part-card .rev-file-icon__main,
.epv-part-card .rev-file-icon__spin,
.epv-part-card .rev-file-icon__check {
    width: 22px;
    height: 22px;
}
.epv-files-area .rev-file-icon__spin,
.epv-files-area .rev-file-icon__check,
.epv-part-card .rev-file-icon__spin,
.epv-part-card .rev-file-icon__check { display: none; position: absolute; inset: 0; margin: auto; }
.epv-files-area .rev-file-icon--word.is-pick,
.epv-part-card .rev-file-icon--word.is-pick { background: #f0f6fc; border-color: #b4cce4; }
.epv-files-area .rev-file-icon--pdf.is-pick,
.epv-part-card .rev-file-icon--pdf.is-pick { background: #fef2f2; border-color: #fecaca; }
.epv-files-area .rev-file-icon.is-pick.is-filled,
.epv-part-card .rev-file-icon.is-pick.is-filled { box-shadow: inset 0 0 0 1px rgba(15,118,110,.15); }
.epv-files-area .rev-file-icon.is-pick.is-slot-disabled,
.epv-part-card .rev-file-icon.is-pick.is-slot-disabled { opacity: .45; pointer-events: none; }
.epv-files-area .rev-file-icon.is-uploading .rev-file-icon__main,
.epv-part-card .rev-file-icon.is-uploading .rev-file-icon__main { opacity: 0; }
.epv-files-area .rev-file-icon.is-uploading .rev-file-icon__spin,
.epv-part-card .rev-file-icon.is-uploading .rev-file-icon__spin { display: block; animation: admin-btn-spin .9s linear infinite; }
.epv-files-area .rev-file-icon.is-success,
.epv-part-card .rev-file-icon.is-success { background: #16a34a; border-color: #16a34a; }
.epv-files-area .rev-file-icon.is-success .rev-file-icon__main,
.epv-part-card .rev-file-icon.is-success .rev-file-icon__main { opacity: 0; }
.epv-files-area .rev-file-icon.is-success .rev-file-icon__check,
.epv-part-card .rev-file-icon.is-success .rev-file-icon__check { display: block; stroke: #fff; }
.epv-files-area .rev-file-icon.is-linked,
.epv-part-card .rev-file-icon.is-linked { text-decoration: none; }
.epv-files-area .rev-file-slot,
.epv-part-card .rev-file-slot { display: inline-flex; }
.epv-file-slot-captions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}
.epv-file-slot-captions span {
    width: 40px;
    text-align: center;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.settings-tab:hover {
    text-decoration: none;
    background: #f8fafc;
}

.settings-tab.active {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.section-title {
    margin: 16px 0 10px;
    color: #334155;
    font-size: var(--fs-section);
}

.thumb-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--slate-200);
    cursor: zoom-in;
}

.pager {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pager-actions {
    display: flex;
    gap: 8px;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay, 1400);
    padding: 20px;
}

.image-modal.open {
    display: flex;
}

.image-modal img {
    max-width: min(90vw, 900px);
    max-height: 86vh;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
}

.image-modal-close {
    position: absolute;
    top: 18px;
    left: 18px;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-size: 26px;
    cursor: pointer;
}

.names-page-card .table-wrap,
.names-page-card .pager {
    padding: 0 16px 12px;
}

/* ملخص نتائج وصفحات — خط أصغر */
.names-pager-wrap {
    font-size: 12px;
    line-height: 1.35;
}

.names-pager-wrap .names-pager-summary {
    font-size: var(--fs-small);
    line-height: 1.4;
    color: var(--slate-500, #64748b);
    font-weight: 600;
}

.names-pager-wrap .pager-actions .btn,
.names-pager-wrap .pager-actions .btn-sm {
    font-size: var(--fs-button);
    padding: 4px 8px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.events-page-card {
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
}

.events-toolbar {
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--slate-200);
    background: #fff;
}

.events-filters {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(160px, 0.8fr) minmax(0, 1.4fr) auto;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
}

.events-filters input,
.events-filters select {
    height: 42px;
}

.events-reset-wrap {
    padding: 0 10px 10px;
}

.event-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 12px;
    min-height: 230px;
    display: flex;
    flex-direction: column;
}

.event-card h3 {
    font-size: 14px;
    margin: 6px 0;
    color: #0f172a;
    line-height: 1.35;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card p {
    margin: 4px 0;
    font-size: 12px;
    color: #475569;
}

.event-card.empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
}

.event-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    font-size: var(--fs-small);
    color: #64748b;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-item svg {
    width: 13px;
    height: 13px;
    stroke: #64748b;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.event-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
    font-size: var(--fs-badge);
    font-weight: 700;
}

/* رأس بطاقة الفعالية: نوع الفعالية + عدد الأيام بنفس حجم الخط. */
.event-meta-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

/* تكديس سطري التاريخ (ميلادي فوق الهجري) تحت رأس البطاقة. */
.event-dates-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 6px;
}

.event-date-line {
    font-size: 12px;
    color: #475569;
}

.date-separator {
    color: #94a3b8;
    font-size: var(--fs-small);
}

.event-card-divider {
    border-top: 1px solid #e5e7eb;
    margin: 6px 0;
}

.event-link-row {
    justify-content: flex-start;
}

/* شارة عدد أيام الفعالية — بنفس حجم (event-chip) لتظهر بجانب نوع الفعالية. */
.event-days-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: var(--fs-badge);
    font-weight: 700;
}

/* في صفحة تفاصيل الفعالية — الشارة تظهر بجانب عنوان الفعالية بنفس ارتفاع السطر. */
.event-detail-head-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.event-detail-head-top h2 {
    margin: 0;
}

.copy-link-btn {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.copy-link-btn svg {
    width: 13px;
    height: 13px;
    stroke: #334155;
    fill: none;
    stroke-width: 2;
}

.copy-link-btn.copied {
    border-color: #22c55e;
    background: #ecfdf5;
}

.event-form-card {
    max-width: 100%;
}

.event-form-card .btn-primary {
    width: auto;
    min-width: 110px;
}

.event-form-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.event-form-page > form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.event-form-page .settings-card {
    margin: 0;
}
.event-form-page .settings-field-grid .field {
    margin-bottom: 0;
    min-width: 0;
}
.event-form-page .settings-field-grid + .field,
.event-form-page .field + .settings-field-grid,
.event-form-page .settings-subhead + .settings-field-grid {
    margin-top: 4px;
}
.event-form-page .settings-toggle {
    margin: 8px 0 0;
    width: fit-content;
    max-width: 100%;
}
.event-form-page #remoteLinkField {
    margin-top: 12px;
}
.event-cover-asset {
    grid-column: 1 / -1;
}
.event-cover-asset .settings-asset-preview {
    width: 108px;
    min-height: 144px;
    background:
        repeating-linear-gradient(45deg, #f8fafc 0, #f8fafc 8px, #eef2f7 8px, #eef2f7 16px);
}
.event-cover-asset .settings-asset-preview img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}
.event-cover-asset .settings-asset-actions .check-item {
    min-height: 38px;
    margin: 0;
}
.event-form-page .country-pick-list {
    margin-top: 10px;
}
.event-form-page .event-partners-list {
    margin-top: 2px;
}
.event-form-page .event-partner-card {
    background: #f8fafc;
    border-color: var(--slate-200);
    border-radius: 14px;
    padding: 14px;
}
.event-form-page .event-partner-card .settings-file-label {
    width: auto;
}
.event-time-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}
.event-time-inline > label {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.event-time-inline .native-date-wrap {
    width: 158px;
    flex: 0 0 158px;
    max-width: 45%;
}
.event-time-inline-field .settings-hint {
    margin-top: 6px;
}
@media (max-width: 640px) {
    .event-cover-asset .settings-asset-preview {
        width: 100%;
        min-height: 180px;
    }
    .event-time-inline {
        gap: 8px;
    }
    .event-time-inline .native-date-wrap {
        width: 140px;
        flex: 0 0 140px;
        max-width: 46%;
    }
}

.event-partners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-partner-card {
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 14px;
}
.event-partner-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.event-partner-card__head strong {
    font-size: 13px;
    color: #0f172a;
}
.event-partner-remove {
    font-size: var(--fs-button) !important;
}
.event-partner-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.event-partner-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
}

.event-card-actions {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    gap: 6px;
}

.event-detail-head h2 {
    margin-bottom: 6px;
}

.event-detail-head p {
    margin: 2px 0;
    color: #475569;
}

.event-detail-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.event-detail-meta-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #64748b;
}

.event-detail-meta-ico svg {
    width: 13px;
    height: 13px;
    stroke: #64748b;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.event-detail-remote-link {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.event-detail-remote-link:hover {
    color: #0f766e;
    text-decoration: underline;
}

.event-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
}

.event-stats-shell {
    margin-top: 10px;
    margin-bottom: 0;
    padding: 10px 0 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-stats-group {
    min-width: 0;
}

.event-stats-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    line-height: 1.2;
}

.event-stats-group-title::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #dbe4ea;
}

.event-tools-bar {
    padding: 8px 12px;
    margin: 8px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.event-tools-bar .btn,
.event-tools-bar a.btn,
.event-tools-bar button.btn {
    min-height: 28px;
    padding: 3px 8px;
    font-size: var(--fs-small) !important;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 8px;
    gap: 4px;
}
.event-tools-bar .btn svg,
.event-tools-bar a.btn svg,
.event-tools-bar button.btn svg {
    width: 12px;
    height: 12px;
}

.event-stat-card {
    width: 100px;
    flex: 0 0 100px;
    border: 1px solid #d9e2e8;
    border-radius: 8px;
    padding: 5px 4px 6px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 58px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.event-stat-card.is-stat-clickable {
    cursor: pointer;
    user-select: none;
}
.event-stat-card.is-stat-clickable:hover,
.event-stat-card.is-stat-clickable:focus-visible {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    outline: none;
}
.event-stat-card.is-stat-active {
    border-color: #1f6b66;
    box-shadow: 0 0 0 2px rgba(31, 107, 102, 0.22);
}

.event-stat-card > span:not(.event-stat-icon) {
    display: block;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 1px;
    line-height: 1.2;
}

.event-stat-card strong {
    font-size: 16px;
    color: #0f172a;
    line-height: 1.1;
}
.event-stat-card strong.is-live-pulse,
[data-stat-key].is-live-pulse,
#participantsLiveLists.is-live-pulse {
    animation: dashLivePulse .7s ease 1;
}
@keyframes dashLivePulse {
    0% { filter: brightness(1); }
    40% { filter: brightness(1.18); }
    100% { filter: brightness(1); }
}

.event-stat-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    color: #64748b;
    background: transparent;
    border: 0;
}

.event-stat-icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.event-stat-card-blue { background: #edf3fb; color: #2563eb; }
.event-stat-card-purple { background: #f2effb; color: #7c3aed; }
.event-stat-card-violet { background: #f4eefb; color: #9333ea; }
.event-stat-card-teal { background: #edf5f9; color: #0f766e; }
.event-stat-card-cyan { background: #ecfeff; color: #0891b2; }
.event-stat-card-sky { background: #eff6ff; color: #0284c7; }
.event-stat-card-emerald { background: #ecfdf5; color: #059669; }
.event-stat-card-amber { background: #f8f4e8; color: #d97706; }
.event-stat-card-rose { background: #f8eef5; color: #be185d; }
.event-stat-card-green { background: #eaf7f1; color: #16a34a; }
.event-stat-card-slate { background: #f1f4f7; color: #475569; }
.event-stat-card-red { background: #f9eeee; color: #dc2626; }

.event-stat-card-blue strong,
.event-stat-card-purple strong,
.event-stat-card-violet strong,
.event-stat-card-teal strong,
.event-stat-card-cyan strong,
.event-stat-card-sky strong,
.event-stat-card-emerald strong,
.event-stat-card-amber strong,
.event-stat-card-rose strong,
.event-stat-card-green strong,
.event-stat-card-slate strong,
.event-stat-card-red strong,
.event-stat-card-blue span,
.event-stat-card-purple span,
.event-stat-card-violet span,
.event-stat-card-teal span,
.event-stat-card-cyan span,
.event-stat-card-sky span,
.event-stat-card-emerald span,
.event-stat-card-amber span,
.event-stat-card-rose span,
.event-stat-card-green span,
.event-stat-card-slate span,
.event-stat-card-red span,
.event-stat-card-blue .event-stat-icon,
.event-stat-card-purple .event-stat-icon,
.event-stat-card-violet .event-stat-icon,
.event-stat-card-teal .event-stat-icon,
.event-stat-card-cyan .event-stat-icon,
.event-stat-card-sky .event-stat-icon,
.event-stat-card-emerald .event-stat-icon,
.event-stat-card-amber .event-stat-icon,
.event-stat-card-rose .event-stat-icon,
.event-stat-card-green .event-stat-icon,
.event-stat-card-slate .event-stat-icon,
.event-stat-card-red .event-stat-icon {
    color: currentColor;
}

.topic-add-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay, 1400);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.topic-add-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
}

.topic-add-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.topic-add-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.topic-add-modal-head .settings-section-title {
    margin: 0;
    font-size: var(--fs-title);
}

.topic-add-modal-close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.topic-add-modal-body {
    padding: 18px;
}

.topic-total-pages-box {
    border: 1px solid #d7ebe6;
    background: #eff8f5;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 10px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #2f6f6a;
    font-weight: 800;
}

.topic-total-pages-box--editable .topic-total-pages-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.topic-total-pages-box--editable label {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.topic-total-pages-input {
    width: 140px;
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    direction: ltr;
    background: #fff;
    color: #0f172a;
}

.topic-total-pages-input.is-auto {
    background: #ecfeff;
    border-color: #67e8f9;
    color: #0e7490;
}

.topic-pages-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
    font-weight: 500;
}

.topic-modal-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
}

.topic-add-modal .req {
    color: #dc2626;
    font-weight: 700;
}

#topicAddSubmitBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.topic-total-pages-box strong {
    font-size: 20px;
}

.topic-axes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.topic-axes-head .settings-section-title {
    margin: 0;
}

.topic-axis-rows {
    display: grid;
    gap: 8px;
}

.topic-axis-row {
    display: grid;
    grid-template-columns: 44px 190px 1fr;
    gap: 8px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 8px;
}

.topic-axis-row .participant-icon-btn {
    width: 36px;
    height: 36px;
}

.topic-add-modal-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-detail-head {
    margin-bottom: 10px;
}

/* حاوية معاينة الخطاب — حاوية محايدة فقط؛ تنسيقات الخط (العائلة/الحجم/اللون/المحاذاة/السطر)
   تأتي من الأنماط السطرية (inline) داخل القالب نفسه حتى تتطابق مع PDF. */
.letter-preview {
    margin: 8px 0 0;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    direction: rtl;
    overflow-x: auto;
}

.letter-preview img {
    max-width: 100%;
    height: auto;
}

.letter-preview table {
    max-width: 100%;
    border-collapse: collapse;
}

.country-pick-list {
    margin-top: 8px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    max-height: 180px;
    overflow: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.country-pick-item {
    margin: 0;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .page-shell {
        padding: 14px;
    }

    .auth-wrap {
        min-height: calc(100vh - 28px);
    }

    .auth-card,
    .panel-card {
        padding: 18px;
        border-radius: 14px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        left: auto;
        width: 280px;
        flex: none;
        transform: translate3d(100%, 0, 0);
        -webkit-transform: translate3d(100%, 0, 0);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        z-index: var(--z-sidebar, 1000);
        padding: 24px 18px;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.sidebar-open .admin-sidebar {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }

    .admin-sidebar > div:first-child {
        display: block;
        width: 100%;
        overflow: visible;
    }

    .admin-brand {
        margin: 0 0 24px 0;
        text-align: center;
        display: block;
    }

    .brand-logo {
        width: 80px;
        height: 80px;
        margin: 0 auto 12px;
    }

    .admin-brand h2 {
        display: block;
        font-size: var(--fs-section);
        margin-bottom: 4px;
    }

    .admin-brand p {
        display: block;
        font-size: 13px;
        color: rgba(255,255,255,0.8);
    }

    .admin-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .admin-nav a {
        padding: 12px 14px;
        padding-inline-end: 36px;
        font-size: 15px;
    }

    .admin-footer-links {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-value {
        font-size: 26px;
    }

    .admin-main::before,
    .admin-main::after {
        height: 140px;
    }

    .admin-topbar {
        padding: 16px 14px 6px;
    }

    .admin-content {
        padding: 8px 12px 16px;
    }

    .multi-check-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .names-title {
        font-size: var(--fs-title);
    }

    .names-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .names-filters {
        grid-template-columns: 1fr;
    }

    .thumb-img {
        width: 34px;
        height: 34px;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .event-stats-shell { display: flex; flex-direction: column; }
    .event-stats-grid { display: flex; }

    .events-filters {
        grid-template-columns: 1fr;
    }

    .country-pick-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .event-stats-grid { display: flex; }
}

.topics-panel {
    border-radius: 14px;
    padding: 16px 18px 22px;
}

.topics-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.topics-add-btn {
    border: 1px solid #cbe4e2;
    background: linear-gradient(180deg, #f3fbfa 0%, #e8f6f4 100%);
    color: #2a6661;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    cursor: pointer;
    padding: 7px 13px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: all 0.15s ease;
}

.topics-add-btn:hover {
    color: #1f4f4b;
    border-color: #b9dcd8;
    background: linear-gradient(180deg, #eaf8f6 0%, #dff2ef 100%);
}

.topics-add-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.22);
}

.topics-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topics-icon-only-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #cbe4e2;
    background: #fff;
    color: #2a6661;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.topics-icon-only-btn:hover {
    border-color: #b8d9d5;
    background: #f0fdf4;
}

.topics-icon-only-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topics-forms-wrap {
    background: #f8fbfb;
    border: 1px solid #e3ecec;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.topics-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    min-height: 170px;
    align-items: stretch;
}

.topic-summary-card {
    border: 1px solid #e6ecef;
    border-radius: 14px;
    padding: 14px 14px 12px;
    background: #f8fafc;
    width: 100%;
    min-width: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.topic-summary-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}

.topic-summary-head h4 {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-number-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: var(--fs-small);
    color: #126f68;
    background: #dff4f0;
    border: 1px solid #c7e9e6;
    flex: 0 0 auto;
}

.topic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.topic-summary-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.topic-meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 3px 9px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #fff;
    background: #1f7a73;
}

.topic-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e3e8;
    background: #fff;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.topic-icon-btn:hover {
    border-color: #b9ccd6;
    background: #f8fafc;
    text-decoration: none;
    transform: translateY(-1px);
}

.topic-icon-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic-icon-btn-edit {
    color: #0f766e;
}

.topic-icon-btn-preview {
    color: #1d4ed8;
}

.topic-icon-btn-delete {
    color: #b91c1c;
}

.topic-icon-btn-add {
    color: #0f766e;
    border-color: #bfe3dd;
    background: #ecfdf5;
}

.topic-axes-boxes {
    display: grid;
    gap: 8px;
}

.topic-axis-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.topic-axis-box strong {
    font-size: 13px;
    color: #0f172a;
    font-weight: 400;
}

.topic-axis-box span {
    font-size: 12px;
    color: #475569;
}

.topics-manage-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px;
    margin-bottom: 6px;
}

.topics-back-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 800;
    font-size: var(--fs-section);
}

.topics-back-title:hover {
    text-decoration: none;
}

.topics-back-title svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic-manage-grid {
    display: grid;
    gap: 14px;
}

.topic-manage-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}

.topic-manage-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.topic-manage-card-head strong {
    font-size: 17px;
}

.topic-participants-board {
    display: grid;
    gap: 12px;
}

.topic-participants-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.topic-participants-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    background: linear-gradient(180deg, #fcfefe 0%, #f2f8f8 100%);
    border-bottom: 1px solid #e2e8f0;
}

.topic-participants-summary::-webkit-details-marker {
    display: none;
}

.topic-participants-chevron {
    width: 10px;
    height: 10px;
    border-left: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.topic-participants-accordion[open] .topic-participants-chevron {
    transform: rotate(-135deg);
}

.topic-participants-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    flex: 1;
}

.topic-participants-count {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
}

.topic-participants-table-wrap {
    margin-top: 0;
}

.participant-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-order-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.participant-subrole {
    font-size: var(--fs-badge);
    color: #94a3b8;
}

.participant-name-meta {
    font-size: var(--fs-badge);
    color: #64748b;
    line-height: 1.2;
}

.participant-role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: var(--fs-badge);
    font-weight: 500;
    background: #eef2ff;
    color: #475569;
}

.participant-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 3px 7px;
    font-size: 10.5px;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
}

.status-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
}

.status-icon::before,
.status-icon::after {
    content: "";
    position: absolute;
}

.status-icon-x::before,
.status-icon-x::after {
    width: 10px;
    height: 2px;
    background: #dc2626;
    top: 6px;
    left: 2px;
}

.status-icon-x::before {
    transform: rotate(45deg);
}

.status-icon-x::after {
    transform: rotate(-45deg);
}

.status-icon-dot {
    width: 16px;
    height: 16px;
    background: #facc15;
}

.status-icon-check::before {
    width: 5px;
    height: 9px;
    border-right: 2px solid #16a34a;
    border-bottom: 2px solid #16a34a;
    transform: rotate(40deg);
    top: 1px;
    left: 4px;
}

.status-icon-bang::before {
    content: "!";
    position: static;
    font-size: var(--fs-badge);
    font-weight: 900;
    color: #ca8a04;
    width: auto;
    height: auto;
    background: none;
    line-height: 1;
}

.status-icon-bang {
    background: #fef9c3;
    border: 1px solid #fde047;
    align-items: center;
    justify-content: center;
}

.status-list-red {
    color: #dc2626;
    background: #fef2f2;
}

.status-list-yellow {
    color: #a16207;
    background: #fffbeb;
}

.status-list-green {
    color: #15803d;
    background: #ecfdf5;
}

.status-list-muted {
    color: #94a3b8;
}

.participant-status-lines {
    font-size: 10.5px;
    line-height: 1.3;
    min-width: 118px;
}

.participant-status-line + .participant-status-line {
    margin-top: 2px;
}

.participant-status-key {
    color: #64748b;
    font-weight: 600;
}

.participant-status-lines .participant-status-val {
    font-weight: 600;
    background: none;
    padding: 0;
    border-radius: 0;
}

.status-not-received {
    color: #dc2626;
}

.status-under-review {
    color: #ca8a04;
}

.status-needs-revision {
    color: #dc2626;
    background: #fef2f2;
}

.status-accepted {
    color: #16a34a;
}

.participant-deadline-line {
    font-size: 11px;
    color: #334155;
    line-height: 1.6;
}

.topic-participants-board .participant-status-pill {
    font-size: 10.5px !important;
}

.topic-participants-board .participant-deadline-line {
    font-size: 11px !important;
}

.topic-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}

.topic-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 10px;
    flex-wrap: wrap;
}

.topic-list-main-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.participants-head-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.participants-add-panel .settings-section-title {
    font-size: 14px;
}

.topics-panel .settings-section-title {
    font-size: 14px;
}

.participants-add-panel {
    margin-bottom: 14px;
}

.topic-list-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topic-list-toolbar-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-list-toolbar-filters-compact {
    width: 100%;
}

.topic-list-toolbar-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.topic-list-toolbar-filters span {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.topic-list-toolbar-filters select {
    width: auto;
    min-width: 124px;
    padding: 7px 10px;
}

.topic-list-toolbar-filters input[type="text"] {
    width: min(280px, 100%);
    min-width: 180px;
    padding: 7px 10px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
}

.participant-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.participant-send-indicator {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe5ea;
    background: #fff;
}

.participant-send-indicator svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participant-send-indicator.sent-ok svg {
    stroke: #16a34a;
}

.participant-send-indicator.sent-no svg {
    stroke: #dc2626;
}

.vip-star {
    color: #eab308;
    font-size: 16px;
    line-height: 1;
}

tr.pf-row.is-vip {
    background: linear-gradient(0deg, rgba(234, 179, 8, 0.08), rgba(234, 179, 8, 0.08));
}
tr.pf-row.is-vip td:first-child {
    border-inline-start: 3px solid #eab308;
}
tr.pf-row.is-vip strong::after {
    content: "★";
    color: #eab308;
    margin-inline-start: 6px;
    font-size: 14px;
}

.list-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.list-section-head .settings-section-title {
    font-size: 13px;
}

.list-send-btn {
    padding: 3px 7px;
    font-size: var(--fs-small);
    line-height: 1.2;
    min-height: 24px;
}

.list-send-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.list-send-btn-icon:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.list-send-btn-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participants-list-white {
    background: #fff;
}

.participants-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay, 1400);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.participants-modal.is-open {
    display: flex !important;
}

.participants-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.participants-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1080px, 96vw);
    max-height: min(92vh, 920px);
    overflow: hidden;
    border-radius: 18px;
    background: #f8fafc;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.participants-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex: 0 0 auto;
}

.participants-modal-head-copy {
    min-width: 0;
}

.participants-modal-head .settings-section-title {
    margin: 0;
    font-size: var(--fs-title);
}

.participants-modal-head-desc {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.55;
}

.participants-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.participants-modal-close:hover {
    background: #f8fafc;
    color: #0f172a;
}

.participants-modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.participants-modal-body {
    padding: 16px 18px;
    max-width: none;
    margin: 0;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.participants-modal .participants-add-panel {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.participants-modal .participants-form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.participants-modal-card {
    margin: 0;
}

.participants-modal-card .settings-card-head {
    margin-bottom: 12px;
}

.participants-modal-card .field {
    margin-bottom: 0;
}

.participants-role-grid {
    align-items: end;
}

.participants-role-flags-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-700);
}

.participants-role-flags-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participants-modal .participants-role-flags .settings-toggle {
    margin: 0;
    min-height: 46px;
}

.participants-modal .role-topic-wrap {
    margin-top: 12px;
}

.participants-modal .participants-deadlines {
    margin-top: 8px;
}

.participants-modal .participants-deadlines .settings-subhead {
    margin-top: 8px;
}

.participants-modal .settings-hint-inline {
    font-weight: 600;
    color: var(--slate-500);
    font-size: 12px;
}

.participants-topics-select {
    min-height: 96px;
}

.participants-modal-filters {
    padding: 0;
    margin: 0 0 12px;
    background: transparent;
    align-items: center;
}

.participants-modal-filters .filter-icon-btn {
    width: 42px;
    height: 42px;
}

.participants-modal-filters #memberCategoryFilter:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    background: #f3f4f6;
}

.participants-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex: 0 0 auto;
}

.participants-modal-actions .btn {
    width: auto;
    min-width: 120px;
}

/* قائمة اختيار الأعضاء داخل نافذة المشاركين */
.members-pool-table .mp-check-h {
    width: 56px;
}

.members-pool-table .mp-person-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
}

.members-pool-table .mp-title {
    color: #64748b;
    font-size: 0.92em;
    font-weight: 650;
}

.members-pool-table .mp-name {
    color: #0f172a;
    font-weight: 750;
}

/* عمود الجنسية أُزيل من نافذة الإضافة */
.members-pool-table .mp-nationality,
.members-pool-table .mp-nationality-h {
    display: none;
}

.members-pool-table .mp-meta {
    display: none;
}

.members-pool-table .mp-check {
    vertical-align: middle;
    width: 56px;
}

.members-pool-table .mp-check input {
    width: 16px;
    height: 16px;
    accent-color: #0f766e;
}
.mp-check-all-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.mp-selected-bar {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
}
.mp-selected-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.mp-selected-bar-head strong {
    font-size: 13px;
    color: #166534;
}
.mp-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mp-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #86efac;
    color: #14532d;
    font-size: var(--fs-small);
    font-weight: 600;
}
.mp-selected-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
.mp-selected-chip-remove {
    border: 0;
    background: transparent;
    color: #15803d;
    cursor: pointer;
    font-size: var(--fs-small);
    line-height: 1;
    padding: 0 2px;
}
.mp-selected-chip-remove:hover {
    color: #b91c1c;
}

.participants-modal .members-pool-wrap {
    margin: 0;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    overflow: auto;
    max-height: min(38vh, 380px);
    background: #fff;
}

.participants-modal .members-pool-table {
    margin: 0;
}

/*
 * جدول عادي على الكمبيوتر/التابلت (≥641px).
 * يغلب تحويل البطاقات العام عند ≤900px (تكبير الشاشة / نافذة ضيقة).
 */
@media (min-width: 641px) {
    .members-pool-table {
        border-collapse: collapse;
        border-spacing: 0;
    }

    .members-pool-table thead th {
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px 12px;
        font-size: 12px;
        font-weight: 700;
    }

    .members-pool-table tbody tr {
        box-shadow: none;
        background: #fff;
    }

    .members-pool-table tbody td {
        border-radius: 0 !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-top: 0 !important;
        border-bottom: 1px solid #eef2f6 !important;
        padding: 10px 12px;
        vertical-align: middle;
        background: #fff;
        box-shadow: none;
        display: table-cell !important;
        width: auto !important;
    }

    .members-pool-table thead {
        display: table-header-group !important;
    }

    .members-pool-table tbody {
        display: table-row-group !important;
    }

    .members-pool-table tr {
        display: table-row !important;
        margin: 0 !important;
        width: auto !important;
    }

    .members-pool-table tr.is-mp-filtered-out {
        display: none !important;
    }

    .members-pool-table tbody tr:hover td {
        background: #f8fafc;
    }

    .members-pool-table tbody td::before {
        content: none !important;
        display: none !important;
    }

    /* قسم قوائم المشاركين: جدول أعمدة عادي (لا بطاقات صفوف) */
    .participants-board-panel .topic-participants-board {
        gap: 0;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

    .participants-board-panel .topic-participants-accordion {
        border: 0;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    .participants-board-panel .topic-participants-accordion:last-child {
        border-bottom: 0;
    }

    .participants-board-panel .topic-participants-summary {
        border-radius: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .participants-board-panel .admin-table,
    .participants-board-panel .participants-unified-table {
        width: 100%;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        table-layout: fixed;
        display: table !important;
    }

    .participants-board-panel .admin-table thead,
    .participants-board-panel .participants-unified-table thead {
        display: table-header-group !important;
    }

    .participants-board-panel .admin-table tbody,
    .participants-board-panel .participants-unified-table tbody {
        display: table-row-group !important;
    }

    .participants-board-panel .admin-table tr,
    .participants-board-panel .participants-unified-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    .participants-board-panel tr.pf-row.is-pf-filtered-out {
        display: none !important;
    }

    .participants-board-panel .admin-table th,
    .participants-board-panel .admin-table td,
    .participants-board-panel .participants-unified-table th,
    .participants-board-panel .participants-unified-table td {
        display: table-cell !important;
        float: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .participants-board-panel .admin-table thead th,
    .participants-board-panel .participants-unified-table thead th {
        background: #f8fafc !important;
        border: 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 12px 14px;
        vertical-align: middle;
    }

    .participants-board-panel .admin-table tbody td,
    .participants-board-panel .participants-unified-table tbody td {
        border: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
        border-inline-start: 0 !important;
        border-inline-end: 0 !important;
        background: #fff !important;
        padding: 12px 14px;
        vertical-align: middle;
    }

    .participants-board-panel .admin-table tbody td:first-child,
    .participants-board-panel .admin-table tbody td:last-child,
    .participants-board-panel .participants-unified-table tbody td:first-child,
    .participants-board-panel .participants-unified-table tbody td:last-child {
        border-radius: 0 !important;
        border-right: 0 !important;
        border-left: 0 !important;
    }

    .participants-board-panel .admin-table tbody tr:last-child td,
    .participants-board-panel .participants-unified-table tbody tr:last-child td {
        border-bottom: 0 !important;
    }

    .participants-board-panel .admin-table tbody tr:hover td,
    .participants-board-panel .participants-unified-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .participants-board-panel .admin-table tbody td::before,
    .participants-board-panel .participants-unified-table tbody td::before {
        content: none !important;
        display: none !important;
    }

    .participants-board-panel tr.pf-row.is-vip {
        background: #fffbeb !important;
    }

    .participants-board-panel tr.pf-row.is-vip td {
        background: #fffbeb !important;
    }

    .participants-board-panel tr.pf-row.is-vip td:first-child {
        border-inline-start: 3px solid #eab308 !important;
    }

    /* إدارة المشاركين (قائمة الأسماء): جدول عادي وليس بطاقات صفوف */
    .names-page-card .members-list-table {
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        display: table !important;
        table-layout: fixed !important;
        width: 100%;
    }

    .names-page-card .members-list-table thead {
        display: table-header-group !important;
    }

    .names-page-card .members-list-table tbody {
        display: table-row-group !important;
    }

    .names-page-card .members-list-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
    }

    .names-page-card .members-list-table tr.mf-row.is-mf-filtered-out,
    .names-page-card .members-list-table tr.mf-empty-row.is-mf-filtered-out {
        display: none !important;
    }

    .names-page-card .members-list-table th,
    .names-page-card .members-list-table td {
        display: table-cell !important;
        float: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-top: 0 !important;
        border-bottom: 1px solid #eef2f6 !important;
        background: #fff !important;
        vertical-align: middle;
        padding: 12px 14px;
    }

    .names-page-card .members-list-table--no-expertise .col-member-expertise,
    .names-page-card .members-list-table--no-expertise thead th.th-member-expertise,
    .names-page-card .members-list-table--no-expertise tbody td.td-member-expertise {
        display: none !important;
        width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
    }

    .names-page-card .members-list-table thead th {
        background: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
    }

    .names-page-card .members-list-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .names-page-card .members-list-table tbody tr.is-vip,
    .names-page-card .members-list-table tbody tr.is-vip td,
    .names-page-card .members-list-table tbody tr.is-vip:hover td {
        background: #fffbeb !important;
    }
    .names-page-card .members-list-table tbody tr.is-vip td:first-child {
        border-inline-start: 3px solid #eab308 !important;
    }

    .names-page-card .members-list-table tbody td::before {
        content: none !important;
        display: none !important;
    }

    .names-page-card .members-list-table .pal-check-col,
    .names-page-card .members-list-table .pal-check-cell,
    .names-page-card .members-list-table .col-member-check {
        width: 42px !important;
    }
    .names-page-card .members-list-table .th-member-photo,
    .names-page-card .members-list-table .td-member-photo,
    .names-page-card .members-list-table .col-member-photo {
        width: 72px !important;
        text-align: center;
        padding: 8px !important;
    }
    .names-page-card .members-list-table .th-member-nationality,
    .names-page-card .members-list-table .td-member-nationality,
    .names-page-card .members-list-table .col-member-nationality,
    .names-page-card .members-list-table .th-member-expertise,
    .names-page-card .members-list-table .td-member-expertise {
        text-align: center !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: #64748b !important;
    }
    .names-page-card .members-list-table .th-member-nationality,
    .names-page-card .members-list-table .td-member-nationality,
    .names-page-card .members-list-table .col-member-nationality {
        width: 108px !important;
    }
    .names-page-card .members-list-table .th-member-identity,
    .names-page-card .members-list-table .td-member-identity,
    .names-page-card .members-list-table .col-member-identity {
        width: 36% !important;
    }
    .names-page-card .members-list-table .th-member-expertise,
    .names-page-card .members-list-table .td-member-expertise,
    .names-page-card .members-list-table .col-member-expertise {
        width: 14% !important;
        max-width: 0;
    }
    .names-page-card .members-list-table .th-member-actions {
        width: 204px !important;
        padding-inline: 8px !important;
        overflow: hidden;
        text-align: center !important;
    }
    .names-page-card .members-list-table .td-member-actions,
    .names-page-card .members-list-table .col-member-actions {
        width: 204px !important;
        padding-inline: 8px !important;
        overflow: hidden;
        text-align: left;
    }
    .names-page-card .members-list-table .td-member-photo .thumb-img {
        width: 100%;
        height: auto;
        max-width: 100%;
        aspect-ratio: 1 / 1;
    }
    .names-page-card .members-list-table .td-member-actions .actions-cell {
        flex-wrap: nowrap;
        flex-direction: row;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    .participants-modal {
        padding: 8px;
        align-items: stretch;
    }

    .participants-modal-dialog {
        width: 100%;
        max-height: 96vh;
        border-radius: 14px;
        margin: auto 0;
    }

    .participants-modal-head {
        padding: 12px 14px;
    }

    .participants-modal-head .settings-section-title {
        font-size: var(--fs-section);
    }

    .participants-modal-head-desc {
        display: none;
    }

    .participants-modal-body {
        padding: 10px 12px;
    }

    .participants-modal .settings-field-grid,
    .participants-modal .participants-role-grid {
        grid-template-columns: 1fr;
    }

    .participants-modal-card {
        padding: 12px;
    }

    .participants-modal .events-filters {
        gap: 6px;
        margin-bottom: 8px;
        grid-template-columns: 1fr;
    }

    .participants-modal-filters .filter-icon-btn {
        width: 42px;
        justify-self: start;
    }

    .participants-modal .members-pool-wrap {
        margin: 0;
        overflow: visible;
        max-height: none;
        border: 0;
        background: transparent;
    }

    /* تجاوز بطاقات الجدول العامة — صفوف اختيار مضغوطة */
    .participants-modal .members-pool-table,
    .participants-modal .members-pool-table tbody {
        display: block;
        width: 100%;
    }

    .participants-modal .members-pool-table thead {
        display: none;
    }

    .participants-modal .members-pool-table tbody tr[data-name] {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        margin: 0 0 6px;
        padding: 8px 10px;
        border: 1px solid #e6edf2;
        border-radius: 10px;
        background: #fff;
        box-shadow: none;
    }

    .participants-modal .members-pool-table tbody tr[data-name]:has(input:checked) {
        border-color: #9ec9bd;
        background: #f3faf7;
    }

    .participants-modal .members-pool-table tbody tr[data-name] td {
        display: block;
        width: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0;
        background: transparent !important;
        box-shadow: none !important;
        align-items: unset;
        justify-content: unset;
    }

    .participants-modal .members-pool-table tbody tr[data-name] td::before {
        content: none !important;
        display: none !important;
        flex: none !important;
        max-width: none !important;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-check {
        flex: 0 0 22px;
        width: 22px !important;
        padding-top: 2px !important;
        line-height: 0;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-check input {
        width: 17px;
        height: 17px;
        margin: 0;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-person {
        flex: 1 1 auto;
        min-width: 0;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-person-name {
        gap: 2px 5px;
        line-height: 1.35;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-title {
        font-size: var(--fs-small);
        color: #64748b;
        font-weight: 600;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-name {
        font-size: 13.5px;
        font-weight: 700;
        color: #0f172a;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-meta {
        display: block;
        margin-top: 3px;
        font-size: var(--fs-small);
        line-height: 1.4;
        color: #64748b;
        font-weight: 500;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-job,
    .participants-modal .members-pool-table tbody tr[data-name] .mp-category,
    .participants-modal .members-pool-table tbody tr[data-name] .mp-nationality {
        display: none !important;
    }

    .participants-modal .members-pool-table tbody tr.mp-empty-row,
    .participants-modal .members-pool-table tbody tr.mp-empty-row td {
        display: block;
        width: 100% !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 14px 8px !important;
        text-align: center;
        color: #64748b;
        font-size: 13px;
        background: transparent !important;
    }

    .participants-modal-actions {
        position: static;
        background: #fff;
        margin: 0;
        padding: 10px 12px 12px;
        gap: 6px;
        justify-content: stretch;
    }

    .participants-modal-actions .btn {
        flex: 1 1 auto;
        min-height: 42px;
        font-size: var(--fs-button);
        width: auto;
        min-width: 0;
    }
}

.participant-icon-btn {
    width: 36px;
    height: 36px;
}

.topic-add-modal-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-detail-head {
    margin-bottom: 10px;
}

/* حاوية معاينة الخطاب — حاوية محايدة فقط؛ تنسيقات الخط (العائلة/الحجم/اللون/المحاذاة/السطر)
   تأتي من الأنماط السطرية (inline) داخل القالب نفسه حتى تتطابق مع PDF. */
.letter-preview {
    margin: 8px 0 0;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    direction: rtl;
    overflow-x: auto;
}

.letter-preview img {
    max-width: 100%;
    height: auto;
}

.letter-preview table {
    max-width: 100%;
    border-collapse: collapse;
}

.country-pick-list {
    margin-top: 8px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    max-height: 180px;
    overflow: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.country-pick-item {
    margin: 0;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .page-shell {
        padding: 14px;
    }

    .auth-wrap {
        min-height: calc(100vh - 28px);
    }

    .auth-card,
    .panel-card {
        padding: 18px;
        border-radius: 14px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        left: auto;
        width: 280px;
        flex: none;
        transform: translate3d(100%, 0, 0);
        -webkit-transform: translate3d(100%, 0, 0);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        z-index: var(--z-sidebar, 1000);
        padding: 24px 18px;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.sidebar-open .admin-sidebar {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }

    .admin-sidebar > div:first-child {
        display: block;
        width: 100%;
        overflow: visible;
    }

    .admin-brand {
        margin: 0 0 24px 0;
        text-align: center;
        display: block;
    }

    .brand-logo {
        width: 80px;
        height: 80px;
        margin: 0 auto 12px;
    }

    .admin-brand h2 {
        display: block;
        font-size: var(--fs-section);
        margin-bottom: 4px;
    }

    .admin-brand p {
        display: block;
        font-size: 13px;
        color: rgba(255,255,255,0.8);
    }

    .admin-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .admin-nav a {
        padding: 12px 14px;
        padding-inline-end: 36px;
        font-size: 15px;
    }

    .admin-footer-links {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-value {
        font-size: 26px;
    }

    .admin-main::before,
    .admin-main::after {
        height: 140px;
    }

    .admin-topbar {
        padding: 16px 14px 6px;
    }

    .admin-content {
        padding: 8px 12px 16px;
    }

    .multi-check-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .names-title {
        font-size: var(--fs-title);
    }

    .names-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .names-filters {
        grid-template-columns: 1fr;
    }

    .thumb-img {
        width: 34px;
        height: 34px;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .event-stats-shell { display: flex; flex-direction: column; }
    .event-stats-grid { display: flex; }

    .events-filters {
        grid-template-columns: 1fr;
    }

    .country-pick-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .event-stats-grid { display: flex; }
}

.topics-panel {
    border-radius: 14px;
    padding: 16px 18px 22px;
}

.topics-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.topics-add-btn {
    border: 1px solid #cbe4e2;
    background: linear-gradient(180deg, #f3fbfa 0%, #e8f6f4 100%);
    color: #2a6661;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    cursor: pointer;
    padding: 7px 13px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: all 0.15s ease;
}

.topics-add-btn:hover {
    color: #1f4f4b;
    border-color: #b9dcd8;
    background: linear-gradient(180deg, #eaf8f6 0%, #dff2ef 100%);
}

.topics-add-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.22);
}

.topics-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topics-icon-only-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #cbe4e2;
    background: #fff;
    color: #2a6661;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.topics-icon-only-btn:hover {
    border-color: #b8d9d5;
    background: #f0fdf4;
}

.topics-icon-only-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topics-forms-wrap {
    background: #f8fbfb;
    border: 1px solid #e3ecec;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.topics-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    min-height: 170px;
    align-items: stretch;
}

.topic-summary-card {
    border: 1px solid #e6ecef;
    border-radius: 14px;
    padding: 14px 14px 12px;
    background: #f8fafc;
    width: 100%;
    min-width: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.topic-summary-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}

.topic-summary-head h4 {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-number-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: var(--fs-small);
    color: #126f68;
    background: #dff4f0;
    border: 1px solid #c7e9e6;
    flex: 0 0 auto;
}

.topic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.topic-summary-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.topic-meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 3px 9px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #fff;
    background: #1f7a73;
}

.topic-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e3e8;
    background: #fff;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.topic-icon-btn:hover {
    border-color: #b9ccd6;
    background: #f8fafc;
    text-decoration: none;
    transform: translateY(-1px);
}

.topic-icon-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic-icon-btn-edit {
    color: #0f766e;
}

.topic-icon-btn-preview {
    color: #1d4ed8;
}

.topic-icon-btn-delete {
    color: #b91c1c;
}

.topic-icon-btn-add {
    color: #0f766e;
    border-color: #bfe3dd;
    background: #ecfdf5;
}

.topic-axes-boxes {
    display: grid;
    gap: 8px;
}

.topic-axis-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.topic-axis-box strong {
    font-size: 13px;
    color: #0f172a;
    font-weight: 400;
}

.topic-axis-box span {
    font-size: 12px;
    color: #475569;
}

.topics-manage-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px;
    margin-bottom: 6px;
}

.topics-back-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 800;
    font-size: var(--fs-section);
}

.topics-back-title:hover {
    text-decoration: none;
}

.topics-back-title svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic-manage-grid {
    display: grid;
    gap: 14px;
}

.topic-manage-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}

.topic-manage-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.topic-manage-card-head strong {
    font-size: 17px;
}

.topic-participants-board {
    display: grid;
    gap: 12px;
}

.topic-participants-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.topic-participants-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    background: linear-gradient(180deg, #fcfefe 0%, #f2f8f8 100%);
    border-bottom: 1px solid #e2e8f0;
}

.topic-participants-summary::-webkit-details-marker {
    display: none;
}

.topic-participants-chevron {
    width: 10px;
    height: 10px;
    border-left: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.topic-participants-accordion[open] .topic-participants-chevron {
    transform: rotate(-135deg);
}

.topic-participants-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    flex: 1;
}

.topic-participants-count {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
}

.topic-participants-table-wrap {
    margin-top: 0;
}

.participant-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-order-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.participant-subrole {
    font-size: var(--fs-badge);
    color: #94a3b8;
}

.participant-name-meta {
    font-size: var(--fs-badge);
    color: #64748b;
    line-height: 1.2;
}

.participant-role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: var(--fs-badge);
    font-weight: 500;
    background: #eef2ff;
    color: #475569;
}

.participant-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 3px 7px;
    font-size: 10.5px;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
}

.status-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
}

.status-icon::before,
.status-icon::after {
    content: "";
    position: absolute;
}

.status-icon-x::before,
.status-icon-x::after {
    width: 10px;
    height: 2px;
    background: #dc2626;
    top: 6px;
    left: 2px;
}

.status-icon-x::before {
    transform: rotate(45deg);
}

.status-icon-x::after {
    transform: rotate(-45deg);
}

.status-icon-dot {
    width: 16px;
    height: 16px;
    background: #facc15;
}

.status-icon-check::before {
    width: 5px;
    height: 9px;
    border-right: 2px solid #16a34a;
    border-bottom: 2px solid #16a34a;
    transform: rotate(40deg);
    top: 1px;
    left: 4px;
}

.status-icon-bang::before {
    content: "!";
    position: static;
    font-size: var(--fs-badge);
    font-weight: 900;
    color: #ca8a04;
    width: auto;
    height: auto;
    background: none;
    line-height: 1;
}

.status-icon-bang {
    background: #fef9c3;
    border: 1px solid #fde047;
    align-items: center;
    justify-content: center;
}

.status-list-red {
    color: #dc2626;
    background: #fef2f2;
}

.status-list-yellow {
    color: #a16207;
    background: #fffbeb;
}

.status-list-green {
    color: #15803d;
    background: #ecfdf5;
}

.status-list-muted {
    color: #94a3b8;
}

.participant-status-lines {
    font-size: 10.5px;
    line-height: 1.3;
    min-width: 118px;
}

.participant-status-line + .participant-status-line {
    margin-top: 2px;
}

.participant-status-key {
    color: #64748b;
    font-weight: 600;
}

.participant-status-lines .participant-status-val {
    font-weight: 600;
    background: none;
    padding: 0;
    border-radius: 0;
}

.status-not-received {
    color: #dc2626;
}

.status-under-review {
    color: #ca8a04;
}

.status-needs-revision {
    color: #dc2626;
    background: #fef2f2;
}

.status-accepted {
    color: #16a34a;
}

.participant-deadline-line {
    font-size: 11px;
    color: #334155;
    line-height: 1.6;
}

.topic-participants-board .participant-status-pill {
    font-size: 10.5px !important;
}

.topic-participants-board .participant-deadline-line {
    font-size: 11px !important;
}

.topic-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}

.topic-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 10px;
    flex-wrap: wrap;
}

.topic-list-main-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.participants-head-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.participants-add-panel .settings-section-title {
    font-size: 14px;
}

.topics-panel .settings-section-title {
    font-size: 14px;
}

.participants-add-panel {
    margin-bottom: 14px;
}

.topic-list-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topic-list-toolbar-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-list-toolbar-filters-compact {
    width: 100%;
}

.topic-list-toolbar-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.topic-list-toolbar-filters span {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.topic-list-toolbar-filters select {
    width: auto;
    min-width: 124px;
    padding: 7px 10px;
}

.topic-list-toolbar-filters input[type="text"] {
    width: min(280px, 100%);
    min-width: 180px;
    padding: 7px 10px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
}

.participant-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.participant-send-indicator {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe5ea;
    background: #fff;
}

.participant-send-indicator svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participant-send-indicator.sent-ok svg {
    stroke: #16a34a;
}

.participant-send-indicator.sent-no svg {
    stroke: #dc2626;
}

.vip-star {
    color: #eab308;
    font-size: 16px;
    line-height: 1;
}

tr.pf-row.is-vip {
    background: linear-gradient(0deg, rgba(234, 179, 8, 0.08), rgba(234, 179, 8, 0.08));
}
tr.pf-row.is-vip td:first-child {
    border-inline-start: 3px solid #eab308;
}
tr.pf-row.is-vip strong::after {
    content: "★";
    color: #eab308;
    margin-inline-start: 6px;
    font-size: 14px;
}

.list-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.list-section-head .settings-section-title {
    font-size: 13px;
}

.list-send-btn {
    padding: 3px 7px;
    font-size: var(--fs-small);
    line-height: 1.2;
    min-height: 24px;
}

.list-send-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.list-send-btn-icon:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.list-send-btn-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participant-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #dbe5ea;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.participant-icon-btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.participant-icon-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participant-icon-btn-delete {
    color: #64748b;
    border-color: #cbd5e1;
}

.participant-icon-btn-delete.is-protected {
    color: #dc2626;
    border-color: #dc2626;
}
.participant-icon-btn--whatsapp {
    color: #25D366;
}
.participant-icon-btn--whatsapp svg {
    fill: currentColor;
    stroke: none;
}
.participant-icon-btn--impersonate {
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}
.participant-icon-btn--impersonate:hover {
    background: #ccfbf1;
    color: #115e59;
}
.participant-icon-btn.js-pal-copy.is-success,
.participant-icon-btn.js-pal-wa.is-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.participant-icon-btn.js-pal-copy.is-loading,
.participant-icon-btn.js-pal-wa.is-loading {
    opacity: 0.65;
    cursor: wait;
}

.participant-travel-btn--none {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.participant-travel-btn--uploaded {
    color: #2563eb;
    border-color: #93c5fd;
    background: #eff6ff;
}

.participant-travel-btn--revision {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.participant-remind-btn {
    color: #2f855a;
    border-color: #bbf7d0;
    background: #f0fdf4;
    position: relative;
}

.participant-remind-btn__spin,
.participant-remind-btn__check {
    display: none;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px;
    height: 14px;
}

.participant-remind-btn.is-loading .participant-remind-btn__mail,
.participant-remind-btn.is-success .participant-remind-btn__mail {
    opacity: 0;
}

.participant-remind-btn.is-loading .participant-remind-btn__spin {
    display: block;
    animation: admin-btn-spin .9s linear infinite;
}

.participant-remind-btn.is-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.participant-remind-btn.is-success .participant-remind-btn__check {
    display: block;
    stroke: #fff;
}

.participant-actions-th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.participant-actions-legend-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: #64748b;
    text-decoration: none;
    border-radius: 3px;
    transition: color 0.15s ease, background 0.15s ease;
}

.participant-actions-legend-jump:hover {
    color: #0f766e;
    background: #ecfdf5;
}

.participant-actions-legend-jump svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.participant-actions-legend {
    scroll-margin-top: 72px;
}

.participant-actions-legend--cols {
    margin: 10px 0 0;
    padding: 0;
    background: none;
    border: none;
    font-size: var(--fs-small);
    color: #64748b;
    line-height: 1.45;
}

.participant-actions-legend--cols .participant-actions-legend__title {
    margin: 0 0 6px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #475569;
}

.participant-actions-legend__grid {
    display: grid;
    gap: 12px 20px;
    align-items: start;
}

.participant-actions-legend--cols-3 .participant-actions-legend__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.participant-actions-legend--cols-2 .participant-actions-legend__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.participant-actions-legend__col {
    min-width: 0;
    padding-inline-start: 10px;
    border-inline-start: 1px solid #e2e8f0;
}

.participant-actions-legend__col:first-child {
    padding-inline-start: 0;
    border-inline-start: none;
}

.participant-actions-legend__col-title {
    margin: 0 0 5px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #334155;
}

.participant-actions-legend__entries {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.participant-actions-legend__entry {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
}

.participant-actions-legend__entry-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.participant-actions-legend__entry-label {
    flex: 1;
    min-width: 0;
    font-size: var(--fs-small);
    color: #64748b;
    line-height: 1.35;
}

.participant-actions-legend--cols .participant-icon-btn,
.participant-actions-legend--cols .participant-travel-btn {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    pointer-events: none;
    cursor: default;
    flex: 0 0 auto;
}

.participant-actions-legend--cols .participant-icon-btn svg,
.participant-actions-legend--cols .participant-travel-btn svg {
    width: 10px;
    height: 10px;
    stroke-width: 2;
}

.participant-actions-legend--cols .participant-send-indicator {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.participant-actions-legend--cols .participant-send-indicator svg {
    width: 9px;
    height: 9px;
    stroke-width: 2.2;
}

@media (max-width: 900px) {
    .participant-actions-legend--cols-3 .participant-actions-legend__grid,
    .participant-actions-legend--cols-2 .participant-actions-legend__grid {
        grid-template-columns: 1fr;
    }

    .participant-actions-legend__col {
        padding-inline-start: 0;
        border-inline-start: none;
        padding-top: 8px;
        border-top: 1px solid #e2e8f0;
    }

    .participant-actions-legend__col:first-child {
        padding-top: 0;
        border-top: none;
    }
}

@keyframes admin-btn-spin {
    to { transform: rotate(360deg); }
}

.participants-fixed-table {
    table-layout: fixed;
    width: 100%;
}

.participants-fixed-table th,
.participants-fixed-table td {
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

/*
 * شبكة أعمدة موحّدة لكل قوائم المشاركين داخل الفعالية
 * (مستكتبين / عارضين / حضور / أمانة / مرافقين)
 */
.participants-board-panel .participants-unified-table.participants-fixed-table-5 {
    table-layout: fixed;
    width: 100%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-5 th:nth-child(1),
.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(1) {
    width: 28%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-5 th:nth-child(2),
.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(2) {
    width: 14%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-5 th:nth-child(3),
.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(3) {
    width: 20%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-5 th:nth-child(4),
.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(4) {
    width: 12%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-5 th:nth-child(5),
.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(5) {
    width: 26%;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(1),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(1) {
    width: 42px;
    min-width: 42px;
    max-width: 48px;
    text-align: center;
    padding-inline: 6px;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(2),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(2) {
    width: 26%;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(3),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(3) {
    width: 13%;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(4),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(4) {
    width: 19%;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(5),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(5) {
    width: 12%;
}
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 th:nth-child(6),
.participants-board-panel .participants-unified-table.has-pal-pick.participants-fixed-table-5 td:nth-child(6) {
    width: 24%;
}
.participants-board-panel tr.pf-row.is-vip.has-pal-pick td:first-child,
.participants-board-panel .has-pal-pick tr.pf-row.is-vip td:first-child {
    border-inline-start: 0 !important;
}
.participants-board-panel .has-pal-pick tr.pf-row.is-vip td:nth-child(2) {
    border-inline-start: 3px solid #eab308 !important;
}

.participants-board-panel .companions-table.participants-fixed-table-5 th:nth-child(1),
.participants-board-panel .companions-table.participants-fixed-table-5 td:nth-child(1) {
    width: 24%;
}
.participants-board-panel .companions-table.participants-fixed-table-5 th:nth-child(3),
.participants-board-panel .companions-table.participants-fixed-table-5 td:nth-child(3) {
    width: 20%;
}
.participants-board-panel .companions-table.participants-fixed-table-5 th:nth-child(4),
.participants-board-panel .companions-table.participants-fixed-table-5 td:nth-child(4) {
    width: 16%;
}
.participants-board-panel .companions-table.participants-fixed-table-5 th:nth-child(5),
.participants-board-panel .companions-table.participants-fixed-table-5 td:nth-child(5) {
    width: 26%;
}

.participants-board-panel .participants-unified-table.participants-fixed-table-6 {
    table-layout: fixed;
    width: 100%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(1),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(1) {
    width: 20%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(2),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(2) {
    width: 11%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(3),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(3) {
    width: 18%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(4),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(4) {
    width: 12%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(5),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(5) {
    width: 13%;
}
.participants-board-panel .participants-unified-table.participants-fixed-table-6 th:nth-child(6),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(6) {
    width: 26%;
}

.participants-board-panel .participants-unified-table thead th:last-child,
.participants-board-panel .participants-unified-table tbody td:last-child {
    text-align: left;
}

.participants-board-panel .participants-unified-table .participant-actions {
    display: flex;
    width: auto;
    max-width: min(100%, calc(28px * 5 + 3px * 4));
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-end; /* في RTL: تجميع الأيقونات على يسار الخلية */
    column-gap: 3px;
    row-gap: 4px;
    white-space: normal;
    margin-inline-start: auto;
}
.participants-board-panel .participants-unified-table .participant-actions > * {
    flex: 0 0 auto;
}
.participants-board-panel .participants-unified-table .participant-actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.participants-board-panel .participants-unified-table .participant-actions-th {
    justify-content: flex-end;
    width: 100%;
}

.participants-board-panel .participants-unified-table.participants-fixed-table-5 td:nth-child(5):not(:last-child),
.participants-board-panel .participants-unified-table.participants-fixed-table-6 td:nth-child(6):not(:last-child) {
    white-space: nowrap;
}
.participants-board-panel .participants-unified-table tbody td:last-child {
    white-space: normal;
}

.members-pool-table tbody.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.epv-companion-coverage {
    margin-top: 8px;
    padding-top: 4px;
}
.epv-companion-coverage-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.epv-companion-coverage-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.epv-companion-coverage-title {
    font-weight: 700;
    font-size: 13px;
    color: #334155;
    min-width: 160px;
}
.epv-companion-coverage-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}
.epv-companions-notes-box {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    color: #78350f;
}
.epv-companions-notes-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}
.epv-companions-notes-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}
.epv-housing-hint.muted {
    font-size: 12px;
    margin: -4px 0 12px;
}
.epv-housing-enable-row {
    margin: 0 0 8px;
    max-width: 420px;
}
.epv-hotel-name-field {
    margin-bottom: 14px;
    max-width: 420px;
}
.epv-hotel-name-field small.muted {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
}
.epv-attendance-table-wrap {
    overflow-x: auto;
    margin-top: 4px;
    -webkit-overflow-scrolling: touch;
}
.epv-attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.epv-attendance-table th,
.epv-attendance-table td {
    text-align: right;
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.epv-attendance-table th {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
}
.epv-attendance-table .epv-att-cell--name {
    min-width: 140px;
}
.epv-attendance-table input[type="text"],
.epv-attendance-table select.epv-housing-type-select {
    width: 100%;
    min-width: 0;
    max-width: 180px;
}
.epv-attendance-table .epv-check-row {
    margin: 0;
    padding: 8px 10px;
}
.epv-attendance-table .epv-meta-line {
    margin-top: 4px;
}
.epv-attendance-table input.js-epv-spouse-room[readonly],
.epv-attendance-table select.js-epv-spouse-housing:disabled {
    background: #f1f5f9;
    color: #334155;
    cursor: default;
}
.epv-housing-notes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}
.epv-housing-note-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 2px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
}
.epv-housing-note-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary-600, #3d7a76);
}
.epv-housing-early-note {
    margin: 6px 0 0;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
    max-width: 240px;
}
.epv-spouse-same-room {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
}
.epv-attendance-role {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-small);
    color: #94a3b8;
    font-weight: 600;
}
@media (max-width: 860px) {
    #epv-attendance .epv-section-card {
        padding: 14px 12px;
        overflow: hidden;
    }
    .epv-hotel-name-field {
        max-width: none;
        margin-bottom: 16px;
    }
    .epv-hotel-name-field input {
        width: 100%;
        min-width: 0;
    }
    #epv-attendance {
        min-width: 0;
        overflow-x: hidden;
    }
    .epv-attendance-table-wrap {
        overflow: visible;
        margin: 0;
        max-width: 100%;
    }
    .epv-attendance-table {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    .epv-attendance-table thead {
        display: none;
    }
    .epv-attendance-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .epv-attendance-table tbody tr.epv-att-person {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin: 0;
        padding: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.05);
        overflow: hidden;
    }
    .epv-attendance-table tbody tr.epv-attendance-spouse {
        background: #f8fafc;
        border-color: #dbe4ee;
    }
    .epv-attendance-table td {
        display: block;
        border: 0;
        padding: 0;
        min-width: 0;
        width: auto;
        vertical-align: top;
    }
    .epv-att-cell--name,
    .epv-att-cell--present,
    .epv-att-cell--type,
    .epv-att-cell--room,
    .epv-att-cell--note {
        min-width: 0;
        width: 100%;
    }
    .epv-att-cell--name strong {
        display: block;
        font-size: 15px;
        line-height: 1.4;
        word-break: break-word;
    }
    .epv-att-cell--name .epv-attendance-role {
        margin-top: 3px;
        color: #64748b;
    }
    .epv-att-cell--type,
    .epv-att-cell--room,
    .epv-att-cell--note {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .epv-att-cell[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: #64748b;
        letter-spacing: 0.02em;
    }
    .epv-att-cell--present[data-label]::before {
        display: none;
    }
    .epv-attendance-table input[type="text"],
    .epv-attendance-table select.epv-housing-type-select {
        max-width: none;
        min-height: 42px;
        width: 100%;
    }
    #epv-attendance input[type="checkbox"] {
        width: 18px;
        max-width: 18px;
        height: 18px;
        padding: 0;
        flex-shrink: 0;
    }
    .epv-attendance-table .epv-check-row {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
    }
    .epv-housing-notes {
        width: 100%;
        gap: 8px;
    }
    .epv-housing-note-check {
        width: 100%;
        white-space: normal;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #f8fafc;
        line-height: 1.4;
    }
    .epv-housing-early-note {
        max-width: none;
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 12px;
    }
    .epv-spouse-same-room {
        width: fit-content;
        max-width: 100%;
    }
    #epv-attendance .epv-form-actions {
        position: sticky;
        bottom: 0;
        margin-top: 12px;
        padding: 10px 0 4px;
        background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, #f8fafc 28%);
        z-index: 3;
    }
}
.epv-companion-cov-pill {
    display: inline-block;
    margin-inline-start: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-size: var(--fs-badge);
    font-weight: 700;
}
.epv-companion-cov-pill--table {
    margin-inline-start: 0;
    white-space: normal;
}
.epv-companion-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.epv-companion-summary-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}
.epv-companion-ord {
    display: inline-block;
    color: #0e7490;
    font-weight: 800;
}
.epv-companion-reorder,
.comp-reorder {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
}
.epv-companion-reorder .btn,
.comp-reorder .p-btn {
    min-width: 28px;
    padding: 2px 6px;
    line-height: 1.2;
}
.epv-companion-reorder-label,
.comp-reorder-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-small);
    color: #64748b;
    font-weight: 600;
}
.epv-companion-reorder-label select,
.comp-reorder-label select {
    min-width: 48px;
    padding: 2px 4px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
}

/* إخفاء صفوف تصفية قائمة إضافة المشاركين — يغلب display:table-row !important */
.members-pool-table tr.is-mp-filtered-out {
    display: none !important;
}

/* إخفاء صفوف التصفية — يجب أن يغلب display:table-row !important */
.participants-board-panel tr.pf-row.is-pf-filtered-out {
    display: none !important;
}

.names-page-card .members-list-table tr.mf-row.is-mf-filtered-out,
.names-page-card .members-list-table tr.mf-empty-row.is-mf-filtered-out {
    display: none !important;
}

/* العارضين: نفس الشبكة الموحّدة + تنسيق محتوى الاسم/الموضوع */
.exhibitors-table .exhibitor-name-cell strong {
    display: block;
    line-height: 1.35;
}
.exhibitors-table .participant-topic-line {
    margin-top: 3px;
    font-size: var(--fs-small);
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.exhibitor-presenter-line,
.exhibitor-presenter-form {
    margin-top: 6px;
    font-size: 12px;
    color: #9f1239;
    line-height: 1.4;
}
.exhibitor-presenter-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #9f1239;
    font-weight: 600;
}
.exhibitor-presenter-form select {
    max-width: 100%;
    font-size: 12px;
    font-weight: 500;
    color: #334155;
}
.exhibitors-table .exhibitor-role-cell .participant-role-pill {
    display: inline-flex;
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
}
.exhibitors-table .exhibitor-deadline-cell .participant-deadline-line {
    font-size: 11px;
    line-height: 1.45;
}
.agenda-date-line-text { opacity: .95; margin-inline-start: 6px; }

.participants-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0 12px;
    flex-wrap: wrap;
}

.participants-tab-btn {
    border: 1px solid #dbe3ea;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.participants-tab-btn.is-active {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.participants-tab-panel {
    display: none;
}

.participants-tab-panel.is-active {
    display: block;
}

.participants-board-panel {
    margin-top: 12px;
    padding: 18px 20px 18px;
}

.participants-board-panel .topic-list-head {
    margin: 0 0 10px;
}

.participants-board-panel .topic-list-toolbar {
    margin: 0;
}

.participants-board-panel .list-section-head {
    margin-top: 12px;
}

.participants-board-panel .topic-participants-board {
    margin-top: 8px;
}

.topic-edit-wrap {
    margin-top: 8px;
}

.topic-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topic-icon-btn-save {
    color: #166534;
}

.topic-icon-btn-edit .icon-minus {
    display: none;
}

.topic-icon-btn-edit.is-open .icon-pencil {
    display: none;
}

.topic-icon-btn-edit.is-open .icon-minus {
    display: inline;
}

@media (max-width: 900px) {
    .admin-table thead,
    .admins-table thead,
    .audit-table thead,
    .eval-table thead,
    .changes-table thead {
        display: none;
    }

    .admin-table,
    .admins-table,
    .audit-table,
    .eval-table,
    .changes-table,
    .admin-table tbody,
    .admins-table tbody,
    .audit-table tbody,
    .eval-table tbody,
    .changes-table tbody,
    .admin-table tr,
    .admins-table tr,
    .audit-table tr,
    .eval-table tr,
    .changes-table tr,
    .admin-table td,
    .admins-table td,
    .audit-table td,
    .eval-table td,
    .changes-table td {
        display: block;
        width: 100% !important;
    }

    .admin-table tbody tr,
    .admins-table tbody tr,
    .audit-table tbody tr,
    .eval-table tbody tr,
    .changes-table tbody tr {
        margin-bottom: 14px;
        box-shadow: var(--shadow-sm);
    }

    .admin-table tbody td,
    .admins-table tbody td,
    .audit-table tbody td,
    .eval-table tbody td,
    .changes-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        border-right: 1px solid var(--slate-200);
        border-left: 1px solid var(--slate-200);
        border-radius: 0 !important;
    }

    .admin-table tbody td:first-child,
    .admins-table tbody td:first-child,
    .audit-table tbody td:first-child,
    .eval-table tbody td:first-child,
    .changes-table tbody td:first-child {
        border-top-right-radius: 16px !important;
        border-top-left-radius: 16px !important;
    }

    .admin-table tbody td:last-child,
    .admins-table tbody td:last-child,
    .audit-table tbody td:last-child,
    .eval-table tbody td:last-child,
    .changes-table tbody td:last-child {
        border-bottom-right-radius: 16px !important;
        border-bottom-left-radius: 16px !important;
    }

    .admin-table tbody td::before,
    .admins-table tbody td::before,
    .audit-table tbody td::before,
    .eval-table tbody td::before,
    .changes-table tbody td::before {
        font-size: 12px;
        color: var(--slate-500);
        font-weight: 800;
        flex: 0 0 108px;
        max-width: 108px;
        text-align: right;
    }

    .researchers-table td:nth-child(1)::before,
    .exhibitors-table td:nth-child(1)::before,
    .attendance-table td:nth-child(1)::before,
    .participants-unified-table td::before,
    .companions-table td::before { content: none !important; display: none !important; }
    .researchers-table td:nth-child(2)::before,
    .exhibitors-table td:nth-child(2)::before,
    .attendance-table td:nth-child(2)::before { content: "الدور"; }
    .researchers-table td:nth-child(3)::before,
    .exhibitors-table td:nth-child(3)::before,
    .attendance-table td:nth-child(3)::before { content: "الموعد"; }
    .researchers-table td:nth-child(4)::before,
    .exhibitors-table td:nth-child(4)::before,
    .attendance-table td:nth-child(4)::before { content: "الحالة"; }
    .researchers-table td:nth-child(5)::before,
    .exhibitors-table td:nth-child(5)::before,
    .attendance-table td:nth-child(5)::before { content: none !important; display: none !important; }
    .admins-table td:nth-child(1)::before { content: "#"; }
    .admins-table td:nth-child(2)::before { content: "البريد"; }
    .admins-table td:nth-child(3)::before { content: "الاسم"; }
    .admins-table td:nth-child(4)::before { content: "الدور"; }
    .admins-table td:nth-child(5)::before { content: "حساب مشارك"; }
    .admins-table td:nth-child(6)::before { content: "الحالة"; }
    .admins-table td:nth-child(7)::before { content: "التاريخ"; }
    .admins-table td:nth-child(8)::before { content: "الإجراءات"; }
    .adm-people-table td::before { content: none !important; display: none !important; }
    .adm-people-table td[data-label]::before {
        content: attr(data-label) !important;
        display: block !important;
    }
    .audit-table td:nth-child(1)::before { content: "التاريخ"; }
    .audit-table td:nth-child(2)::before { content: "المنفّذ"; }
    .audit-table td:nth-child(3)::before { content: "العملية"; }
    .audit-table td:nth-child(4)::before { content: "الكيان"; }
    .audit-table td:nth-child(5)::before { content: "الوصف"; }
    .audit-table td.audit-empty::before { content: none !important; display: none !important; }
    .audit-table td.audit-empty { justify-content: center; }
    .changes-table td:nth-child(1)::before { content: "الحقل"; }
    .changes-table td:nth-child(2)::before { content: "الحالي"; }
    .changes-table td:nth-child(3)::before { content: "المقترح"; }
    .eval-table td:nth-child(1)::before { content: "التاريخ"; }
    .eval-table td:nth-child(2)::before { content: "المقيم"; }
    .eval-table td:nth-child(3)::before { content: "التقييم"; }
    .eval-table td:nth-child(4)::before { content: "الملاحظة"; }
}

/* نافذة إضافة المشاركين — إجبار إخفاء أعمدة الجدول على الجوال (بعد قواعد البطاقات العامة) */
@media (max-width: 900px) {
    .participants-modal .members-pool-table tbody tr[data-name] .mp-job,
    .participants-modal .members-pool-table tbody tr[data-name] .mp-category,
    .participants-modal .members-pool-table tbody tr[data-name] .mp-nationality {
        display: none !important;
    }

    .participants-modal .members-pool-table tbody tr[data-name] .mp-meta {
        display: block !important;
    }
}


/* قائمة الأعضاء — جوال ضيق فقط: صورة+هوية | الدولة | الخبرات | أزرار */
@media (max-width: 640px) {
    /* بدون خط فاصل بين شريط الأدوات/الفلاتر والقائمة */
    .names-page-card .toolbar {
        border-bottom: 0;
    }

    .names-page-card .names-filters {
        border-bottom: 0;
    }

    .names-page-card .members-list-table {
        border-collapse: separate;
    }

    .names-page-card .members-list-table tbody tr {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        column-gap: 12px;
        row-gap: 0;
        align-items: start;
        margin: 0 0 12px 0;
        padding: 0;
        box-sizing: border-box;
        width: 100% !important;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.04);
        overflow: hidden;
    }

    .names-page-card .members-list-table tbody tr.mf-row.is-mf-filtered-out,
    .names-page-card .members-list-table tbody tr.mf-empty-row.is-mf-filtered-out {
        display: none !important;
    }

    .names-page-card .members-list-table tbody tr.is-vip {
        background: #fffbeb;
        border-color: #eab308;
    }

    .names-page-card .members-list-table tbody td {
        display: block;
        width: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .names-page-card .members-list-table .pal-check-cell {
        grid-row: 4;
        grid-column: 1;
        padding: 8px 12px 10px 4px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        align-self: stretch;
        border-top: 1px solid #f1f5f9 !important;
    }

    .names-page-card .members-list-table .pal-check-cell .pal-check input {
        width: 18px;
        height: 18px;
    }

    .names-page-card .members-list-table .td-member-photo {
        grid-row: 1;
        grid-column: 1;
        padding: 12px 12px 8px 0;
        text-align: center;
        min-height: 0;
    }

    .names-page-card .members-list-table .td-member-identity {
        grid-row: 1;
        grid-column: 2;
        padding: 12px 12px 8px 12px;
        align-self: start;
    }

    .names-page-card .members-list-table .td-member-nationality,
    .names-page-card .members-list-table .td-member-expertise {
        display: block !important;
        direction: rtl;
        text-align: right !important;
        grid-column: 1 / -1;
        max-width: none !important;
        overflow: visible !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        line-height: 1.55;
        color: #64748b !important;
        border-top: 1px solid #f1f5f9 !important;
        word-break: normal;
        overflow-wrap: normal;
    }

    .names-page-card .members-list-table .td-member-nationality {
        grid-row: 2;
        padding: 8px 12px 6px 12px;
    }

    .names-page-card .members-list-table .td-member-expertise {
        grid-row: 3;
        padding: 4px 12px 8px 12px;
    }

    .names-page-card .members-list-table .member-expertise-list {
        display: inline !important;
        justify-content: unset;
        flex: none;
        min-width: 0;
        gap: 0;
    }
    .names-page-card .members-list-table .member-expertise-item {
        display: inline;
    }

    .names-page-card .members-list-table .td-member-actions {
        grid-row: 4;
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        align-self: stretch;
        padding: 8px 10px 10px 12px;
        border-top: 1px solid #f1f5f9 !important;
        text-align: start;
    }

    .names-page-card .members-list-table--no-expertise tbody tr {
        grid-template-rows: auto auto auto;
    }

    .names-page-card .members-list-table--no-expertise .pal-check-cell,
    .names-page-card .members-list-table--no-expertise .td-member-actions {
        grid-row: 3;
    }

    .names-page-card .members-list-table .td-member-actions .actions-cell {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        direction: ltr;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        margin-inline-start: 0;
    }

    .names-page-card .members-list-table .td-member-actions .icon-btn {
        width: 30px;
        min-height: 30px;
        min-width: 30px;
        border-radius: 9px;
    }

    .names-page-card .members-list-table .td-member-actions .icon-btn svg {
        width: 14px;
        height: 14px;
    }

    .names-page-card .members-list-table tbody td::before {
        display: none;
        content: "" !important;
    }

    .names-page-card .members-list-table tbody td.td-member-nationality::before,
    .names-page-card .members-list-table tbody td.td-member-expertise::before {
        content: attr(data-label) !important;
        display: inline !important;
        flex: none;
        max-width: none;
        font-size: 12px;
        font-weight: 800;
        color: #64748b;
        text-align: start;
        line-height: 1.55;
        margin-inline-end: 8px;
    }

    .names-page-card .members-list-table .member-title-line,
    .names-page-card .members-list-table .member-job-line {
        font-size: var(--fs-small);
    }

    .names-page-card .names-filters {
        grid-template-columns: 1fr 1fr;
    }

    .names-page-card .members-list-table .thumb-img {
        width: 100%;
        max-width: 88px;
        height: auto;
        aspect-ratio: 1;
        min-height: 0;
        max-height: 88px;
        object-fit: cover;
        border-radius: 12px;
        display: block;
        margin: 0 auto;
    }
}

/*
 * جدول مشاركين موحّد — كمبيوتر/تابلت: صفوف متصلة كجدول عادي
 * (بطاقات الصفوف للجوال الضيق فقط)
 */
@media (min-width: 641px) {
    .topic-participants-table-wrap--unified {
        background: #fff;
        overflow: hidden;
    }

    .participants-unified-table {
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

    .participants-unified-table thead th {
        background: #f8fafc;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        padding: 12px 16px;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    .participants-unified-table tbody tr {
        background: #fff !important;
        box-shadow: none !important;
        margin: 0 !important;
        transition: background 0.12s ease;
    }

    .participants-unified-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .participants-unified-table tbody td {
        padding: 14px 16px;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        background: #fff !important;
        border-radius: 0 !important;
        vertical-align: middle;
        font-size: 13px;
        display: table-cell !important;
    }

    .participants-unified-table tbody tr:last-child td {
        border-bottom: none !important;
    }

    .participants-unified-table tbody td:first-child,
    .participants-unified-table tbody td:last-child {
        border-right: none !important;
        border-left: none !important;
        border-radius: 0 !important;
    }

    .participants-unified-table tbody td::before {
        content: none !important;
        display: none !important;
    }

    .participants-unified-table .participant-name-meta {
        font-size: var(--fs-badge);
        color: #94a3b8;
    }

    .participants-unified-table .participant-subrole {
        font-size: var(--fs-badge);
    }

    .participants-unified-table .participant-deadline-line {
        font-size: 11px;
        line-height: 1.5;
    }

    .participants-unified-table .participant-status-pill {
        font-size: 10.5px;
        padding: 4px 10px;
        border-radius: 999px;
    }

    .participants-unified-table .participant-role-pill {
        font-size: var(--fs-badge);
        padding: 3px 10px;
    }

    .participants-unified-table .vip-star {
        color: #eab308;
        font-size: 16px;
    }

    .participants-unified-table .participant-actions {
        flex-wrap: wrap;
        align-content: center;
        column-gap: 3px;
        row-gap: 4px;
        width: auto;
        max-width: min(100%, calc(28px * 5 + 3px * 4));
        margin-inline-start: auto;
    }

    .topic-participants-accordion:has(.participants-unified-table) .topic-participants-summary {
        border-bottom: 1px solid #e2e8f0;
    }

    /* سجل التدقيق: جدول صفوف متصلة على الكمبيوتر (بطاقات الجوال تبقى كما هي تحت 641px) */
    .audit-table-wrap {
        background: #fff;
        overflow: hidden;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
    }

    .audit-table {
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

    .audit-table thead {
        display: table-header-group !important;
    }

    .audit-table thead th {
        background: #f8fafc;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        padding: 12px 16px;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
        display: table-cell !important;
    }

    .audit-table {
        display: table !important;
        width: 100% !important;
    }

    .audit-table tbody {
        display: table-row-group !important;
    }

    .audit-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
    }

    .audit-table tbody tr {
        background: #fff !important;
        box-shadow: none !important;
        margin: 0 !important;
        transition: background 0.12s ease;
    }

    .audit-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .audit-table tbody td {
        padding: 14px 16px;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        background: #fff !important;
        border-radius: 0 !important;
        vertical-align: middle;
        font-size: 13px;
        display: table-cell !important;
        width: auto !important;
        align-items: unset;
        justify-content: unset;
        gap: unset;
    }

    .audit-table tbody tr:last-child td {
        border-bottom: none !important;
    }

    .audit-table tbody td:first-child,
    .audit-table tbody td:last-child {
        border-right: none !important;
        border-left: none !important;
        border-radius: 0 !important;
    }

    .audit-table tbody td::before {
        content: none !important;
        display: none !important;
    }

    .audit-table .audit-date-cell {
        white-space: nowrap;
    }

    .audit-table .audit-empty {
        text-align: center;
    }
}

/* ── جدول الجلسات — ألوان متناسقة مع هوية الموقع ── */
.sessions-agenda-wrap { max-width: 960px; margin: 0 auto; }
.sessions-agenda-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}
.sessions-agenda-toolbar .btn { border-radius: 8px; font-weight: 700; }
.sessions-agenda-toolbar label { margin: 0; }
.sessions-agenda-hint { font-size: var(--fs-small); color: #94a3b8; margin-inline-start: auto; }

.sessions-agenda-actions{
  padding:10px 12px;
}
.agenda-actions-row{
  display:flex;
  align-items:flex-end;
  gap:12px 14px;
  flex-wrap:wrap;
}
.agenda-day-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0;
  flex:0 0 auto;
}
.agenda-day-label{
  font-size: var(--fs-small);
  font-weight:700;
  color:#475569;
}
.agenda-day-select{
  min-width:120px;
  padding:5px 8px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  font-size: var(--fs-small);
  background:#fff;
  color:#0f172a;
}
.agenda-add-group{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  flex:1 1 auto;
}
.agenda-add-group .btn{
  border-radius:7px;
  font-weight:700;
  font-size: var(--fs-button);
  padding:4px 9px;
  line-height:1.3;
  min-height:0;
}
.agenda-add-group .btn.btn-sm{
  font-size: var(--fs-button);
  padding:4px 9px;
}

.sessions-agenda-panel{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:12px;
}
.sessions-agenda-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
  padding-bottom:8px;
  border-bottom:1px solid #eef2f7;
}
.sessions-agenda-panel-title{
  font-size:13px;
  font-weight:800;
  color:#1e293b;
}
.sessions-agenda-panel-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.sessions-agenda-panel-body{
  display:flex;
  flex-direction:column;
  gap:14px;
  align-items:stretch;
}
.agenda-cover-block{
  margin:0;
  padding:0;
  min-width:0;
}
.agenda-cover-block-title{
  margin:0 0 10px;
  font-size:12px;
  font-weight:800;
  color:#64748b;
  letter-spacing:.02em;
}
.agenda-officers-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.agenda-officer-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  min-width:0;
}
.agenda-officer-label{
  font-size:12px;
  font-weight:700;
  color:#475569;
}
.agenda-officer-select,
.agenda-cover-partner-select{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  padding:8px 10px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  font-size:12px;
  line-height:1.4;
  background:#fff;
  color:#0f172a;
}
.agenda-cover-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
.agenda-cover-options-title{
  font-size: var(--fs-small);
  font-weight:800;
  color:#64748b;
  letter-spacing:.02em;
}
.agenda-cover-option{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  min-width:0;
  padding:8px 10px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  font-size:12px;
  font-weight:700;
  color:#334155;
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease;
}
.agenda-cover-option:hover{
  border-color:#cbd5e1;
  background:#f8fafc;
}
.agenda-cover-option input{
  width:16px;
  height:16px;
  margin:0;
  flex:0 0 auto;
}
.agenda-cover-partner-field{
  max-width:420px;
}
#agenda-cover-settings .agenda-cover-partners{
  margin-top:0;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
#agenda-cover-settings .agenda-cover-partners-hint{
  margin:0 0 10px;
}
#agenda-cover-settings .badges-logos{
  flex:none;
  width:100%;
  box-sizing:border-box;
}
.agenda-periods-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px 12px;
}
.agenda-period-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  min-width:0;
}
.agenda-period-label{
  font-size:12px;
  font-weight:700;
  color:#475569;
}
.agenda-period-times{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
  direction:rtl;
}
.agenda-period-input{
  flex:1 1 0;
  min-width:0;
  padding:6px 8px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  font-size:12px;
  background:#fff;
  direction:ltr;
  unicode-bidi:isolate;
  text-align:left;
}
.agenda-period-sep{
  color:#94a3b8;
  font-size:12px;
  flex:0 0 auto;
  direction:ltr;
}
.agenda-period-status{font-size: var(--fs-small);color:#64748b}

@media (max-width:900px){
  .agenda-officers-grid{grid-template-columns:1fr}
  .agenda-cover-options{grid-template-columns:1fr}
  .agenda-cover-partner-field{max-width:none}
  .agenda-periods-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:560px){
  .agenda-periods-grid{grid-template-columns:1fr}
}
.sessions-agenda-toast {
    display: none;
    position: sticky;
    top: 8px;
    z-index: 40;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: var(--fs-ui);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.sessions-agenda-toast.ok { display: block; background: var(--primary-50); color: var(--primary-800); border: 1px solid var(--primary-100); }
.sessions-agenda-toast.err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* مؤشر الحفظ على الخانة نفسها */
.field-save-wrap { position: relative; display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle; }
.field-save-wrap > input:not([type="checkbox"]):not([type="radio"]),
.field-save-wrap > select,
.field-save-wrap > textarea,
.field-save-wrap > .time24-host { width: 100%; }
.field-save-wrap > input[type="checkbox"],
.field-save-wrap > input[type="radio"] {
    width: auto;
    height: auto;
    padding: 0;
    flex: 0 0 auto;
}
.agenda-cover-option.field-save-wrap,
.agenda-cover-option.field-save-wrap.is-saving,
.agenda-cover-option.field-save-wrap.is-saved {
    display: flex !important;
    width: 100%;
    max-width: none;
    position: relative;
    box-sizing: border-box;
    padding: 8px 10px;
}
.agenda-cover-option.field-save-wrap > input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 16px !important;
    max-width: 16px !important;
}
.agenda-cover-option.field-save-wrap .field-save-mark {
    left: auto;
    right: 8px;
}
.field-save-mark {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 2;
}
.field-save-wrap.is-saving .field-save-mark,
.field-save-wrap.is-saved .field-save-mark { opacity: 1; }
.field-save-wrap.is-saving > input:not([type="checkbox"]):not([type="radio"]),
.field-save-wrap.is-saving > select,
.field-save-wrap.is-saving > textarea,
.field-save-wrap.is-saved > input:not([type="checkbox"]):not([type="radio"]),
.field-save-wrap.is-saved > select,
.field-save-wrap.is-saved > textarea { padding-left: 28px; }
.field-save-mark::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgba(50, 98, 95, .25);
    border-top-color: var(--primary-600);
    animation: agenda-spin .7s linear infinite;
}
.field-save-wrap.is-saved .field-save-mark::before {
    border: none;
    animation: none;
    width: 16px;
    height: 16px;
    border-radius: 0;
    background: var(--primary-600);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field-save-wrap.is-saving > input,
.field-save-wrap.is-saving > select,
.field-save-wrap.is-saving > textarea,
.field-save-wrap.is-saving > .time24-host .time24-face,
.field-save-wrap.is-saving > .time24-host .time24-date { border-color: var(--primary-400) !important; box-shadow: 0 0 0 2px rgba(50, 98, 95, .12); }
.field-save-wrap.is-saved > input,
.field-save-wrap.is-saved > select,
.field-save-wrap.is-saved > textarea,
.field-save-wrap.is-saved > .time24-host .time24-face,
.field-save-wrap.is-saved > .time24-host .time24-date { border-color: var(--primary-500) !important; }
.agenda-break-check.field-save-wrap { position: relative; padding-left: 18px; }
.agenda-break-check.field-save-wrap .field-save-mark { left: 0; }
.agenda-break-check.field-save-wrap.is-saving,
.agenda-break-check.field-save-wrap.is-saved { opacity: .95; }
@keyframes agenda-spin { to { transform: rotate(360deg); } }
.btn.is-saving { position: relative; pointer-events: none; opacity: .75; }
.btn.is-saving::after {
    content: '';
    width: 12px; height: 12px;
    margin-inline-start: 6px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    display: inline-block;
    vertical-align: -1px;
    animation: agenda-spin .7s linear infinite;
}
.btn-outline.is-saving::after { border-color: rgba(50,98,95,.25); border-top-color: var(--primary-600); }

.agenda-day { margin-bottom: 32px; page-break-inside: auto; }
.agenda-day-title { text-align: center; font-size: var(--fs-title); font-weight: 800; color: var(--primary-700); margin: 0 0 10px; letter-spacing: -0.02em; }
.agenda-date-bar {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    color: #fff;
    text-align: center;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    border-radius: 10px;
    direction: rtl;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    box-shadow: 0 6px 16px rgba(50, 98, 95, .18);
}
.agenda-date-fields { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; direction: rtl; }
.agenda-date-field { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.agenda-date-bar input[type="date"],
.agenda-date-bar input[type="text"] {
    background: #fff;
    border: 1px solid rgba(255,255,255,.85);
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    direction: ltr;
    text-align: center;
    box-sizing: border-box;
}
.agenda-date-bar input[type="date"] {
    display: inline-block;
    width: 11.5rem;
    min-width: 11.5rem;
    max-width: none;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 10px 0 30px;
    line-height: 34px;
    color-scheme: light;
}
.agenda-date-bar input[type="date"]::-webkit-datetime-edit,
.agenda-date-bar input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.agenda-date-bar input[type="date"]::-webkit-date-and-time-value {
    height: 34px;
    max-height: 34px;
    line-height: 34px;
    min-width: 0;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.agenda-date-bar input[type="date"]::-webkit-calendar-picker-indicator {
    right: auto;
    left: 8px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 1;
}
.agenda-date-bar input[type="text"] {
    display: inline-block;
    width: 11.5rem;
    min-width: 11.5rem;
    max-width: none;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 10px;
    line-height: 34px;
    font-size: 13px;
    font-weight: 700;
}
.agenda-date-field .field-save-wrap:has(> input[type="date"]) {
    width: 11.5rem;
    flex: 0 0 11.5rem;
}
.agenda-date-field .field-save-wrap:has(> input[type="text"]) {
    width: 11.5rem;
    flex: 0 0 11.5rem;
}
.agenda-word-modal[hidden] { display: none !important; }
.agenda-word-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.agenda-word-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}
.agenda-word-card {
    position: relative;
    width: min(420px, 96vw);
    background: #fff;
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .2);
    text-align: center;
}
.agenda-word-card h3 { margin: 0 0 6px; font-size: 18px; color: #0f172a; }
.agenda-word-card p { margin: 0 0 14px; color: #64748b; font-size: 13px; }
.agenda-word-actions { display: flex; gap: 10px; justify-content: center; }
.agenda-word-actions a { flex: 1; text-align: center; text-decoration: none; }
.agenda-date-bar .field-save-wrap > input[type="date"],
.agenda-date-bar .field-save-wrap > input[type="text"] {
    width: 100%;
    min-width: 0;
    max-width: none;
}
.agenda-segment-text-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.agenda-segment-text-edit .agenda-segment-text-input {
    flex: 1 1 auto;
}
.agenda-segment-text-edit .i18n-en-btn {
    flex: 0 0 auto;
    margin-inline-start: 0;
}
.agenda-date-bar .agenda-date-field { color: #fff; }
.agenda-date-line-text { direction: rtl; unicode-bidi: plaintext; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.agenda-date-bar--preview {
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
}
.agenda-date-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}
.agenda-date-day-name {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.3;
}
.agenda-date-bar--preview .agenda-date-line-text {
    margin: 0;
    opacity: 0.95;
    font-size: 12px;
    font-weight: 700;
}

.agenda-item {
    margin-bottom: 14px;
    position: relative;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* عمود الوقت أولاً في الشبكة (يمين في RTL): أزل حشوة البطاقة من جهته حتى يتوسّط المربع */
.agenda-item.agenda-item--split,
.agenda-item.agenda-item--break-split {
    padding-block: 12px;
    padding-inline-start: 0;
    padding-inline-end: 14px;
}
.agenda-item:hover { border-color: #64748b; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.sessions-agenda-wrap,
.portal-agenda {
    --agenda-time-col-w: 150px;
    --agenda-split-gap: 0;
    --agenda-chip-bg: #f0fdfa;
    --agenda-chip-border: #99c5c1;
}
.sessions-agenda-wrap:not(.portal-agenda) {
    --agenda-time-col-w: 188px;
}
.agenda-item--split {
    display: grid;
    grid-template-columns: var(--agenda-time-col-w) minmax(0, 1fr);
    gap: var(--agenda-split-gap);
    align-items: stretch;
}
.agenda-time-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: var(--agenda-time-col-w);
    min-width: var(--agenda-time-col-w);
    max-width: var(--agenda-time-col-w);
    box-sizing: border-box;
    min-height: 100%;
    padding: 10px 12px;
    border-inline-end: 1px solid #cbd5e1;
}
.agenda-body-col { min-width: 0; padding-inline-start: 14px; display: flex; flex-direction: column; justify-content: center; }
.agenda-item[data-type="break"] .agenda-body-col,
.agenda-item[data-type="other"].is-title-only .agenda-body-col,
.agenda-item--body-center .agenda-body-col {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.agenda-item[data-type="break"] .agenda-session-heading,
.agenda-item[data-type="other"].is-title-only .agenda-session-heading {
    text-align: center;
    width: 100%;
}
.agenda-item-date,
.agenda-item-date-field {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    text-align: center;
}
.agenda-item-date {
    font-size: 11px;
    font-weight: 800;
    color: #1f4a48;
    line-height: 1.35;
}
.agenda-item-date-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #99c5c1;
    border-radius: 8px;
    background: #fff;
    color: #1f4a48;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    padding: 4px 2px;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
}
.agenda-item-date-select:focus {
    outline: none;
    border-color: var(--primary-500, #32625f);
    box-shadow: 0 0 0 3px rgba(50, 98, 95, .12);
}
.agenda-item.is-just-moved {
    box-shadow: 0 0 0 3px rgba(50, 98, 95, .28);
}
.agenda-time-chip {
    text-align: center;
    font-size: var(--fs-small);
    font-weight: 800;
    color: #1f4a48;
    line-height: 1.55;
    padding: 12px 8px;
    background: var(--agenda-chip-bg);
    border: 1px solid var(--agenda-chip-border);
    border-radius: 10px;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.agenda-time-chip--edit {
    padding: 10px 8px;
}
.agenda-time-editor-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 6px;
    width: 100%;
}
.agenda-time-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 0 auto;
    align-self: stretch;
}
.agenda-time-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    text-align: center;
}
.agenda-time-stack-line {
    display: block;
    white-space: nowrap;
    font-size: var(--fs-small);
    font-weight: 800;
    color: inherit;
    line-height: 1.45;
    text-align: center;
    width: 100%;
}
.agenda-time-editor input[type="time"],
.agenda-time-editor-fields input[type="time"] {
    width: 100%;
    max-width: 118px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 4px;
    background: #fff;
    color: #0f172a;
    text-align: center;
}
.agenda-time-sep { color: #94a3b8; font-weight: 700; }
.agenda-time-preview {
    font-size: var(--fs-small);
    font-weight: 800;
    color: #1f4a48;
    text-align: center;
    line-height: 1.45;
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
}
.agenda-session-rule {
    height: 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 10px 0 8px;
    width: 100%;
}
.agenda-session-heading {
    margin: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.agenda-session-topic {
    margin-top: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.agenda-item[data-type="break"] .agenda-session-topic,
.agenda-item[data-type="other"] .agenda-session-topic {
    color: #334155;
    font-weight: 600;
}
.agenda-other-title-input {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #111;
    text-align: center;
    background: transparent;
    font-family: inherit;
    line-height: 1.45;
}
.agenda-other-title-input:hover {
    border-color: #e2e8f0;
    background: #fff;
}
.agenda-other-title-input:focus {
    outline: none;
    border-color: #32625f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(50, 98, 95, .12);
}
.agenda-other-title-input.agenda-session-heading {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
}
/* تداخل الوقت: خلفية حمراء فاتحة على خانة الوقت */
.agenda-time-editor input[type="time"].agenda-time-overlap,
.agenda-break-times input[type="time"].agenda-time-overlap,
input[type="time"].agenda-time-overlap,
.time24-host:has(.agenda-time-overlap) .time24-face {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}
.agenda-time-preview.agenda-time-overlap,
.agenda-break-time-preview.agenda-time-overlap,
.agenda-time-chip--derived.agenda-time-overlap {
    background: #fee2e2 !important;
    color: #991b1b !important;
}
.field-save-wrap.agenda-time-overlap-wrap > input[type="time"],
.field-save-wrap.agenda-time-overlap-wrap > .time24-host .time24-face {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}
.agenda-item[data-type="break"].agenda-item--split,
.agenda-item[data-type="break"].agenda-item--break-split,
.agenda-item--break-split {
    background: #fff;
    border: 1px solid #94a3b8;
    color: #0f172a;
}
.agenda-item[data-type="break"] .agenda-session-heading,
.agenda-item[data-type="break"] .agenda-session-topic {
    color: #0f172a;
}
.agenda-item[data-type="break"] .agenda-time-col {
    border-inline-end-color: #cbd5e1;
}
.agenda-item[data-type="break"] .agenda-time-chip {
    background: var(--agenda-chip-bg, #f0fdfa);
    border-color: var(--agenda-chip-border, #99c5c1);
}
.agenda-item--segmented .agenda-time-chip--derived {
    cursor: default;
}
.agenda-segments {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.agenda-segment-row {
    display: grid;
    grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--primary-100);
    border-radius: 10px;
    background: #fff;
}
.agenda-segment-row--edit {
    grid-template-columns: max-content minmax(0, 1fr) 34px;
}
.agenda-segment-time {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-800);
    text-align: center;
    line-height: 1.45;
    white-space: pre-line;
}
.agenda-segment-time-chip {
    display: block;
    padding: 7px 10px;
    background: #f0fdfa;
    border: 1px solid #99c5c1;
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 800;
    color: #1f4a48;
    line-height: 1.45;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}
.agenda-segment-text {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.55;
    text-align: right;
}
.agenda-segment-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}
.agenda-segment-times {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
}
.agenda-segment-times .agenda-time-sep {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}
.agenda-segment-times .field-save-wrap {
    width: 6.6rem;
    flex: 0 0 6.6rem;
    max-width: 6.6rem;
}
.agenda-segment-times input[type="time"] {
    display: inline-block;
    width: 6.6rem;
    max-width: 6.6rem;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 6px;
    padding-inline-end: 22px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 36px;
    color: #0f172a;
    background: #fff;
}
.agenda-segment-times .field-save-wrap > input[type="time"] {
    width: 100%;
}
.agenda-segment-times input[type="time"]::-webkit-datetime-edit,
.agenda-segment-times input[type="time"]::-webkit-date-and-time-value {
    height: 36px;
    max-height: 36px;
    min-width: 0;
    line-height: 36px;
    padding: 0;
}
.agenda-segment-times input[type="time"]::-webkit-calendar-picker-indicator {
    right: 4px;
    width: 14px;
    height: 14px;
}
.agenda-segment-text-input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
}
.agenda-segment-text-input:focus,
.agenda-segment-times input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-400, #5f8f8c);
    box-shadow: 0 0 0 3px rgba(50, 98, 95, 0.12);
}
.agenda-segment-remove {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.agenda-segment-remove:hover {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}
.agenda-segment-add {
    align-self: flex-start;
    margin-top: 2px;
}
.agenda-item.is-saving { opacity: .85; }
.agenda-muted { color: #64748b; }
.agenda-names-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 8px;
    align-items: stretch;
    direction: rtl;
}
.agenda-names-cols > .agenda-name-item {
    border: 1px solid var(--primary-100);
    border-radius: 10px;
    overflow: hidden;
    min-height: 100%;
}
.agenda-names-cols > .agenda-name-item:last-child {
    border-bottom: 1px solid var(--primary-100);
}
.agenda-names-cols > .agenda-names-list {
    grid-column: 1 / -1;
}
.agenda-names-reset-wrap {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}
.agenda-names-reset-wrap[hidden] {
    display: none !important;
}
.agenda-names-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--primary-100);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 100%;
}
.agenda-name-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--primary-100);
    background: #fff;
}
.agenda-name-item:nth-child(even) { background: var(--primary-50); }
.agenda-name-item:last-child { border-bottom: none; }
.agenda-name-num {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--primary-700);
}
.agenda-name-text {
    font-size: var(--fs-small);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}
.agenda-name-item--sortable {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.agenda-name-item--sortable:active,
.agenda-name-item.is-dragging {
    cursor: grabbing;
}
.agenda-name-item.is-dragging {
    opacity: .55;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}
.agenda-member-tag {
    font-size: var(--fs-small);
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.agenda-name-empty {
    padding: 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    list-style: none;
}
.agenda-rich-title {
    font-size: 14px;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.7;
    text-align: right;
    direction: rtl;
}
.agenda-rich-title p { margin: 0 0 .55em; }
.agenda-rich-title p:last-child { margin-bottom: 0; }
.agenda-rich-title strong,
.agenda-rich-title b { font-weight: 800; }
.agenda-rich-title em,
.agenda-rich-title i { font-style: italic; }
.agenda-rich-title u { text-decoration: underline; }
.agenda-rich-title ul,
.agenda-rich-title ol {
    margin: .45em 0 .6em;
    padding: 0 1.55em 0 0;
    text-align: right;
    list-style-position: outside;
}
.agenda-rich-title ul { list-style-type: disc; }
.agenda-rich-title ol { list-style-type: decimal; }
.agenda-rich-title li {
    margin: .18em 0;
    padding: 0;
    text-align: right;
    line-height: 1.65;
}
.agenda-rich-title li > p { margin: 0; }
.agenda-rich-title ul[style*="text-align: center"],
.agenda-rich-title ol[style*="text-align: center"],
.agenda-rich-title li[style*="text-align: center"],
.agenda-rich-title ul[style*="text-align:center"],
.agenda-rich-title ol[style*="text-align:center"],
.agenda-rich-title li[style*="text-align:center"] {
    text-align: center;
    list-style-position: inside;
    padding-right: 0;
    padding-left: 0;
    margin-right: 0;
    margin-left: 0;
}
.agenda-rich-title p[style*="text-align: center"],
.agenda-rich-title p[style*="text-align:center"],
.agenda-rich-title div[style*="text-align: center"],
.agenda-rich-title div[style*="text-align:center"] { text-align: center; }
.agenda-rich-title [style*="text-align: left"],
.agenda-rich-title [style*="text-align:left"] { text-align: left; }
.agenda-rich-title [style*="text-align: right"],
.agenda-rich-title [style*="text-align:right"] { text-align: right; }
.agenda-item--break-split {
    display: grid;
    grid-template-columns: var(--agenda-time-col-w) minmax(0, 1fr);
    gap: var(--agenda-split-gap);
    align-items: stretch;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    color: #0f172a;
    padding: 12px 14px;
    overflow: hidden;
}
.agenda-item--break-split .agenda-time-col {
    border-inline-end: 1px solid var(--primary-100);
    background: transparent;
    border-radius: 0;
    min-height: 0;
    width: var(--agenda-time-col-w);
    min-width: var(--agenda-time-col-w);
    max-width: var(--agenda-time-col-w);
}
.agenda-item--break-split .agenda-time-chip {
    background: #fff;
    border: 1px solid var(--primary-100);
    color: var(--primary-800);
    box-shadow: none;
}
.agenda-item--break-split .agenda-time-stack-line { color: inherit; }
.agenda-break-label-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    min-height: 64px;
    min-width: 0;
}
.agenda-break-label-text {
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #111;
    line-height: 1.5;
    text-shadow: none;
}
.agenda-break-time-preview {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--primary-800);
    opacity: 1;
}
.agenda-item-actions { position: absolute; left: 8px; top: 8px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s; z-index: 2; }
.agenda-item:hover .agenda-item-actions { opacity: 1; }
.agenda-item-actions button {
    width: 28px; height: 28px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.agenda-item-actions button:hover { border-color: var(--primary-600); color: var(--primary-700); }
.agenda-item-actions button.del:hover { border-color: #ef4444; color: #ef4444; }

.agenda-break-bar {
    background: #fff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}
.agenda-break-bar--multi { flex-wrap: wrap; align-items: center; }
.agenda-break-bar .break-label { color: #0f172a; text-shadow: none; }
.agenda-break-bar .break-label select { background: transparent; border: none; color: #0f172a; font-weight: 700; font-size: 12px; cursor: pointer; max-width: 260px; }
.agenda-break-bar .break-label select option { color: #111; }
.agenda-break-checks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 2px 0;
    overflow: visible;
}
.agenda-break-checks-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
}
.agenda-break-checks-row--prayer .agenda-break-check {
    font-size: 11px;
    font-weight: 700;
    gap: 3px;
    padding: 2px 7px;
}
.agenda-break-checks-row--prayer .agenda-break-check input {
    width: 12px;
    height: 12px;
}
.agenda-break-checks-row--prayer .agenda-break-check.field-save-wrap {
    padding-left: 14px;
}
.agenda-break-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
    line-height: 1.3;
    white-space: nowrap;
    user-select: none;
}
.agenda-break-check:hover { border-color: #cbd5e1; background: #f1f5f9; z-index: 2; }
.agenda-break-check:has(input:checked) {
    background: var(--primary-50);
    border-color: var(--primary-200, #99f6e4);
    color: var(--primary-800);
}
.agenda-break-check input {
    accent-color: #32625f;
    margin: 0;
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}
.agenda-break-options {
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}
.agenda-session-topic.agenda-break-options {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 8px;
    overflow: visible;
}
.agenda-break-display-label {
    display: block;
    width: 100%;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
}
.agenda-break-times {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    min-width: 180px;
}
.agenda-break-times input[type="time"] {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 6px;
    border-radius: 8px;
    width: 104px;
    min-width: 104px;
}
.agenda-session-meta-edit { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0; border-top: 1px solid var(--primary-100); padding-top: 8px; }
.agenda-session-meta-edit label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); font-weight: 700; color: #334155; }
.agenda-session-meta-edit select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    padding: 6px 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.agenda-session-meta-edit select:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(50,98,95,.12); }
.agenda-tour-block,
.agenda-tour-label { display: none !important; }
.agenda-multiline-title {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    line-height: 1.55;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.agenda-multiline-title:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(50,98,95,.12); }
@media (max-width: 700px) {
    .agenda-session-meta-edit { grid-template-columns: 1fr; }
}

.agenda-session-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.agenda-session-time { font-size: 13px; font-weight: 800; color: #111; white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.agenda-session-time input[type="time"] {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 6px;
    width: 78px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.agenda-session-time input[type="time"]:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(50,98,95,.12); }
.agenda-session-title-block { flex: 1; text-align: center; }
.agenda-session-heading { font-size: 15px; font-weight: 800; color: #0f172a; margin: 0; text-align: center; }
.agenda-session-topic { font-size: 13px; font-weight: 700; color: #0f172a; margin-top: 4px; text-align: center; }
.agenda-session-topic select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    padding: 6px 10px;
    max-width: 100%;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.agenda-session-topic select:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(50,98,95,.12); }
.agenda-topic-pick-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.agenda-topic-ordinal { color: var(--primary-700); font-weight: 800; white-space: nowrap; }

.agenda-session-meta { font-size: var(--fs-small); color: #334155; margin: 6px 0 8px; line-height: 1.7; border-top: none; padding-top: 0; text-align: right; }
.agenda-session-meta strong { font-weight: 800; }

.agenda-generic-block { border: 1px solid var(--primary-100); border-radius: 10px; padding: 12px 14px; background: #fff; }
.agenda-generic-block input[type="text"] { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; font-weight: 700; padding: 6px 10px; }
.agenda-generic-block input[type="text"].agenda-other-title-input,
.agenda-generic-block input.agenda-session-heading.agenda-other-title-input {
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #111;
    text-align: center;
    padding: 4px 8px;
    background: transparent;
}
.agenda-generic-block input.agenda-session-heading.agenda-other-title-input:focus {
    border-color: #32625f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(50, 98, 95, .12);
}
.agenda-session-meta { border-top-color: var(--primary-100); }
.agenda-generic-block .tox-tinymce {
    border-radius: 8px !important;
    border-color: #cbd5e1 !important;
    overflow: hidden;
}
.agenda-generic-block .tox .tox-edit-area__iframe { background: #fff; }
.agenda-generic-block .tox .tox-toolbar-overlord,
.agenda-generic-block .tox .tox-toolbar__primary {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
/* بند «أخرى» بدون تفاصيل: لا خط تحت العنوان ولا شريط أدوات */
.agenda-generic-block.is-notes-empty .tox-tinymce,
.agenda-generic-block.is-notes-empty .tox .tox-editor-container,
.agenda-generic-block.is-notes-empty .tox .tox-edit-area,
.agenda-generic-block.is-notes-empty .tox .tox-edit-area__iframe {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.agenda-generic-block.is-notes-empty .tox .tox-editor-header,
.agenda-generic-block.is-notes-empty .tox .tox-toolbar-overlord,
.agenda-generic-block.is-notes-empty .tox .tox-toolbar__primary {
    display: none !important;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
}
.agenda-generic-block.is-notes-empty .tox .tox-edit-area {
    border-top: none !important;
}
.agenda-generic-block.is-notes-empty {
    border: none;
    padding: 0;
    background: transparent;
    width: 100%;
    min-height: 0;
}
.agenda-generic-block.is-notes-empty .tox-tinymce {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.agenda-generic-block.is-notes-empty .i18n-en-btn[data-i18n-field="notes"] {
    display: none !important;
}
.agenda-generic-block.is-notes-empty .i18n-session-title-row {
    position: relative;
    width: 100%;
    justify-content: center;
}
.agenda-generic-block.is-notes-empty .i18n-session-title-row .i18n-en-btn {
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
}
.agenda-generic-block.is-notes-empty .agenda-other-title-input {
    margin: 0;
}

.agenda-empty {
    text-align: center;
    padding: 36px 16px;
    color: #94a3b8;
    font-size: 13px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

/* بوابة المشارك: نفس أسلوب لوحة الإدارة */
.portal-agenda { padding: 8px 0 12px; max-width: 960px; margin: 0 auto; }
.portal-agenda .agenda-day { margin-bottom: 28px; }
.portal-agenda .agenda-day-title { font-size: var(--fs-title); }
.portal-agenda .agenda-date-bar {
    font-size: 12px;
    box-shadow: 0 6px 16px rgba(50, 98, 95, .16);
}
.portal-agenda .agenda-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    background: #fff;
    padding: 12px 14px;
}
.portal-agenda .agenda-item.agenda-item--split,
.portal-agenda .agenda-item.agenda-item--break-split {
    padding-block: 12px;
    padding-inline-start: 0;
    padding-inline-end: 14px;
}
.portal-agenda .agenda-item--split,
.portal-agenda .agenda-item--break-split {
    display: grid;
    grid-template-columns: var(--agenda-time-col-w) minmax(0, 1fr);
    gap: var(--agenda-split-gap);
    align-items: stretch;
}
.portal-agenda .agenda-item--split .agenda-time-col,
.portal-agenda .agenda-item--break-split .agenda-time-col {
    width: var(--agenda-time-col-w);
    min-width: var(--agenda-time-col-w);
    max-width: var(--agenda-time-col-w);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
}
.portal-agenda .agenda-time-chip {
    width: 100%;
    margin: 0;
    align-self: stretch;
    box-sizing: border-box;
    text-align: center;
}
.portal-agenda .agenda-item[data-type="break"],
.portal-agenda .agenda-item--break-split {
    border: 1px solid #94a3b8;
    box-shadow: none;
    background: #fff;
    color: #0f172a;
    overflow: hidden;
}
.portal-agenda .agenda-item:hover {
    border-color: #64748b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.portal-agenda .agenda-item[data-type="break"]:hover,
.portal-agenda .agenda-item--break-split:hover {
    border-color: #64748b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.portal-agenda .agenda-time-chip,
.portal-agenda .agenda-time-stack,
.portal-agenda .agenda-time-stack-line {
    text-align: center;
}
.portal-agenda .agenda-session-heading { text-align: center; }
.portal-agenda .agenda-session-topic { text-align: center; margin-top: 4px; }
.portal-agenda .agenda-session-meta { text-align: right; }
.portal-agenda .agenda-name-text { font-size: var(--fs-small); }
.portal-agenda .agenda-time-chip { font-size: var(--fs-small); }
.portal-agenda .agenda-generic-block { border: none; padding: 0; background: transparent; }
.portal-agenda .agenda-tour-block { background: transparent; }
.portal-agenda .agenda-rich-title {
    font-size: 14px;
    line-height: 1.7;
    color: #0f172a;
}
/* منع أنماط البوابة من تسطيح تنسيق المحرر */
.p-card-body .agenda-rich-title p,
.p-card-body .agenda-rich-title li,
.p-card-body .agenda-rich-title span {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
}

@media (max-width: 700px) {
    .agenda-item--split,
    .agenda-item--break-split,
    .portal-agenda .agenda-item--split,
    .portal-agenda .agenda-item--break-split { grid-template-columns: 1fr; }
    .agenda-time-col {
        border-inline-end: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 10px;
        margin-bottom: 4px;
    }
    .agenda-item--break-split .agenda-time-col {
        border-bottom: 1px solid #e2e8f0;
    }
    .agenda-names-cols { grid-template-columns: 1fr; }
    .agenda-session-head { flex-direction: column; align-items: stretch; }
    .agenda-session-time { text-align: center; justify-content: center; }
    .sessions-agenda-hint { width: 100%; margin: 0; }
    .agenda-break-times { min-width: 0; width: 100%; justify-content: flex-start; }
    .agenda-segment-row,
    .agenda-segment-row--edit {
        grid-template-columns: 1fr;
    }
    .agenda-segment-remove { justify-self: start; }
}

@media print {
    .sessions-agenda-toolbar, .agenda-item-actions, .hdr-tabs, .admin-sidebar, .admin-topbar, .sessions-agenda-toast, .field-save-mark { display: none !important; }
    .agenda-name-item--sortable { cursor: default; touch-action: auto; }
    .agenda-day { page-break-inside: auto; }
    .agenda-item {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .agenda-item[data-type="break"],
    .agenda-item--break-split {
        background: #f1f8f7 !important;
        border: 1px solid #ddeceb !important;
    }
    .agenda-time-chip,
    .agenda-time-stack,
    .agenda-time-stack-line,
    .agenda-time-preview {
        text-align: center !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .agenda-date-bar, .agenda-break-bar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* قفل المقياس المكثّف — يمنع الصفحات من تصغير خط الأزرار والتنبيهات والعناوين */
.btn,
a.btn,
button.btn,
input[type="submit"].btn,
input[type="button"].btn,
.btn-sm {
    font-size: var(--fs-button) !important;
}
.alert,
.sessions-agenda-toast,
.names-inline-alert,
.field-error {
    font-size: var(--fs-ui) !important;
}
.overview-title {
    font-size: var(--fs-title) !important;
}
.admin-table tbody td,
.admins-table tbody td,
.audit-table tbody td,
.eval-table tbody td,
.changes-table tbody td,
.names-page-card .admin-table td {
    font-size: var(--fs-table);
}

/* سجل المرافقين العام داخل ملف المشارك */
.member-companions-card {
    margin-top: 16px;
    scroll-margin-top: 88px;
}
.member-companions-card > h4 {
    margin: 0 0 6px;
}
.member-companions-hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
}
.member-companions-enable {
    margin: 0 0 18px;
}
.member-companions-enable .check-item {
    margin: 0 0 8px;
    max-width: 320px;
}
.member-companions-enable .member-companions-hint {
    margin: 0;
}
.member-companions-card .p-companion-manager {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.member-companions-card .p-companion-empty {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.member-companions-card .p-companion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.member-companions-card .comp-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.member-companions-card .comp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    flex-wrap: wrap;
}
.member-companions-card .comp-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.member-companions-card .comp-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.member-companions-card .comp-card-rel {
    font-size: 12px;
    color: #94a3b8;
}
.member-companions-card .comp-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.member-companions-card .comp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.member-companions-card .comp-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #0f766e;
    font-weight: 800;
    font-size: 15px;
}
.member-companions-card .comp-avatar--preview {
    width: 48px;
    height: 48px;
}
.member-companions-card .comp-edit-panel {
    display: none;
    padding: 12px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}
.member-companions-card .comp-edit-panel.is-open {
    display: block;
}
.member-companions-card .comp-photo-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.member-companions-card .p-companion-form-actions {
    margin-top: 10px;
}
.member-companions-card .work-hint {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}
.member-companions-card details.comp-card,
.member-companions-card details.member-companion-add-card {
    display: block;
}
.member-companions-card details.comp-card > summary,
.member-companions-card details.member-companion-add-card > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    display: flex;
}
.member-companions-card details.comp-card > summary::-webkit-details-marker,
.member-companions-card details.member-companion-add-card > summary::-webkit-details-marker {
    display: none;
}
.member-companions-card details.comp-card[open] > .comp-edit-panel {
    display: block;
}
.member-companions-card details.member-companion-add-card:not([open]) > summary.p-card-head {
    border-bottom: 0;
}
.member-companions-card .comp-card-data-ico {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}
.member-companions-card .comp-card-data-ico svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.member-companions-card details.comp-card[open] .comp-card-data-ico {
    background: #dbeafe;
}
.member-companions-card .member-companion-add-card,
.member-companions-card .p-card {
    background: #fff;
    border: 1px dashed #0d9488;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}
.member-companions-card .p-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.member-companions-card .p-card-head-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.member-companions-card .p-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.member-companions-card .p-card-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.member-companions-card .p-card-icon.ic-green {
    background: #f0fdf4;
    color: #16a34a;
}
.member-companions-card details.member-companion-add-card > summary:hover .p-card-icon.ic-green,
.member-companions-card .p-card-icon.ic-green:hover {
    background: #dcfce7;
}
.member-companions-card .p-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.member-companions-card .p-card-body {
    padding: 14px 16px;
}
.member-companions-card .p-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: var(--fs-button, 13px);
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}
.member-companions-card .p-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}
.member-companions-card .p-btn-primary {
    background: #0d9488;
    color: #fff;
}
.member-companions-card .p-btn-primary:hover {
    background: #0f766e;
}
.member-companions-card .p-btn-outline {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.member-companions-card .p-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.member-companions-card .p-btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.member-companions-card .p-btn-danger:hover {
    background: #fef2f2;
}

/* —— جوال: إحصائيات الفعالية صفوف مضغوطة (عنوان وأيقونة يمين، الرقم يسار) —— */
@media (max-width: 640px) {
    .event-stats-shell {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .event-stats-group-title {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .event-stats-grid {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .event-stat-card {
        width: auto;
        flex: 1 1 auto;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        min-height: 0;
        padding: 5px 8px;
        text-align: start;
        gap: 6px;
    }
    .event-stat-icon {
        margin: 0;
        flex: 0 0 auto;
        width: 16px;
        height: 16px;
    }
    .event-stat-card > span:not(.event-stat-icon) {
        margin: 0;
        flex: 1 1 auto;
        min-width: 0;
        text-align: start;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
        color: inherit;
    }
    .event-stat-card strong {
        margin: 0;
        margin-inline-start: auto;
        font-size: 14px;
        line-height: 1;
        flex: 0 0 auto;
    }

    /* تصفية قوائم المشاركين: شبكة مرتبة */
    .topic-list-toolbar-filters,
    .topic-list-toolbar-filters-compact {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        align-items: stretch;
    }
    .topic-list-toolbar-filters label {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        min-width: 0;
        width: auto;
    }
    .topic-list-toolbar-filters label:first-child {
        grid-column: 1 / -1;
    }
    .topic-list-toolbar-filters span {
        font-size: 11px;
    }
    .topic-list-toolbar-filters select,
    .topic-list-toolbar-filters input[type="text"] {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }
    .topic-list-toolbar-filters .filter-icon-btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    /* قائمة المشاركين: إطار واحد للموضوع، صفوف بدون بطاقات داخلية */
    .participants-board-panel {
        padding: 12px 10px 16px;
    }
    .participants-board-panel .topic-participants-board {
        display: flex;
        flex-direction: column;
        gap: 10px;
        border: 0;
        border-radius: 0;
        overflow: visible;
        background: transparent;
    }
    .participants-board-panel .topic-participants-accordion {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: none;
        overflow: hidden;
        background: #fff;
    }
    .participants-board-panel .topic-participants-accordion:last-child {
        border-bottom: 1px solid #e2e8f0;
    }
    .participants-board-panel .topic-participants-summary {
        padding: 10px 12px;
        border-bottom: 1px solid #eef2f6;
        border-radius: 0;
        background: #f8fafc;
    }
    .participants-board-panel .topic-participants-table-wrap,
    .participants-board-panel .table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    .participants-board-panel .participants-unified-table,
    .participants-board-panel .participants-unified-table tbody,
    .participants-board-panel .admin-table,
    .participants-board-panel .admin-table tbody {
        display: block !important;
        width: 100% !important;
    }
    .participants-board-panel .participants-unified-table thead,
    .participants-board-panel .admin-table thead {
        display: none !important;
    }
    .participants-board-panel .participants-unified-table tbody tr,
    .participants-board-panel .admin-table tbody tr {
        width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #fff !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name act"
            "mid end"
            "sub sub";
        gap: 4px 8px;
        align-items: start;
        padding: 12px !important;
        border: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row.is-pf-filtered-out,
    .participants-board-panel .admin-table tbody tr.pf-row.is-pf-filtered-out {
        display: none !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row:last-child {
        border-bottom: 0 !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row.is-vip {
        background: #fffbeb !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row.is-vip td {
        background: transparent !important;
        border-inline-start: 0 !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td,
    .participants-board-panel .admin-table tbody td {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        float: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    .participants-board-panel .participants-unified-table tbody td::before,
    .participants-board-panel .admin-table tbody td::before {
        content: none !important;
        display: none !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:nth-child(1) {
        grid-area: name;
        min-width: 0;
        padding-inline-end: 4px !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:nth-child(2) {
        grid-area: mid;
        min-width: 0;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:nth-child(3) {
        grid-area: sub;
        min-width: 0;
        color: #64748b;
        font-size: 12px;
        line-height: 1.5;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:nth-child(4) {
        grid-area: end;
        justify-self: start;
        min-width: 0;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:nth-child(5) {
        grid-area: act;
        justify-self: start;
        align-self: start;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
    }
    .participants-board-panel .participants-unified-table tbody tr.pf-row td:first-child strong {
        font-size: 14px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.35;
    }
    .participants-board-panel .participants-unified-table .participant-name-meta {
        font-size: 11px;
        color: #94a3b8;
        margin-bottom: 1px;
    }
    .participants-board-panel .participants-unified-table .participant-subrole {
        font-size: 11.5px;
        color: #64748b;
        margin-top: 2px;
    }
    .participants-board-panel .participants-unified-table .participant-deadline-line {
        font-size: 12px;
        color: #64748b;
        line-height: 1.45;
    }
    .participants-board-panel .participants-unified-table tbody td:last-child {
        text-align: left;
        justify-content: flex-end;
    }
    .participants-board-panel .participants-unified-table .participant-actions {
        width: auto;
        max-width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 4px;
    }
    .participants-board-panel .participants-unified-table tbody tr:not(.pf-row) {
        display: block !important;
        padding: 12px !important;
        border: 0 !important;
        box-shadow: none !important;
        color: #64748b;
        font-size: 13px;
        background: #fff !important;
    }
    .participants-board-panel .participants-unified-table tbody tr:not(.pf-row) td {
        display: block !important;
        width: auto !important;
        border: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

.epv-library-pick {
    margin: 0 0 14px;
}
.epv-library-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}
.epv-library-pick-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #dbe7e6;
    border-radius: 12px;
    background: #f8fafc;
}
.epv-library-pick-card strong {
    font-size: 13.5px;
    color: #0f172a;
}
.epv-library-pick-card .epv-library-pick-rel {
    font-size: 12px;
    color: #64748b;
}
.epv-library-pick-card .btn,
.epv-library-pick-card button {
    margin-top: 4px;
}

/* مركز تصدير البيانات */
.pec-page,
.pec-page button,
.pec-page input,
.pec-page select,
.pec-page textarea,
.pec-modal,
.pec-modal button,
.pec-modal input,
.pec-modal select,
.pec-btn,
.pec-preset-btn,
.pec-chip,
.pec-filter-chip,
.pec-icon-action,
.pec-table,
.pec-metric,
.pec-status,
.pec-pager {
    font-family: var(--site-font-family, "Cairo"), Tahoma, sans-serif;
}
.pec-admin-content {
    padding-inline: 16px;
}
.content-wrap.pec-page {
    max-width: none;
    width: 100%;
    display: block;
}
.pec-shell {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 132px);
}
.pec-hero {
    padding: 16px 18px 12px;
    background:
        linear-gradient(180deg, #f7fbfb 0%, #ffffff 100%);
    border-bottom: 1px solid var(--slate-200);
}
.pec-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.pec-hero-copy h2 {
    margin: 6px 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}
.pec-event-title {
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}
.pec-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.pec-back:hover { text-decoration: none; color: var(--primary-800); }
.pec-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.pec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: var(--fs-button);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pec-btn svg { flex-shrink: 0; }
.pec-btn:hover { text-decoration: none; transform: translateY(-1px); }
.pec-btn-ghost {
    background: #fff;
    color: #334155;
    border-color: #dbe3ea;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}
.pec-btn-primary {
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    color: #fff;
    border-color: #274f4c;
    box-shadow: 0 8px 16px rgba(50, 98, 95, 0.22);
}
.pec-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}
.pec-metric {
    background: #fff;
    border: 1px solid #e8eef3;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}
.pec-metric b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.1;
}
.pec-metric span {
    display: block;
    margin-top: 3px;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.pec-presets {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
}
.pec-preset-btn {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 0;
    border-bottom: 3px solid transparent;
    border-inline-start: 1px solid rgba(15, 23, 42, 0.05);
    color: #475569;
    cursor: pointer;
    font-weight: 700;
    min-height: 46px;
    padding: 8px 16px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pec-preset-btn:first-child { border-inline-start: 0; }
.pec-preset-btn:hover { background: #f8fafc; }
.pec-preset-btn.is-active {
    color: #0f766e;
    border-bottom-color: #0f766e;
    background: #f4fbfa;
}
.pec-preset-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef2f6;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}
.pec-preset-btn.is-active .pec-preset-count {
    background: #d7efec;
    color: #115e59;
}
.pec-preset-btn.has-saved .pec-preset-label {
    position: relative;
    padding-inline-end: 12px;
}
.pec-preset-btn.has-saved .pec-preset-label::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    top: 2px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #0f766e;
    box-shadow: 0 0 0 2px #ecfdf5;
}
.pec-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8fafc;
    border-bottom: 1px solid var(--slate-200);
}
.pec-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px 12px;
    padding: 12px 16px;
    align-items: end;
}
.pec-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    min-width: 0;
    letter-spacing: 0.01em;
}
.pec-field input,
.pec-field select {
    font-weight: 600;
    height: 38px;
    min-height: 38px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    color: var(--slate-900);
    width: 100%;
}
.pec-field input:focus,
.pec-field select:focus {
    outline: none;
    border-color: #99c5c1;
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.16);
}
.pec-search-field { min-width: 220px; }
.pec-search-wrap {
    position: relative;
    display: block;
}
.pec-search-wrap svg {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.pec-search-wrap input { padding-right: 32px; }
.pec-chip-row { display: flex; gap: 6px; flex-wrap: nowrap; }
.pec-chip {
    border: 1px solid #cde3e1;
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
    color: #0f766e;
    white-space: nowrap;
    height: 38px;
}
.pec-chip.is-active { background: #0f766e; color: #fff; border-color: #0f766e; }
.pec-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
}
.pec-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    color: #115e59;
    border-radius: 999px;
    padding: 4px 8px 4px 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.pec-filter-chip button {
    border: 0;
    background: transparent;
    color: #0f766e;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
}
.pec-apply-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 16px 14px;
    padding: 12px 14px;
    border: 1px solid #cce7e2;
    border-radius: 12px;
    background: #f8fffd;
}
.pec-apply-bar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
.pec-apply-bar .pec-field {
    min-width: 180px;
    flex: 1 1 180px;
}
.pec-apply-hint {
    margin: 0;
    color: #0f766e;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
}
.pec-apply-hint.is-warn { color: #9a3412; }
.pec-apply-hint.is-err { color: #991b1b; }
.pec-table-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #fff;
}
.pec-table-wrap {
    overflow: auto;
    flex: 1;
    max-height: min(68vh, 820px);
    background:
        linear-gradient(#fff, #fff) local,
        linear-gradient(to left, #fff 70%, rgba(255,255,255,0)) local,
        linear-gradient(to left, rgba(15, 23, 42, 0.08), transparent 18px) scroll;
    background-repeat: no-repeat;
}
.pec-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    font-size: 13px;
}
.pec-table thead th,
.pec-table tbody td {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    hyphens: none !important;
    vertical-align: middle;
    text-align: right;
    line-height: 1.35;
}
.pec-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 12px;
    border-bottom: 1px solid #dbe4ee;
    cursor: pointer;
    box-shadow: 0 1px 0 #dbe4ee;
}
.pec-table thead th.is-sorted { color: #0f766e; }
.pec-th-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.pec-sort {
    width: 0;
    height: 0;
    border-inline-start: 4px solid transparent;
    border-inline-end: 4px solid transparent;
    opacity: 0.28;
}
.pec-table thead th.is-asc .pec-sort {
    border-bottom: 5px solid currentColor;
    opacity: 1;
}
.pec-table thead th.is-desc .pec-sort {
    border-top: 5px solid currentColor;
    opacity: 1;
}
.pec-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #eef2f6;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
}
.pec-table tbody tr:nth-child(even) td { background: #fafcfd; }
.pec-table tbody tr:hover td { background: #f3faf8; }
.pec-table tbody td.pec-td-empty {
    color: #94a3b8;
    font-weight: 500;
}
.pec-table tbody td.pec-td-name {
    font-weight: 800;
    color: #0f172a;
}
.pec-table tbody tr.pec-row-companion td.pec-td-name {
    font-weight: 700;
    padding-inline-start: 1.65rem;
    color: #334155;
}
.pec-table thead th.pec-th-photo,
.pec-table tbody td.pec-td-photo {
    width: 52px;
    min-width: 52px;
    max-width: 56px;
    text-align: center !important;
    padding: 4px 6px !important;
}
.pec-photo-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
    display: block;
    margin-inline: auto;
    background: #e2e8f0;
    vertical-align: middle;
}
.pec-table .pec-tel {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: left;
}
.pec-table tbody td.pec-td-datetime {
    direction: rtl;
    text-align: right;
}
.pec-table tbody td.pec-td-note {
    white-space: pre-line;
    line-height: 1.45;
    text-align: right;
}
.pec-table .pec-datetime {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: left;
    font-variant-numeric: lining-nums tabular-nums;
}
.pec-table tbody td.pec-td-serial,
.pec-table thead th.pec-th-serial {
    text-align: center;
    color: #64748b;
}
.pec-th-check,
.pec-td-check,
.pec-th-file,
.pec-td-file {
    width: 44px;
    min-width: 44px;
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.pec-th-check,
.pec-td-check {
    position: sticky;
    inset-inline-start: 0;
    z-index: 4;
    box-shadow: -6px 0 8px -6px rgba(15, 23, 42, 0.12);
}
.pec-th-serial,
.pec-td-serial {
    position: sticky;
    inset-inline-start: 44px;
    z-index: 4;
}
.pec-th-file,
.pec-td-file {
    position: sticky;
    inset-inline-end: 0;
    z-index: 4;
    box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.12);
}
.pec-table thead th.pec-th-check,
.pec-table thead th.pec-th-serial,
.pec-table thead th.pec-th-file {
    z-index: 6;
    background: #eef3f7;
}
.pec-table tbody tr:nth-child(even) td.pec-td-check,
.pec-table tbody tr:nth-child(even) td.pec-td-serial,
.pec-table tbody tr:nth-child(even) td.pec-td-file {
    background: #fafcfd;
}
.pec-table tbody tr:hover td.pec-td-check,
.pec-table tbody tr:hover td.pec-td-serial,
.pec-table tbody tr:hover td.pec-td-file {
    background: #f3faf8;
}
.pec-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
}
.pec-icon-action:hover { text-decoration: none; }
.pec-exclude {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}
.pec-exclude:hover { background: #fee2e2; }
.pec-open {
    border-color: #cde3e1;
    background: #f0fdfa;
    color: #0f766e;
}
.pec-open:hover { background: #ccfbf1; }
.pec-th-filelink,
.pec-td-filelink {
    width: 72px;
    min-width: 72px;
    text-align: center !important;
}
.pec-file-open {
    border-color: #cde3e1;
    background: #f0fdfa;
    color: #0f766e;
}
.pec-file-open:hover { background: #ccfbf1; color: #0f766e; }
.pec-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
}
.pec-pill-ok { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.pec-pill-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.pec-pill-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.pec-pill-muted { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.pec-empty {
    white-space: normal !important;
    text-align: center !important;
    padding: 48px 20px !important;
    color: #94a3b8;
    font-weight: 600;
}
.pec-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--slate-200);
    background: #fff;
}
.pec-status {
    margin: 0;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}
.pec-pager {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.pec-pager-btns { display: inline-flex; gap: 6px; }
.pec-pager select {
    height: 32px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    padding: 0 8px;
    font-weight: 700;
    background: #fff;
}
.pec-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    z-index: var(--z-overlay, 1400);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pec-modal[hidden] { display: none !important; }
.pec-modal-dialog {
    width: min(880px, 96vw);
    max-height: min(88vh, 780px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, .28);
    padding: 0;
    font-family: var(--site-font-family, "Cairo"), Tahoma, sans-serif;
}
.pec-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.pec-modal-head-copy { min-width: 0; flex: 1; }
.pec-modal-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--slate-900);
}
.pec-modal-hint {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}
.pec-col-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #d7efec;
    color: #115e59;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.pec-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    flex-shrink: 0;
}
.pec-modal-close:hover { background: #eef2f6; color: #334155; }
.pec-modal-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid #eef2f6;
    background: #fff;
    flex-shrink: 0;
}
.pec-col-search-wrap {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
    margin: 0;
}
.pec-col-search-wrap svg {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
#pecColSearch {
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin: 0;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 0 36px 0 12px;
    font-family: inherit;
    font-weight: 600;
    background: #f8fafc;
}
#pecColSearch:focus {
    outline: none;
    border-color: #99c5c1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.16);
}
.pec-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}
.pec-btn-sm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}
.pec-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}
.pec-col-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.pec-col-section-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #0f766e;
}
.pec-col-section-hint {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.pec-col-order-panel,
.pec-col-catalog-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
}
.pec-col-order {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    min-height: 42px;
}
.pec-col-order-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 2px;
}
.pec-order-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
    border-radius: 10px;
    padding: 5px 10px 5px 8px;
    cursor: grab;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    user-select: none;
}
.pec-order-chip:active { cursor: grabbing; }
.pec-order-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #0f766e;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.pec-order-grip {
    color: #5eead4;
    font-size: 11px;
    letter-spacing: -1px;
    line-height: 1;
}
.pec-col-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}
.pec-col-group {
    border: 1px solid #e8eef3;
    border-radius: 12px;
    padding: 0;
    background: #f8fafc;
    overflow: hidden;
}
.pec-col-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #eef6f5;
    border-bottom: 1px solid #e2e8f0;
}
.pec-col-group-head input {
    width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    accent-color: #0f766e;
}
.pec-col-group-head h4 {
    margin: 0;
    font-size: 13px;
    color: #0f766e;
    font-weight: 800;
    flex: 1;
}
.pec-col-group-count {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.pec-col-group-body { padding: 6px 8px 8px; }
.pec-col-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    padding: 6px 6px;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
}
.pec-col-item:hover { background: #fff; }
.pec-col-item input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #0f766e;
}
.pec-col-item-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.pec-col-item-en {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}
.pec-col-item-hint {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}
.pec-modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.pec-modal-foot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.pec-col-save-status {
    margin: 0;
    flex: 1 1 180px;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    color: #64748b;
}
.pec-col-save-status.is-saved { color: #0f766e; }
.pec-col-save-status.is-dirty { color: #b45309; }
.pec-col-save-status.is-default { color: #64748b; }
.pec-order-move {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    margin-inline-start: 2px;
}
.pec-order-move-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    color: #0f766e;
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    padding: 0 2px;
    min-width: 16px;
}
.pec-order-move-btn:hover,
.pec-order-move-btn:focus {
    color: #115e59;
    outline: none;
}
.pec-btn:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

@media (max-width: 900px) {
    .pec-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pec-filters { grid-template-columns: 1fr 1fr; }
    .pec-search-field { grid-column: 1 / -1; }
    .pec-table { display: table; width: max-content; }
    .pec-table thead { display: table-header-group; }
    .pec-table tbody { display: table-row-group; }
    .pec-table tr { display: table-row; }
    .pec-table th,
    .pec-table td {
        display: table-cell;
        width: auto !important;
        white-space: nowrap !important;
    }
    .pec-table tbody td::before { content: none !important; }
}
@media (max-width: 720px) {
    .pec-hero-actions { width: 100%; }
    .pec-btn { flex: 1 1 auto; }
    .pec-filters { grid-template-columns: 1fr; }
    .pec-modal-dialog { width: 100%; max-height: 96vh; }
    .pec-col-groups { grid-template-columns: 1fr; }
    .pec-modal-foot { align-items: stretch; }
    .pec-modal-foot-actions { width: 100%; }
    .pec-modal-foot-actions .pec-btn { flex: 1 1 auto; }
}

/* —— الصفحة الرئيسية للإدارة —— */
.dash-home {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 12px;
}
.dash-featured {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 14px 16px 12px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}
.dash-featured-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    align-items: start;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}
.dash-featured-head-main { min-width: 0; }
.dash-featured-head-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.dash-featured-head-actions .btn { white-space: nowrap; }
.dash-featured-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.dash-featured-title {
    margin: 0 0 8px;
    font-size: var(--fs-title);
    font-weight: 800;
    line-height: var(--line-title);
    color: var(--slate-900);
}
.dash-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--slate-500);
    font-size: var(--fs-small);
    font-weight: 600;
}
.dash-featured-meta li {
    display: inline-flex;
    align-items: center;
}
.dash-featured-meta li:not(:last-child)::after {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--slate-300);
    margin: 0 10px;
}
.dash-phase,
.dash-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-badge);
    font-weight: 800;
}
.dash-phase--ongoing { background: #dcfce7; color: #166534; }
.dash-phase--upcoming { background: #e0f2fe; color: #0369a1; }
.dash-phase--past { background: #f1f5f9; color: #475569; }
.dash-chip { background: var(--primary-50); color: var(--primary-800); }
.dash-chart {
    margin: 0;
}
.dash-chart figcaption {
    margin: 0 0 10px;
    font-size: var(--fs-section);
    font-weight: 800;
    color: var(--primary-800);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
    animation: dashLiveDot 2.2s ease-out infinite;
    flex-shrink: 0;
}
@keyframes dashLiveDot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.dash-chart.is-live .dash-vchart-col { animation: none; }
.dash-chart-scroll {
    overflow-x: auto;
    margin: 0 -2px;
}
.dash-vchart {
    display: block;
    width: 100%;
    min-width: 640px;
    height: auto;
    overflow: visible;
}
.dash-vchart-col {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: dashBarIn 0.75s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes dashBarIn {
    from { transform: scaleY(0.08); opacity: 0.35; }
    to { transform: scaleY(1); opacity: 1; }
}
.dash-chart-legend {
    list-style: none;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--slate-100);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.dash-chart-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--slate-700);
}
.dash-chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex: 0 0 auto;
}
.dash-featured-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--slate-100);
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--slate-500);
}
.dash-featured-foot strong { color: var(--slate-900); }
.dash-empty-card {
    background: #fff;
    border: 1px dashed var(--slate-300);
    border-radius: 14px;
    padding: 28px 18px;
    text-align: center;
}
.dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.dash-section-title {
    margin: 0 0 8px;
    font-size: var(--fs-section);
    font-weight: 800;
    color: var(--slate-700);
}
.dash-section-head .dash-section-title { margin: 0; }
.dash-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dash-event-list a {
    display: block;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
}
.dash-event-list a:hover {
    text-decoration: none;
    border-color: var(--primary-500);
}
.dash-event-list strong { display: block; font-size: var(--fs-ui); }
.dash-event-list span {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-small);
    color: var(--slate-500);
    font-weight: 600;
}
.dash-dir-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.dash-dir-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}
.dash-dir-card span {
    display: block;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--slate-500);
}
.dash-dir-card strong {
    display: block;
    margin-top: 2px;
    font-size: 22px;
    color: var(--slate-900);
}
@media (max-width: 720px) {
    .dash-dir-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .dash-featured { padding: 12px; }
    .dash-featured-head { grid-template-columns: 1fr; }
    .dash-featured-head-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .dash-vchart-col { animation: none; }
    .dash-live-dot { animation: none; }
    .event-stat-card strong.is-live-pulse,
    [data-stat-key].is-live-pulse,
    #participantsLiveLists.is-live-pulse { animation: none; }
}

.topic-icon-btn.topic-icon-btn-wa svg {
    fill: currentColor;
    stroke: none;
}

/* ── تحديد جماعي وإرسال واتساب بالتتابع ───────────────────────── */
.pal-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}
.pal-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0f766e;
    cursor: pointer;
}
.members-list-table .pal-check-col,
.members-list-table .pal-check-cell,
.participants-unified-table .pal-check-col,
.participants-unified-table .pal-check-cell {
    width: 42px;
    min-width: 42px;
    max-width: 48px;
    text-align: center;
    vertical-align: middle;
    display: table-cell !important;
}
.pal-bulk-bar {
    position: fixed;
    inset-inline: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #134e4a;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}
.pal-bulk-bar[hidden] { display: none !important; }
.pal-bulk-bar-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pal-bulk-bar-count {
    font-weight: 800;
    font-size: 15px;
}
.pal-bulk-bar-hint {
    font-size: 12px;
    opacity: .82;
}
.pal-bulk-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pal-bulk-bar .btn {
    min-height: 38px;
}
.pal-bulk-bar .btn-link {
    color: #ccfbf1;
    background: transparent;
    border: 0;
}
.pal-bulk-bar .btn-primary {
    background: #22c55e;
    border-color: #16a34a;
    color: #052e16;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pal-bulk-bar .btn-primary svg {
    width: 16px;
    height: 16px;
}
.pal-bulk-bar .btn-mail {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pal-bulk-bar .btn-mail svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pal-bulk-modal[hidden] { display: none !important; }
.pal-bulk-modal {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.pal-bulk-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}
.pal-bulk-modal-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    display: flex;
    flex-direction: column;
}
.pal-bulk-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 10px;
}
.pal-bulk-modal-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #134e4a;
}
.pal-bulk-modal-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
}
.pal-bulk-modal-x {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.pal-wa-missing {
    margin: 0 18px 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.65;
}
.pal-wa-missing strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.pal-wa-missing p {
    margin: 0 0 10px;
}
.pal-wa-missing[hidden],
html[data-pal-wa-autosend="1"] .js-pal-wa-missing {
    display: none !important;
}
.pal-wa-ext {
    margin: 0 18px 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.65;
}
.pal-wa-ext strong {
    display: block;
    margin-bottom: 6px;
}
.pal-wa-ext ol {
    margin: 0 0 10px;
    padding-inline-start: 20px;
}
.pal-wa-ext-browser {
    margin: 10px 0 4px;
    font-weight: 800;
    color: #7c2d12;
}
.pal-wa-ext-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pal-wa-ext-on {
    margin: 0 18px 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}
.pal-bulk-progress {
    padding: 0 18px 10px;
}
.pal-bulk-progress-track {
    height: 6px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
}
.pal-bulk-progress-track i {
    display: block;
    height: 100%;
    width: 0;
    background: #14b8a6;
    border-radius: inherit;
    transition: width .25s ease;
}
.pal-bulk-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    font-size: 12.5px;
    color: #334155;
    font-weight: 600;
}
.pal-bulk-progress-meta .js-pal-bulk-countdown {
    color: #0f766e;
}
.pal-bulk-list {
    margin: 0;
    padding: 0 18px 12px;
    list-style: none;
    max-height: 320px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pal-bulk-list li {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
}
.pal-bulk-list li.is-current {
    border-color: #5eead4;
    background: #f0fdfa;
}
.pal-bulk-list li.is-sent { border-color: #bbf7d0; background: #f0fdf4; }
.pal-bulk-list li.is-skip,
.pal-bulk-list li.is-error { border-color: #fecaca; background: #fef2f2; }
.pal-bulk-list li.is-excluded {
    border-color: #fde68a;
    background: #fffbeb;
}
.pal-bulk-picker {
    padding: 0 18px 12px;
    max-height: 360px;
    overflow: auto;
}
.pal-bulk-tpl-group {
    margin: 0 0 14px;
}
.pal-bulk-tpl-group h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #0f766e;
    font-weight: 800;
}
.pal-bulk-tpl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pal-bulk-tpl {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: #134e4a;
    cursor: pointer;
    min-height: 64px;
}
.pal-bulk-tpl:hover,
.pal-bulk-tpl:focus {
    border-color: #34d399;
    background: #ecfdf5;
}
.pal-bulk-tpl strong {
    font-size: 14px;
}
.pal-bulk-tpl small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
}
.pal-bulk-tpl-empty {
    margin: 8px 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .pal-bulk-tpl-grid { grid-template-columns: 1fr; }
}
.pal-bulk-list .pal-bulk-i {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    background: #ccfbf1;
    color: #115e59;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}
.pal-bulk-list .pal-bulk-name { font-weight: 700; color: #0f172a; min-width: 0; }
.pal-bulk-list .pal-bulk-st { font-size: 11px; color: #64748b; font-weight: 700; }
.pal-bulk-list li small {
    grid-column: 2 / -1;
    color: #94a3b8;
    font-size: 11px;
}
.pal-bulk-modal-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid #f1f5f9;
}
.pal-bulk-modal-foot .btn { min-height: 40px; }
@media (max-width: 640px) {
    .pal-bulk-bar {
        inset-inline: 10px;
        flex-direction: column;
        align-items: stretch;
    }
    .pal-bulk-bar-actions { justify-content: stretch; }
    .pal-bulk-bar-actions .btn { flex: 1; justify-content: center; }
}

/* —— إعدادات المنصة —— */
.content-wrap.settings-page {
    max-width: 1120px;
}
.content-wrap.settings-page.settings-page--wide {
    max-width: 1280px;
}
.settings-shell {
    position: relative;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}
.settings-shell::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-800) 0%, var(--primary-600) 42%, var(--primary-500) 100%);
}
.settings-hero {
    padding: 20px 22px 8px;
    background:
        radial-gradient(720px 160px at 100% -40%, rgba(86, 158, 154, 0.22), transparent 58%),
        linear-gradient(180deg, #f5fbfa 0%, #ffffff 100%);
}
.settings-hero-kicker {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    color: var(--primary-800);
    font-size: var(--fs-badge);
    font-weight: 800;
    letter-spacing: 0.02em;
}
.settings-hero-copy {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.settings-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(50, 98, 95, 0.22);
}
.settings-hero-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.settings-hero-copy h2 {
    margin: 0 0 4px;
    font-size: var(--fs-title);
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}
.settings-hero-copy p {
    margin: 0;
    max-width: 52em;
    color: var(--slate-500);
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1.7;
}
.settings-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 8px;
    padding: 14px 18px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
    border-bottom: 1px solid var(--slate-100);
}
.settings-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 78px;
    padding: 12px 12px 11px;
    border-radius: 14px;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.settings-nav-item:hover {
    text-decoration: none;
    transform: translateY(-1px);
    border-color: var(--primary-500);
    box-shadow: 0 10px 18px rgba(50, 98, 95, 0.1);
}
.settings-nav-item.is-active {
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    border-color: #274f4c;
    color: #fff;
    box-shadow: 0 12px 22px rgba(50, 98, 95, 0.24);
}
.settings-nav-item.is-active:hover {
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    border-color: #274f4c;
    color: #fff;
}
.settings-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--primary-50);
    color: var(--primary-700);
}
.settings-nav-item.is-active .settings-nav-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.settings-nav-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.settings-nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.settings-nav-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.3;
}
.settings-nav-item.is-active .settings-nav-label {
    color: #fff;
}
.settings-nav-desc {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.45;
}
.settings-nav-item.is-active .settings-nav-desc {
    color: rgba(255, 255, 255, 0.82);
}
.settings-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-body > form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-body > .alert {
    margin: 0;
}
.settings-lead,
.settings-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.75;
}
.settings-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.settings-jump a {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.settings-jump a:hover {
    text-decoration: none;
    background: var(--primary-50);
    border-color: var(--primary-100);
    color: var(--primary-800);
}
.settings-page .settings-section {
    margin-bottom: 0;
    border-radius: 16px;
    padding: 16px 16px 14px;
    box-shadow: none;
}
.settings-card {
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    scroll-margin-top: 18px;
}
.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}
.settings-card-head h3,
.settings-card-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--slate-900);
}
.settings-card-head p {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.6;
}
.settings-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--primary-50);
    color: var(--primary-700);
}
.settings-card-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.settings-card-head-main { min-width: 0; flex: 1; }
.settings-subhead {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-700);
}
.settings-subhead:first-child { margin-top: 0; }
.settings-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}
.settings-hint {
    display: block;
    margin: 6px 0 0;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
}
.settings-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}
.settings-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}
.settings-status.is-on {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.settings-status.is-off {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.settings-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--slate-200);
    background: #f8fbfb;
    cursor: pointer;
    font-weight: 700;
    color: var(--slate-800);
}
.settings-toggle input[type="checkbox"] {
    width: 42px;
    height: 24px;
    margin: 0;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e2e8f0;
    position: relative;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}
.settings-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    transition: transform 0.16s ease;
}
.settings-toggle input[type="checkbox"]:checked {
    background: var(--primary-600);
    border-color: var(--primary-700);
}
.settings-toggle input[type="checkbox"]:checked::after {
    transform: translateX(-18px);
}
html[dir="rtl"] .settings-toggle input[type="checkbox"]:checked::after,
[dir="rtl"] .settings-toggle input[type="checkbox"]:checked::after {
    transform: translateX(-18px);
}
.settings-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.visa-upload-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 760px;
    margin-bottom: 16px;
}
@media (min-width: 720px) {
    .visa-upload-choices {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.settings-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--slate-200);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--slate-800);
}
.settings-choice:has(input:checked) {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-800);
    box-shadow: 0 0 0 3px rgba(86, 158, 154, 0.12);
}
.settings-choice input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--primary-600);
}
.settings-split {
    display: grid;
    grid-template-columns: minmax(240px, 0.86fr) minmax(0, 1.14fr);
    gap: 14px;
    align-items: stretch;
}
.settings-brand-preview {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(39, 79, 76, 0.18);
    background: #3f8a86;
    color: #fff;
    box-shadow: 0 12px 24px rgba(50, 98, 95, 0.18);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.settings-preview-kicker {
    margin: 0;
    padding: 10px 14px 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    opacity: 0.78;
}
.settings-preview-sidebar {
    padding: 18px 18px 16px;
    text-align: center;
}
.settings-preview-logo,
.settings-preview-logo-ph {
    width: 86px;
    height: 86px;
    margin: 0 auto 10px;
    border-radius: 18px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-preview-logo { display: block; background: transparent; }
.settings-preview-logo-ph svg {
    width: 34px;
    height: 34px;
    stroke: rgba(255, 255, 255, 0.8);
    fill: none;
    stroke-width: 1.7;
}
.settings-preview-sidebar h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #fff;
}
.settings-preview-sidebar .brand-title-img {
    filter: brightness(0) invert(1);
    max-height: 42px;
}
.settings-preview-sidebar p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}
.settings-preview-extras {
    margin-top: auto;
    padding: 0 12px 14px;
    display: grid;
    gap: 8px;
}
.settings-preview-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(10, 24, 24, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: start;
}
.settings-preview-chip img,
.settings-preview-fav-ph,
.settings-preview-pwa-ph {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}
.settings-preview-chip img.settings-preview-pwa {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}
.settings-preview-chip b {
    display: block;
    font-size: 11px;
    font-weight: 800;
}
.settings-preview-chip span {
    display: block;
    font-size: 10px;
    opacity: 0.78;
    font-weight: 600;
}
.settings-assets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.settings-asset {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}
.settings-asset-preview {
    width: 92px;
    min-height: 92px;
    border-radius: 12px;
    background:
        repeating-linear-gradient(45deg, #f8fafc 0, #f8fafc 8px, #eef2f7 8px, #eef2f7 16px);
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}
.settings-asset-preview img {
    max-width: 100%;
    max-height: 88px;
    object-fit: contain;
    display: block;
}
.settings-asset-preview.is-favicon img { width: 48px; height: 48px; }
.settings-asset-preview.is-pwa img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}
.settings-asset-preview svg {
    width: 28px;
    height: 28px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.settings-asset-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.settings-asset-body h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: var(--slate-900);
}
.settings-asset-body p {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.6;
}
.settings-asset-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.settings-file-label {
    position: relative;
    overflow: hidden;
}
.settings-file-label input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    padding: 0;
    border: 0;
    font-size: 0;
}
.settings-file-name {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-700);
    min-height: 1.2em;
}
.settings-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}
.settings-card-title-en {
    display: inline-block;
    margin-inline-start: 8px;
    font-size: 13px;
    font-weight: 650;
    color: #64748b;
    letter-spacing: 0.01em;
}
.settings-list-card .settings-card-head h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}
.settings-list-io {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.settings-list-io-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: var(--primary-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.settings-list-io-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.settings-list-io-btn:hover {
    background: var(--primary-50);
    border-color: #99f6e4;
}
.settings-list-import-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.settings-list-import-dialog {
    border: 0;
    border-radius: 16px;
    padding: 0;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}
.settings-list-import-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}
.settings-list-import-panel {
    padding: 18px 18px 16px;
}
.settings-list-import-panel h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--slate-900);
}
.settings-list-import-panel p {
    margin: 0 0 14px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}
.settings-list-import-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.settings-list-import-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    background: #fff;
    cursor: pointer;
    color: var(--slate-900);
}
.settings-list-import-choice strong {
    font-size: 14px;
    font-weight: 800;
}
.settings-list-import-choice span {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.6;
}
.settings-list-import-choice:hover {
    background: var(--primary-50);
    border-color: #99f6e4;
}
.settings-list-import-choice.is-replace:hover {
    background: #fff7ed;
    border-color: #fdba74;
}
.settings-countries-card {
    margin-bottom: 12px;
}
.settings-countries-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
}
.settings-countries-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}
.settings-countries-table th,
.settings-countries-table td {
    padding: 8px;
    text-align: right;
    vertical-align: middle;
    border-bottom: 1px solid var(--slate-100);
}
.settings-countries-table thead th {
    font-size: 12px;
    font-weight: 800;
    color: var(--slate-600);
    background: #f8fafc;
}
.settings-bilingual-wrap {
    overflow-x: auto;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
}
.settings-bilingual-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}
.settings-bilingual-table th,
.settings-bilingual-table td {
    padding: 8px;
    text-align: right;
    vertical-align: middle;
    border-bottom: 1px solid var(--slate-100);
}
.settings-bilingual-table thead th {
    font-size: 12px;
    font-weight: 800;
    color: var(--slate-600);
    background: #f8fafc;
}
.settings-bilingual-table tbody tr:last-child td {
    border-bottom: 0;
}
.settings-bilingual-table input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}
.settings-list-col-drag {
    width: 36px;
    text-align: center;
}
.settings-list-drag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--slate-500);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.settings-list-drag svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
}
.settings-list-drag:hover {
    background: #f1f5f9;
    color: var(--slate-700);
}
.settings-list-drag:active {
    cursor: grabbing;
}
.settings-bilingual-table tbody tr.is-dragging {
    opacity: 0.45;
}
.settings-bilingual-table tbody tr.is-dragging td {
    background: #f8fafc;
}
.settings-list-card .settings-countries-toolbar {
    margin-top: 8px;
}
.settings-countries-table input[type="text"] {
    width: 100%;
    min-height: 38px;
    margin: 0;
}
.settings-countries-col-actions {
    width: 72px;
    text-align: center;
}
.settings-countries-remove {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 8px;
}
.settings-countries-remove:hover {
    text-decoration: underline;
}
.settings-countries-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}
.settings-list-card textarea {
    min-height: 148px;
    resize: vertical;
    line-height: 1.65;
}
.settings-list-card .settings-card-head {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    cursor: pointer;
    list-style: none;
    align-items: center;
}
.settings-list-card > summary.settings-card-head::-webkit-details-marker,
.settings-list-card > summary.settings-card-head::marker {
    display: none;
    content: '';
}
.settings-list-card:not([open]) > summary.settings-card-head {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
.settings-list-chevron {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-left: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.settings-list-card[open] > summary .settings-list-chevron {
    transform: rotate(-135deg);
}
.settings-list-body {
    min-width: 0;
}
.settings-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-800);
    font-size: 11px;
    font-weight: 800;
}
.settings-footer {
    position: sticky;
    bottom: 10px;
    z-index: 6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.settings-footer p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
}
.settings-steps {
    margin: 8px 0 0;
    padding: 0 18px 0 0;
    font-size: 13px;
    color: var(--slate-700);
    line-height: 1.8;
}
.settings-steps li { margin-bottom: 8px; }
.settings-steps a { font-weight: 700; }
.settings-preset-note {
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--slate-600);
    line-height: 1.7;
}
.settings-accordion {
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.settings-accordion + .settings-accordion { margin-top: 10px; }
.settings-accordion > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-weight: 800;
    color: var(--slate-900);
    user-select: none;
}
.settings-accordion > summary::-webkit-details-marker { display: none; }
.settings-accordion > summary .settings-card-icon { width: 34px; height: 34px; }
.settings-accordion-meta {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}
.settings-accordion-meta::after {
    content: "";
    width: 7px;
    height: 7px;
    border-inline-end: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.16s ease;
}
.settings-accordion[open] > summary {
    border-bottom: 1px solid var(--slate-100);
    background: #f8fbfb;
}
.settings-accordion[open] .settings-accordion-meta::after {
    transform: rotate(225deg);
}
.settings-accordion-body { padding: 14px 16px 16px; }
.eai-cap-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin: 8px 0 16px; }
.eai-cap-table { width:100%; border-collapse:collapse; font-size:13px; }
.eai-cap-table th, .eai-cap-table td { border-bottom:1px solid var(--slate-100); padding:7px 8px; text-align:start; vertical-align:top; }
.eai-cap-table code { font-size:12px; }
.eai-cap-desc td { color:var(--slate-500); font-size:12px; }
.eai-cap-unknown { border:1px dashed var(--slate-200); border-radius:12px; padding:12px; margin:10px 0; background:#f8fafc; }
.eai-cap-pill { display:inline-block; margin:4px 0 4px 8px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.eai-cap-pill.is-ok { background:#ecfdf5; color:#047857; }
.eai-cap-pill.is-bad { background:#fef2f2; color:#b91c1c; }
.eai-cap-pill.is-tech { background:#fff7ed; color:#c2410c; }
.eai-cap-case { border:1px solid var(--slate-200); border-radius:12px; padding:12px 14px; margin:10px 0; background:#fff; }
.eai-cap-case.is-tech { border-color:#fdba74; background:#fffbeb; }
.eai-cap-case.is-fail { border-color:#fca5a5; background:#fff7f7; }
.eai-cap-case h5 { margin:0 0 8px; font-size:15px; }
.eai-cap-case-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.eai-cap-diag { background:#f8fafc; border-radius:10px; padding:10px 12px; margin:8px 0; }
.eai-cap-tech { margin-top:8px; }
.eai-cap-tech pre { max-height:240px; overflow:auto; background:#0f172a; color:#e2e8f0; padding:10px; border-radius:10px; font-size:11px; }
.eai-cap-summary-grid pre { max-height:240px; overflow:auto; background:#0f172a; color:#e2e8f0; padding:10px; border-radius:10px; font-size:11px; }
.page-save-msg { display: none; color: #047857; font-weight: 800; font-size: 13px; align-self: center; }
.page-save-msg.show { display: inline; }

.settings-page .letter-bg-library {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    box-shadow: none;
    margin-bottom: 0;
}
.settings-page .letter-block {
    margin-bottom: 0;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}
.settings-page .letter-block-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 16px;
    background: #fff;
}
.settings-page .letter-block-collapsible[open] .letter-block-summary {
    background: #f8fbfb;
}
.settings-page .letter-editor-wrap {
    border-radius: 12px;
    border-color: var(--slate-200);
}

@media (max-width: 980px) {
    .settings-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 14px;
        -webkit-overflow-scrolling: touch;
    }
    .settings-nav-item {
        min-width: 168px;
        flex: 0 0 auto;
    }
    .settings-split,
    .settings-field-grid,
    .settings-assets,
    .settings-lists-grid,
    .settings-choice-grid {
        grid-template-columns: 1fr;
    }
    .settings-countries-table {
        min-width: 520px;
    }
}
@media (max-width: 640px) {
    .settings-hero,
    .settings-body { padding-inline: 14px; }
    .settings-nav { padding-inline: 12px; }
    .settings-nav-desc { display: none; }
    .settings-nav-item { min-width: 118px; min-height: 64px; align-items: center; }
    .settings-footer { align-items: stretch; }
    .settings-footer .btn { width: 100%; }
    .settings-asset { flex-direction: column; }
    .settings-asset-preview { width: 100%; min-height: 110px; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* —— قوالب الرسائل —— */
.msg-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}
.msg-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbfb 0%, #fff 100%);
}
.msg-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-800);
    line-height: 1.2;
}
.msg-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
}
.msg-toolbar { margin-bottom: 16px; }
.msg-wa-ext-card {
    margin: 0 0 16px;
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 46%);
}
.msg-wa-ext-card .settings-card-head {
    align-items: center;
    margin-bottom: 12px;
}
.msg-wa-ext-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.msg-wa-ext-pill[data-state="on"] {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.msg-wa-ext-pill[data-state="off"] {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.msg-wa-ext-card .pal-wa-ext {
    margin: 0;
    background: #fff;
    border-color: var(--slate-200);
    color: var(--slate-700);
}
.msg-wa-ext-card .pal-wa-ext-browser {
    color: var(--primary-800);
}
.msg-wa-ext-card[hidden] {
    display: none !important;
}
.msg-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.msg-channel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--slate-200);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.msg-channel:hover {
    border-color: var(--primary-500);
    box-shadow: 0 10px 18px rgba(50, 98, 95, 0.1);
}
.msg-channel.is-active {
    background: linear-gradient(180deg, #f3fbfa 0%, #eaf6f5 100%);
    border-color: var(--primary-500);
    box-shadow: 0 10px 18px rgba(50, 98, 95, 0.12);
}
.msg-channel .settings-card-icon { width: 38px; height: 38px; }
.msg-channel strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--slate-900);
}
.msg-channel small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.5;
}
.msg-filters { display: flex; flex-direction: column; gap: 10px; }
.msg-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}
.msg-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-cat {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.msg-cat.is-active {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}
.msg-tpl-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.msg-tpl-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    line-height: 1.55;
}
.msg-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: var(--slate-100);
    color: var(--slate-600);
}
.msg-badge.is-mail { background: #ecfeff; color: #0e7490; }
.msg-badge.is-wa { background: #f0fdf4; color: #15803d; }
.msg-badge.is-custom { background: #ecfdf5; color: #047857; }
.msg-enabled { margin-bottom: 4px; }
.msg-vars {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 12px;
}
.msg-var {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px dashed #bbf7d0;
    background: #f8fdfb;
    color: #14532d;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.msg-var:hover { background: #ecfdf5; border-style: solid; }
.msg-var code {
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
    direction: ltr;
}
.msg-tpl-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 16px;
    align-items: start;
}
.msg-preview-col {
    position: sticky;
    top: 12px;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
}
.msg-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--slate-200);
    background: #fff;
}
.msg-preview-head strong { font-size: 13px; color: var(--slate-800); }
.msg-preview-head span { font-size: 11px; font-weight: 700; color: var(--slate-500); }
.msg-preview-email { padding: 14px; }
.msg-preview-brand {
    text-align: center;
    margin-bottom: 12px;
}
.msg-preview-brand img {
    max-height: 48px;
    max-width: 160px;
    margin-bottom: 8px;
}
.msg-preview-app {
    font-size: 16px;
    font-weight: 800;
    color: #32625f;
}
.msg-preview-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}
.msg-preview-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.msg-preview-card::before {
    content: "";
    display: block;
    height: 5px;
    background: #3d7a76;
}
.msg-preview-subject {
    padding: 12px 16px 0;
    font-size: 13px;
    font-weight: 800;
    color: #32625f;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}
.msg-preview-html {
    padding: 8px 16px 16px;
    font-size: 14px;
    line-height: 1.85;
    color: #0f172a;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}
.msg-preview-html p { margin: 0 0 10px; }
.msg-preview-wa { padding: 12px; }
.msg-wa-phone {
    background: #0b141a;
    border-radius: 22px;
    padding: 10px 8px 16px;
    min-height: 280px;
    box-shadow: inset 0 0 0 3px #1f2c34;
}
.msg-wa-status {
    text-align: center;
    color: #8696a0;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 0 10px;
}
.msg-wa-thread {
    background: #0b141a url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' opacity='.06'><path fill='%23fff' d='M0 30h60M30 0v60'/></svg>");
    border-radius: 12px;
    min-height: 220px;
    padding: 12px;
}
.msg-wa-bubble {
    margin-inline-start: auto;
    max-width: 92%;
    background: #d9fdd3;
    color: #111;
    border-radius: 10px 10px 4px 10px;
    padding: 8px 10px;
    white-space: pre-wrap;
    font-size: 13.5px;
    line-height: 1.7;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.msg-char {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
}
.msg-form .settings-asset-actions { margin-top: 8px; flex-wrap: wrap; }
.msg-form .letter-save-flash { min-height: 0; }
@media (max-width: 980px) {
    .msg-tpl-workspace,
    .msg-channels,
    .msg-stats { grid-template-columns: 1fr; }
    .msg-wa-ext-card .settings-card-head { flex-wrap: wrap; }
    .msg-preview-col { position: static; }
}

/* —— إدارة المشرفين والأدوار —— */
.admins-page .settings-body { gap: 16px; }
.adm-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.adm-kpi {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.adm-kpi span {
    display: block;
    color: var(--slate-500);
    font-size: var(--fs-small);
    font-weight: 700;
}
.adm-kpi strong {
    display: block;
    margin-top: 4px;
    font-size: 26px;
    line-height: 1.15;
    color: var(--slate-900);
}
.adm-kpi--ok strong { color: #166534; }
.adm-kpi--warn strong { color: #b45309; }
.adm-form-card .settings-card-head {
    margin-bottom: 0;
    flex-wrap: wrap;
}
.adm-form-card .settings-card-head > .btn {
    width: auto;
    margin-inline-start: auto;
}
.adm-form-card.is-open .settings-card-head {
    margin-bottom: 4px;
}
.adm-admin-form {
    margin-top: 8px;
    padding-top: 4px;
}
.adm-form-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--slate-100);
}
.adm-form-section:first-of-type {
    margin-top: 0;
    padding-top: 8px;
    border-top: 0;
}
.adm-form-section h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-800);
}
.adm-form-section > .settings-hint {
    margin: 0 0 10px;
}
.adm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}
.adm-form-grid .field,
.adm-form-section > .field {
    margin-bottom: 0;
}
.adm-form-grid .field > label,
.adm-form-section > .field > label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--slate-700);
}
.adm-span-2 { grid-column: 1 / -1; }
.adm-check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-weight: 600;
    font-size: var(--fs-small);
    color: var(--slate-700);
}
.adm-check-row input {
    width: auto;
    margin-top: 2px;
}
.adm-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--slate-100);
    flex-wrap: wrap;
}
.adm-people-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}
.adm-table-search {
    width: min(320px, 100%);
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    padding: 0 12px;
    font-size: 13px;
}
.adm-people-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.adm-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.adm-row.is-inactive { opacity: 0.78; }
.adm-row.is-editing {
    border-color: var(--primary-500);
    box-shadow: 0 10px 22px rgba(50, 98, 95, 0.12);
}
.adm-row-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.adm-avatar,
.adm-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex: 0 0 auto;
}
.adm-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary-800);
    font-weight: 800;
    font-size: 14px;
}
.adm-avatar.is-gold {
    background: #fef3c7;
    color: #92400e;
}
.adm-avatar-img {
    object-fit: cover;
    border: 1px solid var(--slate-200);
    display: block;
    background: #fff;
}
.adm-row-identity { min-width: 0; }
.adm-row-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
    line-height: 1.3;
}
.adm-row-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.35;
}
.adm-row-job {
    font-size: 12px;
    color: var(--slate-500);
    line-height: 1.35;
}
.adm-row-email {
    font-size: 12px;
    color: var(--slate-500);
    direction: ltr;
    text-align: right;
    overflow-wrap: anywhere;
}
.adm-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.adm-row-date {
    font-size: 12px;
    color: var(--slate-500);
    font-weight: 600;
}
.adm-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}
.adm-row-actions form { margin: 0; }
.role-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ddeceb;
    color: #32625f;
    font-size: 12px;
    font-weight: 700;
}
.role-pill.super_admin { background: #fde68a; color: #713f12; }
.role-pill.inactive { background: #fee2e2; color: #991b1b; }
.adm-pill-on { background: #dcfce7; color: #166534; }
.adm-pill-link {
    background: #dbeafe;
    color: #1e40af;
    text-decoration: none;
}
.adm-pill-link:hover { text-decoration: underline; }
.adm-empty {
    text-align: center;
    color: var(--slate-500);
    padding: 28px 12px;
    font-weight: 600;
}
.admin-member-search { position: relative; }
.admin-member-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.admin-member-search-row input[type=text] { flex: 1; min-width: 0; }
.admin-member-search-row .btn { flex: 0 0 auto; width: auto; }
.admin-member-search-list {
    position: absolute;
    z-index: 30;
    right: 0;
    left: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    max-height: 280px;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.admin-member-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}
.admin-member-search-item:last-child { border-bottom: none; }
.admin-member-search-item:hover,
.admin-member-search-item.is-active { background: #f0fdfa; color: #0f766e; }
.admin-member-search-item strong {
    display: block;
    font-size: 13px;
    color: var(--slate-900);
}
.admin-member-search-item span {
    display: block;
    font-size: 12px;
    color: var(--slate-500);
    direction: ltr;
    text-align: right;
}
.adm-search-thumb {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid var(--slate-200);
}
.adm-search-thumb.adm-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
    border-radius: 10px;
}
.admin-member-search-none { padding: 10px 12px; font-size: 12px; color: #94a3b8; text-align: center; }
.adm-member-picked {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--primary-100);
    background: var(--primary-50);
    border-radius: 14px;
}
.adm-member-picked-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.adm-member-picked-inner .adm-row-identity { flex: 1; min-width: 0; }
.adm-member-picked-inner .btn { flex: 0 0 auto; width: auto; }
.adm-roles-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.adm-roles-toolbar .settings-lead { flex: 1; margin: 0; }
.adm-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.adm-role-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 14px 16px 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.adm-role-card.is-active {
    border-color: var(--primary-500);
    box-shadow: 0 10px 22px rgba(50, 98, 95, 0.12);
}
.adm-role-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.adm-role-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}
.adm-role-count {
    margin: 0;
    color: var(--slate-500);
    font-size: 12.5px;
    font-weight: 600;
}
.adm-role-count strong { color: var(--primary-800); font-size: 18px; }
.adm-role-bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.adm-role-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
    border-radius: inherit;
}
.adm-role-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.adm-role-card footer form { margin: 0; }
.adm-danger { color: #b91c1c !important; }
.adm-role-name {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}
.adm-perm-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.adm-search-wrap {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}
.adm-search-wrap svg {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    stroke: #94a3b8;
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}
.adm-search-wrap input {
    width: 100%;
    height: 38px;
    padding: 0 34px 0 12px;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
}
.adm-perm-counter {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-800);
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 999px;
    padding: 6px 10px;
}
.adm-perm-groups { display: flex; flex-direction: column; gap: 10px; }
.adm-perm-group {
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.adm-perm-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    background: #f8fafc;
    font-weight: 800;
}
.adm-perm-group summary::-webkit-details-marker { display: none; }
.adm-perm-group-title { flex: 1; }
.adm-perm-group-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
}
.adm-perm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    padding: 10px 14px 14px;
}
.adm-perm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
    padding: 6px 4px;
    border-radius: 8px;
}
.adm-perm:hover { background: #f0fdfa; }
.adm-perm input { margin-top: 3px; accent-color: #0f766e; }
.adm-role-save {
    position: sticky;
    bottom: 8px;
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
#admRoleForm.is-readonly .adm-perm { opacity: 0.85; pointer-events: none; }
@media (max-width: 900px) {
    .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-form-grid,
    .adm-role-name { grid-template-columns: 1fr; }
    .adm-perm-grid { grid-template-columns: 1fr; }
    .adm-roles-toolbar { flex-direction: column; }
    .adm-people-toolbar { justify-content: stretch; }
    .adm-table-search { width: 100%; }
    .adm-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .adm-row-actions { justify-content: flex-start; }
    .adm-member-picked-inner { flex-wrap: wrap; }
}

@media (max-width: 900px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]),
    select,
    textarea {
        font-size: 16px;
    }
    .btn, .p-btn, button {
        touch-action: manipulation;
    }
}

/* نوافذ الحوار داخل .admin-content (سياق تكديس z-index:1) تُحصر تحت القائمة (1000).
   عند فتح نافذة نرفع منطقة المحتوى فوق القائمة حتى تظهر أمامها. */
body:has(.participants-modal.is-open) .admin-content,
body:has(.topic-add-modal.is-open) .admin-content,
body:has(.image-modal.open) .admin-content,
body:has(.pec-modal:not([hidden])) .admin-content,
body:has(.pal-bulk-modal:not([hidden])) .admin-content,
body:has(.imp-modal:not([hidden])) .admin-content,
body:has(.epv-tk-apply:not([hidden])) .admin-content {
    z-index: var(--z-overlay, 1400);
}
body:has(.participants-modal.is-open) .admin-sidebar,
body:has(.topic-add-modal.is-open) .admin-sidebar,
body:has(.image-modal.open) .admin-sidebar,
body:has(.pec-modal:not([hidden])) .admin-sidebar,
body:has(.pal-bulk-modal:not([hidden])) .admin-sidebar,
body:has(.imp-modal:not([hidden])) .admin-sidebar,
body:has(.epv-tk-apply:not([hidden])) .admin-sidebar,
body:has(.participants-modal.is-open) .sidebar-backdrop,
body:has(.topic-add-modal.is-open) .sidebar-backdrop,
body:has(.image-modal.open) .sidebar-backdrop,
body:has(.pec-modal:not([hidden])) .sidebar-backdrop,
body:has(.pal-bulk-modal:not([hidden])) .sidebar-backdrop,
body:has(.imp-modal:not([hidden])) .sidebar-backdrop,
body:has(.epv-tk-apply:not([hidden])) .sidebar-backdrop {
    z-index: 0;
}

.evw-nav {
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    justify-content: center;
}
.evw-nav-scroll {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 1px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-inline: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(50, 98, 95, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #f6fbfa 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 24px rgba(15, 23, 42, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(50, 98, 95, 0.28) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.evw-nav-scroll::-webkit-scrollbar { height: 6px; }
.evw-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(50, 98, 95, 0.28);
    border-radius: 999px;
}
.evw-nav-group,
.evw-nav-group-label {
    display: none;
}
.evw-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 0 0 auto;
    width: auto;
    min-width: 4.05rem;
    max-width: 7.1rem;
    min-height: 50px;
    padding: 4px 4px 3px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--slate-600);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.evw-nav-item:hover {
    text-decoration: none;
    color: var(--primary-800);
    background: rgba(86, 158, 154, 0.1);
    border-color: rgba(86, 158, 154, 0.16);
    transform: translateY(-1px);
}
.evw-nav-item.is-active {
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    border-color: #274f4c;
    color: #fff;
    box-shadow: 0 12px 20px rgba(50, 98, 95, 0.24);
}
.evw-nav-item.is-active:hover {
    color: #fff;
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    border-color: #274f4c;
    transform: none;
}
.evw-nav-item--edit:not(.is-active) {
    color: var(--primary-800);
}
.evw-nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #edf4f3;
    color: var(--primary-700);
}
.evw-nav-item:hover .evw-nav-icon {
    background: #fff;
    color: var(--primary-800);
}
.evw-nav-item.is-active .evw-nav-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.evw-nav-icon svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.evw-nav-label {
    display: block;
    max-width: 100%;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
    height: auto;
}
.evw-hero {
    margin: 0 0 16px;
    padding: 18px 20px 16px;
    background:
        radial-gradient(720px 160px at 100% -40%, rgba(86, 158, 154, 0.18), transparent 58%),
        linear-gradient(180deg, #f5fbfa 0%, #ffffff 100%);
}
.evw-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.evw-hero-copy { min-width: min(100%, 260px); flex: 1; }
.evw-kicker {
    margin: 0 0 10px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    color: var(--primary-800);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.evw-hero-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.evw-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(50, 98, 95, 0.22);
}
.evw-hero-icon svg,
.evw-meta svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.evw-hero h1 {
    margin: 0 0 4px;
    font-size: var(--fs-title, 20px);
    font-weight: 800;
    line-height: 1.45;
    color: var(--slate-900);
    overflow-wrap: anywhere;
}
.evw-hero-desc {
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    max-width: 52em;
}
.evw-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #475569;
    font-size: 11.5px;
    overflow-x: auto;
}
.evw-fact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 0;
    padding: 2px 8px 2px 2px;
    padding-inline: 2px 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
}
.evw-fact-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    background: #eef6f5;
    color: #32625f;
}
.evw-fact-text {
    min-width: 0;
}
.evw-meta svg,
.evw-fact-icon svg {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}
@media (max-width: 860px) {
    .evw-meta {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .evw-fact {
        white-space: normal;
    }
}
.evw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}
.evw-hero-actions .btn,
.evw-hero-actions .hb,
.evw-hero-actions .topics-icon-only-btn,
.evw-hero-actions .pec-btn,
.evw-hero-actions .icon-btn {
    text-decoration: none;
}
.evw-hero-actions form {
    margin: 0;
    display: inline-flex;
}
.evw-hero-actions .ers-actions {
    margin: 0;
    padding: 0;
    border: 0;
}
.evw-hero-actions .icon-btn,
.evw-hero-actions .epv-icon-btn {
    width: 40px;
    height: 40px;
}
.evw-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
}
.pec-page .pec-shell {
    min-height: calc(100vh - 280px);
}
.pec-hero--metrics {
    padding: 12px 18px;
}
.panel-card.event-detail-head {
    background:
        radial-gradient(720px 160px at 100% -40%, rgba(86, 158, 154, 0.16), transparent 58%),
        linear-gradient(180deg, #f5fbfa 0%, #ffffff 100%);
}
@media (max-width: 1366px) {
    .evw-nav { margin-bottom: 12px; }
    .evw-nav-scroll {
        padding: 3px;
        border-radius: 14px;
        gap: 0;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .evw-nav-scroll::-webkit-scrollbar { display: none; }
    .evw-nav-item {
        flex: 0 0 auto;
        width: auto;
        min-width: 3.85rem;
        max-width: 6.7rem;
        min-height: 46px;
        padding: 3px 3px 2px;
        font-size: 10px;
        scroll-snap-align: start;
    }
    .evw-nav-label {
        white-space: normal;
        overflow: visible;
        display: block;
        line-height: 1.2;
        text-overflow: unset;
        height: auto;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }
    .evw-nav-icon { width: 20px; height: 20px; border-radius: 6px; }
    .evw-nav-icon svg { width: 11px; height: 11px; }
}
@media (hover: none) {
    .evw-nav-item:hover {
        transform: none;
        background: transparent;
        border-color: transparent;
        color: var(--slate-600);
    }
    .evw-nav-item:hover .evw-nav-icon {
        background: #edf4f3;
        color: var(--primary-700);
    }
    .evw-nav-item.is-active:hover {
        background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
        border-color: #274f4c;
        color: #fff;
    }
    .evw-nav-item.is-active:hover .evw-nav-icon {
        background: rgba(255, 255, 255, 0.16);
        color: #fff;
    }
}
@media (max-width: 720px) {
    .evw-nav-item { min-width: 3.6rem; max-width: 6.3rem; min-height: 44px; padding: 3px 2px; font-size: 9.5px; }
    .evw-nav-icon { width: 18px; height: 18px; border-radius: 6px; }
    .evw-nav-icon svg { width: 10px; height: 10px; }
    .evw-hero-title-row { gap: 10px; }
    .evw-hero-icon { width: 40px; height: 40px; border-radius: 12px; }
}

/* تقييم الفعالية — النموذج العام + نتائج الإدارة */
.content-wrap.ers { max-width: 1120px; color: var(--slate-900); }
.ers-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.ers-actions .btn { margin: 0; white-space: nowrap; }
.ers-actions form { margin: 0; display: inline-flex; }
.ers-copy-btn.is-copied {
    border-color: #22c55e;
    background: #ecfdf5;
    color: #15803d;
}
.ers-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.ers-kpi {
    position: relative;
    overflow: hidden;
    min-width: 0;
    background: #fff;
    border: 1px solid rgba(50, 98, 95, 0.12);
    border-radius: 18px;
    padding: 16px 16px 14px;
    box-shadow: var(--shadow-sm);
}
.ers-kpi::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: var(--primary-600);
}
.ers-kpi.is-teal::before { background: var(--primary-700); }
.ers-kpi.is-green::before { background: #059669; }
.ers-kpi.is-gold::before { background: #c4a35a; }
.ers-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--primary-50);
    color: var(--primary-700);
}
.ers-kpi-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ers-kpi.is-gold .ers-kpi-icon { background: #f8f4e8; color: #b8860b; }
.ers-kpi.is-green .ers-kpi-icon { background: #ecfdf5; color: #059669; }
.ers-kpi .lbl { font-size: 12px; font-weight: 800; color: var(--slate-500); margin-bottom: 6px; }
.ers-kpi .val { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--slate-900); }
.ers-kpi .sub { margin-top: 6px; font-size: 12px; color: var(--slate-500); font-weight: 600; }
.ers-kpi.is-teal .val { color: var(--primary-700); }
.ers-kpi.is-gold .val { color: #b8860b; }
.ers-kpi.is-green .val { color: #059669; }
.ers-layout {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.2fr);
    gap: 14px;
    margin-bottom: 16px;
}
.panel-card.ers-card {
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    border-color: rgba(50, 98, 95, 0.12);
}
.ers-card h2 {
    margin: 0 0 16px;
    font-size: var(--fs-section);
    font-weight: 800;
    color: var(--slate-900);
}
.ers-toolbar h2 { margin: 0; }
.ers-score { display: flex; align-items: center; gap: 18px; }
.ers-donut { position: relative; width: 128px; height: 128px; flex: 0 0 128px; }
.ers-donut svg { width: 128px; height: 128px; transform: rotate(-90deg); }
.ers-donut-num {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ers-donut-num strong { font-size: 28px; font-weight: 800; line-height: 1; color: var(--primary-800); }
.ers-donut-num span { font-size: 11px; color: var(--slate-500); margin-top: 4px; font-weight: 700; }
.ers-score-copy .grade { font-size: 18px; font-weight: 800; margin: 0 0 6px; color: var(--primary-800); }
.ers-score-copy .muted { margin: 0; }
.ers-quiet { margin: 0; }
.ers-stars { display: inline-flex; gap: 1px; letter-spacing: 0; font-size: 16px; line-height: 1; }
.ers-stars .is-on { color: #c4a35a; }
.ers-stars .is-off { color: #e2e8f0; }
.ers-sent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.ers-sent > div { border-radius: 12px; padding: 10px 8px; text-align: center; }
.ers-sent .n { display: block; font-size: 18px; font-weight: 800; }
.ers-sent .t { font-size: 11px; font-weight: 700; }
.ers-sent-pos { background: #ecfdf5; color: #047857; }
.ers-sent-mid { background: #f8f4e8; color: #b8860b; }
.ers-sent-neg { background: #fef2f2; color: #b91c1c; }
.ers-bar-row {
    display: grid;
    grid-template-columns: 92px 1fr 72px;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}
.ers-bar-lab { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ers-bar-lab b { color: #c4a35a; font-weight: 800; }
.ers-bar { height: 12px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.ers-bar > i { display: block; height: 100%; border-radius: 999px; min-width: 0; }
.ers-bar-n { font-size: 12px; font-weight: 700; color: var(--slate-500); text-align: left; }
.ers-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.ers-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ers-chip {
    border: 1px solid var(--slate-200);
    background: #fff;
    color: var(--slate-500);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}
.ers-chip.is-on {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: #fff;
}
.ers-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(280px, 100%);
    box-sizing: border-box;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: #fff;
    padding: 0 10px;
}
.ers-search:focus-within {
    border-color: #99f6e4;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.ers-search-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #64748b;
}
.ers-search-ico svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ers-search input,
.ers-search input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 9px 0 !important;
    font-size: 13px;
    font-family: inherit;
    color: #0f172a;
}
.ers-search input:focus {
    outline: none;
    box-shadow: none !important;
}
.ers-search input::-webkit-search-decoration,
.ers-search input::-webkit-search-cancel-button,
.ers-search input::-webkit-search-results-button,
.ers-search input::-webkit-search-results-decoration {
    display: none;
}
.ers-list { display: flex; flex-direction: column; gap: 10px; }
.ers-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: start;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fbfc;
}
.ers-av {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-50);
    color: var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
    flex-shrink: 0;
}
.ers-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ers-item h3 { margin: 0 0 2px; font-size: 14px; font-weight: 800; }
.ers-name {
    color: var(--primary-800);
    text-decoration: none;
}
.ers-name:hover {
    text-decoration: underline;
}
.ers-item .who { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--slate-500); font-size: 12px; }
.ers-pill { background: #fff; color: var(--slate-500); border: 1px solid var(--slate-200); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.ers-item .cmt { margin: 8px 0 0; font-size: 13.5px; line-height: 1.7; color: #1e293b; }
.ers-item .cmt.is-empty { color: #94a3b8; }
.ers-item .rate { text-align: left; }
.ers-rate-lab { margin: 4px 0 0; font-size: 12px; color: var(--slate-500); font-weight: 700; }
.ers-empty { text-align: center; padding: 36px 16px; color: var(--slate-500); }
.ers-empty-ico {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary-700);
}
.ers-empty-ico svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ers-empty strong { display: block; font-size: 16px; color: var(--slate-900); margin: 10px 0 6px; }
.ers-hidden { display: none !important; }

body.evl-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 28px 16px 40px;
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(86, 158, 154, 0.2), transparent 55%),
        radial-gradient(680px 340px at 0% 110%, rgba(196, 163, 90, 0.12), transparent 50%),
        linear-gradient(180deg, #f4faf9 0%, #eef3f7 100%);
}
.evl-wrap {
    width: min(740px, 100%);
    margin: 0 auto;
}
.evl-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-bottom: 22px;
}
.evl-brand img {
    max-height: 76px;
    max-width: 220px;
    width: auto;
    height: auto;
    display: block;
}
.evl-brand h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    color: var(--primary-700);
    font-weight: 800;
}
.evl-brand .brand-title--image { margin: 0; line-height: 0; }
.evl-brand .brand-title-img {
    max-height: 52px;
    max-width: 280px;
    margin: 0 auto;
    filter: brightness(0) saturate(100%) invert(32%) sepia(24%) saturate(720%) hue-rotate(131deg) brightness(92%) contrast(90%);
}
.evl-brand p { margin: 0; font-size: 14px; color: var(--slate-500); font-weight: 600; }
.ui-lang {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--slate-200, #e2e8f0);
    flex-shrink: 0;
    user-select: none;
    direction: ltr;
    flex-direction: row;
}
.ui-lang .ui-lang-btn[lang="en"] { order: 1; }
.ui-lang .ui-lang-sep { order: 2; }
.ui-lang .ui-lang-btn[lang="ar"] { order: 3; }
.ui-lang-sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    color: #94a3b8;
    pointer-events: none;
}
.ui-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-500, #64748b);
    text-decoration: none;
    line-height: 1;
}
.ui-lang-btn[lang="en"] { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
.ui-lang-btn:hover { text-decoration: none; color: var(--primary-800, #2f6f6b); }
.ui-lang-btn.is-on {
    background: var(--primary-700, #32625f);
    color: #fff;
}
.mf-lang-seg {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    flex-wrap: wrap;
}
.mf-lang-seg-opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    border: 0;
    line-height: 1.4;
    position: relative;
}
.mf-lang-seg-opt input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.mf-lang-seg-opt.is-on,
.mf-lang-seg-opt:has(input:checked) {
    background: var(--primary-700, #3d7a76);
    color: #fff;
}
.mf-lang-seg-opt:hover { text-decoration: none; color: inherit; }
.letter-tpl-lang { margin: 4px 0 14px; }
.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.65;
    font-weight: 500;
}
.evl-langs,
.evl-brand .ui-lang {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-top: 12px;
    padding: 3px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--slate-200);
    flex-shrink: 0;
    user-select: none;
    direction: ltr;
    flex-direction: row;
}
.evl-langs a[lang="en"],
.evl-brand .ui-lang-btn[lang="en"] { order: 1; }
.evl-langs .ui-lang-sep,
.evl-brand .ui-lang-sep { order: 2; }
.evl-langs a[lang="ar"],
.evl-brand .ui-lang-btn[lang="ar"] { order: 3; }
.evl-langs .ui-lang-sep,
.evl-brand .ui-lang-sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    color: #94a3b8;
    pointer-events: none;
}
.evl-langs a,
.evl-brand .ui-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-500);
    text-decoration: none;
    line-height: 1;
}
.evl-langs a[lang="en"],
.evl-brand .ui-lang-btn[lang="en"] { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
.evl-langs a:hover,
.evl-brand .ui-lang-btn:hover { text-decoration: none; color: var(--primary-800); }
.evl-langs a.is-on,
.evl-brand .ui-lang-btn.is-on {
    background: var(--primary-700);
    color: #fff;
}
.ui-lang.ui-lang--words .ui-lang-btn,
.ui-lang.ui-lang--words .ui-lang-sep,
.evl-brand .ui-lang--words .ui-lang-btn,
.evl-brand .ui-lang--words .ui-lang-sep,
.evl-langs.ui-lang--words a,
.evl-langs.ui-lang--words .ui-lang-sep {
    order: 0;
}
.ui-lang--words,
.evl-brand .ui-lang--words,
.evl-langs.ui-lang--words {
    padding: 3px;
    gap: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(50, 98, 95, .16);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06), inset 0 1px 0 #fff;
}
.ui-lang--words .ui-lang-btn,
.evl-brand .ui-lang--words .ui-lang-btn,
.evl-langs.ui-lang--words a {
    min-width: 0;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
}
.ui-lang--words .ui-lang-btn[lang="en"],
.evl-brand .ui-lang--words .ui-lang-btn[lang="en"],
.evl-langs.ui-lang--words a[lang="en"] {
    font-family: inherit;
    font-size: 11px;
    letter-spacing: .05em;
}
.ui-lang--words .ui-lang-sep,
.evl-brand .ui-lang--words .ui-lang-sep,
.evl-langs.ui-lang--words .ui-lang-sep {
    width: auto;
    min-width: 0;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}
.ui-lang--words .ui-lang-btn.is-on,
.evl-brand .ui-lang--words .ui-lang-btn.is-on,
.evl-langs.ui-lang--words a.is-on {
    background: var(--primary-700, #32625f);
    color: #fff;
    box-shadow: 0 1px 2px rgba(39, 79, 76, .28);
}
.evl-card {
    background:
        radial-gradient(520px 140px at 100% -40%, rgba(86, 158, 154, 0.16), transparent 58%),
        linear-gradient(180deg, #f5fbfa 0%, #ffffff 42%);
    border: 1px solid rgba(50, 98, 95, 0.12);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.evl-card-body { padding: 26px 28px 28px; }
.evl-event-text {
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: start;
}
.evl-event-text strong {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--slate-900);
    overflow-wrap: anywhere;
}
.evl-event-text span {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-500);
    line-height: 1.7;
}
.evl-lead {
    margin: 0 0 18px;
    color: var(--slate-700);
    font-size: 15px;
    line-height: 1.8;
    font-weight: 600;
}
.evl-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-700);
}
.evl-rates {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    direction: ltr;
}
.evl-rate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    min-height: 118px;
    padding: 12px 6px 10px;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.evl-rate input { position: absolute; opacity: 0; pointer-events: none; }
.evl-rate:hover {
    transform: translateY(-2px);
    border-color: rgba(86, 158, 154, 0.45);
    box-shadow: 0 10px 20px rgba(50, 98, 95, 0.1);
}
.evl-rate:has(input:checked) {
    background: linear-gradient(180deg, #f1f8f7 0%, #e7f3f2 100%);
    border-color: var(--primary-700);
    box-shadow: 0 0 0 2px rgba(50, 98, 95, 0.2), 0 10px 22px rgba(50, 98, 95, 0.12);
    transform: translateY(-2px);
}
.evl-rate:has(input:checked) strong { color: var(--primary-800); }
.evl-rate-stars {
    display: flex;
    gap: 1px;
    font-size: 11px;
    line-height: 1;
    direction: ltr;
}
.evl-rate-stars i { font-style: normal; font-family: inherit; }
.evl-rate-stars .is-on { color: #c4a35a; }
.evl-rate-stars .is-off { color: #e2e8f0; }
.evl-rate strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-900);
}
.evl-rate em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-500);
}
.evl-pick-hint {
    min-height: 1.6em;
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-700);
}
.evl-pick-hint [data-for] { display: none; }
.evl-rate-block:has(#evl-r5:checked) .evl-pick-empty,
.evl-rate-block:has(#evl-r4:checked) .evl-pick-empty,
.evl-rate-block:has(#evl-r3:checked) .evl-pick-empty,
.evl-rate-block:has(#evl-r2:checked) .evl-pick-empty,
.evl-rate-block:has(#evl-r1:checked) .evl-pick-empty { display: none; }
.evl-rate-block:has(#evl-r5:checked) [data-for="5"],
.evl-rate-block:has(#evl-r4:checked) [data-for="4"],
.evl-rate-block:has(#evl-r3:checked) [data-for="3"],
.evl-rate-block:has(#evl-r2:checked) [data-for="2"],
.evl-rate-block:has(#evl-r1:checked) [data-for="1"] { display: inline; }
.evl-comment { margin-top: 18px; }
.evl-comment textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
}
.evl-submit {
    width: 100%;
    margin-top: 8px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    border-color: #274f4c;
    box-shadow: 0 12px 24px rgba(50, 98, 95, 0.22);
}
.evl-submit svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.evl-form:not(:has(input[name="rating"]:checked)) .evl-submit {
    opacity: .55;
    pointer-events: none;
}
.evl-state {
    text-align: center;
    padding: 28px 8px 10px;
}
.evl-state-ico {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.evl-state-ok .evl-state-ico {
    background: linear-gradient(180deg, #3d8f8a 0%, #32625f 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(50, 98, 95, 0.25);
}
.evl-state-error .evl-state-ico {
    background: #fef2f2;
    color: #b91c1c;
}
.evl-state-ico svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.evl-state strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 8px;
}
.evl-state p {
    margin: 0 auto;
    max-width: 36em;
    color: var(--slate-500);
    font-weight: 600;
    line-height: 1.8;
}
.evl-foot {
    text-align: center;
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--slate-500);
}
.evl-foot a { color: var(--primary-600); text-decoration: none; margin: 0 6px; }
.evl-foot a:hover { text-decoration: underline; }

@media (max-width: 980px) {
    .ers-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ers-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .evl-card-body { padding-inline: 18px; }
    .evl-rates { gap: 6px; }
    .evl-rate { padding: 10px 4px 8px; border-radius: 12px; }
    .evl-rate strong { font-size: 11px; }
    .evl-rate-stars { font-size: 9px; }
}
@media (max-width: 640px) {
    .ers-kpis { grid-template-columns: 1fr; }
    .ers-item { grid-template-columns: 40px 1fr; }
    .ers-item .rate { grid-column: 2; text-align: right; }
    .ers-bar-row { grid-template-columns: 78px 1fr 58px; }
    .ers-search { width: 100%; min-width: 0; }
}
@media print {
    .admin-sidebar, .sidebar-backdrop, .admin-topbar, .ers-actions, .evw-nav, .evw-hero-actions, .ers-search, .ers-chips { display: none !important; }
    .admin-shell, .admin-main, .admin-content, .content-wrap { display: block !important; width: 100% !important; padding: 0 !important; margin: 0 !important; background: #fff !important; }
    .ers-card, .ers-kpi, .ers-item { box-shadow: none !important; break-inside: avoid; }
}

.topics-panel-accordion {
    margin: 0;
}
.topics-panel-accordion > summary.topics-panel-head {
    list-style: none;
    cursor: pointer;
    margin-bottom: 0;
}
.topics-panel-accordion[open] > summary.topics-panel-head {
    margin-bottom: 10px;
}
.topics-panel-accordion > summary.topics-panel-head::-webkit-details-marker {
    display: none;
}
.topics-panel-accordion > summary .settings-section-title {
    margin: 0;
    flex: 1;
}
.topics-panel-accordion[open] .topic-participants-chevron {
    transform: rotate(-135deg);
}

.topic-publish-box {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #d9eee9;
    border-radius: 12px;
    background: #f7fbfa;
}
.topic-publish-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.topic-publish-head strong {
    font-size: 14px;
    color: #134e4a;
}
.topic-publish-bulk {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.topic-publish-hint,
.topic-publish-empty,
.topic-publish-count {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.6;
}
.topic-publish-list {
    display: grid;
    gap: 8px;
}
.topic-publish-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex-wrap: wrap;
}
.topic-publish-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}
.topic-publish-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.topic-publish-role,
.topic-publish-files { font-size: 12px; color: #64748b; }
.topic-publish-flag label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    cursor: pointer;
}
.topic-publish-state { font-size: 12px; color: #64748b; }

.imp-modal[hidden] { display: none !important; }
.imp-modal {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.imp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
}
.imp-modal-dialog {
    position: relative;
    width: min(440px, 100%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .32);
    overflow: hidden;
    outline: none;
}
.imp-modal-head {
    position: relative;
    padding: 22px 22px 8px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(45, 212, 191, .16), transparent 55%),
        linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
}
.imp-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}
.imp-modal-head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #134e4a;
}
.imp-modal-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.65;
    max-width: 34em;
}
.imp-modal-x {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.8);
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.imp-modal-x:hover { background: #fff; color: #0f172a; }
.imp-modal-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 22px 0;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.imp-modal-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f766e;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #99f6e4;
}
.imp-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.imp-modal-person strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
}
.imp-modal-person span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}
.imp-modal-points {
    margin: 14px 22px 0;
    padding: 0 18px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}
.imp-modal-error {
    margin: 12px 22px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
}
.imp-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 22px 20px;
}
.imp-modal-foot .btn { min-height: 40px; }
body.imp-modal-open { overflow: hidden; }

.ld-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.ld-toolbar-chip {
    white-space: nowrap;
}
.ld-channel {
    display: inline-flex;
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 3px;
    gap: 2px;
}
.ld-channel-opt {
    margin: 0;
    cursor: pointer;
}
.ld-channel-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ld-channel-opt span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    line-height: 1;
}
.ld-channel-opt span svg {
    width: 13px;
    height: 13px;
}
.ld-channel-opt input:checked + span {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.ld-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    background: #16a34a;
    border-color: #15803d;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
}
.ld-send-btn svg {
    width: 15px;
    height: 15px;
}
.ld-send-btn:hover:not(:disabled) {
    background: #15803d;
}
.ld-send-btn:disabled,
.ld-toolbar--empty .ld-send-btn {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}
.ld-email-summary {
    margin: 0 18px 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-size: 12.5px;
    font-weight: 600;
}
.ld-upload-send {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.ld-upload-send .ld-channel {
    margin-inline-end: 4px;
}
.ld-modal-dialog {
    width: min(760px, 100%);
    max-height: min(90vh, 820px);
}
.ld-review-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 12px;
}
.ld-stat {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.ld-stat.is-ok {
    background: #ecfdf5;
    color: #047857;
}
.ld-stat.is-miss {
    background: #fef2f2;
    color: #b91c1c;
}
.ld-review-table-wrap {
    margin: 0 18px 8px;
    max-height: min(48vh, 420px);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.ld-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ld-review-table th,
.ld-review-table td {
    padding: 9px 12px;
    text-align: start;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.ld-review-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    z-index: 1;
}
.ld-review-table tbody tr.is-miss {
    background: #fff7ed;
}
.ld-review-ok,
.ld-review-miss {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
    font-size: 12.5px;
}
.ld-review-ok { color: #047857; }
.ld-review-miss { color: #b91c1c; }
.ld-review-ok small,
.ld-review-miss small {
    font-weight: 600;
    font-size: 11px;
    color: #64748b;
    direction: ltr;
    text-align: start;
}
.ld-file-link {
    margin-top: 6px;
}
.ld-file-link a {
    color: #0f766e;
    font-weight: 700;
    font-size: 12px;
}
.pal-bulk-modal-foot .js-ld-confirm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.pal-bulk-modal-foot .js-ld-confirm svg,
.ld-send-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}
@media (max-width: 720px) {
    .ld-toolbar {
        width: 100%;
        justify-content: stretch;
    }
    .ld-channel {
        flex: 1;
    }
    .ld-send-btn {
        flex: 1;
        justify-content: center;
    }
    .ld-review-table th:nth-child(2),
    .ld-review-table td:nth-child(2) {
        display: none;
    }
}

html[data-pal-wa-autosend="1"] #ld-bulk-modal .js-ld-wa-ext,
html[data-pal-wa-autosend="1"] .wa-ext-note,
#ld-bulk-modal .js-ld-wa-ext[hidden],
.wa-ext-note[hidden] {
    display: none !important;
}
#ld-bulk-modal .ld-modal-dialog {
    width: min(680px, 100%);
    max-height: min(88vh, 760px);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}
#ld-bulk-modal .ld-modal-dialog::before {
    content: "";
    display: block;
    height: 3px;
    flex: 0 0 3px;
    background: linear-gradient(90deg, #115e59 0%, #0d9488 48%, #99f6e4 100%);
}
#ld-bulk-modal .ld-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
}
#ld-bulk-modal .ld-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    color: #0f766e;
}
#ld-bulk-modal .ld-modal-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #134e4a;
}
#ld-bulk-modal .ld-modal-head p.js-ld-modal-lead {
    margin: 0;
    max-width: 46ch;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}
#ld-bulk-modal .ld-modal-dialog::before,
#ld-bulk-modal .ld-modal-head,
#ld-bulk-modal .ld-modal-foot {
    flex-shrink: 0;
}
#ld-bulk-modal .js-ld-step-review,
#ld-bulk-modal .js-ld-step-send {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
}
#ld-bulk-modal .ld-review-stats {
    padding-top: 2px;
}
#ld-bulk-modal .ld-review-table-wrap {
    margin-bottom: 14px;
}
#ld-bulk-modal .pal-bulk-list li.is-current {
    box-shadow: inset 3px 0 0 #0d9488;
}
#ld-bulk-modal .ld-progress-side {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
#ld-bulk-modal .js-ld-bulk-countdown {
    color: #0f766e;
    font-variant-numeric: tabular-nums;
}
#ld-bulk-modal .ld-skip {
    border: 0;
    background: transparent;
    color: #0f766e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}
#ld-bulk-modal .ld-skip:hover { color: #115e59; }
#ld-bulk-modal .ld-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px 14px;
    border-top: 1px solid #eef2f6;
    background: #f8fafc;
}
#ld-bulk-modal .ld-foot-hint {
    margin: 0;
    flex: 1;
    min-width: 12rem;
    font-size: 12px;
    line-height: 1.55;
    color: #64748b;
}
#ld-bulk-modal .ld-foot-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
#ld-bulk-modal .ld-btn-quiet {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
}
#ld-bulk-modal .ld-btn-end {
    background: #fff;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
#ld-bulk-modal .ld-btn-quiet:hover,
#ld-bulk-modal .ld-btn-end:hover { filter: brightness(0.98); }
@media (max-width: 640px) {
    #ld-bulk-modal .ld-modal-foot {
        flex-direction: column;
        align-items: stretch;
    }
    #ld-bulk-modal .ld-foot-actions .btn { flex: 1; justify-content: center; }
}

/* ── Admin English translation control ──────────────────────── */
.i18n-en-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 22px;
    margin-inline-start: 8px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px dashed #94a3b8;
    background: #f8fafc;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.i18n-en-btn:hover {
    background: #ecfeff;
    border-color: #0d9488;
    color: #0f766e;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.i18n-en-btn.is-ready {
    border-style: solid;
    border-color: #0d9488;
    background: #0d9488;
    color: #fff;
}
.i18n-en-btn.is-ready:hover {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.i18n-en-btn-mark { pointer-events: none; }
body.i18n-modal-open { overflow: hidden; }
.i18n-modal {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.i18n-modal[hidden] { display: none !important; }
.i18n-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.i18n-modal-card {
    position: relative;
    width: min(640px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
}
.i18n-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #e2e8f0;
}
.i18n-modal-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0d9488;
}
.i18n-modal-head h3 {
    margin: 0;
    font-size: 18px;
    color: #1f3a39;
}
.i18n-modal-x {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.i18n-modal-x:hover { background: #e2e8f0; }
.i18n-modal-body { padding: 16px 20px 8px; display: flex; flex-direction: column; gap: 10px; }
.i18n-orig span,
.i18n-en-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}
.i18n-en-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.i18n-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #99f6e4;
    background: linear-gradient(180deg, #f0fdfa, #ecfeff);
    color: #0f766e;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}
.i18n-ai-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.i18n-ai-btn:hover {
    background: #ccfbf1;
    border-color: #0d9488;
}
.i18n-ai-btn:disabled {
    opacity: .55;
    cursor: wait;
}
.i18n-ai-btn[hidden] { display: none !important; }
.i18n-orig-text {
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 160px;
    overflow: auto;
}
.i18n-orig-text.is-empty { color: #94a3b8; }
.i18n-en-input {
    width: 100%;
    min-height: 120px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    direction: ltr;
    text-align: left;
    resize: vertical;
}
.i18n-en-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.i18n-modal-hint { margin: 0; font-size: 12px; color: #64748b; line-height: 1.6; }
.i18n-modal-status { margin: 0; font-size: 13px; font-weight: 700; }
.i18n-modal-status.is-ok { color: #15803d; }
.i18n-modal-status.is-err { color: #dc2626; }
.i18n-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e2e8f0;
}
.i18n-modal-foot-end { display: flex; gap: 8px; }
.i18n-session-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.i18n-session-title-row input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
    .i18n-modal { padding: 0; align-items: flex-end; }
    .i18n-modal-card { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; }
    .i18n-modal-foot { flex-direction: column; align-items: stretch; }
    .i18n-modal-foot-end { justify-content: stretch; }
    .i18n-modal-foot .btn { flex: 1; }
}

body.cvf-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 28px 16px 48px;
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(86, 158, 154, 0.22), transparent 55%),
        radial-gradient(680px 340px at 0% 110%, rgba(196, 163, 90, 0.14), transparent 50%),
        linear-gradient(180deg, #f4faf9 0%, #eef3f7 100%);
}
.cvf-wrap {
    width: min(640px, 100%);
    margin: 0 auto;
}
.cvf-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-bottom: 22px;
}
.cvf-brand img {
    max-height: 76px;
    max-width: 220px;
    width: auto;
    height: auto;
    display: block;
}
.cvf-brand h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    color: var(--primary-700);
    font-weight: 800;
}
.cvf-brand .brand-title--image { margin: 0; line-height: 0; }
.cvf-brand .brand-title-img {
    max-height: 52px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(32%) sepia(24%) saturate(720%) hue-rotate(131deg) brightness(92%) contrast(90%);
}
.cvf-brand p { margin: 0; font-size: 14px; color: var(--slate-500); font-weight: 600; }
.cvf-brand .ui-lang--words { margin-top: 4px; }
.cvf-card {
    background: #fff;
    border: 1px solid rgba(15, 76, 73, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 50px rgba(15, 48, 51, 0.08);
    padding: 28px 24px 26px;
    text-align: center;
}
.cvf-card--verified {
    border-color: rgba(15, 118, 110, 0.16);
}
.cvf-seal {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #0f766e, #115e59);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}
.cvf-seal svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cvf-seal--muted {
    background: linear-gradient(180deg, #64748b, #475569);
    box-shadow: none;
}
.cvf-kicker {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-800, #115e59);
}
.cvf-card--pending .cvf-kicker,
.cvf-card--invalid .cvf-kicker,
.cvf-card--not_issued .cvf-kicker {
    color: #334155;
}
.cvf-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}
.cvf-photo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px rgba(196, 163, 90, 0.7), 0 12px 24px rgba(15, 48, 51, 0.12);
}
.cvf-photo--initials {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #0f766e, #134e4a);
    color: #fff;
    font-size: 32px;
    font-weight: 800;
}
.cvf-person-text h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.35;
    color: #0f172a;
}
.cvf-title-prefix {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #b45309;
}
.cvf-job {
    margin: 6px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
}
.cvf-body {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}
.cvf-event {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.cvf-event-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}
.cvf-event strong {
    font-size: 16px;
    color: #0f172a;
}
.cvf-event span { color: #475569; font-size: 14px; }
.cvf-ref {
    margin: 16px 0 0;
    font-size: 13px;
    color: #64748b;
}
.cvf-ref code {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #115e59;
    font-weight: 700;
    letter-spacing: 0.06em;
}
@media (min-width: 720px) {
    .cvf-card { padding: 36px 40px 32px; }
    .cvf-person {
        flex-direction: row;
        text-align: start;
        gap: 20px;
    }
    .cvf-photo { width: 128px; height: 128px; flex: 0 0 auto; }
    .cvf-person-text { flex: 1; min-width: 0; }
    .cvf-person-text h2 { font-size: 28px; }
}
@media (max-width: 480px) {
    body.cvf-page { padding: 18px 12px 32px; }
    .cvf-card { border-radius: 22px; padding: 22px 16px 20px; }
    .cvf-person-text h2 { font-size: 22px; }
    .cvf-photo { width: 96px; height: 96px; }
}

.hb-admin-grid {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.hb-qr-card h2,
.hb-admin h2 {
    margin: 0 0 8px;
    font-size: 17px;
}
.hb-qr-frame {
    display: flex;
    justify-content: center;
    margin: 14px 0;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
}
.hb-qr-frame img {
    width: 220px;
    height: 220px;
    display: block;
}
.hb-qr-actions,
.hb-enable-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.hb-status {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 600;
}
.hb-status.is-on { color: #166534; }
.hb-status.is-off { color: #9a3412; }
.hb-preview-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.hb-preview-list li {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.hb-preview-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
}
.hb-preview-list input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0f766e;
}
.hb-preview-list .muted { margin: 6px 0 0 28px; }
.hb-preview-list li.is-on,
.hb-preview-list li.is-off {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
}
.hb-preview-list li.is-on em { color: #166534; font-style: normal; }
.hb-preview-list li.is-off em { color: #9a3412; font-style: normal; }
.hb-preview-form .btn { margin-top: 12px; }
.hb-upload .muted,
.hb-admin .muted { color: #64748b; font-size: 13px; }
.hb-file-list { display: grid; gap: 12px; }
.hb-admin-side .hb-stats-card { order: 1; }
.hb-admin-side .hb-qr-card { order: 2; }
.hb-kind-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.hb-album-switch { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.hb-admin-folder[hidden] { display: none !important; }
.hb-admin-folder:not([hidden]) { margin-top: 10px; }
.hb-kind-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    min-height: 74px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d7e4e2;
    border-radius: 14px;
    background: #fff;
    color: #0f766e;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-align: start;
    cursor: pointer;
}
.hb-kind-card em {
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    color: #0f172a;
}
.hb-kind-card.is-open {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.hb-kind-card.is-open em { color: #fff; }
.hb-kind-group:not([hidden]) {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.hb-kind-group[hidden] { display: none; }
.hb-kind-empty { margin: 4px 0 0; }
.hb-stats-more summary {
    cursor: pointer;
    padding: 2px 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: #0f766e;
}
.hb-admin-file {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.hb-admin-file.is-hidden { opacity: 0.62; }
.hb-admin-file-top { display: grid; gap: 2px; margin-bottom: 10px; }
.hb-admin-file-top strong { font-size: 15px; color: #0f172a; }
.hb-admin-file-top span { font-size: 12px; color: #64748b; }
.hb-admin-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}
.hb-admin-file-actions .participant-icon-btn.is-success {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}
.hb-vis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
    font-weight: 600;
}
.hb-wrap { width: min(480px, 100%); }
.hb-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #3d7a76;
    letter-spacing: 0.02em;
}
.hb-section { margin-top: 12px; }
.hb-section h2 {
    margin: 0 0 6px;
    font-size: 13px;
    color: #1f3a39;
}
.hb-files {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.hb-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.hb-file-copy { display: grid; gap: 1px; min-width: 0; }
.hb-file-copy strong {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.35;
}
.hb-file-copy span { font-size: 12px; color: #64748b; }
.hb-file .btn { flex: 0 0 auto; }
.hb-admin-side {
    display: grid;
    gap: 16px;
    align-content: start;
}
.panel-card.hb-stats-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid #c5ddd9;
    background: #f7fbfa;
    box-shadow: 0 14px 34px rgba(16, 46, 44, 0.12);
}
.hb-stats-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 18px;
    color: #ecf8f6;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(212, 175, 88, 0.28), transparent 42%),
        linear-gradient(135deg, #0d2423 0%, #164e4a 58%, #1c5f5a 100%);
}
.hb-stats-head h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}
.hb-stats-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hb-stats-xlsx {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}
.hb-stats-xlsx:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.hb-stats-xlsx svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hb-stats-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #d4af58;
}
.hb-stats-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d9f4ef;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.hb-stats-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: hb-stats-pulse 1.8s ease-out infinite;
}
.hb-stats-live.is-fresh {
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.45);
}
@keyframes hb-stats-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
#hbStatsInner { padding: 0 14px 16px; }
.hb-stats-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.hb-stats-kpis article {
    padding: 10px 11px 9px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbe7e5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    min-width: 0;
}
.hb-stats-kpis span {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
}
.hb-stats-kpis strong {
    display: block;
    margin: 2px 0 1px;
    font-size: 26px;
    line-height: 1.1;
    color: #102e2c;
    font-variant-numeric: tabular-nums;
}
.hb-stats-kpis .hb-stats-ago { font-size: 16px; line-height: 1.35; }
.hb-stats-kpis small {
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
}
.hb-stats-empty,
.hb-stats-muted {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
}
.hb-stats-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.hb-stats-block h3,
.hb-stats-block-head h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1f3a39;
}
.hb-stats-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.hb-stats-block-head span {
    font-size: 11px;
    color: #0f766e;
    font-weight: 700;
}
.hb-stats-bars,
.hb-stats-hours {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 78px;
    padding: 8px 6px 4px;
    border-radius: 12px;
    background:
        linear-gradient(#edf5f4, #edf5f4) 0 100% / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(16, 46, 44, 0.02), rgba(16, 46, 44, 0.06));
}
.hb-stats-bars span,
.hb-stats-hours span {
    flex: 1 1 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    min-width: 0;
}
.hb-stats-bars i,
.hb-stats-hours i {
    display: block;
    width: 100%;
    min-height: 3px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #2a9d8f, #164e4a);
}
.hb-stats-hours { height: 52px; gap: 2px; }
.hb-stats-hours i {
    border-radius: 3px 3px 1px 1px;
    background: #94b8b3;
}
.hb-stats-hours .is-peak i {
    background: linear-gradient(180deg, #d4af58, #b45309);
}
.hb-stats-bar-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #94a3b8;
}
.hb-stats-split { display: grid; gap: 4px; }
.hb-stats-meter { margin-bottom: 8px; }
.hb-stats-meter > div,
.hb-stats-files li > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}
.hb-stats-meter em,
.hb-stats-files em {
    color: #0f766e;
    font-style: normal;
}
.hb-stats-track {
    display: block;
    height: 6px;
    margin-top: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.hb-stats-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f6f69, #2a9d8f);
}
.hb-stats-track i.is-en { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.hb-stats-track i.is-tablet { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.hb-stats-track i.is-desktop { background: linear-gradient(90deg, #0f766e, #99f6e4); }
.hb-stats-files,
.hb-stats-recent {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.hb-stats-files li b,
.hb-stats-recent b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hb-stats-recent li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.hb-stats-recent small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
}
.hb-stats-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #2a9d8f;
    flex: 0 0 auto;
}
.hb-stats-dot.is-file { background: #d4af58; }
.hb-stats-dot.is-guest { background: #d97706; }
.hb-stats-mix { margin: 10px 0 4px; }
.hb-stats-mix-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #334155;
}
.hb-stats-mix-labels em {
    font-style: normal;
    color: #b45309;
}
.hb-stats-track-mix i { background: linear-gradient(90deg, #164e4a, #2a9d8f); }
.hb-stats-people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.hb-stats-people li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #dbe7e5;
}
.hb-stats-people li.is-guest {
    background: #fffbeb;
    border-color: #fde68a;
}
.hb-stats-people b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #102e2c;
}
.hb-stats-people small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
}
.hb-stats-people em {
    font-style: normal;
    font-size: 18px;
    font-weight: 800;
    color: #0f766e;
    font-variant-numeric: tabular-nums;
}
.hb-stats-people li.is-guest em { color: #b45309; }
.hb-stats-honor {
    display: block;
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.3;
}
.hb-stats-recent .hb-stats-honor { color: #64748b; }
.hb-upload-files {
    display: grid;
    gap: 10px;
}
.hb-agenda-pdf {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
}
.hb-agenda-pdf .hb-vis { margin: 0; color: #115e59; }
.hb-agenda-pdf .muted { margin: 0; }
.hb-upload-files.is-site-agenda input[type="file"] {
    opacity: 0.4;
    pointer-events: none;
}
@media (max-width: 900px) {
    .hb-admin-grid { grid-template-columns: 1fr; }
    .hb-admin-main { order: 1; }
    .hb-admin-side { order: 2; }
    .hb-admin .panel-card { padding: 14px; }
    .hb-qr-frame { margin: 8px 0; padding: 8px; }
    .hb-qr-frame img { width: 128px; height: 128px; }
    .hb-qr-card > p.muted {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hb-kind-card { min-height: 64px; padding: 8px 8px; font-size: 12px; }
    .hb-kind-card em { font-size: 16px; }
    .hb-photo-admin { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
}
@media (max-width: 560px) {
    .hb-file { flex-direction: row; align-items: center; }
}

.hb-page .evl-brand { margin-bottom: 12px; gap: 4px; }
.hb-page .evl-brand img { max-height: 52px; }
.hb-page .evl-brand h1 { font-size: 17px; }
.hb-page .evl-card { border-radius: 16px; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06); }
.hb-page .evl-card-body { padding: 14px 14px 16px; }
.hb-page .evl-event-text {
    margin-bottom: 8px;
    gap: 1px;
    text-align: center;
    align-items: center;
}
.hb-page .evl-event-text strong { font-size: 16px; line-height: 1.35; }
.hb-page .evl-event-text span { font-size: 12px; }
.hb-page { padding: 16px 12px 28px; }
body.evl-page.hb-page {
    background: #f4faf9;
}
body.evl-page.hb-page::before,
body.evl-page.hb-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
body.evl-page.hb-page::before {
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(86, 158, 154, 0.2), transparent 55%),
        radial-gradient(680px 340px at 0% 110%, rgba(196, 163, 90, 0.12), transparent 50%),
        linear-gradient(180deg, #f4faf9 0%, #eef3f7 100%);
}
body.evl-page.hb-page::after {
    background-image: url("/public/assets/hb-pattern.png?v=2");
    background-repeat: repeat;
    background-size: 300px 173px;
    opacity: 0.1;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.75) 40%, rgba(0, 0, 0, 1) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.75) 40%, rgba(0, 0, 0, 1) 100%);
}
body.evl-page.hb-page .evl-wrap {
    position: relative;
    z-index: 1;
}
.hb-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-top: 8px;
    padding: 12px 10px;
    border: 1px solid #c5ddd9;
    border-radius: 12px;
    background: #f7fbfa;
}
.hb-person-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    background: #164e4a;
    color: #f8fafc;
    font-weight: 800;
    font-size: 22px;
}
.hb-person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hb-person-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    width: 100%;
    justify-items: center;
}
.hb-person-honor {
    font-size: 13px;
    font-weight: 800;
    color: #3d7a76;
}
.hb-person-copy strong {
    font-size: 15px;
    line-height: 1.3;
    color: #0f172a;
}
.hb-person-copy span:last-child {
    font-size: 13px;
    color: #64748b;
}
.hb-person-docs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    max-width: 100%;
}
.evl-card-body > .hb-person-docs { margin-top: 10px; }
.hb-person-docs + .hb-person-room { margin-top: -6px; }
.hb-person:has(.hb-person-room) { padding-bottom: 4px; }
.hb-person:has(.hb-person-room) + .hb-deck-shell { margin-top: 6px; }
.hb-person-room {
    margin: 0;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #99f6e4;
    background: #fff;
    color: #115e59;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
.hb-deck-shell {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.hb-deck {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    background: #f8fafc;
}
.hb-deck-card {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-inline-start: 1px solid #e2e8f0;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.hb-deck-card:first-child { border-inline-start: 0; }
.hb-deck-card.is-active {
    background: #fff;
    color: #0f766e;
    border-bottom-color: transparent;
}
.hb-deck-card:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: -2px;
}
.hb-deck-card > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hb-deck-ico {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #fff;
    color: #0f766e;
    border: 1px solid #ccfbf1;
}
.hb-deck-card.is-active .hb-deck-ico {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}
.hb-deck-ico svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hb-deck-panel { padding: 10px; }
.hb-deck-panel[hidden] { display: none !important; }
.hb-deck-status {
    margin: 8px 0;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.hb-topic + .hb-topic { margin-top: 12px; }
.hb-topic h3 {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
}
@media (max-width: 380px) {
    .hb-deck-card {
        flex-direction: column;
        gap: 4px;
        padding: 10px 4px;
        font-size: 12px;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .hb-deck-panel { animation: hbDeckIn .18s ease; }
}
@keyframes hbDeckIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.hb-hotel-rows { display: grid; gap: 8px; margin: 12px 0; }
.hb-hotel-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 8px;
    align-items: end;
}
.hb-hotel-row .field { margin: 0; }
.hb-hotel-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 800px) {
    .hb-hotel-row { grid-template-columns: 1fr; }
}
.hb-doc-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
}
.hb-doc-btn:hover {
    background: #ccfbf1;
    color: #115e59;
}
.hb-doc-btn svg,
.hb-lightbox-close svg,
.hb-lightbox-nav svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hb-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.hb-section-head h2 { margin: 0; }
.hb-folders {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.hb-folder {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.hb-album-photos {
    display: none;
    flex: 1 1 100%;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.hb-folder.is-open .hb-album-photos { display: grid; }
.hb-album-photo {
    display: grid;
    gap: 4px;
    margin: 0;
    min-width: 0;
}
.hb-album-photo .hb-photo-open { width: 100%; }
.hb-folder-open {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: start;
    cursor: pointer;
}
.hb-folder-cover {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #e2e8f0;
}
.hb-folder-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hb-folder-copy { display: grid; min-width: 0; }
.hb-folder-copy strong {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.3;
}
.hb-folder-copy span { font-size: 11px; color: #64748b; }
.hb-folder-admin { display: grid; gap: 12px; margin-top: 14px; }
.hb-album-fold summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #0f766e;
}
.hb-album-fold summary span {
    margin-inline-start: 6px;
    color: #64748b;
}
.hb-album-fold .hb-photo-admin { margin-top: 10px; }
.hb-admin-folder {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.hb-admin-folder-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.hb-admin-folder-head input[type="text"] { flex: 1 1 140px; min-width: 0; }
.hb-admin-folder .hb-photo-admin { margin-top: 0; }
.hb-photo-card-actions { flex-wrap: wrap; }
.hb-photo-card-actions input[type="text"] {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    font-size: 12px;
}
.hb-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}
.hb-photo-open {
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 1;
    cursor: pointer;
}
.hb-photo-open img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hb-photo-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
@media (max-width: 900px) {
    .hb-photo-admin { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
}
.hb-photo-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}
.hb-photo-card.is-hidden { opacity: 0.55; }
.hb-photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}
.hb-photo-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px;
}
.hb-photo-card-actions .hb-vis { margin: 0; }
.hb-photo-card-tools {
    display: inline-flex;
    gap: 4px;
}
.hb-album-create { margin-bottom: 14px; }
.hb-move-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.hb-move-bar[hidden] { display: none !important; }
.hb-move-bar select { min-width: 180px; }
.hb-photo-pick {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}
.hb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.88);
}
.hb-lightbox[hidden] { display: none; }
.hb-lightbox-stage {
    margin: 0;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 10px;
}
.hb-lightbox-stage img {
    max-width: min(920px, 100%);
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    object-fit: contain;
    border-radius: 12px;
    background: #0f172a;
}
.hb-lightbox-stage figcaption {
    color: #e2e8f0;
    font-size: 14px;
    text-align: center;
}
.hb-lightbox-close,
.hb-lightbox-nav {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.hb-lightbox-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
}
.hb-lightbox-download {
    position: absolute;
    bottom: 16px;
    inset-inline-end: 16px;
    background: #fff;
}
[dir="rtl"] .hb-lightbox-prev svg,
[dir="rtl"] .hb-lightbox-next svg { transform: scaleX(-1); }
body.hb-lightbox-open { overflow: hidden; }
@media (max-width: 560px) {
    .hb-lightbox { padding-inline: 8px; }
}




