:root {
    --ink: #172640;
    --muted: #596a82;
    --blue: #245edf;
    --blue-soft: #edf3ff;
    --border: #dee5ef;
    --canvas: #f4f6fa;
    --panel: #fff;
    --radius: 12px;
    --shadow: 0 3px 10px rgb(23 38 64 / 3%);
    font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    color-scheme: light;
    -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
.wrap { width: min(100%, 1480px); margin-inline: auto; padding-inline: clamp(1rem, 4.3vw, 4.4rem); }
.workspace { margin-block: clamp(1.5rem, 3.3vw, 3.1rem) 4rem; }
a { color: var(--blue); text-decoration: none; }
a:where(:hover, :focus-visible) { color: #1748af; }
:where(.adm-help, .profile-data, .auth-intro) a { font-weight: 650; }
button, input, select, textarea { font: inherit; }
button, .btn, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.65rem; padding: .5rem 1rem;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--ink); font-weight: 600; cursor: pointer;
    text-decoration: none; line-height: 1.35;
}
button:hover, .btn:hover, .button:hover { border-color: #a6bbd9; background: #f4f7fc; text-decoration: none; }
.btn-primary, .button { color: white; background: var(--blue); border-color: var(--blue); }
.btn-primary:hover, .button:hover { color: white; border-color: #194bbf; background: #194bbf; }
.btn-secondary { color: #394c66; }
button:disabled { cursor: default; opacity: .5; }
input:not([type=checkbox],[type=radio],[type=hidden]), select, textarea {
    min-height: 2.7rem; max-width: 100%; min-width: 0; padding: .55rem .72rem;
    background: #fff; border: 1px solid #bdc9d9; border-radius: 7px; color: var(--ink); line-height: 1.4;
}
@media (forced-colors: none) {
    select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
        -webkit-appearance: none;
        appearance: none;
        padding-right: 2.5rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23596a82' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right .8rem center;
        background-size: 1rem 1rem;
    }
}
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 1.07rem; height: 1.07rem; }
input::placeholder, textarea::placeholder { color: #738198; }
textarea { resize: vertical; vertical-align: middle; }
label { font-weight: 550; }
:focus-visible { outline: 3px solid #548bf3; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--blue); outline-width: 2px; outline-offset: 1px; }
h1,h2,h3,p { overflow-wrap: break-word; }
h1,h2,h3 { margin-top: 0; color: var(--ink); line-height: 1.2; }
h1 { margin-bottom: 1.35rem; font-size: clamp(1.7rem, 2.1vw, 2.35rem); letter-spacing: -.045em; }
h2 { margin-bottom: 1rem; font-size: 1.3rem; letter-spacing: -.025em; }
h3 { font-size: 1.04rem; }
.muted { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { margin: 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid #e8edf3; text-align: left; }
th { background: #f7f9fc; font-size: .84rem; color: #55647c; font-weight: 650; }
fieldset { min-width: 0; border: 1px solid var(--border); border-radius: 10px; }
.skip-link { position: fixed; z-index: 50; top: -80px; left: 1rem; padding: .7rem 1rem; color: #fff; background: var(--blue); }
.skip-link:focus { top: 8px; }
.app-header { position: relative; z-index: 6; background: #fff; box-shadow: 0 1px 0 #d8e1ee; }
.app-bar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-block, .brand, .account-tools, .nav-items { display: flex; align-items: center; }
.brand { gap: .75rem; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; flex: none; width: 2.45rem; height: 2.45rem; border-radius: 10px;
    color: #fff; background: linear-gradient(145deg, #4d8dff, #234bd0); box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%);
}
.brand-mark .ui-icon { font-size: 1.45rem; }
.brand strong { font-size: 1.6rem; font-weight: 750; letter-spacing: -.065em; }
.brand-product { border-inline-start: 1px solid var(--border); padding-left: .95rem; margin-left: .15rem; font-weight: 550; color: #54647c; font-size: .98rem; }
.account-tools { gap: 1rem; }
.icon-button {
    position: relative; display: inline-grid; place-items: center; width: 2.7rem; height: 2.7rem; padding: 0;
    border: 1px solid var(--border); border-radius: 9px; background: white; color: #415573;
}
.icon-button:hover, .icon-button.current { background: var(--blue-soft); border-color: #c7d9fe; color: var(--blue); text-decoration: none; }
.icon-button .ui-icon { font-size: 1.2rem; }
.unread-count:not(:empty) { position: absolute; top: -.35rem; right: -.35rem; padding: .05rem .35rem; border-radius: 9px; color: white; background: #284fbe; font: 650 .68rem/1.3 Inter, sans-serif; }
.account-menu { position: relative; margin: 0; border: 0; }
.account-menu summary { display: flex; align-items: center; gap: .65rem; list-style: none; cursor: pointer; border-radius: 8px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary > .ui-icon { font-size: .8rem; color: var(--muted); margin-left: .45rem; }
.avatar { width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border-radius: 10px; color: #2450b7; background: #e7efff; font-size: 1.06rem; font-weight: 700; }
.account-name { display: grid; max-width: 13rem; overflow: hidden; text-overflow: ellipsis; font-size: .93rem; font-weight: 650; line-height: 1.35; }
.account-name small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.account-popover { position: absolute; z-index: 3; right: 0; top: calc(100% + 10px); width: max-content; padding: .4rem; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: 0 8px 28px #213c5e22; }
.account-popover button { border: 0; }
.nav-row { border-top: 1px solid #edf1f6; }
.nav-items { gap: .5rem; min-height: 53px; }
.nav-items a { color: #465670; font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: .58rem; padding: .53rem .88rem; border-radius: 7px; }
.nav-items a:first-child { margin-left: -.88rem; }
.nav-items a:hover { background: #f4f7fc; text-decoration: none; }
.nav-items a[aria-current] { background: var(--blue-soft); color: #1e53c5; }
.nav-items .ui-icon { font-size: 1.04rem; }
.mobile-menu-toggle { margin-right: .7rem; }
.notice, .errors { padding: .85rem 1.1rem; margin: 0 0 1rem; border-radius: 8px; }
.notice { display: flex; gap: .6rem; align-items: center; background: #e6f7ef; color: #166342; }
.errors { background: #fff0ed; color: #9d322b; padding-left: 2.2rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 0; }
.pagination-range { color: var(--muted); font-size: .9rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination li > span { display: grid; place-items: center; min-width: 2.15rem; height: 2.15rem; padding: 0 .35rem; border-radius: 6px; font-weight: 600; }
.pagination a:hover, .pagination [aria-current] { color: #1e53c5; background: var(--blue-soft); }
.activity-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 10; max-width: min(24rem,90vw); }
.activity-toasts > div { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 5px 24px #1d33551c; background: white; }
.activity-toasts button { border: 0; min-height: 2rem; padding: .25rem; }
@media(max-width: 44rem) {
    .app-bar { height: 62px; gap: .4rem; }
    .brand { gap: .5rem; }
    .brand-product, .account-name, .account-menu summary > .ui-icon { display: none; }
    .brand-mark { width: 2.1rem; height: 2.1rem; border-radius: 8px; }
    .brand strong { font-size: 1.38rem; }
    .account-tools { gap: .6rem; }
    .nav-items { align-items: stretch; flex-direction: column; gap: .15rem; padding-block: .5rem; }
    .nav-items a, .nav-items a:first-child { margin: 0; min-height: 42px; }
    .page-heading { align-items: flex-start; }
    input:not([type=checkbox],[type=radio]), textarea, select { font-size: 16px; }
}

.demo-workspace-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1.25rem; padding: .7rem 1rem; color: #304d78; background: #eaf1ff; border-radius: 8px; }

/* The badge is always absolutely positioned so an empty badge cannot create a second grid row. */
.notice-menu { position: relative; }
.notice-link { display: inline-flex; align-items: center; justify-content: center; }
.notice-link .ui-icon { display: block; width: 1em; height: 1em; line-height: 1; }
.notice-link .ui-icon::before { display: block; }
.notice-link .unread-count { position: absolute; }
.notice-link .unread-count:empty { display: none; }
.notice-panel {
    position: absolute; z-index: 4; top: calc(100% + 12px); right: 0;
    width: min(24rem, calc(100vw - 2rem)); color: var(--ink);
    border: 1px solid var(--border); border-radius: 12px; background: white;
    box-shadow: 0 12px 36px #24354d26; overflow: hidden;
}
.notice-heading, .notice-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem .95rem; }
.notice-heading { border-bottom: 1px solid var(--border); }
.notice-heading h2 { font-size: 1.08rem; margin: 0; }
.notice-close { padding: 0; min-height: 2rem; width: 2rem; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.notice-preview { max-height: min(50vh, 24rem); overflow-y: auto; overscroll-behavior: contain; }
.notice-preview ul { list-style: none; padding: 0; margin: 0; }
.notice-preview li { border-bottom: 1px solid #edf1f6; }
.notice-preview li:last-child { border-bottom: 0; }
.notice-preview li.unread { background: #f3f7ff; box-shadow: inset 3px 0 var(--blue); }
.notice-entry { display: flex; align-items: center; gap: .8rem; min-height: 44px; padding: .75rem .95rem; color: var(--ink); }
.notice-entry-text { flex: 1; min-width: 0; }
.notice-entry-text strong { display: block; margin: .18rem 0; font-size: .94rem; font-weight: 600; line-height: 1.4; }
.notice-entry > .ui-icon { color: var(--muted); font-size: .85rem; }
a.notice-entry:is(:hover, :focus-visible, :active) { background-color: #326bdf12; color: #183e83; }
a.notice-entry:focus-visible { outline-offset: -3px; }
.activity-toasts a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .65rem; color: var(--ink); font-weight: 600; }
.activity-toasts a:is(:hover, :focus-visible) { color: var(--blue); }
.activity-toasts a .ui-icon { font-size: .8rem; color: var(--muted); }
.notice-preview small, .notice-preview p { display: block; margin: 0; font-size: .85rem; color: var(--muted); }
.notice-preview p, .notice-preview strong, .notice-preview a { overflow-wrap: anywhere; }
.notice-preview .notice-empty { padding: 1.25rem .95rem; }
.notice-footer { border-top: 1px solid var(--border); font-size: .9rem; }
.notice-footer > a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.5rem; font-weight: 600; }
.notice-footer > a .ui-icon { font-size: .76em; }
.notice-footer button { min-height: 2rem; padding: .25rem .5rem; font-size: inherit; }
.notice-feedback { margin: 0; padding: .5rem .95rem; color: #9d322b; }
@media (max-width: 44rem) {
    .notice-panel { position: fixed; top: 58px; right: 1rem; }
}

.account-popover { display: grid; min-width: 12rem; }
.account-popover a, .account-popover button {
    display: flex; align-items: center; justify-content: flex-start; gap: .65rem;
    width: 100%; padding: .58rem .72rem; border-radius: 7px; font-weight: 550; color: var(--ink);
}
.account-popover a:hover, .account-popover button:hover { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
.account-popover .ui-icon, .profile-panel h2 .ui-icon { color: var(--blue); }
.profile-grid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 72rem; }
.profile-panel { padding: clamp(1rem, 2.4vw, 1.65rem); }
.profile-panel h2 { display: flex; align-items: center; gap: .65rem; }
.profile-form { display: grid; gap: .95rem; }
.profile-form label, .profile-data > div { display: grid; gap: .3rem; min-width: 0; }
.profile-form button { justify-self: start; }
.profile-data { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.profile-data dt, .profile-data small { color: var(--muted); font-size: .86rem; }
.profile-data dd { margin: 0; overflow-wrap: anywhere; }
.profile-data small { display: block; }
@media (max-width: 44rem) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }

.sound-setting { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.1rem; }
.sound-setting label { display: inline-flex; align-items: center; gap: .48rem; cursor: pointer; }
.sound-setting label input { margin: 0; }
.sound-setting p { width: 100%; margin: 0; }
.sound-setting-compact { padding: .65rem .95rem; border-top: 1px solid var(--border); font-size: .9rem; }
.sound-feedback { color: var(--muted); font-size: .85rem; }
