/* ═══════════════════════════════════════════════════════════════
   portal.css — نظام تصميم بوابة المشارك (بطاقات حديثة)
   يُحمّل بعد theme.css ويضيف عليه أنماط البوابة فقط.
   ═══════════════════════════════════════════════════════════════ */

/* ── Portal Card System ─────────────────────────────────────── */
.p-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: box-shadow .15s ease;
}
.p-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.p-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.p-card-head-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.p-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.p-card-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-card-icon.ic-teal   { background: #f0fdfa; color: #0d9488; }
.p-card-icon.ic-blue   { background: #eff6ff; color: #2563eb; }
.p-card-icon.ic-purple { background: #f5f3ff; color: #7c3aed; }
.p-card-icon.ic-amber  { background: #fffbeb; color: #d97706; }
.p-card-icon.ic-green  { background: #f0fdf4; color: #16a34a; }
.p-card-icon.ic-red    { background: #fef2f2; color: #dc2626; }
.p-card-icon.ic-slate  { background: #f8fafc; color: #64748b; }

.p-card-title {
    font-size: var(--fs-section);
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}
.p-card-subtitle {
    font-size: var(--fs-small);
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}
.p-card-body {
    padding: 14px 16px;
}
.p-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.p-card-footer--stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* ── Status Chips ────────────────────────────────────────────── */
.st-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: var(--fs-badge);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}
.st-chip svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.st-done    { background: #dcfce7; color: #166534; }
.st-active  { background: #dbeafe; color: #1e40af; }
.st-pending { background: #fef3c7; color: #92400e; }
.st-blocked { background: #fef2f2; color: #991b1b; }
.st-neutral { background: #f1f5f9; color: #475569; }
.st-exempt  { background: #f0f9ff; color: #0369a1; }
.chip-warn  { background: #fef3c7; color: #92400e; }
.chip-ok    { background: #dcfce7; color: #166534; }
.chip-err   { background: #fef2f2; color: #991b1b; }

/* ── Progress Stepper ────────────────────────────────────────── */
.p-stepper-wrap {
    position: relative;
    margin-top: 8px;
    z-index: 5;
}
.p-stepper-hint {
    position: absolute;
    inset-inline: 10px;
    top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: rgba(255, 251, 235, .97);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    z-index: 4;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.p-stepper-hint[hidden] {
    display: none !important;
}
.p-stepper-hint *,
.p-journey-rail,
.p-journey-rail-fill,
.p-journey-meter,
.p-journey-meter-fill {
    pointer-events: none !important;
}
.p-stepper-hint.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.p-stepper-hint-text {
    margin: 0;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #92400e;
    text-align: center;
    line-height: 1.55;
}
.p-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.p-step {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.p-step.is-step-nav,
.p-step.is-locked-step {
    cursor: pointer;
}
.p-step.is-locked-step {
    opacity: .88;
}
.p-step.is-locked-step .p-step-dot {
    box-shadow: inset 0 0 0 2px #fde68a;
}
.p-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-small);
    font-weight: 800;
    flex-shrink: 0;
    transition: .15s;
}
.p-step-dot svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-step-label {
    font-size: var(--fs-small);
    font-weight: 600;
    margin-right: 5px;
    white-space: nowrap;
}
.p-step-line {
    width: 24px;
    height: 2px;
    flex-shrink: 0;
    margin: 0 2px;
    border-radius: 1px;
}
.p-step.done .p-step-dot    { background: #16a34a; color: #fff; }
.p-step.done .p-step-label  { color: #16a34a; }
.p-step.done .p-step-line   { background: #16a34a; }
.p-step.active .p-step-dot  { background: #2563eb; color: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.p-step.active .p-step-label{ color: #2563eb; }
.p-step.active .p-step-line { background: #cbd5e1; }
.p-step.wait .p-step-dot    { background: #e2e8f0; color: #94a3b8; }
.p-step.wait .p-step-label  { color: #94a3b8; }
.p-step.wait .p-step-line   { background: #e2e8f0; }

/* ── Invitation journey (participant event page) ─────────────── */
.p-journey {
    display: block;
    padding: 14px 14px 16px;
    margin-top: 4px;
    overflow: visible;
    background:
        linear-gradient(180deg, rgba(241, 248, 247, .9) 0%, #fff 42%);
    border: 1px solid #dce8e6;
    border-radius: 16px;
}
.p-journey.is-complete {
    background:
        linear-gradient(180deg, rgba(240, 253, 244, .95) 0%, #fff 48%);
    border-color: #bbf7d0;
}
.p-journey-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.p-journey-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #0f766e;
    line-height: 1.3;
}
.p-journey.is-complete .p-journey-kicker {
    color: #15803d;
}
.p-journey-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}
.p-journey-summary {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}
.p-journey-score {
    flex-shrink: 0;
    min-width: 72px;
    padding: 8px 10px;
    text-align: center;
    background: #fff;
    border: 1px solid #d9e7e4;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.p-journey.is-complete .p-journey-score {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.p-journey-score-num {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.p-journey-score-pct {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
}
.p-journey-meter {
    height: 6px;
    margin-bottom: 16px;
    background: #e8eef2;
    border-radius: 99px;
    overflow: hidden;
}
.p-journey-meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(to left, #0f766e, #2dd4bf);
    transition: width .35s ease;
}
html[dir="ltr"] .p-journey-meter-fill {
    background: linear-gradient(to right, #0f766e, #2dd4bf);
}
.p-journey.is-complete .p-journey-meter-fill {
    background: linear-gradient(to left, #15803d, #4ade80);
}
html[dir="ltr"] .p-journey.is-complete .p-journey-meter-fill {
    background: linear-gradient(to right, #15803d, #4ade80);
}
.p-journey-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--journey-count, 4), minmax(0, 1fr));
    gap: 8px;
    padding-top: 4px;
    z-index: 0;
}
.p-journey-rail {
    position: absolute;
    top: 24px;
    inset-inline: calc(100% / var(--journey-count, 4) / 2);
    height: 4px;
    background: #dbe4ea;
    border-radius: 99px;
    z-index: 0;
    grid-column: 1 / -1;
    pointer-events: none !important;
    overflow: hidden;
}
.p-journey-rail-fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: #0d9488;
    transform: scaleX(calc(var(--journey-fill, 0%) / 100%));
    transform-origin: right center;
    transition: transform .35s ease;
}
html[dir="ltr"] .p-journey-rail-fill {
    transform-origin: left center;
}
.p-journey.is-complete .p-journey-rail-fill {
    background: #16a34a;
}
.p-journey-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 2px 4px 0;
    text-align: center;
    border-radius: 12px;
    outline: none;
    user-select: none;
    pointer-events: auto;
    transition: background-color .15s ease, transform .15s ease;
}
button.p-journey-step {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    width: 100%;
    margin: 0;
    box-shadow: none;
}
.p-journey-step.is-step-nav {
    cursor: pointer;
}
.p-journey-step.is-locked-step {
    cursor: help;
}
.p-journey-step.is-step-nav:hover,
.p-journey-step.is-step-nav:focus-visible {
    background: rgba(255, 255, 255, .72);
}
.p-journey-step.is-step-nav:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .22);
}
.p-journey-step.is-locked-step:hover,
.p-journey-step.is-locked-step:focus-visible {
    background: rgba(254, 243, 199, .45);
}
.p-journey-node {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.p-journey .p-step-dot {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    background: #e2e8f0;
    color: #64748b;
    box-shadow: 0 0 0 5px #f7fbfa;
}
.p-journey .p-step-dot svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}
.p-journey-num {
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.p-journey-lock {
    position: absolute;
    inset-inline-end: -5px;
    bottom: -4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: #fff;
    color: #b45309;
    border: 1.5px solid #d97706;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}
.p-journey-lock svg {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-journey .p-step-label {
    margin: 0;
    max-width: 100%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.p-journey-state {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #94a3b8;
}
.p-journey-step.done .p-step-dot {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.p-journey-step.done .p-step-label {
    color: #0f766e;
}
.p-journey-step.done .p-journey-state {
    color: #0f766e;
}
.p-journey-step.active .p-step-dot {
    background: #fff;
    border-color: #0d9488;
    color: #0f766e;
    box-shadow:
        0 0 0 5px #f7fbfa,
        0 0 0 8px rgba(13, 148, 136, .22);
    animation: p-journey-pulse 1.8s ease-out infinite;
}
.p-journey-step.active .p-step-label {
    color: #0f766e;
}
.p-journey-step.active .p-journey-state {
    color: #0d9488;
}
.p-journey-step.wait .p-step-dot {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}
.p-journey-step.wait .p-step-label,
.p-journey-step.wait .p-journey-state {
    color: #94a3b8;
}
.p-journey-step.is-locked-step.wait .p-step-dot {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}
.p-journey.is-complete .p-journey-step.done .p-step-dot {
    background: #16a34a;
    border-color: #16a34a;
}
.p-journey.is-complete .p-journey-step.done .p-step-label,
.p-journey.is-complete .p-journey-step.done .p-journey-state {
    color: #15803d;
}
@keyframes p-journey-pulse {
    0% { box-shadow: 0 0 0 5px #f7fbfa, 0 0 0 8px rgba(13, 148, 136, .28); }
    70% { box-shadow: 0 0 0 5px #f7fbfa, 0 0 0 13px rgba(13, 148, 136, 0); }
    100% { box-shadow: 0 0 0 5px #f7fbfa, 0 0 0 8px rgba(13, 148, 136, .18); }
}
@media (prefers-reduced-motion: reduce) {
    .p-journey-step.active .p-step-dot {
        animation: none;
    }
    .p-journey-meter-fill,
    .p-journey-rail-fill {
        transition: none;
    }
}

/* ── Quick-access Grid ───────────────────────────────────────── */
.q-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.q-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: .15s;
    min-height: 72px;
}
.q-card:hover {
    border-color: #0d9488;
    box-shadow: 0 2px 8px rgba(13,148,136,.08);
}
.q-card-ico {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.q-card-ico svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.q-card-text {
    min-width: 0;
    flex: 1;
}
.q-card-text .q-label {
    font-size: 13px;
    font-weight: 800;
    display: block;
    line-height: 1.35;
    color: #0f172a;
}
.q-card-text .q-sub {
    font-size: var(--fs-small);
    color: #64748b;
    margin-top: 2px;
    display: block;
    line-height: 1.4;
}
@media (max-width: 640px) {
    .q-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Welcome Banner ──────────────────────────────────────────── */
.p-welcome {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.p-welcome-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--fs-title);
    font-weight: 800;
    overflow: hidden;
}
.p-welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── Per-role invitation cards ──────────────────────────────── */
.role-cards-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding: 14px 16px;
}
.role-invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    flex-wrap: wrap;
}
.role-invite-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.role-invite-info .role-name,
.role-status-row .role-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.role-topic {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 2px;
}
.role-invite-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.role-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.role-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.role-status-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.role-invite-actions .rev-upload-bar--inline,
.role-status-actions .rev-upload-bar--inline {
    display: inline-flex;
}
.approved-file-links .rev-upload-bar {
    display: inline-flex;
    gap: 6px;
}

.role-inline-letter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    font-size: var(--fs-small);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease;
}

.role-inline-letter:hover {
    background: #ccfbf1;
    border-color: #5eead4;
}

.role-inline-letter.tone-gold {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.role-inline-letter.tone-blue {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.role-inline-letter svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.invite-extra-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding: 12px 16px 14px;
}

.invite-roles-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: start;
    border-top: 1px solid #f1f5f9;
}
.invite-roles-split .role-cards-wrap {
    border-top: 0;
    padding: 0;
}
.invite-roles-col {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.invite-outcome {
    padding: 14px 16px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.portal-outcome-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.portal-outcome-links .role-inline-letter {
    width: auto;
}

.role-letter-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f0fdfa;
    color: #0d9488;
    transition: background .15s;
}
.role-letter-dl:hover { background: #ccfbf1; }
.role-letter-dl svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.role-decline-reason {
    font-size: 12px;
    color: #94a3b8;
    width: 100%;
}
.role-decline-panel {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 6px;
    display: none;
}
.role-decline-panel.open { display: block; }
.role-decline-panel textarea {
    width: 100%;
    min-height: 50px;
    padding: 8px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 6px;
}
.portal-attend-offer {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    border-radius: 10px;
}
.portal-attend-offer-text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #166534;
    font-weight: 600;
}
.portal-attend-offer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── حالة الدعوة: مواد معتمدة + خطابات ─────────────────────── */
.invite-approved-section {
    border-top: 1px solid #f1f5f9;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}
.invite-approved-section + .invite-approved-section {
    padding-top: 12px;
}
.invite-section-label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #0f766e;
    letter-spacing: 0.01em;
}
.invite-section-label::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 99px;
    background: #0d9488;
    flex-shrink: 0;
}

.invite-published-hint {
    margin: -2px 0 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.6;
}

.invite-approved-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-approved-role {
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.invite-approved-role-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #f0fdfa 0%, #ecfdf5 100%);
    border-bottom: 1px solid #ccfbf1;
}

.invite-approved-role-head strong {
    font-size: 13px;
    color: #0f766e;
}

.invite-approved-role-head span {
    font-size: 12px;
    color: #64748b;
}

.invite-approved-files {
    display: flex;
    flex-direction: column;
}

.approved-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.approved-file-row:last-child {
    border-bottom: none;
}

.approved-file-row:hover {
    background: #f0fdfa;
}

.approved-file-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.approved-file-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.45;
}
a.approved-file-title {
    color: #0f766e;
    text-decoration: none;
}
a.approved-file-title:hover {
    text-decoration: underline;
}

.invite-approved-section .rev-file-icon {
    width: 36px;
    height: 36px;
}
.invite-approved-section .rev-file-icon__main.rev-file-icon__type {
    width: 24px;
    height: 24px;
}

.approved-file-note {
    font-size: var(--fs-small);
    color: #94a3b8;
}

.approved-file-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.approved-file-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #047857;
    font-size: var(--fs-badge);
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.approved-file-chip:hover {
    background: #d1fae5;
    border-color: #86efac;
}

.invite-letters-grid {
    display: grid;
    gap: 8px;
}

.invite-letter-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.invite-letter-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.08);
    transform: translateY(-1px);
}

.invite-letter-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f0fdfa;
    color: #0d9488;
}

.invite-letter-card.tone-gold .invite-letter-icon {
    background: #fffbeb;
    color: #b45309;
}

.invite-letter-card.tone-blue .invite-letter-icon {
    background: #eff6ff;
    color: #1d4ed8;
}

.invite-letter-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.invite-letter-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.invite-letter-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.invite-letter-subtitle {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.invite-letter-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #0d9488;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f0fdfa;
}

.invite-letter-card.tone-gold .invite-letter-action {
    color: #b45309;
    background: #fffbeb;
}

.invite-letter-card.tone-blue .invite-letter-action {
    color: #1d4ed8;
    background: #eff6ff;
}

.invite-letter-action svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    .role-invite-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .role-invite-actions {
        justify-content: flex-start;
    }
}
.p-welcome h2 {
    margin: 0 0 2px;
    font-size: var(--fs-section);
    font-weight: 800;
}
.p-welcome p {
    margin: 0;
    font-size: 12px;
    opacity: .85;
}

/* ── Event Header (invitation detail) ────────────────────────── */
.ev-head {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px 16px;
    margin-bottom: 14px;
}
.ev-head h2 {
    font-size: 17px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}
.ev-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    align-items: center;
}
.ev-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}
.ev-meta-dates,
.ev-row-meta-item.ev-meta-dates,
.kv-value.ev-meta-dates {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    white-space: normal;
}
.ev-meta-g,
.ev-meta-h {
    display: inline;
    white-space: nowrap;
}
.ev-meta-sep {
    color: #cbd5e1;
    font-weight: 700;
    user-select: none;
}
.ev-meta-place {
    gap: 4px;
}
html[dir="ltr"] .ev-meta-dates {
    direction: ltr;
}
.ev-meta svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Key-Value Rows ──────────────────────────────────────────── */
.kv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
    gap: 8px;
}
.kv-row:last-child { border-bottom: none; }
.kv-label {
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}
.kv-value {
    color: #1e293b;
    font-weight: 600;
    text-align: left;
}
.kv-value.is-empty {
    color: #94a3b8;
    font-weight: 500;
}

.p-ticket-block {
    padding: 2px 0 10px;
}
.p-ticket-block + .p-ticket-block {
    border-top: 1px solid #e2e8f0;
    margin-top: 6px;
    padding-top: 14px;
}
.p-ticket-block-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 800;
    color: #32625f;
}
.p-ticket-block--booked .p-ticket-block-title {
    color: #1f4f4c;
}
.p-ticket-block-hint,
.p-ticket-waiting {
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.55;
}
.p-ticket-waiting {
    margin: 4px 0 0;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
}
.p-ticket-leg {
    margin: 0 0 8px;
}
.p-ticket-leg:last-of-type {
    margin-bottom: 0;
}
.p-ticket-nested {
    padding-right: 12px;
}
.p-ticket-nested .kv-row {
    padding: 4px 0;
}
.p-ticket-nested .kv-label {
    font-size: 12px;
}
.p-ticket-file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.p-ticket-name-check {
    margin: 8px 0 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}
.p-ticket-name-check.is-match {
    background: #ecfdf5;
    color: #047857;
}
.p-ticket-name-check.is-mismatch {
    background: #fef2f2;
    color: #b91c1c;
}
.p-ticket-name-check.is-unknown {
    background: #f8fafc;
    color: #64748b;
}

/* ── Travel page (visa / ticket / stay) ─────────────────────── */
.p-travel-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.p-travel-page > .p-card {
    margin-bottom: 0;
}
.p-travel-same-city {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
}
.p-travel-card .p-card-subtitle {
    margin-top: 2px;
}
.p-travel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.p-travel-block {
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 14px;
}
.p-travel-block--booked {
    background: linear-gradient(180deg, #f0fdfa 0%, #f8fffc 100%);
    border-color: #99f6e4;
}
.p-travel-block--waiting {
    background: #f8fafc;
    display: flex;
    align-items: center;
}
.p-travel-block--own {
    background: #fff7ed;
    border-color: #fdba74;
}
.p-own-ticket-notice {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffedd5;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}
.p-own-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}
.p-own-ticket-meta,
.p-own-ticket-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.p-own-ticket-leg {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 0;
    border-top: 1px dashed #fdba74;
}
.p-own-ticket-leg:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.p-own-ticket-form .p-btn {
    align-self: flex-start;
}
@media (max-width: 640px) {
    .p-own-ticket-meta,
    .p-own-ticket-row {
        grid-template-columns: 1fr;
    }
}
.p-travel-block .p-ticket-block-title {
    margin-bottom: 2px;
}
.p-travel-block .note-box {
    margin-top: 10px;
}
.p-ticket-meta {
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d1e7e4;
}
.p-flight-path {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.p-travel-block--booked .p-flight-path {
    border-color: #ccfbf1;
}
.p-flight-path--uncovered {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.p-flight-path--uncovered .p-flight-path-head {
    margin-bottom: 6px;
}
.p-ticket-uncovered-note {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.5;
}
.p-flight-path-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
}
.p-flight-path-label {
    font-size: 12px;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 2px 8px;
}
.p-flight-no {
    font-weight: 800;
    letter-spacing: .04em;
    color: #0f172a;
    font-size: 13px;
}
.p-flight-term {
    font-weight: 700;
    font-size: 12px;
    color: #0f766e;
    background: #f0fdfa;
    border-radius: 999px;
    padding: 2px 8px;
}
.p-flight-when {
    margin-inline-start: auto;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.p-flight-path-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.p-flight-stop-k {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 2px;
}
.p-flight-stop-v {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
}
.p-flight-stop--to {
    text-align: left;
}
.p-flight-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    color: #0d9488;
}
.p-flight-line {
    display: block;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #99f6e4 0 6px, transparent 6px 10px);
    border-radius: 2px;
}
.p-flight-plane {
    width: 20px;
    height: 20px;
    margin-top: -11px;
    fill: currentColor;
    stroke: none;
}
.p-stay-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.p-stay-hotel {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}
.p-stay-place {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}
.p-stay-place svg,
.p-maps-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-maps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #0f766e;
    color: #fff !important;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 14px;
}
.p-maps-btn:hover {
    background: #0d9488;
}
.p-stay-people {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.p-stay-person {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.p-stay-person-name {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
}
.p-stay-person-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
    color: #475569;
}
.p-stay-person-meta .is-empty {
    color: #94a3b8;
    font-weight: 500;
}
.p-stay-map {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    min-height: 220px;
    background: #e2e8f0;
}
.p-stay-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: 0;
}
@media (min-width: 720px) {
    .p-travel-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .p-stay-layout {
        grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr);
        align-items: stretch;
    }
    .p-stay-map,
    .p-stay-map iframe {
        min-height: 280px;
        height: 100%;
    }
}
@media (min-width: 1100px) {
    .p-stay-map,
    .p-stay-map iframe {
        min-height: 320px;
    }
}
@media (max-width: 719px) {
    .p-flight-path-body {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .p-flight-connector {
        flex-direction: row;
        min-width: 0;
        width: 100%;
        padding: 2px 8px;
    }
    .p-flight-line {
        flex: 1;
        height: 2px;
        width: auto;
    }
    .p-flight-plane {
        margin-top: 0;
        transform: rotate(90deg);
    }
    .p-flight-stop--to {
        text-align: right;
    }
    .p-flight-when {
        margin-inline-start: 0;
        width: 100%;
    }
    .p-maps-btn {
        width: 100%;
    }
}

/* ── File Pill ───────────────────────────────────────────────── */
.file-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: var(--fs-small);
    font-weight: 600;
    text-decoration: none;
    transition: .12s;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    background: #f8fafc;
}
.file-pill:hover {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #166534;
}
.p-card-footer--files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
button.file-pill {
    cursor: pointer;
    font: inherit;
}
.file-pill--danger {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.file-pill--danger:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
}
.file-pill svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Buttons (portal-specific) ───────────────────────────────── */
.p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: var(--fs-button);
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: .15s;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
}
.p-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-btn-primary {
    background: #0d9488;
    color: #fff;
}
.p-btn-primary:hover { background: #0f766e; }
.p-btn-primary:disabled, .p-btn-primary[disabled] {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}
.p-btn-success {
    background: #16a34a;
    color: #fff;
}
.p-btn-success:hover { background: #15803d; }
.p-btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.p-btn-danger:hover { background: #fef2f2; }
.p-btn-outline {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.p-btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.p-btn-sm {
    padding: 5px 12px;
    font-size: var(--fs-button);
}
.p-btn-block {
    width: 100%;
    justify-content: center;
    padding: 11px;
}

/* ── Events List (participant list mode) ─────────────────────── */
.ev-list-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(13, 148, 136, .14), transparent 55%),
        linear-gradient(135deg, #f0fdfa 0%, #ffffff 55%, #f8fafc 100%);
    border: 1px solid #ccfbf1;
}
@media (max-width: 720px) {
    .ev-list-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .ev-list-hero-count {
        align-self: flex-start;
    }
    .ev-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ev-row-side {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
.ev-list-hero-title {
    margin: 0;
    font-size: var(--fs-title);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.ev-list-hero-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    max-width: 42ch;
}
.ev-list-hero-count {
    flex-shrink: 0;
    min-width: 72px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #99f6e4;
    box-shadow: 0 4px 14px rgba(13, 148, 136, .08);
}
.ev-list-hero-count-num {
    display: block;
    font-size: var(--fs-title);
    font-weight: 800;
    color: #0f766e;
    line-height: 1.1;
}
.ev-list-hero-count-label {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: #64748b;
}

.ev-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ev-list-spotlight {
    margin: 0 0 22px;
}
.ev-list-rest-title {
    margin: 6px 0 12px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.ev-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 18px;
    align-items: center;
    min-height: 84px;
    padding-block: 16px;
    padding-inline: 16px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ev-row:hover {
    border-color: #99f6e4;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}
.ev-row:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}
.ev-row-accent {
    position: absolute;
    inset-block: 10px;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}
.ev-row-is-current {
    border-color: #5eead4;
    background: linear-gradient(180deg, #f0fdfa 0%, #fff 70%);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, .08), 0 6px 18px rgba(13, 148, 136, .08);
}
.ev-row-is-current .ev-row-accent { background: #0d9488; }
.ev-row-needs-action .ev-row-accent { background: #f59e0b; }
.ev-row-is-current.ev-row-needs-action .ev-row-accent {
    background: linear-gradient(180deg, #0d9488, #f59e0b);
}

.ev-row-main { min-width: 0; padding-inline-start: 8px; }
.ev-row-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ev-row-title {
    margin: 0;
    font-size: var(--fs-section);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}
.ev-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.ev-row-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-small);
    font-weight: 600;
    color: #64748b;
}
.ev-row-meta-item svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    opacity: .85;
}

.ev-row-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 420px;
}
.ev-row-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.ev-row:hover .ev-row-chevron {
    background: #ccfbf1;
    color: #0f766e;
}
.ev-row-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ev-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: var(--fs-badge);
    font-weight: 800;
    white-space: nowrap;
}
.ev-row .st-active {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.ev-list-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px 20px;
}
.ev-list-empty-title {
    margin: 0 0 4px !important;
    font-size: 15px !important;
    font-weight: 800;
    color: #334155 !important;
}
.ev-list-empty-sub {
    margin: 0 !important;
    font-size: var(--fs-small) !important;
    color: #94a3b8 !important;
}

/* ── Upload Box ──────────────────────────────────────────────── */
.upload-box {
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    transition: .15s;
    background: #fafbfc;
}
.upload-box:hover { border-color: #0d9488; }
.upload-box label {
    display: block;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.upload-box input[type="file"] { display: none; }

/* ── Notes Box ───────────────────────────────────────────────── */
.note-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: var(--fs-small);
    color: #92400e;
    line-height: 1.6;
}
.note-box.note-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.note-box.note-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.note-box.note-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

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

/* ── Notification inbox ──────────────────────────────────────── */
.notif-shell {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.notif-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    margin: 0;
    background: #fff;
}
.notif-item:last-child {
    border-bottom: 0;
}
.notif-item.unread {
    background: #f8fbff;
}
.notif-ico {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}
.notif-ico svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title {
    font-size: var(--fs-ui);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}
.notif-text {
    font-size: var(--fs-table);
    color: #64748b;
    line-height: 1.5;
}
.notif-time {
    font-size: var(--fs-small);
    color: #94a3b8;
    margin-top: 3px;
}

.notif-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 0;
    padding: 10px 14px;
    background: #f8fafc;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    border-radius: 0;
}
.notif-page-head-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.notif-page-count {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}
.notif-page-head .p-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.notif-empty {
    margin: 0;
    padding: 28px 16px;
    border: 0;
}
.notif-item-top {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.notif-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}
.notif-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #3d7a76;
    cursor: pointer;
    flex: 0 0 32px;
    line-height: 0;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.notif-icon-btn:hover {
    border-color: #3d7a76;
    background: #f0fafa;
    color: #2f5f5c;
}
.notif-icon-btn:focus-visible {
    outline: 2px solid #99f6e4;
    outline-offset: 2px;
}
.notif-icon-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: none;
    flex-shrink: 0;
}
.notif-icon-btn .ico-open {
    display: block;
}
.notif-icon-btn[aria-expanded="true"] .ico-open,
.notif-icon-btn .ico-close {
    display: none;
}
.notif-icon-btn[aria-expanded="true"] .ico-close {
    display: block;
}
.notif-toggle {
    margin: 0;
    align-self: center;
    justify-self: end;
}
.notif-detail {
    margin-top: 8px;
    margin-inline-start: 42px;
    padding-top: 8px;
    border-top: 1px solid #eef2f6;
}
.notif-item.unread .notif-detail {
    border-top-color: #dbeafe;
}
.notif-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 7px 12px;
    background: linear-gradient(180deg, #3d7a76 0%, #2f5f5c 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
}
.notif-action-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.notif-ico.ic-unread {
    background: #dbeafe;
    color: #2563eb;
}
@media (max-width: 640px) {
    .notif-page-head {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .notif-page-head .p-btn {
        margin-inline-start: auto;
    }
    .notif-item {
        padding: 12px;
    }
    .notif-item-top {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        align-items: center;
    }
    .notif-detail {
        margin-inline-start: 0;
    }
}

/* ── Companion Card ──────────────────────────────────────────── */
.comp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.comp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.comp-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* ── Profile Section ─────────────────────────────────────────── */
.prof-section {
    margin-bottom: 10px;
}
.prof-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f766e;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #f0fdfa;
}
.prof-field {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    gap: 10px;
}
.prof-field-label {
    color: #64748b;
    flex-shrink: 0;
}
.prof-field-value {
    color: #1e293b;
    font-weight: 600;
    text-align: left;
    word-break: break-word;
}

/* ── Decline Form ────────────────────────────────────────────── */
.decline-panel {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    display: none;
}
.decline-panel.open { display: block; }
.decline-panel textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 6px;
}

/* ── Auth (login) ────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    padding: max(28px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(86, 158, 154, 0.16), transparent 55%),
        radial-gradient(680px 340px at 0% 110%, rgba(196, 163, 90, 0.1), transparent 50%),
        #eef4f3;
    position: relative;
}
.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("/public/assets/hb-pattern.png?v=2");
    background-repeat: repeat;
    background-size: 520px 300px;
    opacity: 0.05;
}
.auth-page > * {
    position: relative;
    z-index: 1;
}
.auth-box {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(31, 58, 57, 0.12);
    border: 1px solid rgba(47, 109, 105, 0.08);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
}
.auth-brand {
    position: relative;
    text-align: center;
    padding: 36px 28px 28px;
    background: linear-gradient(to bottom, #4c9791 0%, #3e827d 42%, #2f6d69 100%);
    color: #fff;
    overflow: hidden;
}
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("/public/assets/hb-pattern.png?v=2");
    background-repeat: repeat;
    background-size: 520px 300px;
    opacity: 0.06;
    filter: brightness(0) invert(1);
}
.auth-brand::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #c4a35a 20%, #e6d3a1 50%, #c4a35a 80%, transparent);
}
.auth-brand > * {
    position: relative;
    z-index: 1;
}
.auth-brand > img {
    display: block;
    width: auto;
    height: 96px;
    max-width: 120px;
    margin: 0 auto 12px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
.auth-brand h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: 0;
}
.auth-brand .brand-title--image {
    margin: 0 0 6px;
    line-height: 0;
}
.auth-brand .brand-title-img {
    display: block;
    max-width: min(100%, 240px);
    max-height: 68px;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    filter: brightness(0) invert(1);
}
.auth-brand p {
    font-size: 13px;
    opacity: .9;
    margin: 0;
    line-height: 1.6;
}
.auth-form {
    padding: 28px 28px 30px;
}
.auth-form .field {
    margin-bottom: 16px;
}
.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3d5552;
    margin-bottom: 8px;
}
.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d7e4e2;
    border-radius: 12px;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    text-align: start;
    background: #f7fbfb;
    color: #1f3a39;
}
.auth-form input[type="email"],
.auth-form input[type="password"] {
    direction: ltr;
    text-align: left;
}
.auth-form input:focus {
    outline: none;
    border-color: #3d7a76;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(61, 122, 118, 0.12);
}
.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    direction: ltr;
    margin: 8px 0 14px;
}
.otp-inputs input {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    border: 1.5px solid #d7e4e2;
    border-radius: 12px;
    background: #f7fbfb;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
    color: #1f3a39;
}
.otp-inputs input:focus {
    outline: none;
    border-color: #3d7a76;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(61, 122, 118, 0.12);
}
.auth-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #52615f;
    margin: 4px 0 18px;
    line-height: 1.7;
}
.auth-agree input[type="checkbox"] {
    width: auto;
    padding: 0;
    border-radius: 3px;
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: #2f6d69;
}
.auth-agree a {
    color: #2f6d69;
    font-weight: 700;
}
.auth-links {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
}
.auth-links a {
    color: #0d9488;
    font-weight: 600;
    text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.auth-form-title {
    font-size: 22px;
    font-weight: 800;
    color: #1f3a39;
    margin: 0 0 8px;
    text-align: center;
}
.auth-form-subtitle {
    font-size: 14px;
    color: #5f726f;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.7;
}
.auth-page .p-btn-block {
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
}
.auth-page .p-btn-primary {
    background: #32625f;
    box-shadow: 0 10px 20px rgba(50, 98, 95, 0.18);
}
.auth-page .p-btn-primary:hover {
    background: #274f4c;
}
.auth-page .p-btn-primary:disabled,
.auth-page .p-btn-primary[disabled] {
    background: #d5dee0;
    color: #8aa09d;
    box-shadow: none;
}
.auth-verify-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}
.auth-action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #2f6d69;
    transition: color .15s;
}
.auth-action-btn:hover {
    color: #0f766e;
    text-decoration: underline;
}
.auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    font-size: 13px;
    color: #7d918e;
}
.auth-footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color .15s;
}
.auth-footer-links a:hover {
    color: #0d9488;
    text-decoration: underline;
}
.auth-footer-sep {
    color: #cbd5e1;
}
@media (max-width: 720px) {
    .auth-page.auth-fit {
        min-height: 100svh;
        min-height: 100dvh;
        justify-content: center;
        padding: 10px 12px;
    }
    .auth-page.auth-fit .auth-brand {
        padding: 14px 16px 12px;
    }
    .auth-page.auth-fit .auth-brand > img {
        height: 62px;
        max-width: 78px;
        margin-bottom: 6px;
    }
    .auth-page.auth-fit .auth-brand .brand-title-img {
        max-height: 40px;
        max-width: 168px;
    }
    .auth-page.auth-fit .auth-brand p {
        font-size: 11px;
        line-height: 1.35;
        margin-top: 4px;
    }
    .auth-page.auth-fit .auth-form {
        padding: 14px 16px 16px;
    }
    .auth-page.auth-fit .auth-form-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .auth-page.auth-fit .auth-form-subtitle {
        font-size: 12.5px;
        line-height: 1.45;
        margin-bottom: 12px;
    }
    .auth-page.auth-fit .auth-form .field {
        margin-bottom: 10px;
    }
    .auth-page.auth-fit .auth-form label {
        margin-bottom: 4px;
        font-size: 12px;
    }
    .auth-page.auth-fit .auth-form input[type="email"],
    .auth-page.auth-fit .auth-form input[type="password"] {
        padding: 10px 12px;
    }
    .auth-page.auth-fit .p-btn-block {
        min-height: 42px;
        padding: 10px 14px;
    }
    .auth-page.auth-fit .auth-footer-links {
        margin-top: 10px;
        font-size: 12px;
    }
    .auth-page.auth-fit .auth-brand .ui-lang {
        margin-top: 8px;
    }
    .auth-page.auth-fit .auth-agree {
        margin: 0 0 10px;
        font-size: 12px;
        line-height: 1.45;
        gap: 8px;
    }
}
.auth-disabled-email {
    background: #f8fafc !important;
    color: #64748b !important;
}
.auth-field-center label {
    text-align: center;
}

/* ── Alert ───────────────────────────────────────────────────── */
.p-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: var(--fs-ui);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.p-alert svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.p-alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.p-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.p-alert-warn    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.p-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Empty State ─────────────────────────────────────────────── */
.p-empty {
    text-align: center;
    padding: 32px 16px;
    color: #94a3b8;
}
.p-empty svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 8px;
}
.p-empty p {
    font-size: 13px;
    margin: 0;
}

/* ── Collapsible Section ─────────────────────────────────────── */
.p-collapse-trigger {
    cursor: pointer;
    user-select: none;
}
.p-collapse-trigger::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(-45deg);
    margin-inline-start: 6px;
    transition: transform .2s;
    flex-shrink: 0;
}
.p-collapse-trigger.open::after {
    transform: rotate(135deg);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .q-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .ev-list-hero {
        padding: 16px;
    }
    .ev-list-hero-title { font-size: var(--fs-title); }
    .ev-row {
        gap: 12px;
        padding: 14px 14px 14px 12px;
    }
    .ev-row-side { max-width: 340px; }
}
@media (max-width: 768px) {
    .p-welcome {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .p-stepper:not(.p-journey) {
        padding: 10px 12px;
    }
    .p-stepper:not(.p-journey) .p-step-label {
        display: none;
    }
    .p-stepper:not(.p-journey) .p-step-line {
        width: 16px;
    }
    .p-journey {
        padding: 12px 12px 10px;
        border-radius: 14px;
    }
    .p-journey-head {
        margin-bottom: 8px;
    }
    .p-journey-score {
        min-width: 64px;
        padding: 7px 8px;
    }
    .p-journey-track {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-inline-start: 2px;
    }
    .p-journey-rail {
        top: 22px;
        bottom: 22px;
        inset-inline-start: 20px;
        inset-inline-end: auto;
        width: 4px;
        height: auto;
    }
    .p-journey-rail-fill {
        width: 100%;
        height: 100%;
        transform: scaleY(calc(var(--journey-fill, 0%) / 100%));
        transform-origin: top center;
    }
    .p-journey-step {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 2px;
        align-items: center;
        width: 100%;
        padding: 10px 6px;
        text-align: start;
        border-radius: 12px;
    }
    .p-journey-node {
        grid-row: 1 / span 2;
        align-self: center;
    }
    .p-journey .p-step-label,
    .p-journey-state {
        grid-column: 2;
        max-width: none;
        -webkit-line-clamp: unset;
        display: block;
        overflow: visible;
        text-align: start;
    }
    .p-journey-step.is-step-nav:hover,
    .p-journey-step.is-locked-step:hover {
        background: rgba(255, 255, 255, .85);
    }
    .ev-list-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        border-radius: 14px;
    }
    .ev-list-hero-sub { max-width: none; }
    .ev-list-hero-count {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
        min-width: 0;
        padding: 8px 12px;
    }
    .ev-list-hero-count-num,
    .ev-list-hero-count-label { display: inline; }
    .ev-list { gap: 8px; }
    .ev-row {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 0;
        padding-block: 14px;
        padding-inline: 16px 14px;
        border-radius: 12px;
    }
    .ev-row:hover { transform: none; }
    .ev-row-main { padding-inline-start: 6px; }
    .ev-row-title { font-size: 15px; }
    .ev-row-side {
        max-width: none;
        justify-content: flex-start;
        padding-inline-start: 6px;
        border-top: 1px solid #f1f5f9;
        padding-top: 10px;
    }
    .ev-row-chevron {
        margin-inline-start: auto;
        width: 32px;
        height: 32px;
    }
    .ev-row .st-chip,
    .ev-row .ev-action-badge {
        min-height: 28px;
        padding-inline: 10px;
        font-size: var(--fs-small);
    }
    .q-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .p-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .kv-row {
        flex-direction: column;
        gap: 2px;
    }
    .kv-value {
        text-align: start;
    }
    .auth-box {
        border-radius: 18px;
    }
    .auth-brand {
        padding: 28px 20px 24px;
    }
    .auth-form {
        padding: 22px 18px 24px;
    }
    .ev-head h2 {
        font-size: 15px;
    }
}
@media (max-width: 480px) {
    .q-grid {
        grid-template-columns: 1fr;
    }
    .p-card-body {
        padding: 10px 12px;
    }
    .p-card-head {
        padding: 10px 12px;
    }
    .invite-approved-section {
        padding: 12px;
    }
    .invite-approved-role-head,
    .approved-file-row {
        padding-inline: 12px;
    }
    .approved-file-row {
        align-items: flex-start;
    }
    .p-welcome h2 {
        font-size: 15px;
    }
    .otp-inputs input {
        width: 36px;
        height: 42px;
        font-size: 18px;
    }
}

/* ── Revision table/cards responsive ─────────────────────────── */
.rev-desk-table { display: table; }
.rev-mob-cards  { display: none !important; }
@media (max-width: 768px) {
    .rev-desk-table { display: none !important; }
    .rev-mob-cards  { display: block !important; }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
    .p-welcome, .auth-page, .pal-closed-page, .decline-panel, .upload-box { display: none !important; }
    .p-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* ── Portal tabs (invitation detail) ─────────────────────────── */
.p-portal-shell { margin-top: 4px; }
.p-portal-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}
.p-portal-tab > *,
.p-journey-step > * {
    pointer-events: none;
}
.p-portal-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    font-size: var(--fs-ui);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.35;
    max-width: 100%;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    transition: background .15s, color .15s;
}
.p-portal-tab:hover { background: rgba(255,255,255,.7); color: #0f766e; }
.p-portal-tab.is-active {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.p-portal-tab.is-locked {
    opacity: .45;
    cursor: not-allowed;
}
.p-portal-tab.is-locked:hover {
    background: transparent;
    color: inherit;
}
.p-portal-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: var(--fs-badge);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}
.p-portal-tab .tab-badge:empty {
    display: none;
}
.p-tab-panel { display: none; }
.p-tab-panel.is-active { display: block; }
.p-tab-panel > .p-card + .p-card { margin-top: 12px; }
.p-action-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
}
.p-action-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.p-action-banner-label {
    font-size: 13px;
    font-weight: 800;
    color: #7c2d12;
}
.is-required-focus {
    outline: 2px solid #ea580c;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.18);
    border-radius: 12px;
    scroll-margin-top: 88px;
    animation: p-required-pulse 1.1s ease-in-out 2;
}
@keyframes p-required-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.18); }
    50% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0.08); }
}
.p-work-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.p-work-jump {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
}
.p-work-jump:hover { border-color: #0d9488; color: #0d9488; }

/* ── Work panel (بحثي / عرضي) ─────────────────────────────────── */
.work-card { scroll-margin-top: 72px; }
.work-card + .work-card { margin-top: 14px; }
.work-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.work-section {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.work-section-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
}
.work-section-status {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.work-section-status .note-box { margin: 0; }
.work-section-summary {
    background: #f0f9ff;
    border-color: #bae6fd;
}
.work-section-summary .work-section-title { color: #0c4a6e; }
.work-section-upload .work-section-title { margin-bottom: 10px; }
.work-section-upload .work-upload-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.work-section-upload .work-upload-hint {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.work-axes-list {
    margin: 0;
    padding-inline-start: 18px;
    font-size: 13px;
    color: #475569;
}
.work-axes-list li { margin-bottom: 4px; }
.work-axes-meta { color: #94a3b8; font-size: var(--fs-small); }

.work-peer-list { display: grid; gap: 8px; }
.work-peer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-wrap: wrap;
    cursor: pointer;
}
.work-peer-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    min-width: 120px;
    flex: 1;
}
a.work-peer-name {
    color: #0f766e;
    text-decoration: none;
}
a.work-peer-name:hover {
    text-decoration: underline;
}
.work-peer-files {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.work-peer-files .rev-upload-bar {
    display: inline-flex;
    gap: 6px;
}
.work-peer-files .rev-upload-bar .work-peer-empty {
    margin: 0;
}
.work-peer-label {
    font-size: var(--fs-small);
    color: #64748b;
    font-weight: 600;
}
.work-peer-label + .work-peer-label { margin-inline-start: 8px; }
.work-peer-empty { color: #94a3b8; font-size: var(--fs-small); }

.work-files-block { margin-bottom: 10px; }
.work-files-block:last-child { margin-bottom: 0; }
.work-files-block--icons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.work-files-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.work-files-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.file-pill--sm { font-size: var(--fs-badge); padding: 3px 8px; }
.file-pill--reject {
    font-size: var(--fs-small);
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.note-reject-reason {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.note-box--sm { font-size: 12px; margin-top: 8px; }
.note-box--warn {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #7c2d12;
    margin-top: 6px;
}
.st-chip--sm { font-size: var(--fs-badge); }

.rev-work-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.rev-work-table thead tr { background: #fff; border-bottom: 2px solid #e2e8f0; }
.rev-work-table th {
    padding: 8px 10px;
    text-align: right;
    font-weight: 600;
    color: #475569;
}
.rev-work-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
}
.rev-work-table .rev-num { font-weight: 600; color: #0f766e; }
.rev-deadline { color: #64748b; font-size: 12px; }
.rev-deadline.is-past { color: #b91c1c; font-weight: 600; }
.rev-deadline-hint { font-size: var(--fs-small); color: #b91c1c; }

.rev-mob-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.rev-mob-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.rev-mob-card-num { font-weight: 700; color: #0f766e; font-size: 14px; }
.rev-mob-card-date { font-size: 12px; color: #64748b; }
.rev-mob-upload {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.work-file-picks {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.work-file-picks--wide { gap: 8px; }
.work-file-pick {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 3px 8px;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    font-size: var(--fs-small);
    color: #475569;
}
.work-file-pick--lg {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    gap: 5px;
    flex: 1;
    justify-content: center;
}
.work-file-pick input { display: none; }
.work-file-pick svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke-width: 2;
}
.work-file-pick--word svg { stroke: #2b579a; }
.work-file-pick--pdf svg { stroke: #c4161c; }
.work-file-pick--lg svg { width: 18px; height: 18px; }

.work-upload-status { font-size: var(--fs-small); margin-top: 3px; min-height: 14px; }
.work-upload-status--lg { font-size: 12px; margin-top: 6px; min-height: 16px; }
.work-upload-block { margin-top: 10px; }
.work-rev-links { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.work-rev-link {
    font-size: var(--fs-small);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.work-rev-link svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.work-rev-link--word { color: #2b579a; }
.work-rev-link--pdf { color: #c4161c; }

.work-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.work-summary-head .work-section-title { margin: 0; }
.work-summary-meta { font-size: 12px; color: #475569; margin: 4px 0 0; }
.work-summary-meta strong { color: #0f766e; }
.work-summary-revs { margin-top: 12px; }
.work-summary-revs-list { display: grid; gap: 10px; margin-top: 6px; }
.work-summary-rev-card {
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}
.work-summary-rev-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.work-summary-rev-title { font-size: 12px; color: #b45309; }
.work-summary-deadline { font-size: var(--fs-small); color: #78716c; margin: 4px 0 0; }

.work-upload-form .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.work-upload-form .p-btn { margin-top: 8px; }
.work-preparing {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}
.work-preparing svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
    animation: spin-upload 1.2s linear infinite;
}
.work-hint { margin: 0; font-size: 12px; color: #94a3b8; }
.work-muted { font-size: var(--fs-small); color: #64748b; }
.work-muted--ok { color: #166534; }
.work-status-locked { font-size: var(--fs-small); color: #64748b; margin: 4px 0 0; }
.work-status-blocked { font-size: 12px; color: #b91c1c; font-weight: 600; }

/* ── Revision file icon upload bar ─────────────────────────────── */
.rev-upload-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rev-upload-wrap {
    display: block;
    margin-top: 4px;
}
.rev-upload-hint {
    margin: 6px 0 0;
    font-size: var(--fs-small);
    line-height: 1.5;
    color: #64748b;
}
.rev-upload-grace {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.rev-upload-grace.is-locked {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}
.rev-upload-grace-countdown {
    font-weight: 700;
    direction: ltr;
    unicode-bidi: embed;
}
.rev-upload-wrap--locked .rev-upload-bar {
    margin-bottom: 0;
}
.portal-file-stamp {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
}
.portal-file-stamp-who {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0;
}
.portal-file-stamp-when {
    font-weight: 600;
}
.rev-upload-status-text {
    display: block;
    font-size: var(--fs-small);
    color: #64748b;
    margin-bottom: 6px;
}
.rev-upload-status-text--inline {
    display: inline;
    margin-bottom: 0;
}
.rev-files-cell,
.rev-upload-cell,
.rev-participant-cell {
    vertical-align: middle;
}
.rev-file-slot { display: inline-flex; }
.rev-file-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
    text-decoration: none;
    color: inherit;
    padding: 0;
}
.rev-file-icon input { display: none; }
.rev-file-icon__main,
.rev-file-icon__spin,
.rev-file-icon__check {
    width: 20px;
    height: 20px;
}
.rev-file-icon__main.rev-file-icon__type {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.rev-file-icon__spin,
.rev-file-icon__check {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    pointer-events: none;
}
.rev-file-icon--word.is-pick { background: #f0f6fc; border-color: #b4cce4; }
.rev-file-icon--pdf.is-pick { background: #fef2f2; border-color: #fecaca; }
.rev-file-icon--word.is-filled { background: #eff6ff; border-color: #93c5fd; }
.rev-file-icon--pdf.is-filled { background: #fef2f2; border-color: #fca5a5; }
.rev-file-icon.is-pick {
    border-style: dashed;
}
.rev-file-icon.is-pick:hover {
    border-color: #0d9488;
    transform: translateY(-1px);
}
.rev-file-icon.is-pick.is-slot-disabled,
.rev-file-icon.is-pick.is-slot-disabled:hover {
    cursor: not-allowed;
    transform: none;
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
    border-color: #e2e8f0;
}
.rev-file-icon--word.is-pick:hover { background: #e8f1fb; }
.rev-file-icon--pdf.is-pick:hover { background: #fee2e2; }
.rev-file-icon.is-filled {
    border-style: solid;
}
.rev-file-icon.is-linked {
    border-color: #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.rev-file-icon--word.is-linked:hover { border-color: #2b579a; box-shadow: 0 0 0 2px rgba(43, 87, 154, .15); }
.rev-file-icon--pdf.is-linked:hover { border-color: #e5252a; box-shadow: 0 0 0 2px rgba(229, 37, 42, .12); }
.rev-file-icon.is-uploading .rev-file-icon__main { opacity: 0; }
.rev-file-icon.is-uploading .rev-file-icon__spin {
    opacity: 1;
    animation: spin-upload 1s linear infinite;
    stroke: #0d9488;
}
.rev-file-icon.is-success .rev-file-icon__main { opacity: 0; }
.rev-file-icon.is-success .rev-file-icon__check {
    opacity: 1;
    stroke: #16a34a;
}
.rev-work-table td:last-child { min-width: 96px; }

@media (max-width: 640px) {
    .work-upload-form .field-grid { grid-template-columns: 1fr; }
    .rev-file-icon { width: 44px; height: 44px; }
    .rev-file-icon__main.rev-file-icon__type { width: 30px; height: 30px; }
    .rev-file-icon__main,
    .rev-file-icon__spin,
    .rev-file-icon__check { width: 22px; height: 22px; }
}

.p-portal-toast {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 10000;
    padding: 10px 18px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: var(--fs-ui);
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    max-width: min(92vw, 420px);
    text-align: center;
}
.p-portal-toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
.p-portal-toast.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.p-upload-ok { color: #166534; font-weight: 600; font-size: var(--fs-small); }
.p-upload-err { color: #b91c1c; font-size: var(--fs-small); }
.p-upload-pending { color: #0f766e; font-size: var(--fs-small); }
.role-decline-panel { display: none; margin-top: 8px; }
.role-decline-panel.is-open { display: block; }

/* ── Companions ─────────────────────────────────────────────── */
.p-companion-manager { display: flex; flex-direction: column; gap: 12px; }
.p-companion-empty { margin: 0; font-size: 12px; color: #94a3b8; }
.p-companion-list { display: flex; flex-direction: column; gap: 8px; }
.p-companion-priority-hint {
    margin: 0 0 4px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}
.comp-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.comp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    flex-wrap: wrap;
}
.comp-card-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.comp-card-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.comp-card-rel { font-size: var(--fs-small); color: #94a3b8; }
.comp-card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.comp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.comp-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #0f766e;
    font-weight: 800;
    font-size: 15px;
}
.comp-avatar--preview { width: 48px; height: 48px; }
.comp-edit-panel { display: none; padding: 12px; border-top: 1px solid #f1f5f9; background: #fafafa; }
.comp-edit-panel.is-open { display: block; }
details.comp-card > summary,
details.member-companion-add-card > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    display: flex;
}
details.comp-card > summary::-webkit-details-marker,
details.member-companion-add-card > summary::-webkit-details-marker {
    display: none;
}
details.comp-card[open] > .comp-edit-panel { display: block; }
details.member-companion-add-card:not([open]) > summary {
    border-bottom: 0;
}
.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;
}
.comp-card-data-ico svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
details.comp-card[open] .comp-card-data-ico { background: #dbeafe; }
.p-companion-add-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.p-companion-add-tab {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.p-companion-add-tab.is-active { background: #ecfdf5; border-color: #99f6e4; color: #0f766e; }
.p-saved-companion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.p-saved-companion-card {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}
.p-saved-companion-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comp-photo-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-companion-form-actions { margin-top: 10px; }
.p-companion-slots-head { display: flex; flex-direction: column; gap: 4px; }
.p-companion-slots-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.p-companion-slots { display: flex; flex-direction: column; gap: 10px; }
.p-companion-slot {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.p-companion-slot.is-next { border-color: #99f6e4; box-shadow: 0 0 0 3px rgba(13, 148, 136, .08); }
.p-companion-slot.is-waiting { background: #f8fafc; }
.p-companion-slot-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.p-companion-slot.is-next .p-companion-slot-head { background: #f0fdfa; }
.p-companion-slot-title { font-size: 13px; font-weight: 800; color: #334155; }
.p-companion-slot-body { padding: 10px 12px 12px; }
.p-companion-slot .comp-card { border: 0; background: transparent; }
.p-companion-slot .comp-card-head { padding: 0; }
.p-companion-slot-wait { margin: 0; font-size: 12px; color: #94a3b8; font-weight: 600; }
.p-companion-add-lead { margin: 0 0 10px; font-size: 12px; color: #0f766e; font-weight: 700; }
.p-companion-cov-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.p-companion-cov-flag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.p-companion-cov-flag.is-on {
    color: #0f766e;
    background: #ecfdf5;
    border-color: #99f6e4;
}
.p-companion-cov-flag:not(.is-on) {
    display: none;
}
.p-companion-cov-flags:not(:has(.is-on)) {
    display: none;
}
.p-companion-next-cov {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}
.p-companion-next-cov small {
    flex-basis: 100%;
    font-weight: 600;
    color: #64748b;
}

/* ── Profile review (account tab) ─────────────────────────────── */
.p-profile-review { display: flex; flex-direction: column; gap: 14px; }
.p-review-hero {
    display: flex;
    align-items: flex-start;
    gap: 16px 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 100%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
}
.p-review-hero-photo {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
}
.p-review-hero-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.p-review-hero-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.p-review-hero-who {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 2px;
    margin: 0;
    max-width: 100%;
}
.p-review-honorific {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f766e;
    line-height: 1.45;
    white-space: nowrap;
}
.p-review-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
}
.p-review-sub {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}
.p-review-hero-who .p-review-sub::before {
    content: "·";
    margin-inline-end: 8px;
    color: #94a3b8;
    font-weight: 800;
}
.p-review-hero-status {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}
.p-review-photo-consent {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: fit-content;
    max-width: 100%;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    overflow: hidden;
}
.p-review-photo-consent .badge-photo-consent {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #334155;
    max-width: none;
}
.p-review-photo-consent .p-review-icon-btn {
    flex-shrink: 0;
    width: 44px;
    min-height: 100%;
    height: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    border-inline-start: 1px solid #d1fae5;
}
.p-review-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #a7f3d0, 0 8px 20px rgba(15, 118, 110, .12);
    flex-shrink: 0;
    display: block;
}
.p-review-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f766e;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}
.p-review-alert {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-size: var(--fs-ui);
    color: #9a3412;
    line-height: 1.5;
}
.p-review-alert--same-city {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
    font-weight: 700;
}
.p-review-ready {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    max-width: 100%;
}
.p-review-ready svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-review-hint { margin: 4px 0 0; font-size: var(--fs-small); color: #94a3b8; line-height: 1.5; }
.p-review-hint--warn { color: #b45309; }
.p-review-sections--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}
.p-review-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.p-review-section.is-editing {
    border-color: #99f6e4;
    box-shadow: 0 4px 14px rgba(15, 118, 110, .1);
    overflow: visible;
    z-index: 2;
}
.p-card--account-review .p-review-section.is-editing {
    position: relative;
}
.p-review-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.p-review-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.p-review-section-head .p-card-icon { width: 28px; height: 28px; flex-shrink: 0; }
.p-review-section-head .p-card-icon svg { width: 14px; height: 14px; }
.p-review-section-actions { display: flex; gap: 4px; flex-shrink: 0; }
.p-review-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(245, 158, 11, 0.1); color: #92400e; font-size: 12px; line-height: 1.5; }
.p-review-hint-inline { margin: 6px 0 0; color: #64748b; font-size: 11px; line-height: 1.5; }
.p-review-leg { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 10px; border-bottom: 1px solid #f1f5f9; }
.p-review-leg:last-of-type { border-bottom: none; }
.p-review-leg .p-review-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    border-bottom: none;
    padding: 4px 0;
}
.p-review-leg .p-review-value {
    text-align: start;
    justify-self: start;
}
.p-review-value--date,
.p-review-leg .p-review-value--date {
    display: block;
    min-height: 22px;
    padding: 2px 0;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: start;
}
.p-review-date-text {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}
.p-review-row--nested { grid-template-columns: 48px minmax(0, 1fr); padding-inline-start: 8px; }
.p-review-row--nested .p-review-label { color: #94a3b8; font-weight: 600; }
.p-review-leg-airports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 6px; }
.p-review-fields--stack .p-review-leg-airports .p-review-field { grid-column: auto; }
.p-review-section.is-editing .p-review-leg-airports .combo-wrap { z-index: 6; }
.p-review-section.is-editing .p-review-leg-airports input { cursor: pointer; }
@media (max-width: 520px) {
    .p-review-leg-airports { grid-template-columns: 1fr; }
}
.p-review-alert--pending-travel {
    margin-top: 8px;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.p-travel-pending-diff {
    margin: 8px 0 0;
    padding: 0 18px;
    font-size: 12px;
    line-height: 1.6;
}
.p-review-section-title .st-chip {
    margin-inline-start: 8px;
    font-size: 11px;
    font-weight: 700;
}
.p-review-icon-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .15s, color .15s, border-color .15s;
}
.p-review-icon-btn:hover { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.p-review-icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-review-icon-btn--save { color: #0f766e; border-color: #99f6e4; background: #ecfdf5; }
.p-review-icon-btn--save:hover { background: #0f766e; color: #fff; }
.p-review-icon-btn--cancel:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.p-review-section-body { padding: 6px 12px 12px; flex: 1; }
.p-review-edit-actions { justify-content: flex-end; padding-top: 4px; border-top: 1px solid #f1f5f9; margin-top: 8px; }
.p-review-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.p-review-uploads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin: 4px 0 8px;
}
.p-review-upload { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p-review-upload .p-review-label { font-size: var(--fs-small); font-weight: 600; color: #64748b; }
.p-review-fields--stack { grid-template-columns: 1fr; }
.p-review-fields--stack .p-review-field { grid-column: 1 / -1; }
.p-review-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.p-review-field label { font-size: var(--fs-small); font-weight: 600; color: #64748b; }
.p-review-field input,
.p-review-field select,
.p-review-field textarea {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}
.p-review-field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.p-review-field input[type="date"],
.p-review-date-input {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 10px;
    padding-inline-end: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    font-size: 12px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    line-height: 34px;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    writing-mode: horizontal-tb;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}
.p-review-field input[type="date"]::-webkit-datetime-edit,
.p-review-field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.p-review-field input[type="date"]::-webkit-date-and-time-value,
.p-review-date-input::-webkit-datetime-edit,
.p-review-date-input::-webkit-datetime-edit-fields-wrapper,
.p-review-date-input::-webkit-date-and-time-value {
    display: inline-flex;
    flex-direction: row;
    direction: ltr;
    unicode-bidi: isolate;
    align-items: center;
    height: 34px;
    max-height: 34px;
    min-width: 0;
    padding: 0;
    line-height: 34px;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
}
.p-review-field input[type="date"]::-webkit-inner-spin-button,
.p-review-date-input::-webkit-inner-spin-button {
    display: none;
}
.p-review-field input[type="date"]::-webkit-calendar-picker-indicator,
.p-review-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.72;
}
.p-review-leg .p-review-field input[type="date"],
.p-review-leg .p-review-date-input {
    width: min(100%, 200px);
    max-width: 200px;
    align-self: start;
}
.p-review-field--full { grid-column: 1 / -1; }
.p-review-field input[type="file"] { padding: 4px; font-size: var(--fs-small); }
.p-review-field:nth-child(1):nth-last-child(1),
.p-review-field:nth-child(odd):last-child { grid-column: 1 / -1; }
.p-review-row {
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    gap: 8px 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: var(--fs-small);
    align-items: baseline;
}
.p-review-row:last-child { border-bottom: none; }
.p-review-row.is-missing { background: #fffbeb; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 4px; }
.p-review-label { color: #64748b; flex-shrink: 0; }
.p-review-row[data-field="job_title"] .p-review-label,
.p-review-row[data-field="title_prefix"] .p-review-label,
.p-review-field label:has(.i18n-en-btn),
.field > label:has(.i18n-en-btn) {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.p-review-label .i18n-en-btn,
.p-review-field .i18n-en-btn,
.field > label .i18n-en-btn {
    width: 22px;
    min-width: 22px;
    padding: 0;
    flex-shrink: 0;
}
.p-review-value { color: #1e293b; font-weight: 600; text-align: left; word-break: break-word; }
.p-review-value.is-empty { color: #cbd5e1; font-weight: 500; }
.p-review-value--ltr,
.p-review-value[dir="ltr"],
.p-review-field input[name="english_name_passport"],
input[name="english_name_passport"] {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}
.p-review-file-link { color: #0d9488; font-weight: 700; text-decoration: none; }
.p-review-file-link:hover { text-decoration: underline; }
.p-card--account-review {
    overflow: visible;
}
.p-card--account-review .p-card-head {
    border-radius: 12px 12px 0 0;
}
.p-card--account-review .p-card-body { padding: 14px 16px 16px; overflow: visible; }
.p-card-footer--confirm {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}
.p-card-footer--confirm .work-hint {
    margin: 0;
    max-width: 520px;
}
.p-consent-footer-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: min(100%, 520px);
    margin: 0;
}
.p-review-photo-consent--footer {
    width: 100%;
    max-width: none;
}
.p-review-photo-consent--footer .badge-photo-consent {
    width: 100%;
    text-align: start;
}
.p-consent-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    font-weight: 800;
}
.p-consent-save-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-confirm-profile-form {
    display: flex;
    justify-content: center;
    width: 100%;
}
.p-btn--confirm-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(100%, 340px);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 118, 110, .22);
    gap: 10px;
    text-align: center;
}
.p-btn--confirm-profile svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.p-phone-wrap {
    display: flex;
    align-items: stretch;
    direction: ltr;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}
.p-phone-plus {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    font-size: 13px;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.p-phone-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
    min-width: 0;
    direction: ltr;
    text-align: left;
}
.p-review-value--tel {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}
.p-passport-thumb-btn {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
    line-height: 0;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.p-passport-thumb-btn:hover {
    border-color: #99f6e4;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .12);
}
.p-passport-thumb {
    display: block;
    width: 96px;
    height: 64px;
    object-fit: contain;
    background: #f8fafc;
}
.p-passport-thumb-btn--pdf {
    min-width: 96px;
}
.p-passport-pdf-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 96px;
    height: 64px;
    color: #b91c1c;
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
    font-size: var(--fs-small);
    font-weight: 700;
}
.p-passport-pdf-thumb svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.p-lightbox {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.p-lightbox.is-open {
    display: flex;
}
.p-lightbox[hidden] {
    display: none !important;
}
.p-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .78);
    cursor: zoom-out;
}
.p-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;
}
.p-lightbox.is-pdf .p-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, .35);
}
.p-lightbox img.p-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, .35);
    background: transparent;
}
.p-lightbox-img[hidden],
.p-lightbox-frame[hidden] {
    display: none !important;
}
.p-lightbox-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.p-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, .2);
    z-index: 2;
}
body.p-lightbox-open {
    overflow: hidden;
}
@media (max-width: 720px) {
    .p-review-sections--grid { grid-template-columns: 1fr; }
    .p-review-fields { grid-template-columns: 1fr; }
    .p-review-uploads { grid-template-columns: 1fr; }
    .p-review-row { grid-template-columns: 1fr; gap: 2px; }
    .p-review-value { text-align: right; }
    .p-review-value--ltr,
    .p-review-value[dir="ltr"],
    .p-review-field input[name="english_name_passport"],
    input[name="english_name_passport"] {
        text-align: left;
        direction: ltr;
        unicode-bidi: isolate;
    }
    .p-review-hero { padding: 14px; gap: 12px; }
    .p-review-photo { width: 72px; height: 72px; }
    .p-review-name { font-size: 16px; }
    .p-review-photo-consent { max-width: 100%; }
}

@media (max-width: 640px) {
    .p-portal-tab { padding: 7px 10px; font-size: var(--fs-ui); }
}

/* شارة صغيرة: منسوخ من الجواز — بدون 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;
    vertical-align: 1px;
    white-space: nowrap;
    cursor: help;
    width: auto !important;
    height: auto !important;
}
.passport-from-mark svg {
    display: none !important;
}
.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,
.p-btn.is-passport-expiry-blocked,
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;
}

img.pal-existing-passport,
img.passport-existing-thumb {
    display: block;
    width: 160px;
    height: 110px;
    max-width: 160px;
    margin-top: 10px;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}
.passport-upload-preview img.pal-existing-passport,
.passport-upload-preview img.passport-existing-thumb {
    margin-top: 0;
    border: 0;
    border-radius: 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;
    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; }

/* قفل مقياس البوابة — أزرار وإشعارات وتنبيهات موحّدة مع الإدارة */
.p-btn,
.p-btn-sm {
    font-size: var(--fs-button, 14px) !important;
}
.p-alert,
.p-portal-toast,
.p-review-alert {
    font-size: var(--fs-ui, 14px) !important;
}
.notif-title {
    font-size: var(--fs-ui, 14px) !important;
}
.notif-text {
    font-size: var(--fs-table, 13px) !important;
}
.notif-time {
    font-size: var(--fs-small, 12px) !important;
}
.p-card-title {
    font-size: var(--fs-section, 15px);
}
.p-portal-tab {
    font-size: var(--fs-ui, 14px) !important;
}

/* ── رابط تحديث البيانات (جلسة محدودة) ───────────────────────── */
.pal-topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.admin-topbar .pal-top-close {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}
.admin-topbar .pal-top-close:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}
.pal-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.pal-file-field {
    position: relative;
}
input.pal-email-ltr {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}
.pal-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pal-file-actions .p-btn {
    min-height: 42px;
    touch-action: manipulation;
}
.pal-file-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}
.badge-photo-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}
.badge-photo-consent input {
    width: auto;
    margin: 3px 0 0;
}
.pal-file-hint--camera {
    color: #0f766e;
}
.pal-pending-grid {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 4px 10px;
    font-size: 12px;
}
.pal-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ── مسار السفر المطلوب في تحديث البيانات ─────────────────── */
.profile-travel-card {
    overflow: visible;
}
.profile-travel-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profile-travel-section,
.profile-travel-rsvp,
.profile-travel-status {
    border-radius: 14px;
    padding: 14px 14px 12px;
}
.profile-travel-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.profile-travel-section--companions {
    background: #fff;
}
.profile-travel-section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.profile-travel-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}
.profile-travel-section-hint {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: #64748b;
}
.profile-travel-step {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.profile-travel-step--alert {
    background: #d97706;
}
.profile-travel-rsvp {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 72%);
    border: 1px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.08);
}
.profile-travel-rsvp-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #b45309;
}
.profile-travel-rsvp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
}
.profile-travel-rsvp-text {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #475569;
}
.profile-travel-rsvp-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 0 12px;
}
.profile-travel-rsvp-roles span {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}
.profile-travel-rsvp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.profile-travel-rsvp-actions .p-btn {
    min-height: 44px;
    justify-content: center;
    font-weight: 800;
}
.profile-travel-rsvp-decline {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.profile-travel-rsvp-decline.is-open {
    display: block;
}
.profile-travel-rsvp-decline-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #991b1b;
}
.profile-travel-rsvp-decline textarea {
    width: 100%;
    min-height: 68px;
    padding: 9px 10px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    resize: vertical;
    background: #fff;
    box-sizing: border-box;
}
.profile-travel-rsvp-decline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.profile-travel-status {
    border: 1px solid #e2e8f0;
}
.profile-travel-status strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.profile-travel-status p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
}
.profile-travel-status--accepted {
    background: #f0fdf4;
    border-color: #86efac;
}
.profile-travel-status--accepted strong {
    color: #166534;
}
.profile-travel-status--declined {
    background: #fef2f2;
    border-color: #fecaca;
}
.profile-travel-status--declined strong {
    color: #991b1b;
}
.profile-travel-card .profile-route-pair {
    background: #fff;
    padding: 2px 0 0;
}
@media (max-width: 640px) {
    .profile-travel-rsvp-actions {
        grid-template-columns: 1fr;
    }
    .profile-travel-rsvp-actions .p-btn,
    .profile-travel-rsvp-decline-actions .p-btn {
        width: 100%;
        justify-content: center;
    }
}
html.pal-profile-only,
body.pal-profile-only {
    overflow-x: clip;
}
@media (max-width: 768px) {
    .pal-file-actions {
        flex-direction: column;
    }
    .pal-file-actions .p-btn {
        width: 100%;
        justify-content: center;
    }
    .pal-pending-grid {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }
    .pal-pending-grid .pal-pending-old {
        text-decoration: line-through;
    }
    .pal-form-actions {
        position: static;
        margin: 16px 0 0;
        padding: 12px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .pal-form-actions .p-btn {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }
    .admin-content .field input[type="text"],
    .admin-content .field input[type="email"],
    .admin-content .field input[type="date"],
    .admin-content .field input[type="tel"],
    .admin-content .field select,
    .admin-content .field textarea {
        font-size: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .passport-upload-preview-btn,
    .passport-upload-preview-img,
    .profile-upload-preview {
        max-width: 100%;
    }
    .passport-upload-preview-img {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 110px;
    }
    body.pal-profile-only .admin-sidebar {
        padding-top: calc(24px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
    body.pal-profile-only .admin-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}
@media (max-width: 640px) {
    body.pal-profile-only .top-datetime {
        display: none;
    }
    .pal-file-hint--camera {
        display: block;
    }
}

/* ── صفحة إغلاق رابط تحديث البيانات ─────────────────────────── */
html.pal-closed,
html.pal-closed body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
.pal-closed-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(32px + env(safe-area-inset-top, 0px)) 24px calc(28px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(255, 255, 255, 0.16), transparent 55%),
        radial-gradient(900px 500px at 110% 110%, rgba(6, 78, 59, 0.55), transparent 50%),
        linear-gradient(165deg, #0f766e 0%, #0d9488 42%, #115e59 100%);
}
.pal-closed-center {
    position: relative;
    z-index: 1;
    width: min(100%, 640px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pal-closed-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 28px;
    padding: 12px;
    margin: 0 0 18px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
.pal-closed-center .brand-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}
.pal-closed-center .brand-title--image {
    margin: 0;
}
.pal-closed-center .brand-title-img {
    max-width: min(100%, 320px);
    max-height: 58px;
    filter: brightness(0) invert(1);
}
.pal-closed-org {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
}
.pal-closed-rule {
    display: block;
    width: 64px;
    height: 2px;
    margin: 28px 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
}
.pal-closed-msg {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: #fff;
}
.pal-closed-lead {
    margin: 0;
    max-width: 34em;
    font-size: 16px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.86);
}
.pal-closed-foot {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}
.pal-closed-foot a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}
.pal-closed-foot a:hover {
    color: #fff;
    text-decoration: underline;
}
@media (max-width: 640px) {
    .pal-closed-logo {
        width: 80px;
        height: 80px;
        border-radius: 22px;
    }
    .pal-closed-msg {
        font-size: 24px;
    }
    .pal-closed-lead {
        font-size: 15px;
    }
}

html.has-impersonation-bar,
body.has-impersonation-bar {
    padding-top: 52px;
}
.impersonation-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #134e4a 0%, #0f766e 58%, #115e59 100%);
    color: #ecfdf5;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.impersonation-bar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.impersonation-bar-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.impersonation-bar-mark svg {
    width: 16px;
    height: 16px;
    stroke: #99f6e4;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.impersonation-bar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #ccfbf1;
    color: #115e59;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,.25);
}
.impersonation-bar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.impersonation-bar-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.impersonation-bar-copy strong {
    font-size: 12px;
    font-weight: 800;
    color: #99f6e4;
    letter-spacing: .02em;
}
.impersonation-bar-copy span {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.impersonation-bar-back {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #134e4a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}
.impersonation-bar-back:hover {
    background: #ccfbf1;
}
@media (max-width: 640px) {
    html.has-impersonation-bar,
    body.has-impersonation-bar {
        padding-top: 64px;
    }
    .impersonation-bar {
        min-height: 64px;
        align-items: flex-start;
        padding-top: 10px;
    }
    .impersonation-bar-copy span {
        white-space: normal;
    }
}
@media (max-width: 900px) {
    html.has-impersonation-bar .admin-sidebar,
    body.has-impersonation-bar .admin-sidebar {
        top: 52px;
    }
}
@media (max-width: 640px) {
    html.has-impersonation-bar .admin-sidebar,
    body.has-impersonation-bar .admin-sidebar {
        top: 64px;
    }
}

.p-travel-card--pre-arrival .p-card-head {
    align-items: flex-start;
}
.p-pre-arrival {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.p-pre-arrival-when {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}
.p-pre-arrival-when span {
    color: #64748b;
    font-size: 13px;
}
.p-pre-arrival-when strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
    text-align: end;
    overflow-wrap: anywhere;
}
.p-pre-arrival-open {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    text-decoration: none;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}
.p-pre-arrival-wait {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.5;
}
.p-pre-arrival-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}
.p-pre-arrival-form label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.p-pre-arrival-form input[type="text"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 16px;
}
.p-pre-arrival-form .btn {
    width: 100%;
    min-height: 46px;
}
.p-travel-card--visa {
    position: relative;
}
.p-visa-upload-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 4;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.82);
    color: #0f766e;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    padding: 16px;
}
.p-travel-card--visa.is-uploading .p-visa-upload-overlay {
    display: flex;
}
.p-travel-card--visa [hidden] {
    display: none !important;
}
.p-visa-upload-spinner {
    width: 38px;
    height: 38px;
    animation: spin-upload 1s linear infinite;
}
.p-visa-files {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.p-visa-upload-btn {
    position: relative;
    width: 100%;
    min-height: 48px;
    cursor: pointer;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
}
.p-visa-upload-btn input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.p-visa-upload-btn.is-busy {
    opacity: .7;
    pointer-events: none;
}
.p-visa-files .file-pill {
    justify-content: center;
    min-height: 44px;
}
@media (min-width: 641px) {
    .p-visa-files {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .p-visa-upload-btn {
        width: auto;
        min-width: 180px;
    }
}
@media (max-width: 640px) {
    .p-travel-card--pre-arrival .p-card-head {
        align-items: stretch;
    }
    .p-travel-card--pre-arrival .st-chip {
        align-self: flex-start;
    }
    .p-pre-arrival-when {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .p-pre-arrival-when strong {
        text-align: start;
    }
}
@media (min-width: 641px) {
    .p-pre-arrival-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        column-gap: 8px;
    }
    .p-pre-arrival-form label {
        grid-column: 1 / -1;
    }
    .p-pre-arrival-form .btn {
        width: auto;
        min-width: 128px;
    }
}

/* التأشيرة يمينًا والتسجيل قبل الوصول يسارًا من عرض التابلت. الجوال: التأشيرة ثم التسجيل. */
.p-travel-pair {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.p-travel-pair > .p-card {
    margin: 0;
    min-width: 0;
}
@media (min-width: 768px) {
    .p-travel-pair--both {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        align-items: stretch;
    }
    .p-travel-pair--both > .p-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .p-travel-pair--both > .p-card > .p-card-body {
        flex: 1 1 auto;
    }
    .p-travel-pair--both > .p-card > .p-card-footer {
        margin-top: auto;
    }
    .p-travel-pair--both .p-card-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .p-travel-pair--both .p-card-head-info {
        flex: 1 1 180px;
    }
    .p-travel-pair--both .kv-value {
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: end;
    }
    .p-travel-pair--both .p-pre-arrival-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .p-travel-pair--both .p-pre-arrival-form .btn {
        width: 100%;
    }
    .p-travel-pair--both .p-visa-files {
        flex-direction: column;
        align-items: stretch;
    }
    .p-travel-pair--both .p-visa-upload-btn {
        width: 100%;
    }
}

/* ── Language switcher (participant portal) ─────────────────── */
.ui-lang {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    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: rgba(255, 255, 255, 0.45);
    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;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}
.ui-lang-btn[lang="en"] { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
.ui-lang-btn:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.12); }
.ui-lang-btn.is-on {
    background: #fff;
    color: #274f4c;
}
.auth-page .ui-lang,
.evl-brand .ui-lang,
.pub-navbar .ui-lang,
.pal-closed-page .ui-lang {
    background: #fff;
    border-color: #e2e8f0;
}
.auth-page .ui-lang-sep,
.pub-navbar .ui-lang-sep,
.pal-closed-page .ui-lang-sep,
.evl-brand .ui-lang-sep {
    color: #94a3b8;
}
.auth-page .ui-lang-btn,
.pub-navbar .ui-lang-btn,
.pal-closed-page .ui-lang-btn,
.evl-brand .ui-lang-btn {
    color: #64748b;
}
.auth-page .ui-lang-btn.is-on,
.pub-navbar .ui-lang-btn.is-on,
.pal-closed-page .ui-lang-btn.is-on,
.evl-brand .ui-lang-btn.is-on {
    background: #0d9488;
    color: #fff;
}
.ui-lang.ui-lang--words .ui-lang-btn,
.ui-lang.ui-lang--words .ui-lang-sep {
    order: 0;
}
.auth-page .ui-lang--words,
.pal-closed-page .ui-lang--words {
    padding: 3px;
    gap: 1px;
    background: rgba(255, 255, 255, .92);
    border-color: rgba(15, 118, 110, .16);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06), inset 0 1px 0 #fff;
}
.auth-page .ui-lang--words .ui-lang-btn,
.pal-closed-page .ui-lang--words .ui-lang-btn,
.pub-legal .ui-lang--words .ui-lang-btn {
    min-width: 0;
    height: 26px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
}
.auth-page .ui-lang--words .ui-lang-btn[lang="en"],
.pal-closed-page .ui-lang--words .ui-lang-btn[lang="en"],
.pub-legal .ui-lang--words .ui-lang-btn[lang="en"] {
    font-family: inherit;
    font-size: 11px;
    letter-spacing: .05em;
}
.auth-page .ui-lang--words .ui-lang-sep,
.pal-closed-page .ui-lang--words .ui-lang-sep,
.pub-legal .ui-lang--words .ui-lang-sep {
    width: auto;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 600;
}
.auth-page .ui-lang--words .ui-lang-btn.is-on,
.pal-closed-page .ui-lang--words .ui-lang-btn.is-on {
    background: #0f766e;
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 118, 110, .28);
}
.pub-legal .ui-lang--words {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.pub-legal .ui-lang--words .ui-lang-btn { color: rgba(255, 255, 255, .84); }
.pub-legal .ui-lang--words .ui-lang-sep { color: rgba(255, 255, 255, .45); }
.pub-legal .ui-lang--words .ui-lang-btn.is-on {
    background: #fff;
    color: #1f4f4c;
}
.auth-brand .ui-lang { margin-top: 12px; }
html[dir="ltr"] .ev-row-chevron svg,
html[dir="ltr"] .p-btn-back svg {
    transform: scaleX(-1);
}
@media (max-width: 720px) {
    .ui-lang-btn { min-width: 26px; height: 26px; padding: 0 6px; font-size: 12px; }
    .ui-lang--words .ui-lang-btn { min-width: 0; height: 24px; padding: 0 8px; font-size: 10.5px; }
}

/* ── English (LTR) participant portal ───────────────────────── */
html[dir="ltr"] body { text-align: start; }
html[dir="ltr"] .overview-title,
html[dir="ltr"] .p-card-title,
html[dir="ltr"] .p-card-subtitle,
html[dir="ltr"] .auth-form-title,
html[dir="ltr"] .auth-form-subtitle,
html[dir="ltr"] .ev-list-hero-title,
html[dir="ltr"] .ev-list-hero-sub,
html[dir="ltr"] .ev-list-rest-title,
html[dir="ltr"] .invite-section-label {
    text-align: start;
}
html[dir="ltr"] .ev-row-chevron svg {
    transform: scaleX(-1);
}
html[dir="ltr"] .p-portal-tabs,
html[dir="ltr"] .p-portal-tab,
html[dir="ltr"] .p-journey-step,
html[dir="ltr"] .p-stepper-wrap {
    pointer-events: auto;
    position: relative;
    z-index: 5;
}
html[dir="ltr"] .p-portal-tab {
    text-align: start;
}
html[dir="ltr"] .i18n-en-btn { margin-inline-start: 8px; }
html[dir="ltr"] .auth-brand .ui-lang { margin-top: 12px; }

.q-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-inline-start: 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

@media (max-width: 900px) {
    html[dir="ltr"] .admin-sidebar {
        left: 0;
        right: auto;
        transform: translate3d(-100%, 0, 0);
        -webkit-transform: translate3d(-100%, 0, 0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    html[dir="ltr"] body.sidebar-open .admin-sidebar {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.65;
    font-weight: 500;
}

/* ── Participant home (latest event spotlight) ──────────────── */
.phome {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.phome > .p-alert {
    margin: 0;
}
.phome-hero {
    position: relative;
    overflow: hidden;
    align-items: center;
    gap: 18px;
    margin-bottom: 0;
    padding: 22px 24px;
    border-radius: 20px;
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(255, 255, 255, .16), transparent 52%),
        radial-gradient(70% 120% at 0% 100%, rgba(15, 23, 42, .18), transparent 48%),
        linear-gradient(135deg, #115e59 0%, #0d9488 46%, #0f766e 100%);
    box-shadow: 0 16px 36px rgba(13, 148, 136, .22);
}
.phome-hero::before,
.phome-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.phome-hero::before {
    width: 180px;
    height: 180px;
    inset-inline-end: -48px;
    top: -64px;
    background: rgba(255, 255, 255, .08);
}
.phome-hero::after {
    width: 120px;
    height: 120px;
    inset-inline-start: 38%;
    bottom: -70px;
    background: rgba(15, 23, 42, .12);
}
.phome-hero-avatar {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    font-size: 22px;
    border: 2px solid rgba(255, 255, 255, .38);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}
.phome-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
}
.phome-hero-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .78;
}
.phome-hero h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
}
.phome-hero p {
    margin: 0;
    max-width: 52ch;
    font-size: 13.5px;
    line-height: 1.6;
    opacity: .9;
}
.phome-hero-stat {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    min-width: 92px;
    padding: 12px 14px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    transition: background .15s ease, transform .15s ease;
}
.phome-hero-stat:hover {
    background: rgba(255, 255, 255, .22);
    transform: translateY(-1px);
}
.phome-hero-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}
.phome-hero-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    opacity: .86;
    line-height: 1.3;
}
.phome-spotlight {
    background: #fff;
    border: 1px solid #ccfbf1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}
.phome-spot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 18px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(13, 148, 136, .14), transparent 55%),
        linear-gradient(180deg, #f0fdfa 0%, #ffffff 72%);
}
.phome-spot-copy {
    min-width: 0;
    flex: 1;
}
.phome-kicker {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0f766e;
}
.phome-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.025em;
    line-height: 1.3;
}
.phome-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.phome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.phome-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    line-height: 1.45;
}
.phome-meta-item svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #0d9488;
    flex-shrink: 0;
}
.phome-spot-cta {
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(13, 148, 136, .18);
}
.phome-action {
    margin: 0 22px 4px;
}
.phome-journey-wrap {
    padding: 4px 16px 8px;
}
.phome-journey {
    margin: 0;
    border-color: #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 46%);
}
.phome-roles,
.phome-letters {
    padding: 4px 22px 18px;
}
.phome-roles-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 20px;
    align-items: start;
    padding: 4px 22px 18px;
}
.phome-roles-split .phome-roles,
.phome-roles-split .phome-outcome {
    padding: 0;
}
.phome-outcome {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.phome-section-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #64748b;
}
.phome-role-cards {
    border-top: 0;
    padding: 0;
}
.phome .role-invite-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
.phome .role-invite-actions {
    justify-content: flex-end;
}
.phome .role-decline-panel {
    grid-column: 1 / -1;
    width: 100%;
}
.phome-letter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.phome-empty {
    margin: 0;
}
.phome-empty-cta {
    margin-top: 16px;
}
.phome-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.phome-section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.01em;
}
.phome-q-grid .q-card {
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.phome-q-grid .q-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(13, 148, 136, .1);
}

html[dir="ltr"] .phome-hero h2,
html[dir="ltr"] .phome-title,
html[dir="ltr"] .phome-section-title,
html[dir="ltr"] .phome-kicker,
html[dir="ltr"] .phome-hero-kicker,
html[dir="ltr"] .phome-section-label {
    text-align: start;
}

@media (max-width: 900px) {
    .participant-topbar .overview-title-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .phome-hero {
        flex-direction: column;
        align-items: stretch;
        text-align: start;
        padding: 20px 18px;
        gap: 14px;
    }
    .phome-hero-avatar {
        width: 56px;
        height: 56px;
    }
    .phome-hero h2 {
        font-size: 19px;
    }
    .phome-hero-stat {
        align-self: flex-start;
    }
    .phome-spot-head {
        flex-direction: column;
        padding: 18px 16px 14px;
    }
    .phome-title {
        font-size: 18px;
    }
    .phome-spot-cta {
        width: 100%;
        justify-content: center;
    }
    .phome-action,
    .phome-roles,
    .phome-letters,
    .phome-roles-split {
        margin-inline: 0;
        padding-inline: 16px;
    }
    .phome-roles-split,
    .invite-roles-split {
        grid-template-columns: 1fr;
    }
    .invite-outcome {
        padding: 0 16px 14px;
    }
    .phome-journey-wrap {
        padding-inline: 10px;
    }
    .phome .role-invite-card {
        grid-template-columns: 1fr;
    }
    .phome .role-invite-actions {
        justify-content: flex-start;
    }
}

@media print {
    .phome-hero::before,
    .phome-hero::after {
        display: none;
    }
}

/* ── Static pages: about, privacy, terms ────────────────────── */
html.static-pages { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html.static-pages { scroll-behavior: auto; }
}
.pub-legal {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(86, 158, 154, 0.16), transparent 55%),
        radial-gradient(680px 340px at 0% 110%, rgba(196, 163, 90, 0.1), transparent 50%),
        #eef4f3;
}
.pub-legal::before {
    content: "";
    position: fixed;
    inset: 0;
    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.045;
}
.pub-legal > * { position: relative; z-index: 1; }
.pub-legal-mast {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(to bottom, #4c9791 0%, #3e827d 42%, #2f6d69 100%);
}
.pub-legal-mast::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("/public/assets/hb-pattern.png?v=2");
    background-repeat: repeat;
    background-size: 520px 300px;
    opacity: 0.06;
    filter: brightness(0) invert(1);
}
.pub-legal-mast::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #c4a35a 18%, #e6d3a1 50%, #c4a35a 82%, transparent);
}
.pub-legal-mast-inner,
.pub-legal-tabs-inner {
    width: min(1100px, calc(100% - 32px));
    margin-inline: auto;
}
.pub-legal-mast-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 14px;
}
.pub-legal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.pub-legal-brand:hover { color: #fff; text-decoration: none; }
.pub-legal-logo {
    display: block;
    height: 58px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    background: transparent;
    flex-shrink: 0;
}
.pub-legal-brand .brand-title { margin: 0; }
.pub-legal-brand .brand-title-img {
    display: block;
    max-height: 46px;
    max-width: min(240px, 46vw);
    width: auto;
    height: auto;
    margin: 0;
    object-fit: contain;
    background: transparent;
    filter: brightness(0) invert(1);
}
.pub-legal-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
}
.pub-legal-sub {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
}
.pub-legal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.pub-legal-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.pub-legal-login svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pub-legal-login:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
    text-decoration: none;
}
.pub-legal-tabs {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(47, 109, 105, 0.1);
}
.pub-legal-tabs-inner {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.pub-legal-tabs-inner::-webkit-scrollbar { display: none; }
.pub-legal-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: 999px;
    color: #3d5552;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.pub-legal-tabs a svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pub-legal-tabs a:hover {
    background: #f3f8f7;
    color: #1f3a39;
    text-decoration: none;
}
.pub-legal-tabs a.is-active {
    background: #2f6d69;
    color: #fff;
}
.pub-legal-main {
    flex: 1;
    width: min(1100px, calc(100% - 32px));
    margin: 22px auto 8px;
}
.pub-legal-foot {
    margin-top: auto;
    padding: 8px 16px 26px;
    text-align: center;
}
.pub-legal-foot a {
    display: inline-block;
    margin: 4px 10px;
    color: #5d7370;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.pub-legal-foot a:hover { color: #2f6d69; }
.pub-legal-foot a.is-active { color: #1f3a39; }

.static-doc {
    max-width: 1100px;
    margin-inline: auto;
    background: #fff;
    border: 1px solid rgba(47, 109, 105, 0.08);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(31, 58, 57, 0.08);
    padding: 28px 32px 36px;
}
.static-doc-intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e7efee;
}
.static-doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eef6f5;
    color: #2f6d69;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.static-doc-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.static-doc-intro h1 {
    margin: 0;
    color: #1f3a39;
    font-size: 28px;
    line-height: 1.35;
    font-weight: 800;
}
.static-doc-sub {
    margin: 6px 0 0;
    color: #5d7370;
    font-size: 14.5px;
    line-height: 1.6;
}
.static-doc-meta {
    margin: 8px 0 0;
    color: #8aa09c;
    font-size: 12.5px;
    font-weight: 700;
}
.static-doc-grid.has-toc {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 8px 32px;
    align-items: start;
}
.static-doc-toc[hidden] { display: none !important; }
.static-doc-toc {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow: auto;
    padding-top: 2px;
}
.static-doc-toc-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    color: #8aa09c;
}
.static-doc-toc a {
    display: block;
    padding: 7px 10px;
    border-radius: 10px;
    border-inline-start: 2px solid transparent;
    color: #3d5552;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}
.static-doc-toc a:hover {
    background: #f7fbfb;
    color: #1f3a39;
    text-decoration: none;
}
.static-doc-toc a.is-active {
    background: #f4faf9;
    color: #1f3a39;
    border-inline-start-color: #c4a35a;
}
.static-body {
    min-width: 0;
    color: #243f3d;
    font-size: 16.5px;
    line-height: 1.95;
    overflow-wrap: break-word;
}
.static-body > p:first-of-type { font-size: 17.5px; }
.static-body h1,
.static-body h2,
.static-body h3,
.static-body h4 {
    color: #1f3a39;
    line-height: 1.45;
    scroll-margin-top: 84px;
}
.static-body h2 {
    position: relative;
    margin: 30px 0 12px;
    padding: 0 0 10px;
    font-size: 1.18rem;
    font-weight: 800;
    border-bottom: 1px solid #e4eeec;
}
.static-body h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    inset-inline-start: 0;
    width: 52px;
    height: 2px;
    background: #c4a35a;
}
.static-body h3 { margin: 20px 0 8px; font-size: 1.05rem; }
.static-body p { margin: 0 0 14px; }
.static-body a {
    color: #2f6d69;
    font-weight: 700;
    text-underline-offset: 3px;
}
.static-body ul,
.static-body ol {
    list-style: none;
    margin: 8px 0 18px;
    padding: 0;
    display: grid;
    gap: 8px;
}
.static-body li {
    margin: 0;
    padding: 12px 14px;
    background: #f7fbfb;
    border: 1px solid #e5efee;
    border-inline-start: 3px solid #3e827d;
    border-radius: 12px;
}
.static-body ul ul,
.static-body ol ol,
.static-body ul ol,
.static-body ol ul {
    margin: 8px 0 0;
    gap: 4px;
}
.static-body li li {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 3px 0;
    padding-inline-start: 16px;
}
.static-body li li::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8fb5b1;
    top: 0.72em;
    inset-inline-start: 0;
}
.static-body blockquote {
    margin: 14px 0;
    padding: 12px 16px;
    border-inline-start: 3px solid #c4a35a;
    border-radius: 0 12px 12px 0;
    background: #f8f6f1;
    color: #3d5552;
}
html[dir="ltr"] .static-body blockquote { border-radius: 12px 0 0 12px; }
.static-body hr {
    border: 0;
    height: 1px;
    margin: 26px 0;
    background: linear-gradient(to left, transparent, #d5e4e1 20%, #d5e4e1 80%, transparent);
}

@media (max-width: 980px) {
    .static-doc-grid.has-toc {
        grid-template-columns: 1fr;
        gap: 12px;
        min-width: 0;
    }
    .static-doc-toc {
        position: sticky;
        top: 58px;
        z-index: 4;
        flex-direction: row;
        align-items: center;
        max-height: none;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        gap: 8px;
        margin: 0;
        padding: 0 0 4px;
        background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
    }
    .static-doc-toc-label { display: none; }
    .static-doc-toc-list {
        display: flex;
        flex: 1 1 auto;
        gap: 8px;
        min-width: 0;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 6px;
    }
    .static-doc-toc-list::-webkit-scrollbar { display: none; }
    .static-doc-toc a {
        white-space: nowrap;
        border: 1px solid #e5efee;
        border-inline-start-color: #e5efee;
        background: #f7fbfb;
        border-radius: 999px;
        padding: 7px 12px;
        font-size: 12.5px;
    }
    .static-doc-toc a.is-active {
        background: #2f6d69;
        border-color: #2f6d69;
        color: #fff;
    }
}
@media (max-width: 720px) {
    .pub-legal-mast-inner,
    .pub-legal-tabs-inner { width: min(1100px, calc(100% - 24px)); }
    .pub-legal-mast-inner { gap: 10px; padding: 14px 0 12px; }
    .pub-legal-logo { height: 46px; }
    .pub-legal-brand .brand-title-img { max-height: 38px; max-width: 150px; }
    .pub-legal-name { font-size: 14px; }
    .pub-legal-sub { display: none; }
    .pub-legal-login { padding: 7px 11px; font-size: 12px; }
    .pub-legal-login svg { display: none; }
    .pub-legal-tabs a { padding: 8px 12px; font-size: 12.5px; }
    .pub-legal-tabs a svg { display: none; }
    .pub-legal-main { width: min(1100px, calc(100% - 20px)); margin-top: 14px; }
    .static-doc { padding: 18px 16px 24px; border-radius: 18px; }
    .static-doc-intro { gap: 10px; }
    .static-doc-icon { width: 40px; height: 40px; border-radius: 12px; }
    .static-doc-icon svg { width: 20px; height: 20px; }
    .static-doc-intro h1 { font-size: 22px; }
    .static-doc-sub { font-size: 13.5px; }
    .static-body,
    .static-body > p:first-of-type { font-size: 15.5px; }
    .static-body h2 { font-size: 1.05rem; }
    .static-body li { padding: 10px 12px; }
    .static-doc-toc { display: none !important; }
}
@media print {
    .pub-legal { background: #fff !important; }
    .pub-legal::before,
    .pub-legal-mast,
    .pub-legal-tabs,
    .pub-legal-foot,
    .static-doc-toc { display: none !important; }
    .static-doc {
        max-width: none;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
}



