/* Organization security, shared by the settings drawer and standalone page. */
.org-security-console {
    display: grid;
    gap: 1rem;
    max-width: 54rem;
    margin-inline: auto;
    color: var(--ff-color-text, #111827);
}
.org-security-panel {
    min-width: 0;
    padding: 1.2rem;
    border: 1px solid var(--ff-color-border, #d8dee8);
    border-radius: 10px;
    background: #fff;
}
.org-security-heading,
.org-security-disclosure,
.org-security-setting,
.org-security-actions,
.org-security-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.org-security-heading { margin-bottom: 1rem; }
.org-security-panel :is(h3, h4) { margin: 0; font-size: 0.96rem; line-height: 1.4; font-weight: 700; }
.org-security-panel h4 { font-size: 0.86rem; }
.org-security-badge {
    flex: 0 0 auto;
    border-radius: 5px;
    background: var(--ff-color-surface-muted, #f8fafc);
    padding: 0.25rem 0.5rem;
    color: #475569;
    font-size: 0.71rem;
    font-weight: 600;
}
.org-security-form,
.org-security-provider-fields { display: grid; gap: 0.85rem; margin: 0; }
.org-security-console [hidden] { display: none !important; }
.org-security-setting { margin: 0; padding-bottom: 1rem; border-bottom: 1px solid #e8edf2; cursor: pointer; }
.org-security-setting > span { min-width: 0; }
.org-security-panel :is(strong, .org-security-field > span) { font-size: 0.84rem; font-weight: 600; }
.org-security-setting small,
.org-security-disclosure small,
.org-security-download small {
    display: block;
    margin-top: 0.28rem;
    color: #64748b;
    font-size: 0.79rem;
    font-weight: 400;
    line-height: 1.5;
}
.org-security-switch {
    appearance: none;
    position: relative;
    flex: 0 0 2.4rem;
    width: 2.4rem;
    height: 1.4rem;
    margin: 0;
    border: 1px solid #a1afbf;
    border-radius: 999px;
    background: #a1afbf;
    cursor: pointer;
}
.org-security-switch::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: white;
}
.org-security-switch:checked { border-color: #2f8550; background: #2f8550; }
.org-security-switch:checked::before { transform: translateX(1rem); }
.org-security-switch:disabled { cursor: default; }
.org-security-field { display: grid; align-content: start; gap: 0.4rem; min-width: 0; margin: 0; }
.org-security-field :is(input, select) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 2.6rem;
    border: 1px solid #b8c4d1;
    border-radius: 7px;
    padding: 0.5rem 0.65rem;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 0.85rem;
}
.org-security-field .password-field-control input { padding-right: 2.7rem; }
.org-security-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.org-security-help,
.org-security-actions p { margin: 0; color: #64748b; font-size: 0.79rem; line-height: 1.55; }
.org-security-form > .org-security-help { margin-top: -0.4rem; }
.org-security-rules { padding: 0.3rem 0 0.9rem; }
.org-security-rules summary { width: fit-content; color: #475569; cursor: pointer; font-size: 0.79rem; font-weight: 500; }
.org-security-rules dl { margin: 0.8rem 0 0; padding: 0.8rem; border-radius: 7px; background: #f8fafc; }
.org-security-rules dl > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0.8rem; padding: 0.35rem 0; font-size: 0.77rem; line-height: 1.5; }
.org-security-rules dt { color: #334155; font-weight: 600; }
.org-security-rules dd { margin: 0; color: #64748b; }
.org-security-confirmation { display: grid; gap: 0.8rem; padding-top: 1rem; border-top: 1px solid #e8edf2; }
.org-security-actions { margin-top: 0.2rem; justify-content: flex-end; }
.org-security-actions p { flex: 1; max-width: 23rem; }
.org-security-actions button { flex: 0 0 auto; min-height: 2.45rem; }
.org-security-disclosure { position: relative; padding-right: 1.5rem; cursor: pointer; list-style: none; }
.org-security-disclosure::-webkit-details-marker { display: none; }
.org-security-disclosure::after { content: ""; position: absolute; right: 0.1rem; top: 0.55rem; width: 0.4rem; height: 0.4rem; border-right: 1.5px solid #64748b; border-bottom: 1.5px solid #64748b; transform: rotate(45deg); }
.org-security-panel[open] > .org-security-disclosure::after { transform: rotate(225deg); top: 0.8rem; }
.org-security-integration-body { display: grid; gap: 1.25rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid #e8edf2; }
.org-security-integration-body .org-security-heading { margin: 0; }
.org-security-heading a { color: #1d4ed8; font-size: 0.76rem; }
.org-security-directory { display: grid; gap: 0.8rem; margin-top: 0.5rem; padding-top: 1.1rem; border-top: 1px solid #e8edf2; }
.org-security-directory .org-security-setting { border: 0; padding: 0; }
.org-security-token { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding-top: 1.1rem; border-top: 1px solid #e8edf2; }
.org-security-token h4 { margin-bottom: 0.3rem; }
.org-security-token form { margin: 0; }
.org-security-token > .org-security-help,
.org-security-fingerprint { grid-column: 1 / -1; }
.org-security-fingerprint { display: grid; gap: 0.3rem; min-width: 0; font-size: 0.76rem; color: #64748b; }
.org-security-fingerprint code { overflow-wrap: anywhere; font-size: 0.72rem; color: #334155; }
.org-security-downloads { margin-top: 0.9rem; }
.org-security-download { padding: 0.85rem 0; border-top: 1px solid #e8edf2; color: #111827; text-decoration: none; }
.org-security-download:last-child { padding-bottom: 0; }
.org-security-download:hover strong { color: #2f8550; }
.org-security-download-action { display: inline-flex; align-items: center; gap: 0.45rem; color: #2f8550; font-size: 0.77rem; font-weight: 600; white-space: nowrap; }
.org-security-console :is(input, select, button, a, summary):focus-visible,
.org-history-exports :is(a, summary):focus-visible { outline: 2px solid #2f8550; outline-offset: 3px; }
.org-history-exports { margin-bottom: 1rem; }
.org-security-history-link { justify-self: start; color: #1d4ed8; font-size: 0.8rem; }
.org-owners-card { grid-column: 1 / -1; }
.org-owners-list { display: grid; gap: 0.5rem; margin: 0.8rem 0; padding: 0; list-style: none; }
.org-owners-list li { display: flex; align-items: center; gap: 0.7rem; overflow-wrap: anywhere; font-size: 0.82rem; }
.org-owners-list small { color: #64748b; }
.org-owners-card .org-security-form { margin-top: 0.9rem; }
.org-security-feedback { display: grid; gap: 0.5rem; margin: 0.8rem 0; }
.org-security-notice { margin: 0; border-left: 3px solid #2f8550; border-radius: 4px; padding: 0.65rem 0.8rem; background: #eaf7ef; color: #166534; font-size: 0.81rem; }
.org-security-notice.error { border-color: #b91c1c; background: #fef2f2; color: #991b1b; }
@media (max-width: 600px) {
    .org-security-panel { padding: 1rem; }
    .org-security-field-grid { grid-template-columns: minmax(0, 1fr); }
    .org-security-rules dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; padding: 0.45rem 0; }
    .org-security-actions { align-items: stretch; flex-direction: column; gap: 0.8rem; }
    .org-security-actions p { max-width: none; }
    .org-security-disclosure { flex-wrap: wrap; gap: 0.6rem; }
    .org-security-token { grid-template-columns: minmax(0, 1fr); }
    .org-security-token form { justify-self: start; }
    .org-security-download { gap: 0.6rem; }
    .org-security-download-action { font-size: 0; }
    .org-security-download-action svg { width: 20px; height: 20px; }
}
