/* Shared application shell. Tenant logos and palette variables stay in their themes. */
body.app-shell {
    --sidebar-width: 252px;
    --header-height: 88px;
    --workspace-border: #cbd8eb;
    --workspace-muted: #566781;
    --form-control-height: 44px;
    min-height: 100vh;
    margin: 0;
    background: #f1f7fb;
    color: var(--brand-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
.app-shell *, .app-shell *::before, .app-shell *::after { box-sizing: border-box; }
.app-shell div, .app-shell p { line-height: inherit; }
.app-shell .ui-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}
.app-shell #header {
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #dce5f2;
}
.app-shell #header .wrapper {
    max-width: none;
    min-height: var(--header-height);
    margin: 0;
    padding: 0 32px 0 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 32px;
}
.app-shell .workspace-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: var(--sidebar-width);
    border-right: 1px solid #dce5f2;
    padding: 14px 28px;
}
.app-shell .workspace-logo .logo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 60px;
}
.app-shell .typo-logozusatz {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.4;
    flex: 1 1 auto;
}
.app-shell .typo-logozusatz strong { font-size: 20px; }
.app-shell .typo-logozusatz > span { border-left: 1px solid #b8cae3; padding-left: 14px; }
.app-shell .willkommen { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 0 1 auto; min-width: 0; font-size: 14px; }
.app-shell .header-account { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 280px; }
.app-shell .workspace-user { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.app-shell .workspace-user .ui-icon { flex: 0 0 20px; width: 20px; height: 20px; }
.app-shell .user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
.app-shell .parent-session { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.app-shell .header-logout { display: flex; align-items: center; flex: 0 0 auto; margin: 0; }
body.app-shell #header .header-session-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; color: var(--brand-dark); box-shadow: none; font: inherit; line-height: 1.4; text-decoration: none; white-space: nowrap; }
body.app-shell #header .header-session-action:not(:disabled):is(:hover, :focus-visible) { border-color: #9fb6d5; background: #f0f5fc; color: var(--brand-dark); }
body.app-shell a.header-session-action { margin-left: auto; }
.app-shell .header-session-action .ui-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.app-shell #menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    padding: 20px 12px;
    border: 0;
    box-shadow: none;
    background: linear-gradient(115deg, var(--brand-dark), #192a43);
    color: #fff;
}
.app-shell #menu > ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: none;
    min-height: 0;
    flex: 1;
}
.app-shell #menu ul li { min-width: 0; }
.app-shell #menu ul li a {
    padding: 12px 16px;
    border: 0;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 6px;
    background: transparent;
    overflow-wrap: anywhere;
}
.app-shell #menu .nav-link,
.app-shell #menu .nav-group summary {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 56px;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
}
.app-shell #menu summary::-webkit-details-marker { display: none; }
.app-shell #menu .nav-link.is-current,
.app-shell #menu .nav-group.is-current summary { background: #344b7c; font-weight: bold; }
.app-shell #menu .nav-chevron {
    width: 9px;
    height: 9px;
    margin: -4px 2px 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.app-shell #menu details[open] .nav-chevron { transform: rotate(225deg); margin-top: 4px; }
.app-shell #menu .nav-group ul {
    display: block;
    position: static;
    min-width: 0;
    min-height: 0;
    margin: 5px 0 10px 46px;
    padding: 0;
    border: 0;
    border-left: 1px solid #ffffff30;
    background: transparent;
}
.app-shell #menu .nav-group ul a { min-width: 0; padding: 9px 12px; font-size: 13px; color: #e1e9fa; }
.app-shell #menu .nav-group li:hover > a,
.app-shell #menu :is(a:hover, a:focus-visible, summary:hover) { background: #ffffff18; color: #fff; text-decoration: none; }
.app-shell #menu > ul > li.quota-menu {
    flex: 0 0 auto;
    width: 100%;
    margin: auto 0 0;
    padding: 24px 4px 8px;
}
.app-shell #menu .quota-display {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
}
.app-shell #menu .quota-compact { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 12px; }
.app-shell .quota-storage-icon { margin-top: 1px; }
.app-shell .quota-compact-main { min-width: 0; max-width: 260px; }
.app-shell #menu .quota-compact .quota-summary { display: block; margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.app-shell .quota-summary strong { font-weight: normal; }
.app-shell #menu .quota-meter, .app-shell .quota-meter-neutral { display: block; width: 100%; height: 8px; margin: 0; overflow: hidden; border: 0; border-radius: 999px; background: #647b9c; }
.app-shell #menu .quota-meter { appearance: none; }
.app-shell #menu .quota-meter::-webkit-progress-bar { border-radius: 999px; background: #647b9c; }
.app-shell #menu .quota-meter::-webkit-progress-value { border-radius: 999px; background: #fbba00; }
.app-shell #menu .quota-meter::-moz-progress-bar { border-radius: 999px; background: #fbba00; }
.app-shell #menu .quota-compact:not([data-quota-limited="1"]) .quota-meter,
.app-shell #menu .quota-compact[data-quota-limited="1"] .quota-meter-neutral { display: none; }
.app-shell #menu .quota-caption { display: block; margin-top: 7px; color: #edf3ff; font-size: 12px; line-height: 1.4; }
.app-shell #menu .quota-status { display: block; margin-top: 7px; color: #d8e5fa; font-size: 12px; font-weight: normal; line-height: 1.4; }
.app-shell #menu [data-quota-state="normal"] .quota-status { display: none; }
.app-shell #menu [data-quota-state="warning"] .quota-status { color: #ffe088; }
.app-shell #menu [data-quota-state="blocked"] .quota-status,
.app-shell #menu [data-quota-state="unavailable"] .quota-status { color: #ffb5b5; }
.app-shell #menu [data-quota-state="blocked"] .quota-meter::-webkit-progress-value { background: #ef9690; }
.app-shell #menu [data-quota-state="blocked"] .quota-meter::-moz-progress-bar { background: #ef9690; }
.app-shell #menu [data-quota-state="unavailable"] .quota-limit { display: none; }
.app-shell #wrapper {
    max-width: none;
    margin: 0 0 0 var(--sidebar-width);
    padding: 24px 28px;
}
.app-shell #content {
    min-height: calc(100vh - var(--header-height) - 120px);
    padding: 24px 28px;
    margin: 0;
    border: 1px solid #eaf0f7;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}
.app-shell :is(h1, h2, h3, h4, h5, h6) { color: var(--brand-heading, var(--brand-color)); }
.app-shell h1 { margin: 0 0 22px; font-size: 32px; line-height: 1.25; font-weight: bold; letter-spacing: -.7px; }
.app-shell .page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.app-shell .page-heading h1 { margin: 0; }
.app-shell .back-link { margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 38px; padding: 8px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; color: var(--brand-color); font-size: 14px; font-weight: normal; line-height: 1.4; white-space: nowrap; text-decoration: none; }
.app-shell .back-link .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
.app-shell .back-link:is(:hover, :focus-visible) { border-color: #9fb6d5; background: #f0f5fc; color: var(--brand-dark); text-decoration: none; }
.app-shell #fixserverbanner { padding-top: 16px; }
.app-shell #fixserverbanner img { display: block; width: 970px; border: 1px solid #d9dde3; }
.app-shell .workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; font-size: 14px; }
.app-shell button.copyright { float: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; font: inherit; color: var(--brand-color); }
.app-shell #footer-menu { display: block; margin: 0; padding: 0; background: transparent; }
.app-shell #footer-menu ul { display: flex; gap: 20px; font: inherit; }
.app-shell #footer-menu ul li { float: none; padding: 0; }
.app-shell .transfer-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 0; }
.app-shell .transfer-form .transfer-field { min-width: 0; }
.app-shell .transfer-form label { display: block; margin-bottom: 7px; padding: 0; font-size: 15px; font-weight: bold; }
.app-shell .upload-options { display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(120px, .45fr) minmax(280px, 1.1fr) minmax(290px, 1.2fr); align-items: start; gap: 18px; }
@media (max-width: 1400px) {
    .app-shell .upload-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .app-shell .upload-options { grid-template-columns: minmax(0, 1fr); }
}
body.app-shell .plain-form.transfer-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), body.app-shell .transfer-form textarea {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: var(--form-control-height);
    padding: 9px 14px;
    border: 1px solid var(--workspace-border);
    border-radius: 5px;
    box-shadow: none;
    background: #fff;
    color: var(--brand-dark);
    font: inherit;
    line-height: 1.35;
}
body.app-shell .plain-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), body.app-shell .plain-form select { display: block; height: var(--form-control-height); }
body.app-shell .plain-form.transfer-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus, body.app-shell .transfer-form textarea:focus { background: #fff; box-shadow: 0 0 0 3px #366ce414; border-color: #6a91d5; }
.app-shell .transfer-form small { margin: 5px 0 0; color: var(--workspace-muted); font-size: 12px; line-height: 1.4; }
body.app-shell .transfer-form button {
    min-height: var(--form-control-height);
    padding: 9px 16px;
    border: 1px solid var(--brand-primary, var(--brand-color));
    border-radius: 5px;
    box-shadow: none;
    background: var(--brand-primary, var(--brand-dark));
    color: var(--brand-primary-text, #fff);
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}
body.app-shell .transfer-form :is(.secondary-button, .history-button) { background: #fff; color: var(--brand-color); border-color: var(--workspace-border); }
body.app-shell .transfer-form button:not(:disabled):is(:hover, :focus-visible) { background: #edf3ff; color: var(--brand-dark); border-color: #809fd1; }
body.app-shell .plain-form button[type="submit"]:not(.secondary-button):not(:disabled):is(:hover, :focus-visible) { border-color: var(--brand-primary-hover, #344b7c); background: var(--brand-primary-hover, #344b7c); color: var(--brand-primary-text, #fff); }
body.app-shell .transfer-form .history-button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; }
.app-shell .history-button .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.app-shell .control-row { display: flex; gap: 10px; align-items: stretch; }
.app-shell .control-row input + button { margin-top: 0; }
body.app-shell .transfer-form .control-row > .history-button { flex: 0 0 auto; width: auto; }
.app-shell .password-input { position: relative; flex: 1 1 auto; min-width: 0; }
body.app-shell .transfer-form :is(#upload-password, #download-password) { padding-right: 44px; }
body.app-shell .transfer-form .password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    min-height: 0;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--brand-color);
}
body.app-shell .transfer-form .password-toggle:disabled { border: 0; background: transparent; color: #8b99ae; opacity: 1; cursor: default; }
.app-shell .password-controls > button { flex: 0 0 auto; }
.app-shell .password-controls > button span { font-size: 20px; vertical-align: -1px; line-height: 1; }
.app-shell .unit-input { display: flex; align-items: stretch; }
body.app-shell .transfer-form #upload-size { border-radius: 5px 0 0 5px; }
.app-shell .unit-input > span { display: flex; align-items: center; padding: 0 16px; border: 1px solid var(--workspace-border); border-left: 0; border-radius: 0 5px 5px 0; background: #f5f8fc; font-size: 14px; }
.app-shell .filetype-controls { gap: 0; }
body.app-shell .transfer-form #upload-types { border-radius: 5px 0 0 5px; }
body.app-shell .transfer-form .filetype-controls > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; border-left: 0; border-radius: 0 5px 5px 0; }
.app-shell .filetype-input { flex: 1 1 auto; min-width: 0; }
.app-shell .filetype-input.is-enhanced { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: var(--form-control-height); padding: 5px 7px; border: 1px solid var(--workspace-border); border-radius: 5px 0 0 5px; background: #fff; }
.app-shell .filetype-input.is-enhanced:focus-within { border-color: #6a91d5; box-shadow: 0 0 0 3px #366ce414; }
.app-shell .filetype-input.is-enhanced:has(.filetype-entry:focus-visible) { outline: 2px solid #4a7ce0; outline-offset: 3px; }
.app-shell .filetype-tags { display: contents; }
.app-shell .filetype-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; min-height: 30px; padding: 2px 5px 2px 9px; border-radius: 4px; background: #dfe9f3; color: var(--brand-color); font-size: 13px; line-height: 1.4; }
.app-shell .filetype-tag-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell .filetype-tag.is-invalid { background: #fff1f0; color: #9d2c27; }
body.app-shell .transfer-form .filetype-remove { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: 3px; background: transparent; color: inherit; font-size: 18px; line-height: 1; }
body.app-shell .transfer-form .filetype-remove:not(:disabled):is(:hover, :focus-visible) { border: 0; background: #c8d9ec; color: var(--brand-dark); }
body.app-shell .plain-form.transfer-form .filetype-input.is-enhanced input.filetype-entry { flex: 1 1 80px; width: 80px; min-width: 0; height: 30px; min-height: 30px; padding: 2px 4px; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; font-size: 14px; }
body.app-shell .plain-form.transfer-form .filetype-input.is-enhanced input.filetype-entry:focus { background: transparent; box-shadow: none; }
.app-shell .filetype-controls > button .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
@media (max-width: 600px) {
    .app-shell .filetype-select-caption { display: none; }
    body.app-shell .transfer-form .filetype-controls > button { width: 44px; padding-inline: 12px; }
}
.app-shell .message-editor { overflow: hidden; border: 1px solid var(--workspace-border); border-radius: 5px; }
body.app-shell .transfer-form .message-editor textarea { display: block; min-height: 220px; border: 0; border-radius: 0; padding: 14px 17px; resize: vertical; }
.app-shell .message-editor .placeholder-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--workspace-border); background: #f3f7fb; }
.app-shell .placeholder-buttons > span { margin-right: 8px; color: var(--workspace-muted); font-size: 13px; }
body.app-shell .transfer-form .placeholder-buttons button { min-height: 32px; margin: 0; padding: 6px 15px; border: 0; border-radius: 4px; background: #dfe9f3; color: var(--brand-color); font-size: 13px; }
body.app-shell .transfer-form .placeholder-buttons .message-template { margin-left: auto; background: transparent; text-decoration: underline; }
.app-shell .transfer-form .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.app-shell .transfer-form .form-actions .secondary-button { border-color: var(--brand-primary, #667cc7); }
.app-shell .form-status { margin: 0; font-size: 15px; scroll-margin-block: 16px; }
.app-shell .form-status:empty { display: none; }
.app-shell .form-status:not(:empty) { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid #cbd8eb; border-left: 4px solid #6c8ab9; border-radius: 6px; background: #f0f5fc; color: #29456e; line-height: 1.5; }
.app-shell .form-status:not(:empty)::before { content: 'i'; flex: 0 0 22px; font-size: 18px; font-weight: bold; line-height: 1.25; text-align: center; }
.app-shell .form-status[data-status="success"] { border-color: #b9ddc5; border-left-color: #2b8450; background: #eaf7ee; color: #1d5b36; font-weight: bold; }
.app-shell .form-status[data-status="success"]::before { content: '✓'; }
.app-shell .form-status[data-status="error"] { border-color: #ebc3c0; border-left-color: #b7423d; background: #fff1f0; color: #9d2c27; }
.app-shell .form-status[data-status="error"]::before { content: '!'; }
.app-shell :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #4a7ce0; outline-offset: 3px; }
.app-shell #menu :is(a, button, summary):focus-visible { outline-color: #ffda71; }
@media (min-width: 901px) {
    body.app-shell { position: relative; }
}
@media (max-width: 1200px) {
    body.app-shell { --sidebar-width: 224px; }
    .app-shell #header .wrapper { gap: 22px; padding-right: 22px; }
    .app-shell #wrapper { padding: 22px; }
    .app-shell #content { padding: 22px; }
}
@media (max-width: 900px) {
    body.app-shell { --sidebar-width: 200px; }
    .app-shell #header .wrapper { flex-wrap: wrap; gap: 12px 20px; padding: 14px 20px; }
    .app-shell .workspace-logo { width: 160px; border: 0; padding: 0; }
    .app-shell .workspace-logo .logo { max-height: 44px; }
    .app-shell .typo-logozusatz { flex: 1 1 240px; }
    .app-shell .typo-logozusatz strong { font-size: 17px; }
    .app-shell .willkommen { margin-left: auto; }
    .app-shell .user-name, .app-shell .parent-session { white-space: normal; overflow-wrap: anywhere; }
    .app-shell #menu { position: static; width: auto; min-height: 0; padding: 8px 16px; }
    .app-shell #menu > ul { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
    .app-shell #menu > ul > li { flex: 1 1 180px; }
    .app-shell #menu .nav-link, .app-shell #menu .nav-group summary { gap: 12px; min-height: 48px; }
    .app-shell #menu .nav-group ul { margin-left: 20px; }
    .app-shell #menu > ul > li.quota-menu { flex: 1 1 100%; margin: 6px 0 0; padding: 10px 16px; border-top: 1px solid #ffffff30; }
    .app-shell #wrapper { margin: 0; }
    .app-shell #content { min-height: 0; }
}
@media (max-width: 600px) {
    .app-shell #header .wrapper { gap: 14px; padding: 16px; }
    .app-shell .workspace-logo { width: 120px; }
    .app-shell .typo-logozusatz { flex: 1 1 170px; font-size: 14px; }
    .app-shell .typo-logozusatz > span { border: 0; padding: 0; }
    .app-shell .willkommen { width: 100%; justify-content: space-between; text-align: left; }
    .app-shell #menu { padding: 8px; }
    .app-shell #menu > ul > li { flex: 1 1 100%; }
    .app-shell #wrapper { padding: 14px 10px; }
    .app-shell #content { padding: 20px 16px; }
    .app-shell h1 { font-size: 26px; }
    .app-shell .page-heading { align-items: flex-start; gap: 12px; }
    .app-shell .back-link { gap: 5px; padding: 7px 9px; font-size: 13px; }
    .app-shell .page-heading { flex-wrap: wrap; }
    .app-shell .transfer-form { gap: 22px; }
    .app-shell .control-row:has(> .history-button) { flex-wrap: wrap; }
    body.app-shell .transfer-form .control-row > .history-button { flex: 1 1 100%; width: 100%; }
    .app-shell .placeholder-buttons > span { flex-basis: 100%; }
    body.app-shell .transfer-form .placeholder-buttons .message-template { margin-left: 0; }
    body.app-shell .transfer-form .form-actions button { width: 100%; }
    .app-shell #fixserverbanner { padding-top: 16px; }
.app-shell .workspace-footer { align-items: flex-start; flex-wrap: wrap; font-size: 12px; }
}

/* Transfer overviews share the shell palette without changing other tables. */
.app-shell .transfer-overview .page-heading { align-items: center; margin-bottom: 28px; }
.app-shell .transfer-overview .overview-description { margin: 10px 0 0; color: var(--workspace-muted); font-size: 15px; }
.app-shell .transfer-overview .overview-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--brand-primary, var(--brand-dark));
    border-radius: 5px;
    background: var(--brand-primary, var(--brand-dark));
    color: var(--brand-primary-text, #fff);
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
}
.app-shell .transfer-overview .overview-create:is(:hover, :focus-visible) { background: var(--brand-primary-hover, #344b7c); border-color: var(--brand-primary-hover, #344b7c); color: var(--brand-primary-text, #fff); }
.app-shell .transfer-overview .overview-create .ui-icon { width: 20px; height: 20px; flex-basis: 20px; }
.app-shell .transfer-overview .overview-table { margin: 0; border: 1px solid #e1e8f2; border-radius: 7px; }
.app-shell .transfer-overview .ctable { min-width: 850px; border-collapse: collapse; border-spacing: 0; box-shadow: none; border-radius: 0; font-size: 14px; }
.app-shell .transfer-overview .ctable th,
.app-shell .transfer-overview .ctable td {
    padding: 16px;
    border: 0;
    border-bottom: 1px solid #e8edf5;
    border-radius: 0;
    background: #fff;
    vertical-align: middle;
    text-align: left;
    line-height: 1.5;
}
.app-shell .transfer-overview .ctable thead th { padding-top: 14px; padding-bottom: 14px; background: #f1f5fb; color: var(--brand-dark); font-size: 13px; font-weight: bold; }
.app-shell .transfer-overview .ctable tbody tr:nth-child(even) td { background: #fbfcfe; }
.app-shell .transfer-overview .ctable tbody tr:hover td { background: #f3f7fc; }
.app-shell .transfer-overview .ctable tbody tr:last-child td { border-bottom: 0; }
.app-shell .transfer-overview .sort-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin-left: 3px; }
.app-shell .transfer-overview .overview-date { color: var(--workspace-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-shell .transfer-overview .overview-subject { min-width: 170px; }
.app-shell .transfer-overview .overview-subject a { font-weight: bold; }
.app-shell .transfer-overview .overview-recipients { min-width: 220px; color: var(--workspace-muted); }
.app-shell .transfer-overview .ctable .overview-number { text-align: right; font-variant-numeric: tabular-nums; }
.app-shell .transfer-overview .overview-count { display: inline-block; min-width: 30px; padding: 3px 8px; border-radius: 5px; background: #eaf0f9; color: var(--brand-color); text-align: center; }
.app-shell .transfer-overview .overview-size { white-space: nowrap; }
.app-shell .transfer-overview .ctable .overview-actions-heading { text-align: right; }
.app-shell .transfer-overview .overview-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.app-shell .transfer-overview .overview-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    padding: 7px;
    border: 1px solid #d5e0ef;
    border-radius: 5px;
    background: #fff;
    color: var(--brand-color);
    box-shadow: none;
    line-height: 1;
    text-decoration: none;
}
.app-shell .transfer-overview .overview-action .ui-icon { width: 20px; height: 20px; flex-basis: 20px; }
.app-shell .transfer-overview .overview-action:is(:hover, :focus-visible) { border-color: #8da8d1; background: #eaf0fa; color: var(--brand-dark); }
.app-shell .transfer-overview .overview-delete:is(:hover, :focus-visible) { border-color: #dca4a4; background: #fff1f1; color: #a32828; }
.app-shell .downloads-overview .ctable { min-width: 1050px; }
.app-shell .downloads-overview .overview-validity { min-width: 180px; color: var(--workspace-muted); white-space: nowrap; }
.app-shell .downloads-overview .overview-status { display: inline-block; padding: 4px 9px; border-radius: 5px; background: #eaf0f9; color: var(--brand-color); font-size: 13px; }
.app-shell .transfer-overview .overview-table-empty .ctable { min-width: 0; }
.app-shell .transfer-overview .overview-table-empty thead { display: none; }
.app-shell .transfer-overview .ctable .overview-empty { padding: 36px 20px; text-align: center; color: var(--workspace-muted); white-space: normal; }
.app-shell .transfer-overview .overview-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; color: var(--workspace-muted); font-size: 13px; }
.app-shell .transfer-overview .overview-pagination > div { display: flex; gap: 10px; }
.app-shell .transfer-overview .overview-pagination a { display: inline-block; padding: 7px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; }
@media (max-width: 650px) {
    .app-shell .transfer-overview .page-heading { flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 20px; }
    .app-shell .transfer-overview .overview-description { font-size: 14px; }
    .app-shell .transfer-overview .overview-create { align-self: flex-start; }
    .app-shell .transfer-overview .ctable th, .app-shell .transfer-overview .ctable td { padding: 12px; }
}

/* Download-specific fields and the shared download file panel. */
.app-shell .download-form { gap: 16px; }
.app-shell .transfer-form .download-validity { margin: 0; padding: 0; border: 0; }
.app-shell .download-validity legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell .validity-options { display: grid; grid-template-columns: minmax(310px, 1.45fr) repeat(2, minmax(0, 1fr)) minmax(120px, .6fr); gap: 18px; }
.app-shell .validity-option { min-width: 0; }
.app-shell .download-form .validity-option label { display: flex; align-items: center; gap: 9px; min-height: 23px; margin-bottom: 7px; }
.app-shell .download-form input[type="radio"], .app-shell .download-form input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-color); }
.app-shell .download-form .validity-option input:not([type="radio"]) { margin: 0; }
body.app-shell .plain-form.transfer-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):disabled { background: #f1f3f7; border-color: #dce3ec; color: #7a879c; box-shadow: none; }
.app-shell .download-preferences { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.app-shell .download-cleanup .cleanup-caption { display: block; margin-bottom: 7px; font-size: 15px; font-weight: bold; }
.app-shell .download-form .cleanup-option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #f8fafd; font-size: 13px; font-weight: normal; line-height: 1.4; }
.app-shell .download-form .cleanup-option input { margin: 0; }
body.app-shell .download-form .message-editor textarea { min-height: 150px; padding: 12px 14px; }
.app-shell .download-form .placeholder-buttons { gap: 6px; padding: 8px 12px; }
.app-shell .download-form .control-row > button { flex: 0 0 auto; }
.app-shell .download-form + .transfer-file-panel { margin-top: 16px; padding-top: 14px; }
.app-shell .transfer-file-panel { margin-top: 32px; padding-top: 26px; border-top: 1px solid #e2e9f3; }
.app-shell .file-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.app-shell .file-panel-heading h2 { margin: 0; font-size: 20px; font-weight: bold; }
.app-shell .file-archive-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 16px; min-width: 0; }
.app-shell .file-archive { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.app-shell .file-archive .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.app-shell .transfer-file-panel:has([data-file-list]:empty) :is(.overview-table, .table-scroll-hint) { display: none; }
.app-shell .transfer-file-panel .ctable { min-width: 700px; }
.app-shell .transfer-file-panel .ctable thead th, .app-shell .transfer-file-panel .ctable tbody td { padding: 10px 12px; }
.app-shell .transfer-file-panel [data-file-list] td:last-child { white-space: nowrap; }
.app-shell .transfer-file-panel [data-file-upload] { gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid #dce5f1; border-radius: 6px; background: #f7faff; }
.app-shell .file-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; flex: 1 1 300px; min-width: 0; }
.app-shell .file-picker-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell .file-picker input { width: 350px; max-width: 100%; min-width: 0; font: inherit; font-size: 14px; color: var(--workspace-muted); }
.app-shell .file-picker small { color: var(--workspace-muted); font-size: 12px; }
.app-shell .file-selection-status { display: inline-flex; align-items: center; gap: 8px; }
.app-shell .file-upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body.app-shell .transfer-file-panel button,
body.app-shell .transfer-file-panel input[type="file"]::file-selector-button { padding: 8px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; color: var(--brand-color); box-shadow: none; font: inherit; font-size: 14px; line-height: 1.4; }
body.app-shell .transfer-form .form-actions button,
body.app-shell .transfer-file-panel .file-upload-actions button,
body.app-shell .transfer-file-panel input[type="file"]::file-selector-button { min-height: 46px; padding: 11px 22px; font-size: 16px; font-weight: bold; line-height: 1.4; }
body.app-shell .transfer-file-panel .file-upload-submit { border-color: var(--brand-primary, var(--brand-dark)); background: var(--brand-primary, var(--brand-dark)); color: var(--brand-primary-text, #fff); font-weight: bold; }
body.app-shell .transfer-file-panel button:not(:disabled):is(:hover, :focus-visible),
body.app-shell .transfer-file-panel input[type="file"]:not(:disabled):is(:hover, :focus-visible)::file-selector-button { border-color: #8da8d1; background: #eaf0fa; color: var(--brand-dark); box-shadow: none; }
body.app-shell .transfer-file-panel .file-upload-submit:not(:disabled):is(:hover, :focus-visible) { border-color: var(--brand-primary-hover, #344b7c); background: var(--brand-primary-hover, #344b7c); color: var(--brand-primary-text, #fff); }
body.app-shell .transfer-file-panel button:disabled { border-color: #dce3ec; background: #eef1f6; color: #7a879c; }
.app-shell .transfer-file-panel progress { max-width: 100%; accent-color: var(--brand-color); }
.app-shell .download-status { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--workspace-muted); font-size: 14px; }
.app-shell .download-status:empty { display: none; }
.app-shell .download-status.form-error { color: #9d2c27; }
.app-shell .file-selection-status[data-busy="true"]::before,
.app-shell .download-status[data-busy="true"]::before { content: ''; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid var(--workspace-border); border-top-color: var(--brand-primary, var(--brand-dark)); border-radius: 50%; animation: download-spin .8s linear infinite; }
.app-shell .transfer-file-panel a[aria-busy="true"] { opacity: .65; cursor: progress; }
@keyframes download-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .app-shell :is(.file-selection-status, .download-status)[data-busy="true"]::before { animation: none; }
}
.app-shell .transfer-file-panel .file-status { margin: 8px 0 0; font-size: 14px; }
.app-shell .transfer-file-panel .file-status:empty { min-height: 0; margin: 0; }
@media (max-width: 1200px) {
    .app-shell .validity-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .app-shell .validity-options, .app-shell .download-preferences { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .app-shell .file-panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .app-shell .file-archive-actions { width: 100%; justify-content: flex-start; }
    .app-shell .file-picker { flex-basis: 100%; }
    .app-shell .file-upload-actions { width: 100%; }
}

/* Compact administration uses the same controls and tables as the transfer pages. */
.app-shell .admin-overview .ctable { min-width: 720px; }
.app-shell .admin-overview .ctable thead th,
.app-shell .admin-overview .ctable tbody td { padding: 12px 14px; }
.app-shell .admin-login { font-weight: bold; }
.app-shell .admin-muted { color: var(--workspace-muted); }
.app-shell .admin-badge { display: inline-block; padding: 3px 9px; border-radius: 5px; background: #eaf0f9; color: var(--brand-color); font-size: 13px; }
.app-shell .admin-active-indicator { width: 18px; height: 18px; margin: 0; vertical-align: middle; accent-color: var(--brand-color); opacity: 1; cursor: default; }
.app-shell .admin-pagination { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--workspace-muted); font-size: 13px; }
.app-shell .admin-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.app-shell .admin-pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 4px 9px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; }
.app-shell .admin-pagination a[aria-current="page"] { border-color: var(--brand-primary, var(--brand-dark)); background: var(--brand-primary, var(--brand-dark)); color: var(--brand-primary-text, #fff); font-weight: bold; }
.app-shell .admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.app-shell .admin-form.tenant-editor { grid-template-columns: minmax(0, 1fr); }
.app-shell .admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.app-shell .admin-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-shell .admin-grid > * { min-width: 0; }
body.app-shell .plain-form.admin-form select { width: 100%; max-width: none; min-height: var(--form-control-height); padding: 9px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; box-shadow: none; background: #fff; color: var(--brand-dark); font: inherit; }
body.app-shell .plain-form.admin-form select:focus { border-color: #6a91d5; box-shadow: 0 0 0 3px #366ce414; }
body.app-shell .plain-form.admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])[readonly] { border-color: #dce3ec; background: #f3f5f9; color: var(--workspace-muted); box-shadow: none; }
body.app-shell .admin-form textarea { padding: 9px 12px; font-size: 14px; line-height: 1.5; resize: vertical; }
body.app-shell .admin-form #user-password { padding-right: 44px; }
.app-shell .admin-form .admin-check { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 0; font-size: 14px; font-weight: normal; }
.app-shell .admin-form .admin-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand-color); }
.app-shell .admin-form .admin-check-box { align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #f8fafd; }
.app-shell .admin-caption { display: block; margin-bottom: 7px; font-size: 15px; font-weight: bold; }
.app-shell .admin-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.app-shell .admin-form .admin-tools button { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.app-shell .admin-form .admin-note { margin: 10px 0 0; padding: 9px 12px; border: 1px solid #e2e9f3; border-radius: 5px; background: #f6f9fd; color: var(--workspace-muted); font-size: 12px; }
.app-shell .admin-disclosure { min-width: 0; padding: 12px 16px; border: 1px solid #e1e8f2; border-radius: 7px; background: #fbfcfe; }
.app-shell .admin-disclosure summary { color: var(--brand-heading, var(--brand-dark)); display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; cursor: pointer; font-size: 15px; font-weight: bold; list-style: none; }
.app-shell .admin-disclosure summary::-webkit-details-marker { display: none; }
.app-shell .admin-disclosure .disclosure-chevron { grid-column: 1; grid-row: 1; display: block; width: 16px; height: 16px; }
.app-shell .admin-disclosure[open] > summary .disclosure-chevron { transform: rotate(90deg); }
.app-shell .admin-disclosure .disclosure-title { grid-column: 2; grid-row: 1; }
.app-shell .admin-disclosure .disclosure-description { grid-column: 3; color: var(--workspace-muted); font-size: 12px; font-weight: normal; }
.app-shell .admin-disclosure .admin-grid, .app-shell .admin-disclosure > .admin-storage { margin-top: 14px; }
.app-shell .admin-storage { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr); align-items: start; gap: 16px; margin-bottom: 9px; }
.app-shell .admin-quota { padding: 12px 14px; border-radius: 5px; font-size: 12px; }
.app-shell .admin-quota-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.app-shell .admin-quota-values span { min-width: 0; color: var(--workspace-muted); }
.app-shell .admin-quota-values strong { display: block; margin-top: 3px; color: var(--brand-dark); font-size: 17px; }
.app-shell .admin-quota .quota-status { margin-top: 3px; font-weight: normal; }
.app-shell .admin-storage > .admin-note { margin-top: 0; }
.app-shell .admin-log-page .overview-description { margin: 8px 0 0; color: var(--workspace-muted); font-size: 15px; }
.app-shell .admin-log { width: 100%; min-height: 220px; max-height: 65vh; margin: 0; padding: 14px 16px; border: 1px solid #dce5f1; border-radius: 7px; background: #f7f9fc; color: var(--brand-dark); font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; line-height: 1.6; box-shadow: none; tab-size: 4; }
@media (max-width: 650px) {
    .app-shell .admin-form, .app-shell .admin-grid, .app-shell .admin-grid-three, .app-shell .admin-storage { grid-template-columns: minmax(0, 1fr); }
    .app-shell .admin-disclosure { padding: 12px; }
    .app-shell .admin-disclosure .disclosure-description { grid-column: 2 / -1; grid-row: 2; }
    .app-shell .admin-quota-values { gap: 9px; }
    .app-shell .admin-quota-values strong { font-size: 14px; }
    .app-shell .admin-log { min-height: 180px; padding: 12px; font-size: 12px; }
}

/* Transfer detail pages share summary, metrics and action styling. */
.app-shell .transfer-record .page-heading { margin-bottom: 18px; }
.app-shell .transfer-record .form-status { margin: 0 0 16px; }
.app-shell .record-meta { margin: 7px 0 0; color: var(--workspace-muted); font-size: 13px; }
.app-shell .record-summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e1e8f2; border-radius: 7px; background: #f6f9fd; }
.app-shell .record-summary > div { min-width: 0; }
.app-shell .record-eyebrow { color: var(--workspace-muted); font-size: 12px; }
.app-shell .record-summary h2 { margin: 3px 0 8px; font-size: 22px; font-weight: bold; line-height: 1.3; overflow-wrap: anywhere; }
.app-shell .record-recipients { margin: 0; color: var(--workspace-muted); font-size: 14px; overflow-wrap: anywhere; }
.app-shell .record-recipients strong { color: var(--brand-dark); font-weight: normal; }
.app-shell .record-notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #e8d9a6; border-radius: 5px; background: #fff9e7; color: #735313; font-size: 14px; }
.app-shell .record-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-bottom: 16px; border: 1px solid #e1e8f2; border-radius: 7px; background: #e1e8f2; }
.app-shell .record-stats > div { min-width: 0; padding: 12px 14px; background: #fff; }
.app-shell .record-stats span { display: block; color: var(--workspace-muted); font-size: 12px; }
.app-shell .record-stats strong { display: block; margin-top: 5px; font-size: 17px; font-weight: bold; line-height: 1.4; overflow-wrap: anywhere; }
.app-shell .record-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: 16px; }
.app-shell .record-card { min-width: 0; padding: 14px 16px; border: 1px solid #e1e8f2; border-radius: 7px; background: #fff; }
.app-shell .record-card h2 { margin: 0 0 14px; font-size: 16px; font-weight: bold; }
.app-shell .record-data { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; margin: 0; align-items: start; }
.app-shell .record-data dt { padding-top: 2px; color: var(--workspace-muted); font-size: 13px; }
.app-shell .record-data dd { min-width: 0; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.app-shell .record-password { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 4px; background: #edf2fa; color: var(--brand-dark); font-size: 14px; overflow-wrap: anywhere; }
.app-shell .record-message { width: 100%; min-height: 90px; max-height: 230px; margin: 0; padding: 12px; overflow: auto; border: 1px solid #e1e8f2; border-radius: 5px; box-shadow: none; background: #f7f9fc; color: var(--brand-dark); font: inherit; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-shell .record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; }
.app-shell .record-delete-form { margin-left: auto; }
body.app-shell .transfer-record .record-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex: 0 0 auto; min-height: 42px; padding: 9px 15px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; color: var(--brand-color); box-shadow: none; font: inherit; font-size: 14px; line-height: 1.5; text-decoration: none; white-space: nowrap; }
body.app-shell .transfer-record .record-primary { border-color: var(--brand-primary, var(--brand-dark)); background: var(--brand-primary, var(--brand-dark)); color: var(--brand-primary-text, #fff); font-weight: bold; }
body.app-shell .transfer-record .record-button .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
body.app-shell .transfer-record .record-danger { border-color: #e1bcbc; color: #9b3030; }
body.app-shell .transfer-record .record-button:not(:disabled):is(:hover, :focus-visible) { border-color: #8da8d1; background: #eaf0fa; color: var(--brand-dark); }
body.app-shell .transfer-record .record-primary:not(:disabled):is(:hover, :focus-visible) { border-color: var(--brand-primary-hover, #344b7c); background: var(--brand-primary-hover, #344b7c); color: var(--brand-primary-text, #fff); }
body.app-shell .transfer-record .record-danger:not(:disabled):is(:hover, :focus-visible) { border-color: #d39f9f; background: #fff1f1; color: #932525; }
.app-shell .transfer-record .transfer-file-panel { margin-top: 20px; padding-top: 14px; }
@media (max-width: 1000px) {
    .app-shell .record-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
    .app-shell .record-summary { align-items: flex-start; flex-direction: column; gap: 14px; }
    .app-shell .record-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell .record-stats strong { font-size: 15px; }
    .app-shell .record-data { grid-template-columns: minmax(0, 1fr); gap: 5px; }
    .app-shell .record-data dd { margin-bottom: 8px; }
    .app-shell .record-actions { align-items: stretch; flex-direction: column; }
    .app-shell .record-actions form, .app-shell .record-actions .record-button { width: 100%; }
    .app-shell .record-delete-form { margin-left: 0; }
}

/* Native selection dialogs: shared structure for email history and file types. */
body.app-shell dialog.choice-dialog { width: min(640px, calc(100vw - 32px)); max-width: 640px; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #dce5f1; border-radius: 10px; background: #fff; color: var(--brand-dark); box-shadow: 0 18px 55px #10244833; }
body.app-shell dialog.choice-dialog[open] { display: flex; flex-direction: column; }
body.app-shell dialog.choice-dialog::backdrop { background: #192a4366; }
.app-shell .choice-dialog-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #e3eaf4; }
.app-shell .choice-dialog-header > div { min-width: 0; }
.app-shell .choice-dialog-header h2 { margin: 0; font-size: 20px; font-weight: bold; line-height: 1.3; }
.app-shell .choice-dialog-header p { margin: 6px 0 0; color: var(--workspace-muted); font-size: 13px; line-height: 1.5; }
.app-shell .choice-dialog-content { flex: 1 1 auto; min-height: 0; padding: 16px 20px; overflow: auto; }
.app-shell .choice-dialog-footer { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e3eaf4; background: #f8fafd; }
body.app-shell dialog.choice-dialog button { margin: 0; padding: 9px 14px; border: 1px solid var(--workspace-border); border-radius: 5px; background: #fff; color: var(--brand-color); box-shadow: none; font-family: inherit; }
body.app-shell dialog.choice-dialog .dialog-button { min-height: 40px; }
body.app-shell dialog.choice-dialog .dialog-primary { border-color: var(--brand-primary, var(--brand-dark)); background: var(--brand-primary, var(--brand-dark)); color: var(--brand-primary-text, #fff); font-weight: bold; }
body.app-shell dialog.choice-dialog .dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border-color: transparent; background: transparent; font-size: 27px; line-height: 1; }
body.app-shell dialog.choice-dialog button:not(:disabled):is(:hover, :focus-visible) { border-color: #9fb6d5; background: #edf3fc; color: var(--brand-dark); box-shadow: none; }
body.app-shell dialog.choice-dialog .dialog-primary:not(:disabled):is(:hover, :focus-visible) { border-color: var(--brand-primary-hover, #344b7c); background: var(--brand-primary-hover, #344b7c); color: var(--brand-primary-text, #fff); }
.app-shell .email-history-list { display: grid; gap: 8px; }
body.app-shell dialog.choice-dialog .email-choice { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 11px 14px; text-align: left; overflow-wrap: anywhere; }
.app-shell .email-choice::after { content: '→'; flex: 0 0 auto; color: #7a8ca5; font-size: 18px; }
.app-shell .choice-dialog .dialog-empty { color: var(--workspace-muted); font-size: 14px; }
.app-shell .filetype-groups { display: grid; gap: 16px; }
.app-shell .choice-dialog .filetype-group { min-width: 0; margin: 0; padding: 0 0 16px; border: 0; border-bottom: 1px solid #e9eef6; }
.app-shell .choice-dialog .filetype-group:last-child { padding-bottom: 0; border-bottom: 0; }
.app-shell .filetype-group legend { margin-bottom: 10px; padding: 0; color: var(--brand-heading, var(--brand-dark)); font-size: 14px; font-weight: bold; }
.app-shell .filetype-options { display: flex; flex-wrap: wrap; gap: 8px; }
body.app-shell dialog.choice-dialog .filetype-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 7px 10px; border: 1px solid #d9e3f0; border-radius: 5px; background: #fff; color: var(--brand-color); font-size: 13px; cursor: pointer; }
body.app-shell dialog.choice-dialog .filetype-choice:has(input:checked) { border-color: #91add6; background: #edf3fc; }
.app-shell .filetype-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand-color); }
@media (max-width: 650px) {
    body.app-shell dialog.choice-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 8px; }
    .app-shell .choice-dialog-header { padding: 16px; }
    .app-shell .choice-dialog-content { padding: 14px 16px; }
    .app-shell .choice-dialog-footer { padding: 12px 16px; }
}

/* Login forms reuse the primary controls without changing native authentication. */
.app-shell .login-panel { width: 100%; max-width: 560px; }
.app-shell .login-panel h1 { margin-bottom: 12px; }
.app-shell .login-description { margin: 0 0 22px; color: var(--workspace-muted); font-size: 15px; line-height: 1.5; }
.app-shell .transfer-form.login-form { gap: 18px; }
.app-shell .login-form .form-actions { justify-content: flex-start; margin-top: 2px; }
.app-shell .login-form .form-actions > .back-link:first-child { margin-inline-start: 0; }
body.app-shell .login-form .form-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px; }
.app-shell .login-form .form-actions .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.app-shell .login-panel .errordescription { max-width: none; margin: 0 0 18px; padding: 11px 14px; border: 1px solid #ebc3c0; border-left: 4px solid #b7423d; border-radius: 6px; background: #fff1f0; color: #9d2c27; box-shadow: none; font-size: 14px; line-height: 1.5; }

/* Contact uses the shared native form controls and primary action. */
.app-shell .contact-page { max-width: 840px; }
.app-shell .contact-page > .form-status { margin-bottom: 18px; }
.app-shell .contact-description { margin: 0 0 20px; color: var(--workspace-muted); font-size: 15px; line-height: 1.5; }
.app-shell .transfer-form.contact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
body.app-shell .contact-form .form-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.app-shell .contact-form .form-actions .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
@media (max-width: 650px) {
    .app-shell .transfer-form.contact-form { grid-template-columns: minmax(0, 1fr); }
}
