/*
 * Swits Caretaker admin theme.
 * Internal governance console only; do not expand this into a custom tenant portal.
 */
:root {
    --swits-ink: #142235;
    --swits-muted: #5c6b7a;
    --swits-blue: #1377b9;
    --swits-teal: #0f8d86;
    --swits-surface: #f7fafb;
}

body {
    background: var(--swits-surface);
}

/*
 * Keep the fixed account control in its own bottom lane.  Without this
 * clearance, the dock can cover the final card or a changelist paginator.
 */
body.halo-has-account-dock #main {
    box-sizing: border-box;
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}

/*
 * Workspace-first admin shell.
 *
 * Unfold's role-filtered navigation configuration remains intact on the
 * server, while its visible rail is replaced by one compact account control.
 * The zero-width flex child means every admin screen can use the full canvas.
 */
.halo-account-shell {
    flex: 0 0 0;
    min-width: 0;
    width: 0;
}

.halo-account-dock {
    background: #fff;
    border: 1px solid #d9e2ea;
    border-radius: 12px;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 10px 28px rgba(15, 23, 42, .13);
    box-sizing: border-box;
    left: 1rem;
    max-width: calc(100vw - 2rem);
    position: fixed;
    width: 288px;
    z-index: 45;
}

.halo-account-dock__controller {
    position: relative;
}

.halo-account-dock__menu {
    background: #fff;
    border: 1px solid #d9e2ea;
    border-radius: 10px;
    bottom: calc(100% + .55rem);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    left: 0;
    line-height: 1.25;
    padding: .3rem;
    position: absolute;
    right: 0;
}

.halo-account-dock__menu a,
.halo-account-dock__menu form {
    margin-left: 0;
    margin-right: 0;
}

.halo-account-dock__menu a,
.halo-account-dock__menu button {
    border-radius: 8px;
}

.halo-account-dock__trigger {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 11px;
    box-shadow: none;
    color: var(--swits-ink);
    cursor: pointer;
    display: flex;
    gap: .75rem;
    min-height: 64px;
    padding: .65rem .75rem;
    text-align: left;
    width: 100%;
}

.halo-account-dock__trigger:hover {
    background: #f1f7f8;
}

.halo-account-dock__trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(81, 183, 194, .22);
    outline: none;
}

.halo-account-dock__identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.halo-account-dock__name,
.halo-account-dock__email {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.halo-account-dock__name {
    color: var(--swits-ink);
    font-weight: 700;
}

.halo-account-dock__email {
    color: var(--swits-muted);
    font-size: .75rem;
    margin-top: .2rem;
}

.halo-account-dock__chevron {
    color: #64748b;
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    transition: transform .15s ease;
}

.halo-account-dock__chevron--open {
    transform: rotate(180deg);
}

.dark .halo-account-dock,
.dark .halo-account-dock__menu {
    background: #111827;
    border-color: #334155;
}

.dark .halo-account-dock__trigger:hover {
    background: #172235;
}

.dark .halo-account-dock__name {
    color: #f1f5f9;
}

.dark .halo-account-dock__email,
.dark .halo-account-dock__chevron {
    color: #aebdcc;
}

@media (max-width: 640px) {
    .halo-account-dock {
        bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
        left: .75rem;
        max-width: calc(100vw - 1.5rem);
        width: 276px;
    }
}

.sidebar,
[data-simplebar] {
    color: var(--swits-ink);
}

.sidebar a,
nav a {
    letter-spacing: 0;
}

h1,
h2,
h3,
.font-semibold,
.font-medium {
    color: var(--swits-ink);
    letter-spacing: 0;
}

.breadcrumbs a,
a:where(:not(.button, .button-primary)) {
    color: var(--swits-blue);
}

.button,
input[type="submit"],
button[type="submit"] {
    border-radius: 6px;
}

.button.default,
input[type="submit"].default,
.object-tools a,
.submit-row input.default {
    background: var(--swits-blue);
}

/*
 * One navigation-button language across every custom Halo admin screen.
 * Page templates provide the destination and wording; this class owns the
 * shape, icon spacing, focus treatment and hover state everywhere.
 */
.halo-back-button,
.halo-nav-button {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
    color: #475569 !important;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 650;
    gap: .5rem;
    justify-content: center;
    line-height: 1;
    text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.halo-back-button {
    background: linear-gradient(180deg, #fff 0%, #f8fbfc 100%);
    border-radius: 999px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .055);
    min-height: 44px;
    padding: .42rem 1rem .42rem .45rem;
}

.halo-nav-button {
    border-radius: 10px;
    min-height: 44px;
    padding: .65rem 1rem;
}

.halo-back-button:hover,
.halo-nav-button:hover {
    background: #f2fbfc;
    border-color: #9bd8de;
    color: #147886 !important;
    box-shadow: 0 5px 14px rgba(20, 120, 134, .1);
}

.halo-back-button:focus-visible,
.halo-nav-button:focus-visible {
    border-color: #51b7c2;
    box-shadow: 0 0 0 3px rgba(81, 183, 194, .18);
    outline: none;
}

.halo-back-button .halo-back-button__icon {
    align-items: center;
    background: #e5f6f8;
    border-radius: 999px;
    color: #168897;
    display: inline-flex;
    font-size: 18px;
    height: 30px;
    justify-content: center;
    line-height: 1;
    width: 30px;
}

.halo-nav-button .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

.halo-back-button__label {
    align-items: center;
    display: inline-flex;
    line-height: 1;
}

.halo-back-button--spaced {
    margin-bottom: 1rem;
}

.dark .halo-back-button,
.dark .halo-nav-button {
    background: #111827;
    border-color: #475569;
    color: #e2e8f0 !important;
}

.dark .halo-back-button:hover,
.dark .halo-nav-button:hover {
    background: #172235;
    border-color: #67c7d0;
    color: #8ed9df !important;
}

.dark .halo-back-button .halo-back-button__icon {
    background: #12343a;
    color: #8ed9df;
}

/* Compact, keyboard-accessible language control shared by every admin page. */
.crm-lang-bar {
    box-sizing: border-box;
    padding: .7rem 1.5rem 0;
    width: 100%;
}

.crm-lang-bar__inner {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin: 0 auto;
    max-width: 1536px;
}

.crm-lang {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .055);
    display: inline-flex;
    gap: 2px;
    margin: 0;
    padding: 4px;
}

.crm-lang__label {
    align-items: center;
    background: #e5f6f8;
    border-radius: 999px;
    color: #168897;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.crm-lang__icon {
    font-size: 18px;
    line-height: 1;
}

button.crm-lang__option {
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    color: #52606d;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    min-height: 30px;
    padding: .45rem .75rem;
}

button.crm-lang__option:hover {
    background: #eef9fa;
    color: #147886;
}

button.crm-lang__option--current {
    background: #168897;
    color: #fff;
}

button.crm-lang__option--current:hover {
    background: #116e7a;
    color: #fff;
}

button.crm-lang__option:focus-visible {
    box-shadow: 0 0 0 3px rgba(81, 183, 194, .2);
    outline: none;
}

.object-tools a.historylink {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .05);
    color: #475569;
    display: inline-flex;
    font-weight: 700;
    min-height: 42px;
    padding: .6rem .95rem;
}

.dark .crm-lang,
.dark .object-tools a.historylink {
    background: #111827;
    border-color: #475569;
}

.dark button.crm-lang__option {
    color: #cbd5e1;
}

.dark button.crm-lang__option--current {
    background: #168897;
    color: #fff;
}

@media (max-width: 640px) {
    .crm-lang-bar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .crm-lang-bar__inner {
        justify-content: center;
    }
}

.object-tools a:hover,
.submit-row input.default:hover {
    background: var(--swits-teal);
}

table thead th {
    color: var(--swits-ink);
}

.help,
.quiet,
.small {
    color: var(--swits-muted);
}
