/* Portail Groupe — fiche organisation (4 sections unifiées) */

.ja-org-detail-page .fi-resource-relation-managers,
.ja-org-detail-page .fi-resource-infolist {
    --ja-org-pad-x: 0;
}

.ja-org-detail-page .fi-tabs-item-label {
    font-weight: 700;
    font-size: 0.82rem;
}

.ja-org-detail-page .fi-resource-relation-managers-tab {
    border-radius: 0.75rem;
}

.ja-org-detail {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Bandeau essai en attente ── */
.ja-org-detail__trial-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(249, 115, 22, 0.35);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(234, 88, 12, 0.08));
}

.ja-org-detail__trial-banner-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fdba74;
}

.ja-org-detail__trial-banner-text {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #fcd34d;
    line-height: 1.45;
}

.ja-org-detail__trial-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ja-org-detail__trial-banner-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.ja-org-detail__trial-banner-btn--success {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.ja-org-detail__trial-banner-btn--success:hover {
    background: rgba(34, 197, 94, 0.28);
}

.ja-org-detail__trial-banner-btn--danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.ja-org-detail__trial-banner-btn--danger:hover {
    background: rgba(239, 68, 68, 0.24);
}

html.fi:not(.dark) .ja-org-detail__trial-banner {
    border-color: rgba(249, 115, 22, 0.28);
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(254, 243, 199, 0.85));
}

html.fi:not(.dark) .ja-org-detail__trial-banner-title {
    color: #c2410c;
}

html.fi:not(.dark) .ja-org-detail__trial-banner-text {
    color: #9a3412;
}

/* ── Hero ── */
.ja-org-detail__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.42));
}

.ja-org-detail__hero-main {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.ja-org-detail__hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    background: rgba(124, 77, 255, 0.14);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.ja-org-detail__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
}

.ja-org-detail__subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.ja-org-detail__subtitle-sep {
    opacity: 0.5;
}

.ja-org-detail__hero-action {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(124, 77, 255, 0.12);
    color: #e9d5ff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}

.ja-org-detail__hero-action:hover {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(124, 77, 255, 0.22);
    color: #fff;
}

/* ── Stats ── */
.ja-org-detail__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .ja-org-detail__stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ja-org-detail__stat {
    min-height: 4.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(0, 0, 0, 0.16);
}

.ja-org-detail__stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.ja-org-detail__stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.15;
}

/* ── Sections ── */ */
.ja-org-detail__section-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
}

.ja-org-detail__section-head p {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.ja-org-detail__products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .ja-org-detail__products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ja-org-detail__product-card {
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(0, 0, 0, 0.18);
}

.ja-org-detail__product-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.75rem;
}

.ja-org-detail__product-name {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.ja-org-detail__product-detail {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.ja-org-detail__products--licenses {
    align-items: stretch;
}

.ja-org-detail__product-card--jaos {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .ja-org-detail__products--licenses {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ja-org-detail__product-card--jaos {
        grid-column: 1 / -1;
    }
}

.ja-org-jaos-modules {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ja-org-jaos-modules__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.ja-org-jaos-modules__title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.ja-org-jaos-modules__count-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #c4b5fd;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.22);
}

.ja-org-jaos-modules__tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.ja-org-jaos-modules__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(0, 0, 0, 0.14);
}

.ja-org-jaos-modules__item-main {
    display: flex;
    gap: 0.45rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.ja-org-jaos-modules__branch {
    flex: 0 0 auto;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
}

.ja-org-jaos-modules__item-body {
    flex: 1;
    min-width: 0;
}

.ja-org-jaos-modules__item-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.ja-org-jaos-modules__item-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
}

.ja-org-jaos-modules__item-price {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.ja-org-jaos-modules__item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.ja-orgs-hub__license-modules {
    display: block;
    width: 100%;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.35;
}

.ja-org-detail__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
}

@media (min-width: 768px) {
    .ja-org-detail__facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ja-org-detail__fact {
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(0, 0, 0, 0.12);
}

.ja-org-detail__fact dt {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.ja-org-detail__fact dd {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #e2e8f0;
}

.ja-org-detail__facts--billing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ja-org-detail__billing-breakdown {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.ja-org-detail__billing-breakdown li {
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(251, 191, 36, 0.18);
    background: rgba(251, 191, 36, 0.06);
    font-size: 0.78rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.ja-org-detail__billing-breakdown strong {
    color: #fde68a;
    font-weight: 800;
}

.ja-org-detail__billing-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ja-org-detail__billing-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(124, 77, 255, 0.18);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #ddd6fe;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ja-org-detail__billing-breakdown-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.ja-org-detail__billing-breakdown-main {
    flex: 1 1 auto;
}

.ja-org-detail__billing-toggle {
    flex: 0 0 auto;
    padding: 0.35rem 0.75rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.ja-org-detail__billing-toggle:hover {
    border-color: rgba(167, 139, 250, 0.45);
    color: #f8fafc;
}

.ja-org-detail__saas-invoices {
    margin-top: 0.85rem;
}

.ja-org-detail__saas-invoices--loading {
    opacity: 0.65;
    pointer-events: none;
}

.ja-org-detail__saas-invoices-table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.ja-org-detail__saas-invoices-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 0.78rem;
}

.ja-org-detail__saas-invoices-table th,
.ja-org-detail__saas-invoices-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: middle;
}

.ja-org-detail__saas-invoices-table th {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.18);
}

.ja-org-detail__invoice-status {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.ja-org-detail__invoice-status--unpaid {
    background: rgba(251, 146, 60, 0.16);
    color: #fdba74;
}

.ja-org-detail__invoice-status--paid {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.ja-org-detail__invoice-status--cancelled {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

.ja-org-detail__invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ja-org-detail__invoice-action {
    padding: 0.28rem 0.55rem;
    border-radius: 0.45rem;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.ja-org-detail__invoice-action--success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
    color: #86efac;
}

.ja-org-detail__invoice-action--muted {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.ja-org-detail__invoice-action--danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.ja-org-detail__notes {
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(0, 0, 0, 0.14);
}

.ja-org-detail__notes p {
    margin: 0;
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ja-org-detail__notes-empty {
    color: #64748b !important;
    font-style: italic;
}

/* ── Produits panel ── */
.ja-org-detail__panel-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #f8fafc;
}

.ja-org-detail__panel-head p {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.ja-org-detail__quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ja-org-detail__quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ja-org-detail__quick-action:hover {
    border-color: rgba(167, 139, 250, 0.35);
    color: #f8fafc;
}

.ja-org-detail__quick-action--trial {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.12);
    color: #e9d5ff;
}

.ja-org-detail__quick-action--danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.ja-org-detail__table-intro {
    padding-top: 0.25rem;
}

.ja-org-detail__table-intro h4 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    color: #e2e8f0;
}

.ja-org-detail__table-intro p {
    margin: 0.2rem 0 0;
    font-size: 0.76rem;
    color: #64748b;
}

.ja-org-detail__licenses-table .fi-ta-header,
.ja-org-detail__team-table .fi-ta-header {
    background: transparent;
}

/* ── Activité / timeline ── */
.ja-org-detail__activity-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ja-org-detail__activity-filter {
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.4);
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ja-org-detail__activity-filter:hover {
    color: #e2e8f0;
}

.ja-org-detail__activity-filter--active {
    border-color: rgba(124, 77, 255, 0.5);
    background: rgba(124, 77, 255, 0.16);
    color: #ede9fe;
}

.ja-org-detail__activity-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.86rem;
}

.ja-org-detail__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ja-org-detail__timeline-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.ja-org-detail__timeline-item:last-child {
    border-bottom: none;
}

.ja-org-detail__timeline-marker {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.ja-org-detail__timeline-item--success .ja-org-detail__timeline-marker {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.ja-org-detail__timeline-item--warning .ja-org-detail__timeline-marker {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.ja-org-detail__timeline-item--danger .ja-org-detail__timeline-marker {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.ja-org-detail__timeline-meta {
    display: grid;
    grid-template-columns: 5.75rem 2.85rem minmax(0, max-content);
    align-items: center;
    gap: 0.65rem;
    font-size: 0.68rem;
    color: #64748b;
}

.ja-org-detail__timeline-date,
.ja-org-detail__timeline-time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ja-org-detail__timeline-time {
    color: #94a3b8;
}

.ja-org-detail__timeline-category {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-weight: 700;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ja-org-detail__timeline-title {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.ja-org-detail__timeline-detail {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Page wrapper class via render hook */
body.fi-panel-group .fi-resource-view-record-page:has(.ja-org-detail) {
    /* marker */
}

html.fi:not(.dark) .ja-org-detail__hero,
html.fi:not(.dark) .ja-org-detail__stat,
html.fi:not(.dark) .ja-org-detail__product-card,
html.fi:not(.dark) .ja-org-detail__fact,
html.fi:not(.dark) .ja-org-detail__notes {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.08);
}

html.fi:not(.dark) .ja-org-detail__title,
html.fi:not(.dark) .ja-org-detail__stat-value,
html.fi:not(.dark) .ja-org-detail__section-head h3,
html.fi:not(.dark) .ja-org-detail__timeline-title {
    color: #0f172a;
}

.ja-org-detail__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ja-org-detail__stat-value--text {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.ja-org-detail__members-table .fi-ta-table {
    --col-gap: 0.75rem;
}

.ja-org-detail__members-table .fi-ta-header-cell,
.ja-org-detail__members-table .fi-ta-cell {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* ── Membres KPI header ── */
.ja-org-detail__members-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ja-org-detail__members-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ja-org-detail__members-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.55);
}

.ja-org-detail__members-kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.1;
}

.ja-org-detail__members-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.ja-org-detail__members-kpi-meta {
    font-size: 0.72rem;
    color: #64748b;
}

.ja-org-detail__members-kpi-dot,
.ja-org-detail__members-kpi-icon {
    font-size: 0.95rem;
    line-height: 1;
}

/* ── Member row avatar ── */
.ja-member-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ja-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(255, 154, 60, 0.25));
    color: #f8fafc;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ja-member-row__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ja-member-row__name {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 0.84rem;
}

.ja-member-row__email {
    font-size: 0.72rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ja-org-detail__product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin: 0.5rem 0 0;
    padding: 0;
}

.ja-org-detail__product-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ja-org-detail__product-meta dt {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.ja-org-detail__product-meta dd {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
}

/* ── Optional modules cards (admin) ── */
.ja-org-modules {
    display: grid;
    gap: 1rem;
}

.ja-org-modules__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.ja-org-modules__head p {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.ja-org-modules__notice {
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    font-size: 0.8125rem;
}

.ja-org-modules__grid {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 960px) {
    .ja-org-modules__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ja-org-modules__card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
}

.ja-org-modules__card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ja-org-modules__card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.ja-org-modules__price {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.ja-org-modules__description {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.ja-org-modules__meta {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.ja-org-modules__meta div {
    display: grid;
    gap: 0.1rem;
}

.ja-org-modules__meta dt {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.ja-org-modules__meta dd {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.ja-org-modules__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Product access badges (table) ── */
.ja-member-product {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.3rem 0.5rem;
    margin: 0.1rem 0.25rem 0.1rem 0;
    border-radius: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.6);
    font-size: 0.68rem;
    vertical-align: top;
}

.ja-member-product__name {
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.ja-member-product__level {
    font-weight: 600;
    color: #94a3b8;
}

.ja-member-product--primary {
    border-color: rgba(124, 77, 255, 0.35);
    background: rgba(124, 77, 255, 0.12);
}

.ja-member-product--primary .ja-member-product__level {
    color: #c4b5fd;
}

.ja-member-product--success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.08);
}

.ja-member-product--success .ja-member-product__level {
    color: #86efac;
}

.ja-member-product--gray {
    opacity: 0.65;
}

.ja-org-detail__alerts {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ja-org-detail__alert {
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
}

.ja-org-detail__alert--danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.ja-org-detail__alert--warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
}

.ja-org-detail__alert--info {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.ja-org-detail__alert--trial {
    border-color: rgba(167, 139, 250, 0.35);
    background: rgba(124, 77, 255, 0.1);
}

.ja-org-detail__alert-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.ja-org-detail__alert-detail {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.ja-org-detail__module-summary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.ja-org-detail__module-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.45);
}

.ja-org-detail__module-summary-badge {
    font-size: 0.75rem;
    font-weight: 700;
}

.ja-org-detail__data-table-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.ja-org-detail__data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.ja-org-detail__data-table th,
.ja-org-detail__data-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    text-align: left;
    vertical-align: top;
}

.ja-org-detail__data-table th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.ja-org-detail__activity-table {
    margin-top: 0.75rem;
}

.ja-org-detail__accordion {
    margin-top: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.45);
}

.ja-org-detail__accordion > summary {
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: #fff;
    list-style: none;
}

.ja-org-detail__accordion > summary::-webkit-details-marker {
    display: none;
}

.ja-org-detail__accordion[open] > summary {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ja-org-detail__team-preview {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.ja-org-detail__team-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.ja-org-detail__team-preview-item strong {
    min-width: 0;
    flex: 1 1 auto;
}

.ja-org-detail__team-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.ja-org-detail__timeline--compact .ja-org-detail__timeline-item {
    padding-left: 0;
}

.ja-org-detail__timeline--compact .ja-org-detail__timeline-marker {
    display: none;
}

.ja-org-detail__product-meta-line {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
}
