:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #687386;
    --line: #dce2ea;
    --surface: #ffffff;
    --canvas: #f3f6fa;
    --primary: #135f5b;
    --primary-dark: #0b4542;
    --accent: #f0b44d;
    --danger-bg: #fff1f1;
    --danger: #9f2d2d;
    --success-bg: #edf8f3;
    --success: #1f6b4d;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 1280px;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
}

button,
input {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    padding: 64px 0;
    display: flex;
    align-items: center;
    background: #f5f6f8;
}

.auth-shell {
    width: 1120px;
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    overflow: hidden;
    border: 1px solid #e0e4e8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(26, 36, 47, 0.1);
}

.auth-intro {
    padding: 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #f5f7f9;
    background: #171d25;
}

.auth-brand {
    margin-bottom: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #3a4552;
    border-radius: 10px;
    color: #f5f7f9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.auth-brand-copy {
    display: flex;
    flex-direction: column;
}

.auth-brand-copy strong {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.auth-brand-copy small {
    margin-top: 2px;
    color: #7f8a98;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.4px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #8fb8b2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.card-kicker {
    margin: 0 0 14px;
    color: #1d6760;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.auth-intro h1 {
    max-width: 520px;
    margin: 0;
    font-size: 44px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -1.2px;
}

.intro-copy {
    max-width: 460px;
    margin: 24px 0 0;
    color: #aeb7c2;
    font-size: 15px;
    line-height: 1.8;
}

.login-card {
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.login-card h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.6px;
}

.card-description {
    margin: 10px 0 28px;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(19, 95, 91, 0.12);
}

.login-form button {
    height: 52px;
    margin-top: 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--primary-dark);
}

.alert {
    margin: 20px 0 8px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 0.9rem;
}

.alert-error {
    color: var(--danger);
    background: var(--danger-bg);
}

.alert-success {
    color: var(--success);
    background: var(--success-bg);
}

.admin-header {
    min-height: 72px;
    padding: 0 max(28px, calc((100% - 1180px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.brand {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-account form {
    margin: 0;
}

.secondary-button {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.admin-content {
    width: min(1180px, calc(100% - 56px));
    margin: 0 auto;
    padding: 72px 0;
}

.page-heading .eyebrow {
    color: var(--primary);
}

.page-heading h1 {
    margin: 0;
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -1.5px;
}

.page-heading > p:last-child {
    margin: 16px 0 0;
    color: var(--muted);
}

.feature-grid {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card {
    min-height: 250px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.feature-card .step {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.feature-card h2 {
    margin: 30px 0 12px;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.35px;
}

.feature-card p {
    min-height: 52px;
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.65;
}

.status-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #e4f2f0;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.muted {
    color: var(--muted);
    background: #edf0f4;
}

/* Shared authenticated application layout */
.app-page {
    min-width: 1280px;
    overflow-x: hidden;
    background: #f5f6f8;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.app-sidebar {
    height: 100vh;
    padding: 26px 20px 22px;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: #171d25;
    color: #d7dce3;
}

.sidebar-brand {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #3a4552;
    border-radius: 10px;
    color: #f5f7f9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.sidebar-brand > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand strong {
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-brand small {
    margin-top: 2px;
    color: #7f8a98;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.4px;
}

.sidebar-nav {
    margin-top: 42px;
    display: grid;
    gap: 6px;
}

.nav-label {
    margin: 24px 12px 6px;
    color: #727d8a;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.4px;
}

.nav-label:first-child {
    margin-top: 0;
}

.sidebar-nav a {
    min-height: 46px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 9px;
    color: #aeb7c2;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.sidebar-nav a:hover {
    color: #fff;
    background: #202832;
}

.sidebar-nav a.is-active {
    color: #fff;
    background: #28323e;
    box-shadow: inset 3px 0 0 #74a8a1;
}

.nav-icon {
    color: #6f7b88;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.4px;
}

.sidebar-nav a.is-active .nav-icon {
    color: #a9d3cd;
}

.sidebar-footnote {
    margin-top: auto;
    padding: 14px 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #29323d;
    color: #7f8a98;
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6da79a;
    box-shadow: 0 0 0 3px rgba(109, 167, 154, 0.14);
}

.app-workspace {
    min-width: 0;
    overflow-x: hidden;
}

.app-topbar {
    height: 74px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #e2e5e9;
    background: rgba(255, 255, 255, 0.94);
}

.topbar-label {
    margin: 0;
    color: #8a949f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.app-topbar > div:first-child > strong {
    display: block;
    margin-top: 2px;
    color: #252d37;
    font-size: 15px;
    font-weight: 600;
}

.app-topbar .admin-account {
    gap: 10px;
}

.account-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eceff2;
    color: #3e4854;
    font-size: 12px;
    font-weight: 700;
}

.account-name {
    min-width: 96px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.account-name strong {
    color: #303943;
    font-size: 12px;
    font-weight: 600;
}

.account-name small {
    color: #8b949e;
    font-size: 10px;
}

.page-content {
    width: min(1280px, calc(100% - 64px));
    margin: 0 auto;
    padding: 54px 0 80px;
}

.page-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.page-kicker,
.panel-label {
    margin: 0 0 7px;
    color: #77818d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.page-title-row h1 {
    margin: 0;
    color: #202832;
    font-size: 32px;
    line-height: 1.35;
    letter-spacing: -1.1px;
}

.page-title-row > div:first-child > p:last-child {
    margin: 10px 0 0;
    color: #737e8a;
    font-size: 14px;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.button {
    min-height: 42px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    border-color: #1d6760;
    background: #1d6760;
    color: #fff;
}

.button-primary:hover {
    border-color: #14534e;
    background: #14534e;
}

.button-secondary {
    border-color: #cfd5dc;
    background: #fff;
    color: #343e49;
}

.button-secondary:hover,
.button-quiet:hover {
    border-color: #9fa9b4;
    background: #f8f9fa;
}

.button-quiet {
    border-color: transparent;
    background: transparent;
    color: #56616d;
}

.button-small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}

.button-full {
    width: 100%;
}

.metric-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    min-height: 148px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e4e8;
    border-radius: 13px;
    background: #fff;
}

.metric-card > span {
    color: #707b86;
    font-size: 12px;
    font-weight: 500;
}

.metric-card > strong {
    margin-top: 12px;
    color: #202832;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.metric-card > strong em {
    margin-left: 2px;
    color: #7e8893;
    font-size: 15px;
    font-style: normal;
}

.metric-card > small {
    margin-top: auto;
    color: #9aa2ab;
    font-size: 11px;
}

.metric-card-accent {
    border-top: 3px solid #1d6760;
}

.dashboard-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 18px;
}

.panel {
    padding: 24px;
    border: 1px solid #e0e4e8;
    border-radius: 13px;
    background: #fff;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading h2 {
    margin: 0;
    color: #29323c;
    font-size: 17px;
    letter-spacing: -0.35px;
}

.text-link {
    color: #1d6760;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.compact-empty {
    min-height: 240px;
}

.empty-symbol {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #d8dde2;
    border-radius: 12px;
    color: #71808a;
    font-size: 20px;
}

.empty-state strong {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
}

.empty-state p {
    margin: 7px 0 0;
    color: #8a949f;
    font-size: 12px;
}

.readiness-list {
    margin: 25px 0 22px;
    padding: 0;
    list-style: none;
}

.readiness-list li {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf0f2;
    color: #4b5661;
    font-size: 12px;
}

.readiness-list li > span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.state-mark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.state-warning {
    background: #d0922d;
}

.state-success {
    background: #3c8a68;
}

.badge {
    min-height: 25px;
    padding: 4px 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-neutral {
    background: #edf0f3;
    color: #59646f;
}

.badge-warning {
    background: #fff0d2;
    color: #85550a;
}

.badge-success {
    background: #dff2e9;
    color: #27664b;
}

.badge-info {
    background: #e3edf7;
    color: #315f84;
}

.preview-notice {
    margin-top: 28px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #dde2e7;
    border-radius: 10px;
    background: #fff;
}

.preview-notice p {
    margin: 0;
    color: #77818c;
    font-size: 12px;
}

.setting-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.setting-card {
    min-height: 430px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e4e8;
    border-radius: 13px;
    background: #fff;
}

.setting-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.setting-index {
    color: #8a949f;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.7px;
}

.setting-card h2 {
    margin: 34px 0 9px;
    font-size: 19px;
    letter-spacing: -0.45px;
}

.setting-card > div:nth-child(2) p {
    min-height: 52px;
    margin: 0;
    color: #77818c;
    font-size: 13px;
    line-height: 1.7;
}

.setting-summary {
    margin: 28px 0 24px;
    padding: 16px 0;
    border-top: 1px solid #edf0f2;
    border-bottom: 1px solid #edf0f2;
}

.setting-summary div {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.setting-summary dt {
    color: #8a949f;
    font-size: 11px;
}

.setting-summary dd {
    margin: 0;
    color: #454f5a;
    font-size: 12px;
    font-weight: 500;
}

.setting-card > .button {
    margin-top: auto;
}

.mail-setting-actions {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.mail-setting-actions small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.table-panel {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}

.table-toolbar {
    min-height: 70px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e8ebee;
}

.event-filters { justify-content: flex-start; }
.event-filters select {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.event-total { margin-left: auto; }
.data-table.event-table td:last-child { width: 90px; white-space: nowrap; }
.data-table.recipient-table td:first-child { width: 12%; }
.recipient-table td { max-width: 280px; overflow-wrap: anywhere; }
.data-table.recipient-table th:last-child,
.data-table.recipient-table td:last-child { width: 100px; white-space: nowrap; text-align: center; }
.recipient-import-report { margin-top: 24px; }
.recipient-import-report h2 { font-size: 18px; }
.recipient-import-report p { font-size: 13px; overflow-wrap: anywhere; }
.recipient-import-report .data-table td:first-child { width: 80px; }
.recipient-import-report .data-table td:last-child { width: auto; text-align: left; }
.event-table td:first-child { min-width: 240px; max-width: 400px; white-space: normal; overflow-wrap: anywhere; }
.event-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px; font-size: 13px; color: var(--muted); }

.search-field input {
    width: 260px;
    height: 40px;
    padding: 0 13px;
    border: 1px solid #d8dde2;
    border-radius: 8px;
    background: #f8f9fa;
    color: #4d5863;
    font-size: 12px;
}

.filter-group {
    display: flex;
    gap: 6px;
}

.filter-chip {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #dde2e7;
    border-radius: 8px;
    background: #fff;
    color: #6f7984;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.filter-chip.is-selected {
    border-color: #313b46;
    background: #313b46;
    color: #fff;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #fafbfc;
    color: #808a95;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.data-table td {
    color: #59646f;
    font-size: 12px;
}

.data-table td:first-child {
    width: 31%;
}

.data-table td:first-child strong,
.data-table td:first-child small {
    display: block;
}

.data-table td:first-child strong {
    color: #2b343e;
    font-size: 13px;
    font-weight: 600;
}

.data-table td:first-child small {
    margin-top: 4px;
    color: #9099a3;
    font-size: 10px;
}

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

.data-table td:last-child {
    width: 72px;
    text-align: right;
}

.muted-value {
    color: #a1a8b0;
}

.result-value {
    color: #1d6760;
    font-weight: 600;
}

.page-feedback {
    margin: 24px 0 0;
}

.management-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.account-create-panel h2,
.password-panel h2 {
    margin: 0;
    color: #29323c;
    font-size: 20px;
    letter-spacing: -0.45px;
}

.panel-description {
    margin: 10px 0 24px;
    color: #77818c;
    font-size: 13px;
    line-height: 1.7;
}

.stacked-form {
    display: grid;
    gap: 10px;
}

.stacked-form label {
    margin-top: 8px;
    color: #3e4853;
    font-size: 12px;
    font-weight: 600;
}

.stacked-form input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    background: #fff;
    color: #26303a;
    outline: none;
}

.stacked-form input:focus {
    border-color: #1d6760;
    box-shadow: 0 0 0 3px rgba(29, 103, 96, 0.12);
}

.stacked-form .button {
    margin-top: 18px;
}

.account-list-panel {
    padding: 0;
    overflow: hidden;
}

.account-list-section { margin-top: 28px; }
.account-dialog {
    width: 540px;
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 1px solid #d7dde5;
    border-radius: 16px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 28px 90px rgba(18, 28, 38, 0.22);
}
.account-dialog::backdrop { background: rgba(17, 24, 33, 0.52); }
.account-dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}
.account-dialog-heading h2 { margin: 0; font-size: 22px; }
.account-dialog-description {
    margin: 12px 28px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}
.account-dialog-fields { padding: 12px 28px 24px; }
.account-dialog-fields select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.account-dialog-fields > div > label { display: block; margin-bottom: 10px; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.mail-setting-dialog { width: 760px; }
.mail-setting-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; padding: 24px 28px; }
.mail-field-wide { grid-column: 1 / -1; }
.mail-field { min-width: 0; }
.mail-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.mail-field input, .mail-field select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7dde3; border-radius: 8px; background: #fff; color: var(--ink); }
.mail-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.mail-setting-fields summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.mail-timeout-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 16px; }
.setting-summary dd { overflow-wrap: anywhere; min-width: 0; }

.account-list-panel .panel-heading {
    min-height: 86px;
    padding: 20px 22px;
    border-bottom: 1px solid #e8ebee;
}

.account-table-wrap {
    overflow-x: visible;
}

.account-table {
    min-width: 0;
}

.account-table td:first-child {
    width: auto;
}

.account-table td:last-child {
    width: 104px;
}

.inline-form {
    margin: 0;
    display: inline-block;
}

.narrow-page {
    max-width: 920px;
}

.password-panel {
    width: 520px;
    margin-top: 28px;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(29, 103, 96, 0.28);
    outline-offset: 2px;
}


.recipient-selection { display: flex; align-items: center; gap: 12px; padding: 0 18px 16px; font-size: 12px; color: var(--muted); }
.recipient-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.data-table.recipient-table th.recipient-check,
.data-table.recipient-table td.recipient-check { width: 44px; min-width: 44px; padding: 12px; text-align: center; }
.recipient-check input { width: 16px; height: 16px; accent-color: #1d6760; cursor: pointer; }

.recipient-preview-dialog { width: 1000px; max-width: calc(100vw - 64px); }
.recipient-preview-content { padding: 0 24px 20px; max-height: 55vh; overflow: auto; font-size: 14px; }
.recipient-preview-content p { overflow-wrap: anywhere; }
.recipient-preview-notice { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-size: 14px; }
.data-table.preview-table { min-width: 800px; }
.data-table.preview-table td:first-child { width: 60px; }
.data-table.preview-table td:last-child { width: auto; text-align: left; }
.data-table.preview-table td { overflow-wrap: anywhere; max-width: 350px; }

.event-table th { white-space: nowrap; }
.content-summary { margin-top: 20px; }
.content-summary h2 { font-size: 18px; }
.content-details { margin: 24px 0 0; }
.content-details dt { margin-top: 24px; color: var(--muted); font-size: 12px; font-weight: 600; }
.content-details dd { margin: 10px 0 0; overflow-wrap: anywhere; }
.content-subject { font-size: 18px; font-weight: 600; }
.content-body { white-space: pre-wrap; line-height: 1.8; font-size: 14px; padding: 20px; border: 1px solid #edf0f2; border-radius: 10px; background: #fafbfc; }
.content-dialog { width: 850px; max-width: calc(100vw - 64px); }
.content-fields { max-height: 55vh; overflow-y: auto; }
.content-fields textarea { width: 100%; min-height: 230px; resize: vertical; padding: 12px; border: 1px solid #cfd5dc; border-radius: 8px; font: inherit; font-size: 14px; line-height: 1.7; }
.content-fields textarea:focus { outline: 2px solid #1d6760; outline-offset: 2px; }

.event-workspace-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.event-workspace-heading h1 { font-size: 28px; margin: 8px 0 14px; overflow-wrap: anywhere; }
.event-workspace-heading > div:first-child { min-width: 0; flex: 1; }
.event-workspace-heading .page-actions { flex-shrink: 0; padding-top: 16px; }
.event-workspace-summary { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.event-steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin: 28px 0; }
.event-steps a { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #d7dde5; border-radius: 10px; background: #fff; color: #59646f; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.event-steps a:hover { border-color: #1d6760; }
.event-steps a.is-active { border-color: #1d6760; background: #eaf3f1; color: #1d6760; }
.event-step-number { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f0f2f4; font-size: 12px; }
.is-active .event-step-number { color: #fff; background: #1d6760; }
.event-stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.event-stage-heading h2 { margin: 0; font-size: 20px; }
.workspace-check-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid #edf0f2; }
.workspace-check-row strong { font-size: 14px; }
.workspace-check-row p, .workspace-stage-notice p, .workspace-stage-empty p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.workspace-stage-notice { margin-top: 24px; }
.workspace-stage-empty { padding: 40px 28px; }
.workspace-stage-empty h3 { margin-top: 20px; font-size: 18px; }

.click-summary .panel-heading h2 { display: flex; align-items: center; gap: 12px; }
.click-element-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 24px 0; border-bottom: 1px solid #edf0f2; }
.click-element-row .page-actions { flex-shrink: 0; }
.click-element-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.click-element-meta { display: flex; gap: 8px; margin-bottom: 12px; }
.click-text { margin: 0; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.click-image { display: block; max-width: 360px; max-height: 180px; object-fit: contain; border: 1px solid #edf0f2; border-radius: 8px; }
.click-empty { padding: 32px 0; text-align: center; color: var(--muted); font-size: 14px; }
.click-footer { margin-top: 20px; }
.click-fields { max-height: 55vh; overflow-y: auto; }
.click-fields textarea { width: 100%; resize: vertical; border: 1px solid #cfd5dc; border-radius: 8px; padding: 12px; font: inherit; font-size: 14px; }
.click-fields [hidden] { display: none; }
.click-fields .click-enabled { display: flex; align-items: center; gap: 8px; }
.click-fields .click-enabled input { width: 16px; height: 16px; min-height: 0; accent-color: #1d6760; }

.mail-preview-dialog { width: 1100px; max-width: calc(100vw - 64px); }
.mail-preview-content { padding: 0 28px 24px; max-height: 70vh; overflow-y: auto; }
.preview-search, .preview-select { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.preview-search input { width: 320px; }
.preview-select label { flex-shrink: 0; font-size: 14px; font-weight: 600; }
.preview-select select { flex: 1; min-width: 0; }
.preview-select button { flex-shrink: 0; }
.preview-notice { border-radius: 8px; background: #eef5f3; color: #285c57; padding: 12px 16px; font-size: 13px; line-height: 1.7; }
.preview-envelope { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 20px; background: #f6f8fa; border-radius: 8px; font-size: 14px; }
.preview-envelope dt { color: var(--muted); }
.preview-envelope dd { margin: 0; overflow-wrap: anywhere; }
#mail-preview-frame { width: 100%; height: 420px; border: 1px solid #d7dde5; border-radius: 8px; background: #fff; }
.preview-details { margin-top: 16px; font-size: 14px; }
.preview-details summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.preview-details pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; padding: 16px; background: #f6f8fa; }
.preview-details dd { margin: 6px 0 18px; overflow-wrap: anywhere; color: var(--muted); }
.preview-details dt { overflow-wrap: anywhere; }
.preview-search input, .preview-select select { min-height: 42px; padding: 10px 12px; border: 1px solid #cfd5dc; border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 14px; }
.preview-search input:focus, .preview-select select:focus { outline: 2px solid #1d6760; outline-offset: 2px; }
