.settings-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .035);
}

.settings-action-card strong,
.settings-action-card span {
    display: block;
}

.settings-action-card span {
    margin-top: 4px;
    color: #9fb5bf;
}

.email-template-grid {
    display: grid;
    grid-template-columns: minmax(230px, 270px) minmax(480px, 1fr) minmax(320px, 400px);
    gap: 14px;
    align-items: start;
}

.email-template-page > .workspace-page-header {
    overflow: hidden;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(79, 209, 208, .16);
    border-radius: 20px;
    background: radial-gradient(circle at 78% 0, rgba(79, 209, 208, .18), transparent 34%), linear-gradient(135deg, rgba(55, 118, 136, .20), rgba(7, 19, 29, .34));
}

.email-template-kicker,
.email-template-card-kicker {
    color: #72e8e7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.email-template-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}

.email-template-grid > .dashboard-card {
    padding: 16px;
    border-color: rgba(255, 255, 255, .09);
    background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)), rgba(7, 19, 29, .58);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
}

.email-template-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    margin-bottom: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.email-template-card-header h2 {
    margin: 3px 0 0;
    color: #f5fbfc;
    font-size: 19px;
    font-weight: 800;
}

.email-template-count,
.email-template-key,
.email-preview-live {
    max-width: 46%;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(79, 209, 208, .12);
    color: #9bf6ff;
    font-size: 11px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-preview-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #86efac;
    background: rgba(34, 197, 94, .12);
}

.email-preview-live i { font-size: 6px; }

.email-template-list {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 122px);
    overflow: auto;
    scrollbar-gutter: stable;
}

.email-template-list button {
    width: 100%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    text-align: left;
    transition: .25s;
}

.email-template-list button:hover,
.email-template-list button.active {
    border-color: rgba(79, 209, 208, .58);
    background: linear-gradient(90deg, rgba(79, 209, 208, .16), rgba(79, 209, 208, .06));
}

.email-template-list button.active { box-shadow: inset 3px 0 0 #64edf0; }

.email-template-list button strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-template-list button strong i { color: #72e8e7; }

.email-template-list button span {
    max-width: 100%;
    color: #9fb5bf;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.email-template-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.email-template-actions small {
    max-width: 620px;
    color: #9fb5bf;
    line-height: 1.55;
}

.email-template-editor .form-label {
    color: #c8dce3;
    font-size: 12px;
    font-weight: 750;
}

.email-template-editor .form-label i { color: #64edf0; }

.email-template-editor textarea.form-control {
    min-height: 260px;
    line-height: 1.55;
    resize: vertical;
}

.email-preview-window {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.email-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    background: #e9eef3;
}

.email-preview-toolbar > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.email-preview-toolbar > span:first-child { background: #fb7185; }
.email-preview-toolbar > span:nth-child(2) { background: #fbbf24; }
.email-preview-toolbar > span:nth-child(3) { background: #4ade80; }

.email-preview-toolbar small {
    margin-left: auto;
    color: #64748b;
    font-size: 10px;
}

.email-preview-subject {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .10);
    background: #f8fafc;
    color: #18212f;
    overflow-wrap: anywhere;
}

.email-preview-subject small,
.email-preview-subject strong { display: block; }

.email-preview-subject small {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.email-preview-subject strong { font-size: 14px; }

.email-template-preview iframe {
    width: 100%;
    min-height: 500px;
    border: 0;
    background: #fff;
}

.email-template-preview {
    position: sticky;
    top: 24px;
}

@media (max-width: 1199px) {
    .email-template-preview {
        position: static;
    }
}

@media (max-width: 575px) {
    .email-template-page > .workspace-page-header {
        padding: 18px;
    }

    .email-template-grid > .dashboard-card {
        padding: 13px;
    }

    .email-template-editor textarea.form-control {
        min-height: 210px;
    }
}

.platform-email-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 18px;
    align-items: start;
}

.platform-email-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
}

.platform-email-toggle strong,
.platform-email-toggle span {
    display: block;
}

.platform-email-toggle span {
    margin-top: 3px;
    color: #9fb5bf;
}

.platform-email-security {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.platform-email-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
}

.platform-email-check input {
    width: 18px;
    height: 18px;
}

.platform-email-check strong,
.platform-email-check small {
    display: block;
}

.platform-email-check small {
    margin-top: 2px;
    color: #9fb5bf;
}

.platform-email-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.platform-email-actions small {
    color: #9fb5bf;
}

.team-member-picker {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .035);
}

.member-search-wrap {
    position: relative;
}

.member-search-wrap i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    color: #9fb5bf;
    transform: translateY(-50%);
}

.member-search-wrap .form-control {
    padding-left: 44px;
}

.selected-member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.selected-member-chips button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(79, 209, 208, .35);
    border-radius: 999px;
    background: rgba(79, 209, 208, .14);
    color: #e9f6f8;
}

.selected-member-chips span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-picker-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 290px;
    overflow: auto;
    padding-right: 4px;
}

.member-picker-list>button {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    text-align: left;
    transition: .25s;
}

.member-picker-list>button:hover,
.member-picker-list>button.selected {
    border-color: rgba(79, 209, 208, .58);
    background: rgba(79, 209, 208, .12);
}

.member-picker-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #377688, #7faf9a);
    color: #fff;
    font-weight: 800;
}

.member-picker-copy {
    min-width: 0;
}

.member-picker-copy strong,
.member-picker-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-picker-copy small {
    margin-top: 2px;
    color: #9fb5bf;
    font-size: 12px;
}

.member-picker-list .workspace-empty {
    grid-column: 1 / -1;
}

.tenant-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(420px, 92vw);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    background: rgba(15, 30, 44, .98);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
    z-index: 999999;
}

.tenant-search-empty {
    padding: 16px;
    color: #9fb5bf;
    font-size: 14px;
}

.tenant-search-result {
    width: 100%;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: transparent;
    color: #e9f6f8;
    text-align: left;
}

.tenant-search-result:last-child {
    border-bottom: 0;
}

.tenant-search-result:hover,
.tenant-search-result.active {
    background: rgba(79, 209, 208, .13);
}

.tenant-search-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(79, 209, 208, .14);
    color: #64edf0;
}

.tenant-search-copy {
    min-width: 0;
}

.tenant-search-copy strong,
.tenant-search-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-search-copy small {
    margin-top: 2px;
    color: #9fb5bf;
    font-size: 12px;
}

.team-detail-page {
    max-width: 1480px;
    margin: 0 auto;
}

.team-detail-page .workspace-page-header {
    align-items: center;
}

.team-detail-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
}

.team-detail-logo.fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

