.ssb {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: min(640px, 90vw);
    color: var(--app-fg, #111827);
}

.ssb--wide {
    min-width: min(1080px, 94vw);
}

.ssb-title {
    font-size: .9375rem;
    font-weight: 600;
}

.ssb-sub {
    font-size: .8125rem;
    color: var(--app-muted, #6b7280);
}

.ssb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.ssb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--app-muted, #6b7280);
}

.ssb-field--grow {
    flex: 1 1 220px;
}

.ssb-note {
    font-size: .75rem;
    color: var(--app-muted, #6b7280);
}

.ssb-actions {
    display: flex;
    justify-content: flex-end;
}

.ssb-toolbar-meta {
    padding-bottom: 6px;
    font-size: .8125rem;
    color: var(--app-muted, #6b7280);
}

.ssb-toolbar-action {
    margin-left: auto;
}

.ssb-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: .8125rem;
    color: var(--app-muted, #6b7280);
}

.ssb-state--error {
    color: var(--app-danger, #b91c1c);
}

.ssb-table-wrap {
    border: 1px solid var(--app-border, #e5e7eb);
    border-radius: 8px;
    overflow: auto;
}

.ssb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8125rem;
}

.ssb-table th,
.ssb-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--app-border, #e5e7eb);
    text-align: left;
}

.ssb-table th {
    font-weight: 600;
    white-space: nowrap;
    color: var(--app-muted, #6b7280);
    background: var(--app-surface-soft, #f9fafb);
}

.ssb-table td.ssb-nowrap {
    white-space: nowrap;
}

.ssb-table tbody tr:last-child td {
    border-bottom: 0;
}

.ssb-pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: min(560px, 90vw);
    color: var(--app-fg, #111827);
}

.sip-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sip-label {
    font-size: .8125rem;
    font-weight: 600;
}

.sip-choice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .8125rem;
    cursor: pointer;
}

.sip-choice input {
    margin-top: 3px;
    accent-color: var(--app-primary, #2563eb);
}

.sip-muted {
    margin-left: 6px;
    font-size: .75rem;
    color: var(--app-muted, #6b7280);
}

.sip-days,
.sip-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding-left: 22px;
}

.sip-days {
    gap: 6px;
}

.sip-day {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 6px 12px;
    border: 1px solid var(--app-border, #d1d5db);
    border-radius: 10px;
    background: var(--app-surface, #fff);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.sip-day:hover:not(:disabled) {
    background: var(--app-surface-soft, #f3f4f6);
}

.sip-day.is-on {
    border-color: var(--app-primary, #2563eb);
    background: var(--app-primary-soft, #eff6ff);
    color: var(--app-primary, #1d4ed8);
}

.sip-day:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.sip-day:focus-visible,
.sip-link:focus-visible {
    outline: 2px solid var(--app-primary, #2563eb);
    outline-offset: 1px;
}

.sip-day-date {
    font-size: .8125rem;
    font-weight: 600;
}

.sip-day-count {
    font-size: .6875rem;
    opacity: .8;
}

.sip-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--app-primary, #2563eb);
    font: inherit;
    font-size: .75rem;
    text-decoration: underline;
    cursor: pointer;
}

.sip-links .sip-muted {
    margin-left: 0;
}

.ssb-pager-text {
    font-size: .75rem;
    color: var(--app-muted, #6b7280);
}

/* Invite to Schedule: the invite email (template, tokens, preview, editor) */

.sip--email {
    min-width: min(980px, 94vw);
}

.sip-email {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border, #e5e7eb);
}

.sip-email-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.sip-email-edit {
    margin-left: auto;
    font-size: .8125rem;
}

.sip-badge {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--app-primary-soft, #eff6ff);
    color: var(--app-primary, #1d4ed8);
    font-size: .6875rem;
    font-weight: 600;
}

.sip-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--app-border, #e5e7eb);
}

.sip-tab {
    padding: 6px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--app-muted, #6b7280);
    font: inherit;
    font-size: .8125rem;
    cursor: pointer;
}

.sip-tab.is-on {
    border-bottom-color: var(--app-primary, #2563eb);
    color: var(--app-primary, #1d4ed8);
    font-weight: 600;
}

.sip-tab:focus-visible,
.sip-token:focus-visible {
    outline: 2px solid var(--app-primary, #2563eb);
    outline-offset: 1px;
}

.sip-picker {
    max-width: 420px;
}

.sip-subject {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .8125rem;
    font-weight: 600;
}

.sip-subject .sip-muted {
    font-weight: 400;
}

.sip-preview-note {
    color: var(--app-fg, #111827);
}

.sip-frame {
    width: 100%;
    height: 460px;
    border: 1px solid var(--app-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
}

.sip-edit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
}

.sip-edit-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.sip-edit-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 420px;
    overflow: auto;
}

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

.sip-input {
    padding: 5px 8px;
    border: 1px solid var(--app-border, #d1d5db);
    border-radius: 6px;
    background: var(--app-surface, #fff);
    color: var(--app-fg, #111827);
    font: inherit;
    font-size: .8125rem;
    font-weight: 400;
}

.sip-token-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sip-token-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.sip-token,
.sip-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .75rem;
}

.sip-token {
    padding: 1px 6px;
    border: 1px solid var(--app-border, #d1d5db);
    border-radius: 4px;
    background: var(--app-surface-soft, #f9fafb);
    color: var(--app-fg, #111827);
    cursor: pointer;
}

.sip-token:hover {
    border-color: var(--app-primary, #2563eb);
}

.sip-ok {
    color: #047857;
}

.sip-error {
    color: var(--app-danger, #b91c1c);
}

@media (max-width: 900px) {
    .sip-edit {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Transfer Offer: the application picker */

.tot-search {
    width: 100%;
}

.tot-table-wrap {
    max-height: min(520px, 60vh);
}

.tot-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.tot-table th.tot-num,
.tot-table td.tot-num {
    text-align: right;
    white-space: nowrap;
}

.tot-select {
    width: 36px;
    text-align: center;
}

.tot-select input {
    accent-color: var(--app-primary, #2563eb);
    cursor: pointer;
}

.tot-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tot-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tot-sort.is-on {
    color: var(--app-primary, #1d4ed8);
}

.tot-sort:focus-visible {
    outline: 2px solid var(--app-primary, #2563eb);
    outline-offset: 2px;
}

.tot-sort-arrow {
    font-size: .625rem;
    opacity: .7;
}

.tot-group td {
    background: var(--app-surface-soft, #f9fafb);
    font-weight: 600;
}

.tot-row {
    cursor: pointer;
}

.tot-row:hover td {
    background: var(--app-surface-soft, #f3f4f6);
}

.tot-row.is-on td {
    background: var(--app-primary-soft, #eff6ff);
}

.tot-summary {
    color: var(--app-fg, #111827);
}

/* Widen the dialog that hosts the Transfer Offer picker (same :has() pattern as the screening
   report popup) so all eight columns fit without a horizontal scroll. */
.dxbl-modal:has(.tot) .dxbl-popup,
.dxbl-modal:has(.tot) .dxbl-modal-dialog,
.dxbl-modal:has(.tot) .modal-dialog {
    width: min(1240px, 96vw) !important;
    max-width: 96vw !important;
}
