:root{
    --bg:#0b1020;
    --panel:#121a2d;
    --panel2:#17223a;
    --line:#263552;
    --text:#ecf2ff;
    --muted:#96a5bf;
    --accent:#6ea8fe;
    --good:#3ddc97;
    --warn:#ffcf66;
    --danger:#ff7b86;
    --body-bg:#0d1322;
    --chrome:#0a0f1b;
    --surface:#0e1628;
    --text-soft:#cbd8ef;
    --text-medium:#b8c6db;
    --line-light:#30415f;
    --white:#fff;
    --gold:#f4c542;
    --link-soft:#b9d4ff;
    --accent-soft:#9fbcf2;
    --success-soft:#6ee7b7;
}

*{
    box-sizing:border-box;
}

html,
body{
    min-height:100%;
}

body{
    margin:0;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
    background:var(--body-bg);
    color:var(--text);
}

a{
    color:var(--accent);
    text-decoration:none;
}

.topbar{
    min-height:64px;
    background:var(--chrome);
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    padding:0 24px;
    gap:28px;
    position:sticky;
    top:0;
    z-index:20;
}

.brand{
    display:flex;
    gap:10px;
    align-items:baseline;
    min-width:235px;
    flex-shrink:0;
}

.brand a{
    font-size:24px;
    font-weight:800;
    color:white;
}

.brand span{
    color:var(--muted);
    font-size:12px;
}

.global-nav{
    display:flex;
    align-items:center;
    gap:6px;
    flex:1;
    min-width:0;
}

.top-link{
    color:var(--text-soft);
    padding:9px 11px;
    border-radius:7px;
    white-space:nowrap;
    font-size:14px;
}

.top-link:hover,
.top-link.active{
    color:white;
    background:var(--panel2);
}

.topbar-account{
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
}

.user-chip{
    color:var(--text-soft);
    font-size:13px;
    border:1px solid var(--line);
    background:var(--surface);
    border-radius:999px;
    padding:7px 10px;
}

.linkbtn{
    background:none;
    border:0;
    color:var(--accent);
    padding:0;
    font:inherit;
    cursor:pointer;
}

.shell{
    min-height:calc(100vh - 64px);
}

.shell.with-org-sidebar{
    display:grid;
    grid-template-columns:260px minmax(0,1fr);
}

.org-sidebar{
    background:var(--chrome);
    border-right:1px solid var(--line);
    padding:18px 14px;
    display:flex;
    flex-direction:column;
    gap:14px;
    position:sticky;
    top:64px;
    height:calc(100vh - 64px);
    overflow-y:auto;
    align-self:start;
}

.org-switcher{
    display:block;
    padding:13px 12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
}

.org-switcher:hover{
    background:var(--panel2);
}

.org-kicker,
.org-switch-label{
    display:block;
    color:var(--muted);
    font-size:11px;
}

.org-kicker{
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:5px;
}

.org-name{
    display:block;
    color:white;
    font-size:15px;
    line-height:1.35;
    margin-bottom:5px;
    overflow-wrap:anywhere;
}

.org-switch-label{
    color:var(--accent);
}

.org-nav-label{
    color:var(--hl,#fb923c);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:10px;
    font-weight:800;
    padding:0 10px;
    margin-top:2px;
}

.org-nav{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.org-nav a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:var(--text-soft);
    padding:10px 11px;
    border-radius:8px;
    font-size:14px;
}

.org-nav a:hover{
    background:var(--panel2);
    color:white;
}

.org-nav a.active{
    color:white;
    background:var(--sh-3,#1b2a47);
    box-shadow:inset 3px 0 0 var(--accent);
}

.nav-count{
    min-width:24px;
    padding:2px 7px;
    text-align:center;
    border-radius:999px;
    background:var(--sh-1,#0b1323);
    border:1px solid var(--line);
    color:var(--muted);
    font-size:11px;
}

.org-nav a.active .nav-count{
    color:var(--tx-10,#dce9ff);
    border-color:var(--sh-9,#38598d);
}

.aside-note{
    margin-top:auto;
    color:var(--muted);
    font-size:11px;
    line-height:1.7;
    padding:12px;
    border-top:1px solid var(--line);
}

main{
    padding:30px;
    max-width:1500px;
    width:100%;
    margin:0 auto;
}

.with-org-sidebar main{
    max-width:none;
    margin:0;
}

.breadcrumbs{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    color:var(--muted);
    font-size:12px;
    margin-bottom:16px;
}

.breadcrumbs a{
    color:var(--accent-soft);
}

.breadcrumbs strong{
    color:var(--tx-10,#d8e5fa);
    font-weight:650;
}

.page-head,
.section-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.page-head{
    margin-bottom:22px;
}

.page-head h1,
h1{
    margin:0 0 6px;
}

.page-head p,
p{
    color:var(--muted);
}

.page-head p{
    margin:0;
}

.section-head h2,
.module-panel-head h2{
    margin:0;
}

.section-subtitle{
    margin:5px 0 0;
    font-size:13px;
}

.status-pill{
    display:inline-flex;
    align-items:center;
    border:1px solid #285742;
    background:#10271f;
    color:#8ce5b8;
    border-radius:999px;
    padding:7px 11px;
    font-size:12px;
    font-weight:700;
}

.importance-badge{
    display:inline-flex;
    align-items:center;
    width:max-content;
    max-width:100%;
    padding:4px 9px;
    border:1px solid transparent;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    line-height:1.2;
    white-space:nowrap;
}

.importance-critical{
    color:#ff9ca7;
    border-color:#873947;
    background:rgba(255,82,82,.14);
}

.importance-high{
    color:var(--hl-soft,#ffb454);
    border-color:#a96f22;
    background:color-mix(in srgb,var(--hl,rgb(255,159,67)) 14.0%,transparent);
}

.importance-medium{
    color:#ffe08a;
    border-color:#8c7428;
    background:rgba(255,207,102,.14);
}

.importance-low{
    color:var(--success-soft);
    border-color:#33785f;
    background:rgba(61,220,151,.12);
}

button,
.button{
    background:var(--accent);
    color:var(--on-accent,#08111f);
    border:0;
    border-radius:8px;
    padding:10px 15px;
    font-weight:700;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.button.secondary{
    background:var(--sh-4,#22314e);
    color:var(--tx-10,#dbe8ff);
}

.button.compact{
    padding:7px 11px;
    font-size:12px;
}

.metrics{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin:22px 0 32px;
}

.metrics>div,
.metric-card,
.card,
.form-card,
.secret-card,
section,
.auth-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
}

.metrics>div,
.metric-card{
    padding:20px;
}

.metric-card{
    display:block;
    color:var(--text);
    transition:background .15s ease,border-color .15s ease,transform .15s ease;
}

.metric-card:hover{
    background:var(--panel2);
    border-color:var(--sh-8,#38527d);
    transform:translateY(-1px);
}

.metrics b,
.metric-card b{
    font-size:30px;
    display:block;
    color:white;
}

.metrics span,
.metric-card span,
.card span,
.card small,
small,
.muted{
    color:var(--muted);
}

section{
    padding:20px;
    margin-bottom:18px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:12px;
}

.card{
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.card strong{
    color:white;
}

.two{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:18px;
}

.listitem,
.credential-row{
    min-height:58px;
    padding:12px 0;
    border-top:1px solid var(--line);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
}

.listitem{
    color:var(--text);
}

.listitem:hover b,
.credential-summary:hover b{
    color:var(--accent);
}

.listitem small,
.credential-row small,
.credential-summary small{
    display:block;
    margin-top:3px;
}

.list-chevron{
    color:var(--tx-0,#617493);
    font-size:24px;
}

.credential-summary{
    display:block;
    min-width:0;
    color:var(--text);
}

.table,
.audit-table{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
}

.row{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    color:var(--text);
}

/* Organization list */
.organization-list{
    border-color:var(--sh-7,#304b78);
}

.organization-list-row{
    grid-template-columns:
        minmax(180px,1.35fr)
        minmax(115px,.55fr)
        minmax(160px,1fr)
        90px
        105px
        minmax(190px,1.1fr)
        70px
        minmax(205px,auto);
    column-gap:18px;
    align-items:center;
    border-bottom-color:var(--sh-7,#304b78);
}

.organization-list-row:last-child{
    border-bottom:0;
}

.organization-list-name{
    min-width:0;
}

.organization-short-name{
    color:var(--muted);
    font-size:13px;
    font-weight:400;
    white-space:nowrap;
}

.organization-primary-contact{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.organization-status{
    font-weight:650;
}

.organization-status-active{
    color:var(--success-soft);
}

.organization-agent-count{
    white-space:nowrap;
}

.organization-agent-number{
    color:var(--accent-soft);
    font-weight:700;
}

.organization-object-summary{
    min-width:0;
    white-space:nowrap;
}

.organization-object-count{
    color:var(--hl,#ff9f43);
    font-weight:700;
}

.organization-created-date{
    justify-self:end;
    color:var(--muted);
    white-space:nowrap;
}

.form-card,
.secret-card{
    max-width:850px;
    padding:24px;
}

.form-card p{
    margin:0 0 16px;
}

.form-card label,
.secret-card label,
.auth-card label{
    display:block;
    color:var(--text-medium);
    margin:0 0 6px;
    font-weight:650;
}

.form-card .helptext{
    font-size:12px;
    color:var(--muted);
}

.form-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:22px;
}

input,
textarea,
select{
    width:100%;
    background:var(--surface);
    border:1px solid var(--line-light);
    color:var(--text);
    padding:11px 12px;
    border-radius:8px;
}

textarea{
    min-height:130px;
    resize:vertical;
}

input:focus,
textarea:focus,
select:focus{
    outline:none;
    border-color:var(--accent,#5d8ed8);
    box-shadow:0 0 0 3px rgba(110,168,254,.12);
}

.module-page-head{
    align-items:flex-end;
}

.module-panel{
    padding:0;
    overflow:hidden;
}

.module-panel-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 20px;
    border-bottom:1px solid var(--line);
    background:var(--sh-1,#10192b);
}

.module-panel-head>div{
    display:flex;
    align-items:baseline;
    gap:10px;
}

.module-panel-head span{
    color:var(--muted);
    font-size:12px;
}

.module-list{
    width:100%;
}

.module-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:15px 18px;
    border-bottom:1px solid var(--line);
}

.module-row:last-child{
    border-bottom:0;
}

.module-row:hover{
    background:var(--sh-2,#111b2f);
}

.module-row-main{
    flex:1;
    min-width:0;
    display:grid;
    grid-template-columns:minmax(180px,1.2fr) minmax(150px,1fr) minmax(180px,1.5fr);
    align-items:center;
    gap:16px;
    color:var(--text);
}

.module-row-main strong{
    color:white;
    overflow-wrap:anywhere;
}

.module-row-main span,
.module-row-main small{
    color:var(--muted);
    overflow-wrap:anywhere;
}

.module-row-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

/*
 * Consistent module-list columns
 *
 * Reserve a fixed actions column so the three information columns do not
 * shift left or right depending on how many action buttons a row contains.
 *
 * label.module-row is intentionally excluded because the global-import
 * checklist uses a different row structure.
 */
@media(min-width:651px){
    .module-row:not(label){
        display:grid;
        grid-template-columns:minmax(0,1fr) 360px;
    }

    .module-row:not(label) > .module-row-main{
        width:100%;
    }

    .module-row:not(label) > .module-row-actions{
        width:360px;
        justify-content:flex-end;
        flex-wrap:wrap;
    }
}

/* Slightly narrower reserved actions area on tablet-sized layouts. */
@media(min-width:651px) and (max-width:900px){
    .module-row:not(label){
        grid-template-columns:minmax(0,1fr) 280px;
    }

    .module-row:not(label) > .module-row-actions{
        width:280px;
    }
}

.empty-state{
    text-align:center;
    padding:52px 24px;
}

.empty-state h3{
    margin:0 0 8px;
}

.empty-state p{
    max-width:620px;
    margin:0 auto 20px;
}

/* Authentication pages */
body:has(.auth-card) .shell{
    display:block;
    min-height:calc(100vh - 64px);
}

body:has(.auth-card) .org-sidebar{
    display:none;
}

body:has(.auth-card) main{
    min-height:calc(100vh - 64px);
    max-width:none;
    width:100%;
    margin:0;
    padding:32px 20px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.auth-card{
    width:min(100%,480px);
    max-width:480px;
    margin:0;
    padding:28px;
}

.auth-card.wide{
    width:min(100%,620px);
    max-width:620px;
}

.auth-card h1{
    margin-bottom:10px;
}

.auth-card form{
    width:100%;
}

.auth-card button,
.auth-card .button{
    width:100%;
}

.qr{
    width:220px;
    height:220px;
    background:white;
    padding:8px;
    border-radius:10px;
    display:block;
    margin:18px auto;
}

.secret-card{
    display:grid;
    gap:9px;
}

.secret-card code{
    display:block;
    background:var(--sh-0,#09101d);
    border:1px solid var(--line);
    padding:12px;
    border-radius:8px;
    font-size:15px;
    word-break:break-all;
}

.secret-card .secret{
    font-size:18px;
}

.secret-card .otp{
    font-size:28px;
    letter-spacing:5px;
    color:var(--good);
}

.warn{
    color:var(--warn)!important;
}

.msg{
    padding:12px 15px;
    border-radius:8px;
    background:var(--sh-5,#283957);
    margin-bottom:16px;
}

.msg.warning{
    color:var(--warn);
    background:var(--panel2);
    border:1px solid var(--warn);
}

.big-search{
    display:flex;
    gap:8px;
    margin:20px 0;
}

.big-search input{
    flex:1;
}

.audit-row{
    display:grid;
    grid-template-columns:180px 140px 1fr 1fr 1fr;
    gap:10px;
    padding:10px 14px;
    border-bottom:1px solid var(--line);
    font-size:13px;
}

.audit-row.head{
    background:var(--panel2);
}


.audit-row:not(.head){
    background:var(--panel);
}

.audit-row:not(.head):nth-child(even){
    background:var(--sh-2,#211c3d);
}

@media(max-width:1100px){
    .topbar{
        gap:14px;
    }

    .brand{
        min-width:auto;
    }

    .brand span{
        display:none;
    }

    .top-link{
        padding:8px;
    }

    .user-chip{
        display:none;
    }
}

@media(max-width:900px){
    .topbar{
        align-items:flex-start;
        flex-wrap:wrap;
        padding:12px 16px;
    }

    .global-nav{
        order:3;
        flex-basis:100%;
        overflow-x:auto;
        padding-bottom:2px;
    }

    .shell.with-org-sidebar{
        display:block;
    }

    .org-sidebar{
        position:static;
        height:auto;
        border-right:0;
        border-bottom:1px solid var(--line);
        padding:12px 14px;
    }

    .org-switcher{
        margin-bottom:4px;
    }

    .org-nav-label,
    .aside-note{
        display:none;
    }

    .org-nav{
        flex-direction:row;
        overflow-x:auto;
        padding-bottom:3px;
    }

    .org-nav a{
        white-space:nowrap;
        flex-shrink:0;
    }

    .org-nav a.active{
        box-shadow:inset 0 -3px 0 var(--accent);
    }

    .metrics,
    .organization-metrics,
    .two{
        grid-template-columns:1fr 1fr;
    }

    .module-row-main{
        grid-template-columns:1fr 1fr;
    }

    .module-row-main small{
        grid-column:1 / -1;
    }
}

@media(max-width:650px){
    main{
        padding:20px 14px;
    }

    .topbar-account{
        margin-left:auto;
    }

    .top-link{
        font-size:13px;
    }

    .page-head,
    .section-head,
    .module-page-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .metrics,
    .organization-metrics,
    .two{
        grid-template-columns:1fr;
    }

    .module-row{
        align-items:flex-start;
        flex-direction:column;
    }

    .module-row-main{
        width:100%;
        grid-template-columns:1fr;
        gap:5px;
    }

    .module-row-main small{
        grid-column:auto;
    }

    .module-row-actions{
        width:100%;
    }

    .module-row-actions .button{
        flex:1;
    }

    .row{
        grid-template-columns:1fr;
        gap:5px;
    }

    .organization-list-row{
        grid-template-columns:1fr;
    }

    body:has(.auth-card) main{
        padding:20px 14px;
        align-items:flex-start;
    }

    .auth-card{
        margin-top:24px;
        padding:22px;
    }
}

/* =========================================================
   User and role management
   ========================================================= */
.role-summary-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin:0 0 22px;
}

.role-summary-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:7px;
}

.role-summary-card strong{
    color:white;
    font-size:16px;
}

.role-summary-card span{
    color:var(--muted);
    line-height:1.5;
    font-size:13px;
}


/* Built-in role summary colors */
.role-summary-admin{
    border-color:#a96f22;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb,var(--hl,rgb(255,159,67)) 14.0%,transparent),
            rgba(255,207,102,.035) 58%,
            var(--panel) 100%
        );
}

.role-summary-admin strong{
    color:var(--hl-soft,#ffb454);
}

.role-summary-management{
    border-color:#7651b5;
    background:
        linear-gradient(
            135deg,
            rgba(153,102,255,.14),
            rgba(118,81,181,.035) 58%,
            var(--panel) 100%
        );
}

.role-summary-management strong{
    color:var(--tx-6,#bd9cff);
}

.role-summary-user{
    border-color:#33785f;
    background:
        linear-gradient(
            135deg,
            rgba(61,220,151,.12),
            rgba(51,120,95,.035) 58%,
            var(--panel) 100%
        );
}

.role-summary-user strong{
    color:var(--success-soft);
}

.user-table{
    overflow:visible;
}

.user-row{
    display:grid;
    grid-template-columns:minmax(180px,1.25fr) 130px minmax(220px,1.5fr) 100px minmax(340px,1.15fr);
    gap:14px;
    align-items:start;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
}

.user-row:last-child{
    border-bottom:0;
}

.user-row-head{
    align-items:center;
    background:var(--panel2);
    color:var(--text-medium);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.05em;
    border-radius:12px 12px 0 0;
}

.user-row strong,
.user-row small{
    display:block;
}

.user-row small{
    margin-top:4px;
}

.user-identity{
    line-height:1.45;
}

.user-identity > div{
    display:block;
}

.user-identity strong{
    display:inline;
}

.role-badge-admin{
    color:var(--hl-soft,#ffb454);
    border-color:#a96f22;
    background:color-mix(in srgb,var(--hl,rgb(255,159,67)) 14.0%,transparent);
}

.role-badge-management{
    color:var(--tx-6,#bd9cff);
    border-color:#7651b5;
    background:rgba(153,102,255,.14);
}

.role-badge-user{
    color:var(--success-soft);
    border-color:#33785f;
    background:rgba(61,220,151,.12);
}

.role-badge,
.org-pill{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    border:1px solid var(--line);
    background:var(--surface);
    padding:4px 9px;
    font-size:12px;
    line-height:1.2;
}

.role-admin{
    color:#ffd98a;
    border-color:#735b25;
    background:#2d2515;
}

.role-management{
    color:var(--accent,#a9c9ff);
    border-color:var(--sh-9,#35588c);
    background:var(--sh-2,#12233d);
}

.role-user{
    color:#b7e9d4;
    border-color:#2e6653;
    background:#112a22;
}

.org-pill{
    color:var(--text-soft);
    margin:2px 4px 2px 0;
}

.status-good{
    color:var(--good);
    font-weight:700;
}

.status-muted{
    color:var(--muted);
    font-weight:700;
}

.user-actions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    flex-wrap:wrap;
}

.user-actions form{
    margin:0;
}

.small-button{
    padding:7px 10px;
    font-size:12px;
}

.mfa-reset-disabled{
    position:relative;
    display:inline-flex;
    align-items:center;
    outline:none;
    cursor:help;
}

.mfa-reset-disabled .button:disabled{
    opacity:.46;
    color:var(--muted);
    background:var(--panel2);
    border-color:var(--line);
    cursor:not-allowed;
    filter:saturate(.35);
}

.mfa-reset-disabled:focus-visible{
    border-radius:8px;
    outline:2px solid #60a5fa;
    outline-offset:3px;
}

.mfa-reset-tooltip{
    position:absolute;
    top:calc(100% + 9px);
    right:0;
    z-index:80;
    width:max-content;
    max-width:300px;
    padding:8px 10px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--panel2);
    color:var(--text);
    box-shadow:0 8px 24px rgba(0,0,0,.32);
    font-size:12px;
    font-weight:500;
    line-height:1.4;
    text-align:left;
    white-space:normal;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(-3px);
    transition:
        opacity .14s ease,
        transform .14s ease,
        visibility .14s ease;
}

.mfa-reset-disabled:hover .mfa-reset-tooltip,
.mfa-reset-disabled:focus-visible .mfa-reset-tooltip{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.user-form-card{
    max-width:760px;
}

/*
 * User form Boolean fields.
 * Keep standalone checkboxes directly under their option label instead of
 * allowing the global input width rule to stretch them across the card.
 */
.user-form-card .form-field > input[type="checkbox"]{
    display:block;
    width:16px;
    min-width:16px;
    height:16px;
    margin:0;
    padding:0;
    box-shadow:none;
}

.form-field{
    margin:0 0 18px;
}

.form-field label{
    display:block;
    color:var(--text-medium);
    margin:0 0 7px;
    font-weight:650;
}

.form-field .helptext{
    margin-top:6px;
    color:var(--muted);
    font-size:12px;
    line-height:1.45;
}

.field-error{
    color:#ff8b98;
    margin-top:6px;
    font-size:12px;
}

.organization-assignment select{
    min-height:180px;
}

.form-actions{
    display:flex;
    gap:10px;
    align-items:center;
    margin-top:8px;
}

.breadcrumb{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    font-size:12px;
    margin-bottom:8px;
}

.empty-state{
    padding:22px;
    color:var(--muted);
}

@media(max-width:1100px){
    .user-row{
        grid-template-columns:1.2fr 120px 1.2fr 90px;
    }

    .user-row > :last-child{
        grid-column:1/-1;
        justify-content:flex-start;
    }

    .user-row-head > :last-child{
        display:none;
    }
}

@media(max-width:800px){
    .role-summary-grid{
        grid-template-columns:1fr;
    }

    .user-row,
    .user-row-head{
        grid-template-columns:1fr;
        gap:8px;
    }

    .user-row-head{
        display:none;
    }

    .user-row{
        padding:18px;
    }

    .user-row > :last-child{
        grid-column:auto;
    }
}


/* =========================================================
   User deletion / management
   ========================================================= */
.page-head-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.button.danger,
button.danger{
    background:#9f3544;
    color:var(--white);
}

.button.danger:hover,
button.danger:hover{
    background:#bd4253;
    color:var(--white);
}

.danger-notice{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin:0 0 18px;
    padding:16px 18px;
    background:#2b171d;
    border:1px solid #6e303b;
    border-radius:12px;
}

.danger-notice strong{
    color:#ff9ca7;
}

.danger-notice span{
    color:#d9b6bb;
    font-size:13px;
    line-height:1.55;
}

.protected-user{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    background:var(--panel2);
    border:1px solid var(--line);
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

@media(max-width:700px){
    .page-head{
        align-items:flex-start;
        gap:14px;
    }

    .page-head-actions{
        width:100%;
        justify-content:flex-start;
    }
}

/* =========================================================
   Organization management
   ========================================================= */

.info-notice{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin:0 0 18px;
    padding:16px 18px;
    background:var(--sh-2,#101c30);
    border:1px solid var(--sh-7,#2b466c);
    border-radius:12px;
}

.info-notice strong{
    color:var(--link-soft);
}

.info-notice span{
    color:var(--tx-6,#aebdd3);
    font-size:13px;
    line-height:1.55;
}

.organization-management-table{
    overflow:visible;
}

.organization-manage-row{
    display:grid;
    grid-template-columns:minmax(220px,2fr) minmax(280px,2fr) 120px 110px 100px;
    gap:18px;
    align-items:center;
    padding:15px 18px;
    border-bottom:1px solid var(--line);
}

.organization-manage-row:last-child{
    border-bottom:0;
}

.organization-manage-head{
    background:var(--panel2);
    color:var(--text-soft);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.organization-manage-row strong{
    color:var(--white);
}

.organization-manage-row small{
    display:block;
    margin-top:4px;
}

.organization-counts{
    display:flex;
    gap:7px;
    flex-wrap:wrap;
}

.organization-counts span,
.org-pill{
    display:inline-flex;
    align-items:center;
    padding:4px 8px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface);
    color:var(--text-medium);
    font-size:11px;
}

.archived-row{
    background:rgba(150,165,191,.045);
}

.archived-row > div:first-child strong{
    color:var(--tx-6,#aeb8c8);
}

.status-archived{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    background:var(--sh-3,#292536);
    border:1px solid var(--sh-8,#4d4660);
    color:var(--tx-7,#c0b8d1);
    font-size:12px;
    font-weight:750;
}

.delete-confirm-card{
    max-width:900px;
    margin:0 auto;
    padding:24px;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
}

.delete-impact{
    margin:22px 0;
}

.delete-impact h2{
    margin:0 0 12px;
    font-size:17px;
}

.delete-impact-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}

.delete-impact-grid > div{
    padding:14px;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:9px;
}

.delete-impact-grid strong{
    display:block;
    color:var(--white);
    font-size:22px;
}

.delete-impact-grid span{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:12px;
}

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

.delete-confirm-form label{
    color:var(--tx-10,#d9e4f5);
    font-weight:650;
}

.delete-confirm-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-top:8px;
}

@media(max-width:1000px){
    .organization-manage-head{
        display:none;
    }

    .organization-manage-row{
        grid-template-columns:1fr 1fr;
    }

    .organization-manage-row > div:first-child,
    .organization-manage-row > .organization-counts{
        grid-column:1 / -1;
    }

    .delete-impact-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px){
    .organization-manage-row{
        grid-template-columns:1fr;
    }

    .organization-manage-row > div:first-child,
    .organization-manage-row > .organization-counts{
        grid-column:auto;
    }

    .delete-impact-grid{
        grid-template-columns:1fr;
    }

    .delete-confirm-actions{
        align-items:stretch;
        flex-direction:column-reverse;
    }

    .delete-confirm-actions .button{
        width:100%;
        text-align:center;
    }
}

/* =========================================================
   Expanded organization navigation
   ========================================================= */

.org-nav-separator{
    height:1px;
    margin:7px 10px;
    background:var(--line);
    opacity:.75;
}

.org-nav-group{
    margin:2px 0;
}

.org-nav-group > summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:40px;
    padding:9px 12px;
    border-radius:8px;
    color:var(--text-soft);
    cursor:pointer;
    user-select:none;
    font-size:13px;
    font-weight:700;
}

.org-nav-group > summary::-webkit-details-marker{
    display:none;
}

.org-nav-group > summary:hover{
    background:var(--panel2);
    color:var(--white);
}

.org-nav-group-chevron{
    color:var(--muted);
    font-size:18px;
    line-height:1;
    transition:transform .15s ease;
}

.org-nav-group[open] > summary{
    color:var(--white);
    background:color-mix(in srgb,var(--sh-2,rgb(23,34,58)) 55.0%,transparent);
}

.org-nav-group[open] > summary .org-nav-group-chevron{
    transform:rotate(90deg);
}

.org-nav-submenu{
    display:flex;
    flex-direction:column;
    gap:2px;
    margin:3px 0 4px 12px;
    padding-left:9px;
    border-left:1px solid var(--line);
}

.org-nav-submenu > a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:34px;
    padding:7px 10px;
    border-radius:7px;
    color:var(--tx-6,#aebdd3);
    font-size:12px;
}

.org-nav-submenu > a:hover{
    background:var(--panel2);
    color:var(--white);
}

.org-nav-submenu > a.active{
    background:var(--sh-3,#1b2b49);
    color:var(--white);
    box-shadow:inset 3px 0 0 var(--accent);
}

.org-nav-submenu .nav-count{
    min-width:20px;
    height:20px;
    padding:0 6px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:var(--sh-1,#0d1627);
    border:1px solid var(--line);
    color:var(--muted);
    font-size:10px;
}

.org-sidebar{
    overflow-y:auto;
    scrollbar-width:thin;
    scrollbar-color:var(--line-light) var(--chrome);
}

.org-sidebar::-webkit-scrollbar{
    width:8px;
}

.org-sidebar::-webkit-scrollbar-track{
    background:var(--chrome);
}

.org-sidebar::-webkit-scrollbar-thumb{
    background:var(--line-light);
    border-radius:999px;
}

/* User organization assignments: explicit, reversible checkbox selection. */
.organization-assignment-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:8px;
}

.organization-assignment-head > label{
    margin:0;
}

.organization-assignment-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.organization-checkbox-list{
    background:var(--surface);
    border:1px solid var(--line-light);
    border-radius:8px;
    padding:8px;
    max-height:220px;
    overflow:auto;
}

.organization-checkbox-list > div{
    display:grid;
    gap:2px;
}

.organization-checkbox-list > div > div{
    border-radius:6px;
}

.organization-checkbox-list label{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0;
    padding:8px 9px;
    cursor:pointer;
    color:var(--text);
    font-weight:500;
}

.organization-checkbox-list label:hover{
    background:rgba(110,168,254,.08);
}

.organization-checkbox-list input[type="checkbox"]{
    width:auto;
    min-width:16px;
    height:16px;
    margin:0;
    padding:0;
    box-shadow:none;
}

@media (max-width:640px){
    .organization-assignment-head{
        align-items:flex-start;
        flex-direction:column;
    }
}


/* =========================================================
   Archived module records
   ========================================================= */
.button.archive-toggle,
button.archive-toggle{
    background:#a96f22;
    color:#fff4df;
    border:1px solid var(--hl,#c9862a);
}

.button.archive-toggle:hover,
button.archive-toggle:hover{
    background:var(--hl,#c9862a);
    color:var(--white);
}

.button.archive-restore,
button.archive-restore{
    background:#8b6428;
    color:#fff1d2;
    border:1px solid #b88735;
}

.button.archive-restore:hover,
button.archive-restore:hover{
    background:#a9792f;
    color:var(--white);
}

.archived-module-panel{
    margin-top:18px;
    border-color:#76521e;
}

.archived-module-head{
    background:#211b14;
    border-bottom-color:#76521e;
}

.archived-module-head h2{
    color:#ffbd67;
}

.archived-module-row{
    background:rgba(169,111,34,.055);
}

.archived-module-row + .archived-module-row{
    border-top-color:#5d4728;
}


/* =========================================================
   Shared toggle switches
   ========================================================= */
.toggle-row{
    display:flex;
    align-items:flex-start;
    gap:14px;
    cursor:default;
    width:100%;
}

.toggle-row input[type="checkbox"]{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.toggle-switch-control{
    display:inline-flex;
    align-items:flex-start;
    flex:0 0 auto;
    width:54px;
    height:30px;
    cursor:pointer;
}

.toggle-switch{
    position:relative;
    display:inline-block;
    width:54px;
    min-width:54px;
    height:28px;
    background:#6b7280;
    border-radius:999px;
    transition:background .2s ease;
    flex:0 0 54px;
    margin-top:2px;
}

.toggle-switch::after{
    content:"";
    position:absolute;
    top:3px;
    left:3px;
    width:22px;
    height:22px;
    background:var(--white);
    border-radius:50%;
    transition:transform .2s ease;
    box-shadow:0 1px 4px rgba(0,0,0,.35);
}

.toggle-row input[type="checkbox"]:checked + .toggle-switch{
    background:#22c55e;
}

.toggle-row input[type="checkbox"]:checked + .toggle-switch::after{
    transform:translateX(26px);
}

.toggle-row input[type="checkbox"]:focus-visible + .toggle-switch{
    outline:2px solid #60a5fa;
    outline-offset:3px;
}

.toggle-label{
    display:block;
    font-weight:700;
    user-select:none;
    line-height:1.35;
}


/* Compact Boolean setting toggles */
.boolean-form-field{
    margin-bottom:18px;
}

.boolean-toggle-row{
    display:inline-flex;
    width:auto;
    align-items:center;
    gap:10px;
}

.boolean-toggle-row .toggle-label{
    line-height:30px;
}

.boolean-toggle-row .toggle-switch-control{
    align-items:center;
}

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


/* =========================================================
   MFA / account security page
   ========================================================= */
.mfa-settings-stack{
    width:min(100%,620px);
    display:flex;
    flex-direction:column;
    gap:20px;
}

.mfa-settings-stack .auth-card{
    width:100%;
    max-width:none;
    margin:0;
}


/* =========================================================
   Credential OTP live refresh
   ========================================================= */
.otp-meta{
    display:flex;
    align-items:center;
    gap:14px;
    min-height:22px;
    margin-top:-2px;
    color:var(--muted);
    font-size:13px;
}

#otp-countdown{
    font-variant-numeric:tabular-nums;
}

#otp-refresh-status{
    color:var(--warn);
}

/*
 * Reusable record metadata items.
 *
 * These compact values are intentionally button elements so they can copy
 * their underlying value without navigating away from the current record.
 * The native title tooltip exposes the full value on hover.
 */
.document-created-title{
    color:inherit;
    text-decoration:none;
    width:max-content;
    max-width:100%;
}

.document-created-title:hover{
    text-decoration:none;
}

.record-meta-items{
    grid-column:2 / -1;
    display:grid;
    grid-template-columns:1.15fr 1fr 1.2fr 0.8fr 1fr 1fr;
    align-items:center;
    column-gap:48px;
    min-width:0;
    width:100%;
}

.record-meta-item{
    appearance:none;
    border:0;
    background:transparent;
    color:inherit;
    padding:0;
    margin:0;
    font:inherit;
    font-size:0.88em;
    line-height:1.4;
    opacity:0.78;
    cursor:pointer;
    white-space:nowrap;
}

.record-meta-item:hover,
.record-meta-item:focus-visible{
    opacity:1;
    text-decoration:underline;
}

@media(max-width:900px){
    .record-meta-items{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        column-gap:32px;
        row-gap:8px;
    }
}

@media(max-width:650px){
    .record-meta-items{
        grid-column:auto;
        grid-template-columns:1fr;
        row-gap:7px;
    }
}

/*
 * Documents browser line-info alignment.
 *
 * Document rows use a dedicated title + metadata layout instead of inheriting
 * the generic three-column module-row grid. All six metadata positions share
 * consistent column starts across folders, uploaded files, and Killian
 * documents.
 */
.document-created-main{
    grid-template-columns:
        minmax(260px,1.45fr)
        minmax(0,4.55fr);
    column-gap:28px;
    row-gap:0;
}

.document-created-main .record-meta-items{
    grid-column:auto;
    grid-template-columns:
        minmax(150px,1.15fr)
        minmax(100px,.9fr)
        minmax(130px,1fr)
        minmax(80px,.7fr)
        minmax(190px,max-content)
        minmax(90px,.7fr);
    column-gap:18px;
}

.document-created-main .record-meta-static{
    white-space:nowrap;
}

@media(max-width:1100px){
    .document-created-main{
        grid-template-columns:1fr;
        row-gap:10px;
    }

    .document-created-main .record-meta-items{
        grid-column:auto;
        grid-template-columns:repeat(3,minmax(0,1fr));
        column-gap:24px;
        row-gap:8px;
    }
}

@media(max-width:650px){
    .document-created-main .record-meta-items{
        grid-template-columns:1fr;
        row-gap:7px;
    }
}



.copy-toast{
    position:fixed;
    left:50%;
    bottom:28px;
    transform:translateX(-50%);
    z-index:9999;
    padding:9px 14px;
    border-radius:7px;
    background:var(--sh-1,#0f172a);
    border:1px solid var(--sh-6,#334155);
    box-shadow:0 8px 24px rgba(0,0,0,0.28);
    color:var(--tx-10,#e5edf8);
    font-size:0.9rem;
    font-weight:600;
    pointer-events:none;
    opacity:0;
    transition:opacity 0.18s ease;
}

.copy-toast.show{
    opacity:1;
}

/*
 * Exact metadata column alignment.
 * Interactive buttons and static values share the same left edge
 * within each metadata grid column.
 */
.record-meta-item,
.record-meta-static{
    justify-self:start;
    text-align:left;
}


/*
 * Credential list metadata.
 *
 * Secrets are never embedded in the list-page HTML.  The Secret control
 * retrieves the value through the protected credential secret-copy endpoint.
 */
.credential-row-main{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
}

.credential-row-title{
    color:inherit;
    text-decoration:none;
    width:max-content;
    max-width:100%;
}

.credential-row-title:hover{
    text-decoration:none;
}

.credential-meta-items{
    display:grid;
    grid-template-columns:
        1.15fr
        1.35fr
        1.15fr
        0.62fr
        0.62fr
        0.62fr;
    align-items:center;
    column-gap:28px;
    min-width:0;
    width:100%;
}

.credential-meta-item{
    appearance:none;
    border:0;
    background:transparent;
    color:var(--muted);
    padding:0;
    margin:0;
    font:inherit;
    font-size:0.88em;
    line-height:1.4;
    cursor:pointer;
    white-space:nowrap;
    justify-self:start;
    text-align:left;
}

.credential-meta-static{
    color:var(--muted);
    font-size:0.88em;
    line-height:1.4;
    min-width:0;
    justify-self:start;
    text-align:left;
    white-space:nowrap;
}

.credential-meta-item:hover,
.credential-meta-item:focus-visible{
    color:var(--text);
    text-decoration:underline;
}

.credential-secret-copy{
    text-decoration:underline;
}

.credential-secret-label{
    text-decoration:underline;
}

.credential-hover-meta{
    cursor:help;
}

@media(max-width:1100px){
    .credential-meta-items{
        grid-template-columns:repeat(3,minmax(0,1fr));
        column-gap:28px;
        row-gap:7px;
    }
}

@media(max-width:650px){
    .credential-meta-items{
        grid-template-columns:1fr;
        row-gap:7px;
    }
}


/*
 * Asset list metadata.
 */
.asset-row-main{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
}

.asset-row-title{
    color:inherit;
    text-decoration:none;
    width:max-content;
    max-width:100%;
}

.asset-row-title:hover{
    text-decoration:none;
}

.asset-meta-items{
    display:grid;
    grid-template-columns:
        1.35fr
        1fr
        1fr
        1fr
        1fr
        1fr
        1.15fr
        1.25fr
        0.55fr;
    align-items:center;
    column-gap:22px;
    min-width:0;
    width:100%;
}

.asset-meta-item{
    appearance:none;
    border:0;
    background:transparent;
    color:var(--muted);
    padding:0;
    margin:0;
    font:inherit;
    font-size:0.88em;
    line-height:1.4;
    cursor:pointer;
    white-space:nowrap;
    justify-self:start;
    text-align:left;
}

.asset-meta-static{
    color:var(--muted);
    font-size:0.88em;
    line-height:1.4;
    min-width:0;
    white-space:nowrap;
    justify-self:start;
    text-align:left;
}

.asset-meta-item:hover,
.asset-meta-item:focus-visible{
    color:var(--text);
    text-decoration:underline;
}

.asset-notes-meta{
    cursor:help;
}

@media(max-width:1250px){
    .asset-meta-items{
        grid-template-columns:repeat(3,minmax(0,1fr));
        column-gap:28px;
        row-gap:7px;
    }
}

@media(max-width:650px){
    .asset-meta-items{
        grid-template-columns:1fr;
        row-gap:7px;
    }
}


/*
 * Shared line-info label styling.
 *
 * Use this class for the descriptive/name portion of metadata items across
 * module list rows. Values intentionally remain normal weight.
 */
.line-info-label{
    font-weight:600;
}



/*
 * Per-user module View preferences.
 */
.module-view-control{
    position:relative;
}

.module-view-control > summary{
    list-style:none;
    cursor:pointer;
    user-select:none;
}

.module-view-control > summary::-webkit-details-marker{
    display:none;
}

.module-view-menu{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    z-index:1200;
    width:280px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--sh-1,#101a2d);
    box-shadow:0 14px 32px rgba(0,0,0,0.32);
}

.module-view-menu-head{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin-bottom:12px;
}

.module-view-menu-head span{
    color:var(--muted);
    font-size:0.82rem;
}

.module-view-options{
    display:flex;
    flex-direction:column;
    gap:7px;
    max-height:340px;
    overflow:auto;
}

.module-view-option{
    display:flex;
    align-items:center;
    gap:9px;
    cursor:pointer;
    color:var(--text);
}

.module-view-option input{
    margin:0;
}

.module-view-menu-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid var(--line);
}


/*
 * Module View dropdown option alignment.
 * Keep each checkbox left-aligned with its label immediately beside it.
 */
.module-view-option{
    display:flex !important;
    flex-direction:row !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:8px !important;
    width:100%;
    text-align:left !important;
}

.module-view-option input[type="checkbox"]{
    flex:0 0 auto;
    margin:2px 0 0 0 !important;
}

.module-view-option span{
    display:block;
    flex:0 1 auto;
    width:auto !important;
    margin:0 !important;
    text-align:left !important;
    line-height:1.3;
}

/*
 * Compact Module View dropdown.
 * Shrink the menu to its option content and keep checkbox + label together.
 */
.module-view-menu{
    width:max-content !important;
    min-width:0 !important;
    max-width:calc(100vw - 32px) !important;
}

.module-view-options{
    align-items:flex-start !important;
    overflow-x:hidden !important;
}

.module-view-option{
    display:inline-flex !important;
    width:max-content !important;
    max-width:100% !important;
    flex:none !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:7px !important;
    white-space:nowrap !important;
}

.module-view-option input[type="checkbox"]{
    flex:0 0 auto !important;
    width:16px !important;
    min-width:16px !important;
    height:16px !important;
    margin:0 !important;
    padding:0 !important;
}

.module-view-option span{
    display:inline !important;
    flex:none !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    white-space:nowrap !important;
    text-align:left !important;
}

.module-view-menu-head{
    max-width:190px;
}

.module-view-menu-head span{
    white-space:normal;
}


/* =========================================================
   Full module data tables
   ========================================================= */
.module-table-wrap{
    width:100%;
    overflow-x:auto;
    overflow-y:visible;
    scrollbar-gutter:stable;
}

.module-data-table{
    width:max-content;
    min-width:100%;
    border-collapse:separate;
    border-spacing:0;
    color:var(--text);
}

.module-data-table th,
.module-data-table td{
    min-width:150px;
    padding:12px 14px;
    border-bottom:1px solid var(--line);
    vertical-align:middle;
    text-align:left;
    white-space:nowrap;
}

.module-data-table th{
    position:relative;
    background:var(--sh-1,#0d1729);
    color:var(--tx-10,#dbe7fb);
    font-size:0.82rem;
    font-weight:700;
}

.module-data-table th.primary-column,
.module-data-table td.primary-cell{
    min-width:190px;
}

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

.module-data-table tbody tr:hover td{
    background:var(--sh-2,#111b2f);
}

.module-table-sort{
    appearance:none;
    border:0;
    background:transparent;
    color:inherit;
    padding:0;
    margin:0;
    display:inline-flex;
    align-items:center;
    gap:7px;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
}

.module-table-sort:hover,
.module-table-sort:focus-visible{
    color:var(--white);
}

.module-table-sort-indicator{
    color:var(--muted);
    font-size:0.78rem;
    line-height:1;
}

.module-table-primary-link{
    color:var(--white);
    font-weight:700;
    text-decoration:none;
}

.module-table-primary-link:hover{
    color:var(--accent);
    text-decoration:none;
}

.module-table-truncated{
    cursor:help;
}

.module-table-empty{
    color:var(--muted);
}

.module-table-actions-heading,
.module-table-actions{
    position:sticky !important;
    right:0;
    min-width:300px !important;
    width:300px;
    z-index:3;
    border-left:1px solid var(--line);
}

.module-table-actions-heading{
    z-index:5;
    background:var(--sh-1,#0d1729) !important;
}

.module-table-actions{
    background:var(--panel);
}

.module-data-table tbody tr:hover .module-table-actions{
    background:var(--sh-2,#111b2f);
}

.module-table-action-buttons{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    min-width:max-content;
}

.module-table-action-buttons form{
    display:inline;
    margin:0;
}

.module-table-empty-row{
    color:var(--muted);
    text-align:center !important;
    padding:36px 20px !important;
}

.module-secret-cell{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-width:max-content;
}

.module-secret-dots{
    color:var(--muted);
    letter-spacing:1px;
    font-weight:700;
}

.module-secret-action{
    position:relative;
    appearance:none;
    border:0;
    background:transparent;
    color:var(--muted);
    padding:3px;
    margin:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:5px;
    cursor:pointer;
}

.module-secret-action:hover,
.module-secret-action:focus-visible{
    color:var(--text);
    background:rgba(110,168,254,.10);
}

.module-secret-tooltip{
    position:absolute;
    left:50%;
    bottom:calc(100% + 9px);
    transform:translateX(-50%);
    z-index:1500;
    width:max-content;
    max-width:360px;
    padding:7px 9px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--sh-0,#07101f);
    color:var(--white);
    font-size:0.78rem;
    font-weight:500;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    box-shadow:0 10px 28px rgba(0,0,0,.4);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .12s ease;
}

.module-secret-action:hover .module-secret-tooltip,
.module-secret-action:focus-visible .module-secret-tooltip{
    opacity:1;
    visibility:visible;
}

.archived-module-row td{
    opacity:.78;
}

@media(max-width:650px){
    .module-data-table th,
    .module-data-table td{
        min-width:135px;
        padding:10px 12px;
    }

    .module-table-actions-heading,
    .module-table-actions{
        min-width:250px !important;
        width:250px;
    }
}


/* Live credential TOTP table cells */
.module-totp-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.module-totp-countdown {
    font-size: 0.78rem;
    opacity: 0.72;
    white-space: nowrap;
}


/* Credential reveal security policy */
.security-policy-warning[hidden] {
    display: none !important;
}

.security-policy-warning {
    margin-left: auto;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 82, 82, 0.55);
    border-radius: 0.45rem;
    background: rgba(255, 82, 82, 0.08);
    color: #ff6b6b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.security-window-setting {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.security-window-setting > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.security-window-setting .muted {
    margin: 8px 0 0;
}

.security-window-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-window-input input {
    width: 90px;
}


/* =========================================================
   Manage Users cleanup
   ========================================================= */

.manage-user-row{
    grid-template-columns:
        minmax(220px,1.35fr)
        minmax(120px,.55fr)
        minmax(260px,1.55fr)
        110px
        120px;
    column-gap:24px;
}

.manage-user-row > :nth-child(4),
.manage-user-row > :nth-child(5){
    justify-self:center;
}

.manage-user-row.user-row-head > :nth-child(4),
.manage-user-row.user-row-head > :nth-child(5){
    text-align:center;
}

.manage-user-row .user-actions{
    width:100%;
    justify-content:center;
    flex-wrap:nowrap;
}

.manage-user-row .user-actions .button{
    min-width:74px;
    text-align:center;
}

.protected-user{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:74px;
    padding:7px 10px;
    border-radius:999px;
    background:var(--panel2);
    border:1px solid var(--line);
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    line-height:1;
    cursor:help;
    outline:none;
}

.protected-user:focus-visible{
    outline:2px solid #60a5fa;
    outline-offset:3px;
}

.protected-user-tooltip{
    position:absolute;
    top:calc(100% + 9px);
    left:50%;
    z-index:50;
    width:max-content;
    max-width:310px;
    padding:8px 10px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--panel2);
    color:var(--text);
    box-shadow:0 8px 24px rgba(0,0,0,.32);
    font-size:12px;
    font-weight:500;
    line-height:1.4;
    text-align:left;
    white-space:normal;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateX(-50%) translateY(-3px);
    transition:
        opacity .14s ease,
        transform .14s ease,
        visibility .14s ease;
}

.protected-user:hover .protected-user-tooltip,
.protected-user:focus .protected-user-tooltip{
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

@media(max-width:900px){
    .manage-user-row{
        grid-template-columns:
            minmax(180px,1.25fr)
            120px
            minmax(200px,1.25fr)
            100px
            110px;
        column-gap:14px;
    }
}


/* =========================================================
   Killian Favorites system
   ========================================================= */

.favorites-toolbar-menu{
    position:relative;
}

.favorites-toolbar-menu > summary{
    list-style:none;
}

.favorites-toolbar-menu > summary::-webkit-details-marker{
    display:none;
}

.favorites-toolbar-button{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    padding:0;
    border:0;
    border-radius:8px;
    background:transparent;
    color:var(--gold);
    cursor:pointer;
}

.favorites-toolbar-button:hover,
.favorites-toolbar-menu[open] .favorites-toolbar-button{
    background:var(--panel2);
}

.favorites-toolbar-button svg{
    fill:currentColor;
}

.favorites-toolbar-count{
    position:absolute;
    top:1px;
    right:0;
    min-width:16px;
    height:16px;
    padding:0 4px;
    border:2px solid var(--chrome);
    border-radius:999px;
    background:var(--hl-soft,#e9b949);
    color:#15100a;
    font-size:9px;
    font-weight:800;
    line-height:12px;
    text-align:center;
}

.favorites-toolbar-count[hidden]{
    display:none !important;
}

.favorites-toolbar-dropdown{
    position:absolute;
    top:calc(100% + 9px);
    right:0;
    z-index:60;
    width:310px;
    max-width:calc(100vw - 24px);
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel);
    box-shadow:0 16px 36px rgba(0,0,0,.38);
}

.favorites-toolbar-head{
    padding:12px 14px;
    border-bottom:1px solid var(--line);
}

.favorites-toolbar-item{
    display:flex;
    flex-direction:column;
    gap:3px;
    padding:11px 14px;
    color:var(--text);
    border-bottom:1px solid rgba(255,255,255,.045);
}

.favorites-toolbar-item:hover{
    background:var(--panel2);
}

.favorites-toolbar-item strong{
    overflow:hidden;
    color:var(--text);
    font-size:13px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.favorites-toolbar-item span{
    overflow:hidden;
    color:var(--muted);
    font-size:11px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.favorites-toolbar-empty{
    padding:18px 14px;
    color:var(--muted);
    font-size:12px;
    text-align:center;
}

.favorites-toolbar-view-all{
    display:block;
    padding:11px 14px;
    color:var(--accent-soft);
    font-size:12px;
    font-weight:700;
    text-align:center;
}

.favorites-toolbar-view-all:hover{
    background:var(--panel2);
}

.page-favorite-toggle,
.favorite-list-star{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:40px;
    height:40px;
    padding:0;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--panel);
    color:var(--tx-4,#94a3b8);
    cursor:pointer;
}

.page-favorite-toggle[hidden]{
    display:none !important;
}

.page-favorite-toggle:hover,
.favorite-list-star:hover{
    background:var(--panel2);
    color:var(--gold);
}

.page-favorite-toggle svg,
.favorite-list-star svg{
    fill:transparent;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linejoin:round;
}

.page-favorite-toggle.active,
.favorite-list-star.active{
    color:var(--gold);
}

.page-favorite-toggle.active svg,
.favorite-list-star.active svg{
    fill:var(--gold);
    stroke:var(--gold);
}

.page-favorite-toggle:disabled,
.favorite-list-star:disabled{
    cursor:wait;
    opacity:.6;
}

.favorites-page-list{
    display:flex;
    flex-direction:column;
}

.favorite-list-row{
    display:flex;
    align-items:center;
    gap:16px;
    min-height:72px;
    padding:13px 16px;
    border-bottom:1px solid var(--line);
}

.favorite-list-row:last-child{
    border-bottom:0;
}

.favorite-list-row:hover{
    background:rgba(255,255,255,.018);
}

.favorite-list-main{
    display:flex;
    flex:1;
    flex-direction:column;
    gap:4px;
    min-width:0;
    color:var(--text);
}

.favorite-list-main strong{
    overflow:hidden;
    color:var(--text);
    text-overflow:ellipsis;
    white-space:nowrap;
}

.favorite-list-main span{
    overflow:hidden;
    color:var(--muted);
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.favorite-list-star{
    width:38px;
    height:38px;
    border-color:transparent;
    background:transparent;
}

@media(max-width:700px){
    .favorites-toolbar-dropdown{
        position:fixed;
        top:66px;
        right:12px;
        left:12px;
        width:auto;
        max-width:none;
    }

    .favorite-list-row{
        padding:12px;
    }
}

/* =========================================================
   Verbose Audit Log
   ========================================================= */

.audit-filter-panel{
    display:grid;
    grid-template-columns:minmax(260px,2fr) repeat(4,minmax(150px,1fr)) auto;
    gap:12px;
    align-items:end;
    margin-bottom:18px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--panel);
}

.audit-filter-panel label{
    display:block;
    margin:0 0 6px;
    color:var(--text-medium);
    font-size:12px;
    font-weight:700;
}

.audit-filter-actions{
    display:flex;
    gap:8px;
    align-items:center;
}

.audit-results-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:10px;
    color:var(--muted);
    font-size:12px;
}

.audit-results-head strong{
    color:var(--text);
}

.audit-table-wrap{
    overflow-x:auto;
    border-radius:12px;
}

.audit-table.audit-table-verbose{
    min-width:1500px;
}

.audit-row.audit-row-verbose{
    grid-template-columns:
        155px
        135px
        130px
        220px
        180px
        170px
        minmax(280px,1fr)
        minmax(300px,1fr);
    gap:14px;
    align-items:start;
    padding:12px 14px;
}

.audit-row.audit-row-verbose > span{
    min-width:0;
    overflow-wrap:anywhere;
}

.audit-row.audit-row-verbose small{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:11px;
    line-height:1.35;
}

.audit-time,
.audit-ip{
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
}

.audit-ip{
    color:var(--link-soft);
}

.audit-action{
    display:inline-block;
    max-width:100%;
    padding:3px 6px;
    border:1px solid var(--sh-6,#314463);
    border-radius:5px;
    background:var(--sh-1,#101a2d);
    color:var(--tx-9,#c7daf8);
    font-size:11px;
    white-space:normal;
}

.audit-summary{
    line-height:1.45;
}

.audit-request{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.audit-request code{
    color:var(--tx-7,#b8c9e6);
    font-size:11px;
    overflow-wrap:anywhere;
}

.audit-method{
    display:inline-flex;
    width:max-content;
    padding:2px 6px;
    border:1px solid var(--sh-8,#355476);
    border-radius:4px;
    background:var(--sh-2,#11243a);
    color:var(--accent,#a9d3ff);
    font-size:10px;
}

.audit-empty{
    padding:30px 18px;
    color:var(--muted);
    text-align:center;
}

@media(max-width:1200px){
    .audit-filter-panel{
        grid-template-columns:repeat(3,minmax(160px,1fr));
    }

    .audit-filter-search{
        grid-column:span 2;
    }
}

@media(max-width:700px){
    .audit-filter-panel{
        grid-template-columns:1fr;
    }

    .audit-filter-search{
        grid-column:auto;
    }

    .audit-filter-actions{
        width:100%;
    }

    .audit-filter-actions > *{
        flex:1;
    }

    .audit-results-head{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }
}



/* =========================================================
   Killian IP Control
   ========================================================= */

.ip-control-current{
    margin-bottom:18px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--panel);
    color:var(--muted);
}

.ip-control-current strong{
    margin-right:8px;
    color:var(--text);
}

.ip-control-current code{
    color:var(--link-soft);
}

.ip-control-grid{
    display:grid;
    grid-template-columns:minmax(320px,420px) minmax(0,1fr);
    gap:22px;
    align-items:start;
}

.ip-control-form{
    padding:20px;
}

.ip-control-form .form-field{
    margin-bottom:16px;
}

.ip-control-form .form-field label{
    display:block;
    margin-bottom:6px;
    color:var(--text-medium);
    font-weight:700;
}

.ip-control-form .form-field small{
    display:block;
    margin-top:5px;
    color:var(--muted);
    font-size:11px;
    line-height:1.4;
}

.ip-control-check{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin:12px 0;
    color:var(--text);
}

.ip-control-check input{
    width:auto;
    margin-top:3px;
}

.ip-control-self-warning{
    padding:10px 12px;
    border:1px solid #694d29;
    border-radius:8px;
    background:#2a2116;
    color:#f0c782;
}

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

.ip-control-table{
    min-width:1320px;
}

.ip-control-row{
    display:grid;
    grid-template-columns:
        85px
        180px
        95px
        145px
        80px
        155px
        120px
        minmax(180px,1fr)
        260px;
    gap:12px;
    align-items:center;
    padding:11px 14px;
    border-bottom:1px solid var(--line);
    font-size:12px;
}

.ip-control-row.head{
    background:var(--panel2);
}

.ip-control-row:not(.head):nth-child(odd){
    background:var(--sh-2,#151b2d);
}

.ip-rule-badge{
    display:inline-flex;
    padding:4px 8px;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.ip-rule-badge.allow{
    border:1px solid #285742;
    background:#10271f;
    color:#8ce5b8;
}

.ip-rule-badge.block{
    border:1px solid #6b3340;
    background:#2a151c;
    color:#ff9cae;
}

.ip-control-actions{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.ip-control-actions form{
    margin:0;
}

.button.danger,
button.danger{
    background:#7a2d3c;
    color:white;
}

.button.danger:hover,
button.danger:hover{
    background:#943649;
}

@media(max-width:1100px){
    .ip-control-grid{
        grid-template-columns:1fr;
    }
}

/* Killian organization + primary location create page */
.organization-create-page-head,
.organization-create-grid{
    width:min(100%,1220px);
    margin-left:auto;
    margin-right:auto;
}

.organization-create-page-head{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    align-items:center;
    margin-bottom:6px;
}

.organization-create-page-head-single{
    grid-template-columns:minmax(320px,680px);
    justify-content:center;
}

.organization-create-header-left,
.organization-create-header-right{
    display:flex;
    align-items:center;
    min-width:0;
}

.organization-create-header-left{
    justify-content:space-between;
}

.organization-create-header-right{
    justify-content:space-between;
}

.organization-create-title h1{
    margin:0;
}

.organization-create-subtitle{
    width:min(100%,1220px);
    margin:0 auto 22px;
    color:var(--muted);
}

.organization-create-favorite-slot{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    min-width:40px;
}

.organization-create-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    align-items:start;
}

.organization-create-grid-single{
    grid-template-columns:minmax(320px,680px);
    justify-content:center;
}

.organization-create-grid .form-card{
    width:auto;
    max-width:none;
}

.organization-create-card-head{
    margin-bottom:20px;
    padding-bottom:15px;
    border-bottom:1px solid var(--line);
}

.organization-create-card-head h2{
    margin:0 0 6px;
}

.organization-create-card-head p{
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.45;
}


@media(max-width:950px){
    .organization-create-page-head,
    .organization-create-page-head-single,
    .organization-create-grid,
    .organization-create-grid-single{
        width:100%;
        max-width:850px;
        grid-template-columns:1fr;
    }

    .organization-create-header-left,
    .organization-create-header-right{
        gap:10px;
    }

    .organization-create-header-right{
        margin-top:10px;
    }

    .organization-create-subtitle{
        width:100%;
        max-width:850px;
    }
}

/* Killian page-header content alignment */
.page-head-width-760,
.page-head-width-850,
.page-head-width-900,
.page-head-width-1000,
.page-head-width-1100,
.page-head-width-1200{
    width:100%;
}

.page-head-width-760{
    max-width:760px;
}

.page-head-width-850{
    max-width:850px;
}

.page-head-width-900{
    max-width:900px;
}

.page-head-width-1000{
    max-width:1000px;
}

.page-head-width-1100{
    max-width:1100px;
}

.page-head-width-1200{
    max-width:1200px;
}

.page-head-centered{
    margin-left:auto;
    margin-right:auto;
}

/* Keep Boolean toggle switches vertically centered with their labels */
.boolean-toggle-row .toggle-switch{
    margin-top:0;
}

/* =========================================================
   Contact form control alignment
   ========================================================= */

/*
 * Center Important Contact against the Location select rather
 * than against the combined label + select height.
 */
.contact-important-toggle-cell{
    display:flex;
    align-items:flex-end;
    padding-bottom:5px;
}

/*
 * Primary and Remove occupy equal-height action cells so their
 * visual centers always share the same horizontal centerline.
 */
.contact-inline-toggle-cell,
.contact-inline-action-cell{
    display:flex;
    align-items:center;
    min-height:38px;
}

.contact-inline-toggle-cell .boolean-toggle-row{
    margin:0;
    align-items:center;
}

.contact-inline-action-cell .remove-form{
    margin:0;
    transform:none;
}

/*
 * Keep Boolean labels and switches centered against each other.
 */
.boolean-toggle-row{
    align-items:center;
}

.boolean-toggle-row .toggle-label{
    display:flex;
    align-items:center;
    line-height:28px;
}

.boolean-toggle-row .toggle-switch-control{
    display:inline-flex;
    align-items:center;
}

.boolean-toggle-row .toggle-switch{
    margin-top:0;
}

/* MFA verification spacing */
.mfa-verify-form button{
    margin-top:12px;
}

/* Organization overview section titles */
.overview-section-title{
    color:var(--accent,#22d3ee);
}
/* Documents: reveal download affordance on row hover/focus. */
.document-file-actions .document-download{
    opacity:0;
    pointer-events:none;
    transition:opacity .15s ease;
}

.document-browser-row:hover .document-file-actions .document-download,
.document-file-actions .document-download:focus{
    opacity:1;
    pointer-events:auto;
}


/* Rich Killian Document editor and rendered document surface. */
.document-editor{
    width:100%;
}

.document-editor-toolbar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    padding:10px;
    background:var(--sh-1,#10192b);
    border:1px solid var(--line-light);
    border-bottom:0;
    border-radius:10px 10px 0 0;
}

.document-editor-toolbar[hidden],
.document-editor-canvas[hidden]{
    display:none;
}

.document-editor-toolbar-group{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:5px;
    padding-right:8px;
    border-right:1px solid var(--line);
}

.document-editor-toolbar-group:last-child{
    padding-right:0;
    border-right:0;
}

.document-editor-control-label{
    display:flex !important;
    align-items:center;
    gap:5px;
    margin:0 !important;
    font-size:11px;
    color:var(--muted) !important;
}

.document-editor-select{
    width:auto;
    min-width:104px;
    height:34px;
    padding:5px 28px 5px 8px;
    border-radius:6px;
    font-size:12px;
}

.document-editor-size-select{
    min-width:66px;
}

.document-editor-tool{
    min-width:34px;
    min-height:34px;
    padding:6px 9px;
    background:var(--surface);
    color:var(--text-medium);
    border:1px solid var(--line-light);
    border-radius:6px;
    font-size:12px;
    line-height:1;
    cursor:pointer;
}

.document-editor-tool:hover,
.document-editor-tool:focus-visible,
.document-editor-tool.active{
    background:var(--sh-3,#1a2943);
    border-color:var(--accent,#5d8ed8);
    color:#fff;
}

.document-editor-color-control{
    display:flex !important;
    align-items:center;
    justify-content:center;
    gap:4px;
    min-height:34px;
    margin:0 !important;
    padding:5px 7px;
    background:var(--surface);
    border:1px solid var(--line-light);
    border-radius:6px;
    color:var(--text-medium) !important;
    font-size:13px;
}

.document-editor-color-control input[type="color"]{
    width:22px;
    height:20px;
    padding:0;
    border:0;
    border-radius:3px;
    background:transparent;
    cursor:pointer;
}

.document-editor-canvas,
.document-content{
    background:var(--surface);
    color:var(--text);
    font-family:Calibri,Arial,sans-serif;
    font-size:12pt;
    line-height:1.55;
}

.document-editor-canvas{
    min-height:520px;
    padding:38px 44px;
    border:1px solid var(--line-light);
    border-radius:0 0 10px 10px;
    overflow:auto;
    resize:vertical;
}

.document-editor-canvas:focus{
    outline:none;
    border-color:var(--accent,#5d8ed8);
    box-shadow:0 0 0 3px rgba(110,168,254,.12);
}

.document-editor-help{
    display:block;
    margin-top:7px;
}

.document-view-wrap{
    padding:24px;
    background:var(--sh-1,#0d1423);
}

.document-content{
    min-height:260px;
    padding:42px 48px;
    border-radius:8px;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
    overflow-wrap:anywhere;
}

.document-editor-canvas h1,
.document-content h1{
    margin:0 0 18px;
    font-size:2em;
    line-height:1.2;
    color:inherit;
}

.document-editor-canvas h2,
.document-content h2{
    margin:24px 0 14px;
    font-size:1.55em;
    line-height:1.25;
    color:inherit;
}

.document-editor-canvas h3,
.document-content h3{
    margin:20px 0 12px;
    font-size:1.25em;
    line-height:1.3;
    color:inherit;
}

.document-editor-canvas h4,
.document-content h4{
    margin:18px 0 10px;
    font-size:1.1em;
    color:inherit;
}

.document-editor-canvas p,
.document-content p{
    margin:0 0 12px;
}

.document-editor-canvas ul,
.document-editor-canvas ol,
.document-content ul,
.document-content ol{
    margin:0 0 14px 28px;
    padding:0;
}

.document-editor-canvas li,
.document-content li{
    margin:4px 0;
}

.document-editor-canvas blockquote,
.document-content blockquote{
    margin:16px 0;
    padding:8px 16px;
    border-left:4px solid var(--line-light);
    color:var(--text-soft);
}

.document-editor-canvas a,
.document-content a{
    color:var(--accent);
    text-decoration:underline;
}

.document-editor-canvas hr,
.document-content hr{
    border:0;
    border-top:1px solid var(--line-light);
    margin:22px 0;
}

.document-editor-canvas table,
.document-content table{
    width:100%;
    margin:18px 0;
    border-collapse:collapse;
    table-layout:fixed;
}

.document-editor-canvas th,
.document-editor-canvas td,
.document-content th,
.document-content td{
    padding:8px 10px;
    border:1px solid var(--line-light);
    vertical-align:top;
}

.document-editor-canvas th,
.document-content th{
    background:var(--panel2);
    font-weight:700;
}

@media(max-width:900px){
    .document-editor-toolbar{
        align-items:flex-start;
    }

    .document-editor-toolbar-group{
        width:100%;
        padding:0 0 7px;
        border-right:0;
        border-bottom:1px solid var(--line);
    }

    .document-editor-toolbar-group:last-child{
        padding-bottom:0;
        border-bottom:0;
    }

    .document-editor-canvas,
    .document-content{
        padding:28px 24px;
    }
}

@media(max-width:650px){
    .document-editor-control-label{
        flex:1 1 120px;
        align-items:flex-start;
        flex-direction:column;
    }

    .document-editor-select{
        width:100%;
    }

    .document-editor-canvas{
        min-height:420px;
        padding:24px 18px;
    }

    .document-view-wrap{
        padding:12px;
    }

    .document-content{
        padding:24px 18px;
    }
}

/* Rich Document editor: Killian dark-theme canvas. */
.document-editor-canvas{
    background:var(--surface);
    color:var(--text);
}

.document-editor-canvas blockquote{
    border-left-color:var(--line-light);
    color:var(--text-soft);
}

.document-editor-canvas a{
    color:var(--accent);
}

.document-editor-canvas hr{
    border-top-color:var(--line-light);
}

.document-editor-canvas th,
.document-editor-canvas td{
    border-color:var(--line-light);
}

.document-editor-canvas th{
    background:var(--panel2);
    color:var(--text);
}

/* New Document unsaved-change prompt. */
.document-unsaved-dialog{
    width:min(520px,calc(100vw - 32px));
    padding:0;
    background:var(--panel);
    color:var(--text);
    border:1px solid var(--line-light);
    border-radius:12px;
    box-shadow:0 20px 60px rgba(0,0,0,.55);
}

.document-unsaved-dialog::backdrop{
    background:color-mix(in srgb,var(--sh-0,rgb(3,7,18)) 72.0%,transparent);
    backdrop-filter:blur(2px);
}

.document-unsaved-dialog-content{
    padding:24px;
}

.document-unsaved-dialog-content h2{
    margin:0 0 10px;
    color:var(--text);
}

.document-unsaved-dialog-content p{
    margin:0;
    color:var(--text-medium);
    line-height:1.55;
}

.document-unsaved-dialog-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:24px;
}

@media(max-width:650px){
    .document-unsaved-dialog-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .document-unsaved-dialog-actions button{
        width:100%;
    }
}


/* =========================================================
   Shared list sorting
   ========================================================= */

.organization-list-head{
    background:var(--panel2);
    color:var(--text-medium);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.organization-list-head .module-table-sort{
    font-size:inherit;
    text-transform:inherit;
    letter-spacing:inherit;
}

.list-sort-controls{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.list-sort-controls label{
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.list-sort-select{
    min-width:130px;
    width:auto;
    padding:7px 30px 7px 10px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--surface);
    color:var(--text);
    font:inherit;
    font-size:12px;
}

.list-sort-select:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
}

.list-sort-direction{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-width:102px;
    justify-content:center;
}

.list-sort-direction-indicator{
    font-size:13px;
    line-height:1;
}

.document-panel-head-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.audit-row.head .module-table-sort,
.ip-control-row.head .module-table-sort,
.user-row-head .module-table-sort,
.organization-manage-head .module-table-sort{
    font-size:inherit;
    text-transform:inherit;
    letter-spacing:inherit;
}

@media(max-width:1000px){
    .organization-list-head{
        display:none;
    }

    .document-panel-head-actions{
        width:100%;
        justify-content:flex-start;
    }
}

@media(max-width:650px){
    .list-sort-controls{
        width:100%;
    }

    .list-sort-select{
        flex:1;
        min-width:0;
    }

    .list-sort-direction{
        min-width:96px;
    }
}

/* Keep panel-head sort/action groups vertically centered despite the generic
   module-panel heading baseline rule. */
.module-panel-head > .list-sort-controls,
.module-panel-head > .document-panel-head-actions{
    align-items:center;
}

.module-panel-head:has(> .list-sort-controls),
.module-panel-head:has(> .document-panel-head-actions){
    flex-wrap:wrap;
    gap:12px;
}

.list-sort-direction span{
    color:inherit;
    font-size:inherit;
}

/* =========================================================
   Organization overview dashboard
   ========================================================= */
.organization-overview-title-row{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.organization-overview-title-row h1{
    margin:0;
}

.organization-metrics{
    display:grid;
    grid-template-columns:repeat(var(--organization-metric-columns, 4),minmax(0,1fr));
    gap:12px;
    margin:0 0 20px;
}

.organization-metrics .metric-card{
    --metric-color:#60a5fa;
    position:relative;
    display:block;
    min-width:0;
    min-height:82px;
    padding:14px 16px;
    overflow:hidden;
    text-decoration:none;
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb,var(--metric-color) 9%,var(--sh-1,#111827)),
            var(--sh-1,#111827) 72%
        );
    border:1px solid color-mix(in srgb,var(--metric-color) 42%,var(--sh-6,#334155));
    border-radius:10px;
    box-shadow:
        0 3px 10px rgba(0,0,0,.2),
        inset 0 1px 0 rgba(255,255,255,.025);
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.organization-metrics .metric-card::before{
    content:"";
    position:absolute;
    top:0;
    right:0;
    left:0;
    height:3px;
    background:var(--metric-color);
}

.organization-metrics .metric-card:hover{
    transform:translateY(-2px);
    border-color:var(--metric-color);
    box-shadow:
        0 6px 16px rgba(0,0,0,.28),
        0 0 9px color-mix(in srgb,var(--metric-color) 14%,transparent);
}

.organization-metrics .metric-card b{
    display:block;
    margin-bottom:5px;
    color:#fff;
    font-size:24px;
    line-height:1;
    font-weight:700;
}

.organization-metrics .metric-card span{
    display:block;
    overflow:hidden;
    color:var(--tx-8,#cbd5e1);
    font-size:13px;
    line-height:1.25;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.metric-blue{--metric-color:#60a5fa!important;}
.metric-cyan{--metric-color:#22d3ee!important;}
.metric-green{--metric-color:#22c55e!important;}
.metric-purple{--metric-color:#a78bfa!important;}
.metric-orange{--metric-color:#fb923c!important;}
.metric-pink{--metric-color:#f472b6!important;}
.metric-yellow{--metric-color:#facc15!important;}
.metric-teal{--metric-color:#2dd4bf!important;}
.metric-red{--metric-color:#f87171!important;}
.metric-indigo{--metric-color:#818cf8!important;}

.organization-dashboard-separator{
    height:1px;
    margin:24px 0 20px;
    background:var(--line);
}

.organization-dashboard-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
}

.organization-dashboard-toolbar h2{
    margin:0 0 4px;
    color:var(--text);
    font-size:18px;
}

.organization-dashboard-toolbar p{
    margin:0;
    color:var(--muted);
    font-size:12px;
}

.organization-dashboard-add{
    width:40px;
    height:40px;
    min-width:40px;
    padding:0;
    border:1px solid var(--line-light);
    border-radius:8px;
    background:var(--panel);
    color:var(--accent);
    font-size:25px;
    font-weight:500;
    line-height:1;
}

.organization-dashboard-add:hover,
.organization-dashboard-add:focus-visible{
    background:var(--panel2);
    color:var(--white);
}

.organization-dashboard-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));
    gap:16px;
    align-items:start;
}

.organization-dashboard-widget{
    margin:0;
    padding:0;
    overflow:hidden;
    min-width:0;
}

.organization-dashboard-widget-head{
    min-height:86px;
    padding:16px 18px 13px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    background:var(--sh-1,#10192b);
    border-bottom:1px solid var(--line);
}

.organization-dashboard-widget-head>div:first-child{
    min-width:0;
}

.organization-dashboard-widget-head h3{
    margin:0 0 5px;
    color:var(--hl,#fb923c);
    font-size:17px;
}

.organization-dashboard-widget-head p{
    display:-webkit-box;
    overflow:hidden;
    margin:0;
    color:var(--muted);
    font-size:12px;
    line-height:1.4;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}

.organization-dashboard-widget-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex:0 0 auto;
    font-size:12px;
    white-space:nowrap;
}

.organization-dashboard-widget-body{
    max-height:none;
    overflow:visible;
}

.organization-dashboard-widget.is-expanded .organization-dashboard-widget-body{
    max-height:none;
    overflow:visible;
}

.organization-dashboard-widget-row{
    min-height:64px;
    padding:10px 16px;
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    color:var(--text);
}

.organization-dashboard-widget-row:hover{
    background:var(--sh-2,#111b2f);
}

.organization-dashboard-widget-row>div{
    min-width:0;
}

.organization-dashboard-widget-row b,
.organization-dashboard-widget-row small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.organization-dashboard-widget-row b{
    color:var(--text);
    font-size:13px;
}

.organization-dashboard-widget-row small{
    margin-top:4px;
    color:var(--muted);
    font-size:11px;
}

.organization-dashboard-widget-empty{
    min-height:64px;
    padding:18px 16px;
    color:var(--muted);
    font-size:12px;
}

.organization-dashboard-widget-footer{
    min-height:44px;
    padding:8px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-top:1px solid var(--line);
    background:var(--sh-1,#0e1728);
}

.organization-dashboard-widget-footer>span{
    color:var(--muted);
    font-size:11px;
}

.organization-dashboard-expand{
    padding:5px 9px;
    border:1px solid var(--line);
    border-radius:6px;
    background:transparent;
    color:var(--accent-soft);
    font-size:11px;
}

.organization-dashboard-expand:hover,
.organization-dashboard-expand:focus-visible{
    background:var(--panel2);
    color:var(--white);
}

.organization-dashboard-empty{
    padding:34px 22px;
    border:1px dashed var(--line-light);
    border-radius:12px;
    text-align:center;
}

.organization-dashboard-empty p{
    margin:0 0 14px;
}

.organization-dashboard-dialog{
    width:min(720px,calc(100vw - 32px));
    max-height:min(760px,calc(100vh - 48px));
    padding:0;
    overflow:hidden;
    border:1px solid var(--line-light);
    border-radius:12px;
    background:var(--panel);
    color:var(--text);
    box-shadow:0 20px 60px rgba(0,0,0,.55);
}

.organization-dashboard-dialog::backdrop{
    background:color-mix(in srgb,var(--sh-0,rgb(3,7,18)) 72.0%,transparent);
    backdrop-filter:blur(2px);
}

.organization-dashboard-dialog-form{
    max-height:inherit;
    display:flex;
    flex-direction:column;
}

.organization-dashboard-dialog-head{
    padding:20px 22px 16px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    border-bottom:1px solid var(--line);
}

.organization-dashboard-dialog-head h2{
    margin:0 0 5px;
}

.organization-dashboard-dialog-head p{
    margin:0;
    color:var(--muted);
    font-size:12px;
}

.organization-dashboard-dialog-close{
    width:34px;
    height:34px;
    min-width:34px;
    padding:0;
    border:1px solid var(--line);
    background:var(--surface);
    color:var(--muted);
    font-size:22px;
    line-height:1;
}

.organization-dashboard-scope{
    margin:18px 22px 14px;
    padding:0;
    border:0;
}

.organization-dashboard-scope legend{
    margin-bottom:9px;
    color:var(--text-medium);
    font-size:12px;
    font-weight:700;
}

.organization-dashboard-scope label,
.organization-dashboard-option{
    display:flex;
    align-items:flex-start;
    gap:10px;
    cursor:pointer;
}

.organization-dashboard-scope label+label{
    margin-top:8px;
}

.organization-dashboard-scope input,
.organization-dashboard-option input{
    width:16px;
    min-width:16px;
    height:16px;
    margin:2px 0 0;
    padding:0;
}

.organization-dashboard-scope span,
.organization-dashboard-option span{
    min-width:0;
}

.organization-dashboard-scope strong,
.organization-dashboard-option strong{
    display:block;
    color:var(--text);
    font-size:13px;
}

.organization-dashboard-scope small,
.organization-dashboard-option small{
    display:block;
    margin-top:2px;
    color:var(--muted);
    font-size:11px;
    line-height:1.4;
}

.organization-dashboard-options-head{
    padding:12px 22px 8px;
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:14px;
    border-top:1px solid var(--line);
}

.organization-dashboard-options-head strong{
    font-size:13px;
}

.organization-dashboard-options-head span{
    color:var(--muted);
    font-size:11px;
}

.organization-dashboard-options{
    margin:0 22px;
    padding:4px 2px 4px 0;
    max-height:330px;
    overflow:auto;
}

.organization-dashboard-option{
    padding:9px 8px;
    border-radius:7px;
}

.organization-dashboard-option:hover{
    background:rgba(110,168,254,.07);
}

.organization-dashboard-dialog-actions{
    padding:16px 22px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-top:1px solid var(--line);
}

.organization-dashboard-dialog-actions-right{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:9px;
}

@media(max-width:900px){
    .organization-metrics{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:650px){
    .organization-metrics{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .organization-dashboard-toolbar,
    .organization-dashboard-widget-head,
    .organization-dashboard-dialog-actions{
        align-items:flex-start;
    }

    .organization-dashboard-widget-head,
    .organization-dashboard-dialog-actions{
        flex-direction:column;
    }

    .organization-dashboard-widget-actions{
        justify-content:flex-start;
    }

    .organization-dashboard-dialog-actions-right{
        width:100%;
        margin-left:0;
    }

    .organization-dashboard-dialog-actions-right .button{
        flex:1;
    }
}

@media(max-width:420px){
    .organization-metrics{
        grid-template-columns:1fr;
    }
}

.organization-dashboard-widget-row-main{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex:1;
    min-width:0;
    color:var(--text);
}

.organization-dashboard-widget-row-main>div{
    min-width:0;
}

.organization-dashboard-widget-row>.button{
    flex:0 0 auto;
}

/* Rich Quick Card record fields. */
.organization-dashboard-widget{
    overflow:visible;
}

.organization-dashboard-widget-head{
    border-radius:11px 11px 0 0;
}

.organization-dashboard-widget-footer{
    border-radius:0 0 11px 11px;
}

.organization-dashboard-widget-fields{
    width:100%;
    display:flex;
    flex-direction:column;
    gap:5px;
}

.organization-dashboard-widget-field{
    min-width:0;
    display:grid;
    grid-template-columns:minmax(88px,112px) minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-height:22px;
}

.organization-dashboard-widget-field-label{
    color:var(--muted);
    font-size:10px;
    font-weight:700;
    letter-spacing:.035em;
    text-transform:uppercase;
    white-space:nowrap;
}

.organization-dashboard-widget-field-value{
    min-width:0;
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--text);
    font-size:12px;
}

.organization-dashboard-widget-field.is-primary{
    margin-bottom:2px;
}

.organization-dashboard-widget-field.is-primary .organization-dashboard-widget-field-value{
    font-size:13px;
    font-weight:700;
}

.organization-dashboard-widget-primary-link,
.organization-dashboard-widget-value-text{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.organization-dashboard-widget-primary-link{
    color:var(--text);
}

.organization-dashboard-widget-primary-link:hover,
.organization-dashboard-widget-primary-link:focus-visible{
    color:var(--accent-soft);
}

.organization-dashboard-widget-field-value .module-secret-cell,
.organization-dashboard-widget-field-value .module-totp-cell{
    min-width:0;
    flex-wrap:wrap;
    row-gap:4px;
}

.organization-dashboard-widget-field-value .module-totp-countdown{
    font-size:10px;
}

.organization-dashboard-summary-hover{
    position:relative;
    display:inline-flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    padding:2px;
    border-radius:4px;
    color:var(--muted);
    cursor:help;
}

.organization-dashboard-summary-hover:hover,
.organization-dashboard-summary-hover:focus-visible{
    color:var(--text);
    background:rgba(110,168,254,.10);
    outline:none;
}

.organization-dashboard-summary-tooltip{
    position:absolute;
    left:50%;
    bottom:calc(100% + 8px);
    transform:translateX(-50%);
    z-index:1600;
    width:max-content;
    max-width:min(360px,70vw);
    padding:7px 9px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--sh-0,#07101f);
    color:var(--white);
    font-size:11px;
    font-weight:500;
    line-height:1.4;
    white-space:normal;
    overflow-wrap:anywhere;
    box-shadow:0 10px 28px rgba(0,0,0,.4);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}

.organization-dashboard-summary-hover:hover .organization-dashboard-summary-tooltip,
.organization-dashboard-summary-hover:focus-visible .organization-dashboard-summary-tooltip{
    opacity:1;
    visibility:visible;
}

@media(max-width:650px){
    .organization-dashboard-widget-field{
        grid-template-columns:82px minmax(0,1fr);
        gap:8px;
    }
}

/* =========================================================
   Quick Card controls and global record modal
   ========================================================= */
.organization-dashboard-options-head>div:first-child{
    min-width:0;
}

.organization-dashboard-options-head>div:first-child span{
    margin-left:10px;
}

.organization-dashboard-options-bulk{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex:0 0 auto;
}

.record-modal-dialog{
    --record-modal-width:944px;
    --record-modal-height:720px;
    width:min(var(--record-modal-width),calc(100vw - 32px));
    height:min(var(--record-modal-height),calc(100vh - 32px));
    max-width:none;
    max-height:none;
    padding:0;
    overflow:hidden;
    border:1px solid var(--line-light);
    border-radius:14px;
    background:var(--body-bg);
    color:var(--text);
    box-shadow:0 24px 72px rgba(0,0,0,.62);
    transition:none;
}

/* Keep the dialog shell and loading message visible immediately.
   Only the pending iframe content is hidden while the first size arrives. */
.record-modal-dialog.record-modal-sizing .record-modal-frame{
    visibility:hidden;
    pointer-events:none;
}

.record-modal-dialog::backdrop{
    background:color-mix(in srgb,var(--sh-0,rgb(3,7,18)) 78.0%,transparent);
    backdrop-filter:blur(3px);
}

.record-modal-dialog-shell{
    height:100%;
    display:grid;
    grid-template-rows:58px minmax(0,1fr);
    position:relative;
}

.record-modal-dialog-head{
    min-height:58px;
    padding:11px 14px 11px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border-bottom:1px solid var(--line);
    background:var(--chrome);
}

.record-modal-dialog-head strong{
    min-width:0;
    overflow:hidden;
    color:var(--text);
    font-size:15px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.record-modal-frame{
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    border:0;
    background:var(--body-bg);
}

.record-modal-dialog-loading{
    position:absolute;
    inset:58px 0 0;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--body-bg);
    color:var(--muted);
    font-size:13px;
}

.record-modal-dialog-loading[hidden],
.record-modal-frame[hidden]{
    display:none;
}

html.record-modal-frame,
html.record-modal-frame body{
    width:100%;
    min-width:0;
    min-height:0;
    overflow-x:hidden;
}

html.record-modal-frame .topbar,
html.record-modal-frame .org-sidebar,
html.record-modal-frame #page-favorite-toggle,
html.record-modal-frame #record-modal-dialog{
    display:none!important;
}

html.record-modal-frame .shell,
html.record-modal-frame .shell.with-org-sidebar{
    display:block;
    width:100%;
    min-width:0;
    min-height:0;
}

html.record-modal-frame main,
html.record-modal-frame .with-org-sidebar main{
    width:min(100%,calc(var(--record-modal-content-width,900px) + 44px));
    max-width:none;
    min-width:0;
    margin:0 auto;
    padding:22px;
    overflow-x:hidden;
}

html.record-modal-frame main > .page-head,
html.record-modal-frame main > .form-card,
html.record-modal-frame main > .secret-card,
html.record-modal-frame main > .module-panel,
html.record-modal-frame main > section{
    width:100%;
    min-width:0;
}

html.record-modal-frame main > .page-head:not(.page-head-width-760):not(.page-head-width-850):not(.page-head-width-900):not(.page-head-width-1000):not(.page-head-width-1100):not(.page-head-width-1200),
html.record-modal-frame main > .module-panel:not(.document-view-panel){
    max-width:900px;
}

html.record-modal-frame .breadcrumbs,
html.record-modal-frame .record-detail-reveal-action,
html.record-modal-frame .record-detail-lifecycle-actions{
    display:none!important;
}

html.record-modal-frame img,
html.record-modal-frame video,
html.record-modal-frame table{
    max-width:100%;
}

@media(max-width:700px){
    .organization-dashboard-options-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .organization-dashboard-options-head>div:first-child span{
        display:block;
        margin:3px 0 0;
    }

    .organization-dashboard-options-bulk{
        width:100%;
        justify-content:flex-start;
    }

    .record-modal-dialog{
        width:calc(100vw - 12px);
        height:calc(100vh - 12px);
        border-radius:10px;
    }

    html.record-modal-frame main,
    html.record-modal-frame .with-org-sidebar main{
        width:100%;
        padding:14px;
    }
}

/* =========================================================
   Record modal hover-copy controls
   ========================================================= */
.record-detail-values{
    padding:0 20px;
}

.record-detail-value-row{
    display:grid;
    grid-template-columns:minmax(180px,280px) minmax(0,1fr);
    gap:20px;
    padding:14px 0;
    border-bottom:1px solid var(--border, var(--sh-5,#26354d));
    align-items:start;
}

.record-detail-values-compact .record-detail-value-row{
    padding:6px 0;
}

.record-detail-value-label{
    min-width:0;
}

.record-detail-value-cell{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:10px;
    min-width:0;
}

.record-detail-value-text{
    min-width:0;
    overflow-wrap:anywhere;
    white-space:pre-wrap;
}

/* Organization-owned record tags in shared read-only detail views/modals. */
.record-detail-tags{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    min-width:0;
}
.record-detail-tag{
    display:inline-flex;
    max-width:100%;
    align-items:center;
    padding:5px 10px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--panel);
    color:var(--text);
    font-size:13px;
    font-weight:600;
    line-height:1.4;
    overflow-wrap:anywhere;
}
.record-detail-tags-empty{
    color:var(--muted);
}

.record-value-copy{
    display:inline-flex;
    appearance:none;
    border:0;
    border-radius:6px;
    background:transparent;
    color:var(--muted);
    padding:4px;
    margin:-2px 0 0;
    line-height:1;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}

html.record-modal-frame .record-detail-value-row:hover .record-value-copy,
html.record-modal-frame .record-detail-value-row:focus-within .record-value-copy,
html.record-modal-frame .document-view-meta-row:hover .record-value-copy,
html.record-modal-frame .document-view-meta-row:focus-within .record-value-copy,
html.record-modal-frame .document-view-heading-copy-line:hover .record-value-copy,
html.record-modal-frame .document-view-heading-copy-line:focus-within .record-value-copy{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.record-value-copy:hover,
.record-value-copy:focus-visible{
    color:var(--text);
    background:rgba(110,168,254,.10);
    outline:none;
}

.document-view-heading-copy-line{
    display:flex;
    align-items:flex-start;
    gap:8px;
    width:max-content;
    max-width:100%;
}

.document-view-heading-copy-line h1,
.document-view-heading-copy-line p{
    min-width:0;
    margin-right:0;
}

.document-view-summary-copy-line{
    margin-top:4px;
}

.document-view-metadata{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px 18px;
    margin-top:3px;
}

.document-view-meta-row{
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-width:0;
    color:var(--muted);
    font-size:.9rem;
}

.document-view-meta-label{
    font-weight:600;
    color:var(--muted);
}

.document-view-meta-label::after{
    content:':';
}

.document-view-meta-value{
    min-width:0;
    overflow-wrap:anywhere;
    color:var(--text);
}

@media(hover:none){
    html.record-modal-frame .record-detail-value-row .record-value-copy,
    html.record-modal-frame .document-view-meta-row .record-value-copy,
    html.record-modal-frame .document-view-heading-copy-line .record-value-copy{
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }
}

@media(max-width:650px){
    .record-detail-value-row{
        grid-template-columns:1fr;
        gap:6px;
    }
}

/* =========================================================
   First-run installation setup
   ========================================================= */
body:has(.first-run-setup-stack) main{
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

body:has(.first-run-setup-stack) main > .msg{
    width:min(100%,680px);
}

.first-run-setup-stack{
    width:min(100%,680px);
    display:flex;
    flex-direction:column;
    gap:18px;
}

.first-run-card{
    width:100%;
    max-width:none;
}

.first-run-progress{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.first-run-progress span{
    padding:10px 14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel);
    color:var(--muted);
    font-size:13px;
    font-weight:700;
    text-align:center;
}

.first-run-progress span.active{
    border-color:var(--accent,#3d6fa8);
    color:var(--text);
    background:var(--sh-2,#13233a);
}

.first-run-progress span.complete{
    border-color:#2f6955;
    color:#9ee0c3;
    background:#10231d;
}

.first-run-kicker{
    margin-bottom:7px;
    color:var(--link-soft);
    font-size:12px;
    font-weight:800;
    letter-spacing:.11em;
    text-transform:uppercase;
}

.first-run-card label{
    display:block;
    margin:14px 0 7px;
    font-weight:700;
}

.first-run-card input[type="text"],
.first-run-card input[type="email"],
.first-run-card input[type="password"]{
    width:100%;
}

.first-run-card .errorlist{
    margin:7px 0 0;
    padding-left:20px;
    color:#ff9ca7;
}

.first-run-card .form-help{
    margin-top:7px;
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
}

.first-run-card .form-help ul{
    margin:6px 0 0;
    padding-left:20px;
}

.first-run-recommended{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin:18px 0;
    padding:16px 18px;
    border:1px solid #2f6955;
    border-radius:12px;
    background:#10231d;
}

.first-run-recommended strong{
    color:#9ee0c3;
}

.first-run-recommended span{
    color:#b8d7c9;
    font-size:13px;
    line-height:1.55;
}

.first-run-manual-key{
    display:block;
    margin-top:7px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--sh-0,#09101d);
    overflow-wrap:anywhere;
}

.first-run-or{
    display:flex;
    align-items:center;
    gap:12px;
    margin:20px 0;
    color:var(--muted);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.first-run-or::before,
.first-run-or::after{
    content:"";
    flex:1;
    height:1px;
    background:var(--line);
}

.first-run-danger-caption{
    margin:8px 0 0;
    color:#ff7b86;
    text-align:center;
    font-size:12px;
    font-weight:900;
    letter-spacing:.1em;
}

.first-run-danger-dialog{
    width:min(92vw,580px);
    padding:0;
    border:1px solid #873947;
    border-radius:14px;
    background:#151015;
    color:var(--text);
    box-shadow:0 24px 80px rgba(0,0,0,.55);
}

.first-run-danger-dialog::backdrop{
    background:color-mix(in srgb,var(--sh-0,rgb(2,6,12)) 78.0%,transparent);
    backdrop-filter:blur(3px);
}

.first-run-danger-dialog-body{
    padding:26px;
}

.first-run-danger-dialog-body h2{
    margin:8px 0 18px;
    color:#ff9ca7;
}

.first-run-danger-mark{
    display:flex;
    width:46px;
    height:46px;
    align-items:center;
    justify-content:center;
    border:2px solid #bd4253;
    border-radius:50%;
    color:#ff9ca7;
    font-size:28px;
    font-weight:900;
}

.first-run-danger-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:22px;
}

.first-run-danger-actions form,
.first-run-danger-actions button{
    width:100%;
    margin:0;
}

@media(max-width:620px){
    .first-run-progress,
    .first-run-danger-actions{
        grid-template-columns:1fr;
    }
}

/* Documents / KB - full-page Collabora office integration */
.document-office-form-card{
    width:100%;
    max-width:none;
    min-width:0;
}

.document-metadata-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.document-metadata-span{
    grid-column:1/-1;
}

.document-published-toggle{
    justify-self:start;
}

.document-office-section,
.document-reference-section{
    margin-top:28px;
    padding-top:22px;
    border-top:1px solid var(--line);
}

.document-office-section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}

.document-office-section-head h2,
.document-reference-section h2{
    margin:0;
}

.document-office-section-head p{
    margin:6px 0 0;
    color:var(--muted);
}

.document-office-save-status{
    min-height:20px;
    color:var(--muted);
    font-size:.9rem;
    text-align:right;
}

.document-office-save-status.error{
    color:var(--danger);
}

.document-office-frame{
    display:block;
    width:100%;
    min-height:760px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
}

.document-office-view-frame{
    min-height:780px;
}

.document-office-unavailable{
    min-height:220px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.document-reference-list{
    margin-top:18px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.document-reference-empty{
    padding:18px;
}

.document-view-panel-wide,
.document-reference-panel{
    max-width:1200px;
}

.document-reference-panel{
    margin-top:20px;
}

.document-office-view-wrap{
    padding:18px;
}

.document-text-preview{
    margin:0;
    min-height:420px;
    padding:24px;
    overflow:auto;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel-soft);
    font:14px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

.document-image-preview{
    display:flex;
    justify-content:center;
    padding:20px;
}

.document-image-preview img{
    max-width:100%;
    height:auto;
    border-radius:8px;
}

.document-pdf-preview{
    width:100%;
    min-height:780px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
}

@media(max-width:800px){
    .document-metadata-grid{
        grid-template-columns:1fr;
    }

    .document-metadata-span{
        grid-column:auto;
    }

    .document-office-section-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .document-office-save-status{
        text-align:left;
    }

    .document-office-frame,
    .document-office-view-frame,
    .document-pdf-preview{
        min-height:70vh;
    }
}

/* Personal credential and central-tag dual-list transfer controls. */
.credential-shared-users-source select{
    width:100%;
}

.credential-user-transfer,
.record-tags-transfer{
    display:grid;
    grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr);
    gap:14px;
    align-items:stretch;
    margin-top:2px;
}

.credential-user-transfer-column,
.record-tags-transfer-column{
    display:flex;
    min-width:0;
    flex-direction:column;
    gap:7px;
}

.credential-user-transfer-column label,
.record-tags-transfer-column label{
    margin:0;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

.credential-user-transfer-list,
.record-tags-transfer-list{
    width:100%;
    min-height:190px;
    margin:0;
    padding:6px;
}

.credential-user-transfer-list option,
.record-tags-transfer-list option{
    padding:6px 8px;
    border-radius:5px;
}

.credential-user-transfer-controls,
.record-tags-transfer-controls{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:center;
    gap:9px;
}

.credential-user-transfer-button,
.record-tags-transfer-button{
    width:100%;
    min-width:0;
    padding-left:8px;
    padding-right:8px;
    white-space:nowrap;
}

.credential-user-transfer-button:disabled,
.record-tags-transfer-button:disabled{
    cursor:not-allowed;
    opacity:.55;
}

@media(max-width:700px){
    .credential-user-transfer,
    .record-tags-transfer{
        grid-template-columns:1fr;
    }

    .credential-user-transfer-controls,
    .record-tags-transfer-controls{
        flex-direction:row;
        justify-content:center;
    }

    .credential-user-transfer-button,
    .record-tags-transfer-button{
        width:auto;
        min-width:110px;
    }
}

/* Credential organization / Personal vault controls. */
.credential-create-controls{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    min-width:250px;
}

.credential-scope-switch{
    display:grid;
    grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);
    align-items:center;
    gap:8px;
    min-height:34px;
    padding:5px 8px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--panel);
    color:var(--text);
    font-size:12px;
    font-weight:700;
}

.credential-scope-switch:hover{
    border-color:var(--accent);
}

.credential-scope-label{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--muted);
}

.credential-scope-switch:not(.is-personal) .organization-label,
.credential-scope-switch.is-personal .personal-label{
    color:var(--text);
}

.credential-scope-switch .organization-label{
    text-align:right;
}

.credential-scope-track{
    position:relative;
    display:block;
    width:42px;
    height:22px;
    border-radius:999px;
    background:var(--line-light);
}

.credential-scope-knob{
    position:absolute;
    top:3px;
    left:3px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:var(--white);
    transition:transform .16s ease;
}

.credential-scope-switch.is-personal .credential-scope-track{
    background:var(--accent);
}

.credential-scope-switch.is-personal .credential-scope-knob{
    transform:translateX(20px);
}

.credential-personal-notice{
    max-width:850px;
    margin:0 0 16px;
    padding:13px 15px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel);
    display:flex;
    flex-direction:column;
    gap:4px;
}

.credential-personal-notice span{
    color:var(--muted);
    font-size:13px;
    line-height:1.45;
}

.credential-share-form-card{
    max-width:850px;
    margin-bottom:20px;
}

.credential-share-created-panel,
.credential-share-history{
    margin-bottom:20px;
}

.credential-share-link-list{
    display:flex;
    flex-direction:column;
    gap:12px;
    padding:16px;
}

.credential-share-link-row{
    display:grid;
    grid-template-columns:minmax(180px,.6fr) minmax(260px,1.4fr);
    align-items:center;
    gap:12px;
}

.credential-share-link-row input{
    width:100%;
}

.external-share-page{
    min-height:100vh;
    background:var(--body-bg);
}

.external-share-shell{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px 18px;
}

.external-share-card{
    width:min(680px,100%);
    padding:28px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
    box-shadow:0 18px 50px rgba(0,0,0,.28);
}

.external-share-brand{
    margin-bottom:10px;
    color:var(--accent-soft);
    font-size:12px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.external-share-card h1{
    margin:0 0 8px;
}

.external-share-meta{
    margin:0 0 22px;
    color:var(--muted);
    line-height:1.5;
}

.external-share-values{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin:18px 0;
}

.external-share-value-row{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.external-share-value-row input{
    width:100%;
}

.external-share-reveal-form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

@media(max-width:700px){
    .credential-create-controls{
        width:100%;
        min-width:0;
    }

    .credential-share-link-row{
        grid-template-columns:1fr;
    }

    .external-share-card{
        padding:20px;
    }
}

.external-share-revealed-heading{
    margin:18px 0 8px;
}

.external-share-revealed-heading h2{
    margin:0 0 4px;
}

.external-share-revealed-heading span{
    color:var(--muted);
    font-size:13px;
}

/* Native multi-select remains usable until JavaScript initializes the tags transfer. */
.record-tags-field{
    margin:22px 0;
    padding:18px;
    border:1px solid var(--line);
    border-radius:10px;
}
.record-tags-field > label{
    display:block;
    margin-bottom:10px;
    font-weight:700;
}
.record-tags-source select{
    width:100%;
}
.record-tags-source[hidden],
.record-tags-transfer[hidden]{
    display:none;
}

/* Tag picker: selected tags as chips, "+" opens a searchable list of the rest. */
.tag-picker[hidden],
.tag-picker-pop[hidden],
.tag-picker-empty[hidden]{
    display:none;
}
.tag-picker{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
}
.tag-picker-chips{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin:0;
    padding:0;
    list-style:none;
}
.tag-chip{
    display:inline-flex;
    align-items:center;
    gap:2px;
    padding:3px 4px 3px 10px;
    border:1px solid var(--line-light);
    border-radius:999px;
    background:var(--panel2);
    color:var(--text);
    font-size:13px;
    line-height:1.3;
}
.tag-chip-remove{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:20px;
    height:20px;
    margin:0;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:var(--muted);
    font-size:16px;
    line-height:1;
    cursor:pointer;
}
.tag-chip-remove:hover,
.tag-chip-remove:focus-visible{
    background:var(--line);
    color:var(--text);
}
.tag-picker-none{
    color:var(--muted);
    font-size:13px;
}
.tag-picker-add{
    position:relative;
}
.tag-picker-plus{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    margin:0;
    padding:0;
    border:1px dashed var(--accent);
    border-radius:50%;
    background:transparent;
    color:var(--accent);
    font-size:20px;
    line-height:1;
    cursor:pointer;
}
.tag-picker-plus:hover,
.tag-picker-plus:focus-visible,
.tag-picker-plus[aria-expanded="true"]{
    background:var(--panel2);
    border-style:solid;
}
.tag-picker-pop{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    z-index:70;
    width:260px;
    max-width:calc(100vw - 32px);
    padding:8px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel);
    box-shadow:0 10px 28px rgba(0,0,0,.45);
}
.tag-picker-search{
    width:100%;
    margin:0 0 6px;
}
.tag-picker-options{
    max-height:220px;
    margin:0;
    padding:0;
    overflow-y:auto;
    list-style:none;
}
.tag-option{
    padding:7px 10px;
    border-radius:6px;
    color:var(--text);
    font-size:13px;
    cursor:pointer;
}
.tag-option:hover,
.tag-option.is-active{
    background:var(--panel2);
}
.tag-picker-empty{
    margin:4px 2px 2px;
    color:var(--muted);
    font-size:13px;
}

/* Stage 2C: organization-scoped, URL-shareable tag filters for module lists. */
.module-tag-filter{
    margin:12px 16px 18px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--panel2);
    color:var(--text);
}
.module-tag-filter>summary{
    cursor:pointer;
    font-weight:650;
    padding:12px 16px;
    color:var(--text-soft);
}
.module-tag-filter>summary:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
}
.module-tag-filter-form{padding:0 16px 16px;}
.module-tag-filter-options{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    max-height:220px;
    overflow:auto;
    padding:6px 0;
}
.module-tag-filter-option{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:7px 10px;
    border:1px solid var(--line-light);
    border-radius:8px;
    background:var(--surface);
    color:var(--text);
    cursor:pointer;
    font-size:13px;
}
.module-tag-filter-option:has(input:checked){
    border-color:var(--accent);
    background:var(--panel);
}
.module-tag-filter-option input{accent-color:var(--accent);}
.module-tag-filter-hint{
    font-size:12px;
    color:var(--muted);
    margin:10px 0 12px;
}
.module-tag-filter-error{color:var(--danger);font-size:13px;}
.module-tag-filter-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* Assets: compact, responsive two-column editor. Scoped to Assets only. */
.asset-form-card{
    max-width:1200px;
    width:100%;
}
.asset-form-card .asset-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:22px;
    align-items:start;
}
.asset-form-card .asset-form-grid > .form-field{
    min-width:0;
}
.asset-form-card .asset-form-grid > .form-field[data-asset-field="notes"],
.asset-form-card .asset-form-grid > .form-field[data-asset-field="record_tags"],
.asset-form-card .asset-form-grid > .form-actions{
    grid-column:1 / -1;
}
.asset-form-card .asset-form-grid > .form-actions{
    justify-content:flex-start;
}
.asset-mac-pairs:not([hidden]){
    display:flex;
    width:100%;
    align-items:center;
    gap:4px;
}
.asset-mac-pair{
    flex:1 1 0;
    min-width:0;
    max-width:65px;
    text-align:center;
    text-transform:uppercase;
    font-variant-numeric:tabular-nums;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    padding:10px 5px;
}
.asset-mac-separator{
    flex:0 0 auto;
    color:var(--muted);
    font-weight:700;
}
@media(max-width:740px){
    .asset-form-card .asset-form-grid{
        grid-template-columns:minmax(0,1fr);
    }
    .asset-form-card .asset-form-grid > .form-field[data-asset-field="notes"],
    .asset-form-card .asset-form-grid > .form-field[data-asset-field="record_tags"],
    .asset-form-card .asset-form-grid > .form-actions{
        grid-column:auto;
    }
}


/* ================================================================
   Killian Object UI Standard - Phase 2 pilot (Vendors/Virtualization)
   All selectors are scoped to opt-in editor classes; previously
   accepted Contacts, Object Details, and modal behavior are unchanged.
   ================================================================ */
.object-editor-card{
    width:100%;
    max-width:1200px;
}
.object-editor-form{
    min-width:0;
}
.object-editor-section{
    min-width:0;
    margin:0 0 18px;
    padding:22px;
}
.object-editor-section > h2{
    margin:0 0 18px;
    font-size:20px;
    line-height:1.3;
}
.object-editor-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px 22px;
    align-items:start;
}
.object-editor-field{
    min-width:0;
}
.object-editor-field--full{
    grid-column:1 / -1;
}
.object-editor-field > label{
    display:block;
    margin:0 0 7px;
}
.object-editor-field > small{
    display:block;
    margin-top:6px;
    line-height:1.45;
    color:var(--muted);
    font-size:12px;
}
.object-editor-field > .errorlist,
.object-editor-errors .errorlist{
    color:var(--danger);
    margin:6px 0 0;
    padding-left:18px;
    font-size:12px;
}
.object-editor-errors{
    color:var(--danger);
    margin-bottom:18px;
}
.object-editor-description{
    margin:0 0 18px;
    line-height:1.55;
    color:var(--muted);
}
.object-editor-description--final{
    margin-bottom:0;
}
.object-editor-tag-group .record-tags-field{
    margin:0;
}
.object-editor-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    margin-top:24px;
    padding-top:22px;
    border-top:1px solid var(--line);
}
@media(max-width:740px){
    .object-editor-card{
        padding:16px;
    }
    .object-editor-section{
        padding:16px;
    }
    .object-editor-grid{
        grid-template-columns:minmax(0,1fr);
        gap:16px;
    }
    .object-editor-field--full{
        grid-column:auto;
    }
}


/* Assets: named MAC collection, using Firewall/Router Add/Remove interaction. */
.asset-form-card .asset-form-grid > .asset-macs-section{
    grid-column:1 / -1;
    width:100%;
    border-top:1px solid var(--line);
    padding-top:20px;
    margin-top:12px;
    min-width:0;
}
.asset-macs-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:14px;
}
.asset-macs-heading h2{font-size:19px;margin:0 0 4px;}
.asset-macs-heading p{margin:0;}
.asset-mac-rows{display:flex;flex-direction:column;gap:12px;}
.asset-mac-entry{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:end;
    gap:12px 16px;
    min-width:0;
    padding:16px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--sh-1,#0e1628);
}
.asset-mac-entry-name,.asset-mac-entry-address{min-width:0;}
.asset-mac-entry-name label,.asset-mac-entry-address label{display:block;}
.asset-mac-entry-action{grid-column:1 / -1;justify-self:end;padding-bottom:2px;}
.asset-mac-entry-errors{grid-column:1 / -1;}
.asset-mac-confirmation{
    max-width:440px;
    width:calc(100% - 32px);
    background:var(--sh-2,#101c30);
    color:var(--text);
    border:1px solid var(--line);
    border-radius:12px;
    padding:24px;
    box-shadow:0 20px 65px #000b;
}
.asset-mac-confirmation::backdrop{background:#0009;}
.asset-mac-confirmation h2{font-size:20px;margin:0 0 12px;}
.asset-mac-confirmation p{margin:0 0 20px;}
.asset-mac-confirmation-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    flex-wrap:wrap;
}
@media(max-width:740px){
    .asset-form-card .asset-form-grid > .asset-macs-section{grid-column:auto;}
    .asset-mac-entry{grid-template-columns:minmax(0,1fr);}
    .asset-mac-entry-errors{grid-column:auto;}
    .asset-mac-entry-action{grid-column:auto;justify-self:end;}
}


/* H17DXR UI09: wide layouts and balanced Credentials controls. */
.killian-full-width-page-head,
.killian-wide-form-card,
.credential-folder-form-card {
    width:100%;
    max-width:none;
}
.credential-personal-notice { max-width:none; }
.credential-wide-form,
.credential-folder-form-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px 22px;
    align-items:start;
}
.credential-wide-form > .form-field,
.credential-folder-form-grid > .form-field { min-width:0; }
.credential-wide-form > .form-field[data-credential-field="notes"],
.credential-wide-form > .form-field[data-credential-field="shared_users"],
.credential-wide-form > .form-field[data-credential-field="record_tags"],
.credential-wide-form > .form-actions,
.credential-folder-form-grid > .form-actions,
.credential-wide-form > .msg {grid-column:1/-1;}
.credential-folder-form-grid > .form-field:first-of-type { grid-column:1/-1; }
.object-editor-card,
.asset-form-card { max-width:none; width:100%; }
.object-editor-section {padding:16px 18px; margin-bottom:12px;}
.object-editor-section > h2 {margin-bottom:12px;}
.object-editor-grid {gap:12px 18px;}
.credential-toolbar { margin-left:auto; display:flex; justify-content:flex-end; min-width:0; }
.credential-toolbar-grid {
    display:grid;
    grid-template-columns:minmax(95px,1fr) minmax(95px,1fr) minmax(200px,1.8fr);
    grid-template-rows:repeat(2,40px);
    gap:8px;
    width:min(100%,490px);
}
.credential-toolbar-cell {display:flex; min-width:0; align-items:stretch; justify-content:stretch;}
.credential-toolbar-cell > .button,
.credential-toolbar-cell > .module-view-control,
.credential-toolbar-cell > .credential-add-menu,
.credential-toolbar-cell > .credential-scope-switch,
.credential-toolbar-cell > .page-favorite-toggle,
.credential-toolbar-favorite > .page-favorite-toggle {width:100%;min-height:40px;height:40px;}
.credential-toolbar-cell .module-view-control > summary,
.credential-toolbar-cell .credential-add-menu > summary {width:100%;min-height:40px;display:flex;align-items:center;justify-content:center;}
.credential-toolbar-cell > a.button {display:flex;align-items:center;justify-content:center;}
.credential-toolbar-cell .module-view-control { position:relative; }
.credential-add-menu {position:relative;width:100%;}
.credential-add-menu > summary {list-style:none;cursor:pointer;font-size:23px;font-weight:700;}
.credential-add-menu > summary::-webkit-details-marker {display:none;}
.credential-add-options {
    position:absolute;z-index:30;right:0;top:calc(100% + 5px);
    min-width:185px;padding:7px;
    background:var(--panel);border:1px solid var(--line);border-radius:10px;
    box-shadow:0 12px 26px rgba(0,0,0,.3);
}
.credential-add-options a {display:block;padding:9px 11px;color:var(--text);text-decoration:none;border-radius:6px;}
.credential-add-options a:hover,.credential-add-options a:focus-visible {background:var(--panel2);}
.credential-toolbar .credential-scope-switch {min-width:0;min-height:40px;}
.credential-toolbar .credential-scope-label {font-size:11px;}
.credential-folder-list .credential-folder-row .module-row-main {
    display:grid;grid-template-columns:minmax(175px,1fr) minmax(0,2fr);gap:18px;
}
.credential-folder-list .credential-folder-row .record-meta-items {
    grid-column:auto;display:flex;align-items:center;gap:10px;min-width:0;
    flex-wrap:wrap;white-space:normal;
}
.credential-folder-list .credential-folder-row .record-meta-static {white-space:normal;overflow-wrap:break-word;}
.credential-folder-list .credential-parent-row .module-row-main {grid-template-columns:1fr;}
.credential-folder-list .credential-parent-row .document-created-title {width:auto;}
.credential-delete-card {width:100%;max-width:850px;}
.credential-delete-card .warn {margin:12px 0 18px;}
/* Dual-list progressively enhances the original Django multi-select. */
.association-transfer-ui {
    display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:stretch;gap:14px;max-width:100%;
}
.association-transfer-ui[hidden],.association-transfer-source select[hidden] {display:none!important;}
.association-transfer-column {display:flex;flex-direction:column;min-width:0;gap:7px;}
.association-transfer-label {font-size:13px;font-weight:650;}
.association-transfer-list {width:100%;min-width:0;min-height:165px;}
.association-transfer-controls {display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;}
.association-transfer-controls .button {min-width:90px;}
@media(max-width:980px) {
    .module-page-head {align-items:stretch;flex-wrap:wrap;}
    .credential-toolbar {width:100%;}
    .credential-toolbar-grid {width:min(100%,490px);}
    .credential-folder-list .credential-folder-row .module-row-main {grid-template-columns:minmax(0,1fr);}
}
@media(max-width:740px) {
    .credential-wide-form,.credential-folder-form-grid {grid-template-columns:minmax(0,1fr);gap:14px;}
    .credential-toolbar-grid {grid-template-columns:minmax(65px,1fr) minmax(72px,1fr) minmax(135px,1.6fr);gap:6px;}
    .credential-toolbar .credential-scope-label {font-size:10px;}
    .association-transfer-ui {grid-template-columns:minmax(0,1fr);}
    .association-transfer-controls {flex-direction:row;}
    .association-transfer-list {min-height:115px;}
}

/* Reclaim the available organization workspace width without changing form semantics. */
@media(min-width:1000px) {
    .with-org-sidebar main > .form-card {max-width:none;width:100%;}
    .with-org-sidebar main > .page-head {max-width:none;width:100%;}
}

/* UI11B-1: compact and consistent root-page action controls.
 * Third-column Favorites occupies both rows everywhere except Credentials,
 * which retains its separate organization/personal switch and Favorites slot.
 */
.ui11-page-actions {
    display:flex;
    align-items:flex-end;
    flex-direction:column;
    gap:8px;
    min-width:0;
    margin-left:auto;
}
.ui11-toolbar-grid {
    display:grid;
    grid-template-columns:minmax(95px,1fr) minmax(95px,1fr) minmax(180px,1.8fr);
    grid-template-rows:repeat(2,40px);
    gap:8px;
    width:min(100%,490px);
}
.ui11-toolbar-grid > * {min-width:0;}
.ui11-grid-plus {grid-column:1;grid-row:1;}
.ui11-grid-import {grid-column:2;grid-row:1;}
.ui11-grid-view {grid-column:1;grid-row:2;}
.ui11-grid-export {grid-column:2;grid-row:2;}
.ui11-grid-favorite {grid-column:3;grid-row:1 / span 2;min-height:0;display:flex;}
.ui11-toolbar-grid > .button,
.ui11-grid-favorite > .page-favorite-toggle,
.ui11-grid-favorite > .ui11-favorite-placeholder,
.ui11-toolbar-grid > .module-view-control,
.ui11-toolbar-grid > .ui11-add-menu,
.ui11-toolbar-grid > a.button {
    width:100%;height:100%;min-height:0;
    align-items:center;justify-content:center;
}
.ui11-toolbar-grid > a.button,
.ui11-toolbar-grid > .button,
.ui11-grid-favorite > .page-favorite-toggle,
.ui11-grid-favorite > .ui11-favorite-placeholder {
    display:flex;
}
.ui11-grid-favorite > .page-favorite-toggle,
.ui11-grid-favorite > .ui11-favorite-placeholder {height:88px;min-height:88px;}
.ui11-grid-favorite svg {stroke:currentColor;fill:transparent;stroke-width:1.7;stroke-linejoin:round;}
.ui11-toolbar-grid > .module-view-control > summary,
.ui11-toolbar-grid > .ui11-add-menu > summary {
    display:flex;width:100%;height:40px;min-height:40px;
    align-items:center;justify-content:center;
}
.ui11-toolbar-grid .ui11-plus {font-size:23px;font-weight:700;text-decoration:none;}
.ui11-add-menu {position:relative;}
.ui11-add-menu > summary {list-style:none;cursor:pointer;}
.ui11-add-menu > summary::-webkit-details-marker {display:none;}
.ui11-add-options {
    position:absolute;right:0;top:calc(100% + 5px);z-index:40;
    min-width:185px;max-width:280px;padding:7px;
    background:var(--panel);border:1px solid var(--line);border-radius:10px;
    box-shadow:0 12px 26px rgba(0,0,0,.3);
}
.ui11-add-options a {
    display:block;padding:9px 11px;color:var(--text);
    text-decoration:none;border-radius:6px;white-space:nowrap;
}
.ui11-add-options a:hover,
.ui11-add-options a:focus-visible {background:var(--panel2);}
.ui11-secondary-actions {display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;}
.ui11-disabled-action:disabled {cursor:not-allowed;opacity:.42;}
.ui11-sortbar {display:flex;justify-content:flex-end;align-items:center;margin:8px 0 10px;}
.ui11-sort-control {display:flex;align-items:center;gap:8px;min-width:0;}
.ui11-sort-label {display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);font-weight:600;}
.ui11-sort-select {
    min-height:36px;width:auto;max-width:min(100%,250px);min-width:150px;
    padding:7px 32px 7px 11px;background:var(--panel);
    border:1px solid var(--line);border-radius:8px;
    color:var(--text);font:inherit;font-size:12px;cursor:pointer;
}
.ui11-sort-select:focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
.ui11-hidden-sort[hidden],.ui11-enhanced > [hidden],
.ui11-enhanced > label[hidden],.ui11-enhanced > button[hidden] {display:none!important;}
.ui11-static-heading {font-weight:inherit;}
.ui11-server-sort .ui11-sort-control {margin:0;}
.ui11-server-sort .ui11-sort-label {font-size:12px;}
@media(max-width:980px) {
    .ui11-page-actions {width:100%;align-items:flex-end;}
    .ui11-toolbar-grid {width:min(100%,490px);}
}
@media(max-width:740px) {
    .ui11-toolbar-grid {
        grid-template-columns:minmax(65px,1fr) minmax(72px,1fr) minmax(135px,1.6fr);
        gap:6px;width:100%;
    }
    .ui11-grid-favorite > .page-favorite-toggle,
    .ui11-grid-favorite > .ui11-favorite-placeholder {height:86px;min-height:86px;}
    .ui11-sort-select {min-width:120px;max-width:205px;}
}

/* UI11B-2: credential values are their own accessible copy targets. */
.credential-click-copy {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 2px 4px;
    margin: -2px -4px;
    line-height: inherit;
    max-width: 100%;
    cursor: copy;
}
.credential-click-copy.module-secret-dots {
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 1px;
}
.credential-click-copy:hover,
.credential-click-copy:focus-visible {
    color: var(--text);
    background: rgba(110,168,254,.10);
}
.credential-click-copy:focus-visible {
    outline: 2px solid var(--accent, #6ea8fe);
    outline-offset: 2px;
}

/* Live co-editing presence (Collabora View_Added / View_Removed) */
.document-presence{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 10px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.document-presence-label{font-size:.85rem;font-weight:600;color:var(--muted,inherit)}
.document-presence-count{display:inline-block;min-width:1.4em;padding:0 6px;margin-left:4px;border-radius:999px;background:var(--accent-soft,var(--border));color:var(--text);font-size:.8rem;text-align:center}
.document-presence-list{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.document-presence-chip{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--presence-color,var(--accent));color:#fff;font-size:.78rem;font-weight:700;letter-spacing:.02em;text-shadow:0 1px 1px rgba(0,0,0,.45);cursor:default;user-select:none}
.document-presence-chip.is-viewing{opacity:.55;box-shadow:inset 0 0 0 2px var(--surface),0 0 0 1px var(--presence-color,var(--accent))}
.document-presence-chip.is-self{outline:2px solid var(--text);outline-offset:2px}
.document-presence-empty{font-size:.85rem;color:var(--muted,inherit)}
.document-presence-empty[hidden]{display:none}

/* Native document editor */
.native-editor:not(.is-ready) .native-editor-shell{display:none}
.native-editor-shell{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--bg)}
.native-toolbar{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:8px;border-bottom:1px solid var(--border);background:var(--bg)}
.native-btn,.native-select{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;min-width:30px;height:30px;padding:0 8px;cursor:pointer;font:inherit;line-height:1}
.native-btn:hover,.native-select:hover{border-color:var(--accent);color:var(--accent)}
.native-btn.is-on{background:var(--accent);color:var(--accent-fg,var(--bg));border-color:var(--accent)}
.native-btn.b{font-weight:700}.native-btn.i{font-style:italic}.native-btn.u{text-decoration:underline}.native-btn.s{text-decoration:line-through}
.native-btn[hidden]{display:none}
.native-sep{width:1px;height:22px;background:var(--border);margin:0 4px}
.native-color{width:30px;height:30px;padding:2px;border:1px solid var(--border);border-radius:6px;background:var(--surface);cursor:pointer}
.native-linkrow{display:flex;gap:6px;padding:8px;border-bottom:1px solid var(--border);background:var(--surface)}
.native-linkinput{flex:1;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 8px;font:inherit}
.native-stage{background:var(--bg);padding:20px;max-height:70vh;overflow:auto}
.native-paper{background:var(--surface);color:var(--text);max-width:820px;min-height:420px;margin:0 auto;padding:44px 56px;border:1px solid var(--border);border-radius:4px;outline:none;box-shadow:0 8px 28px rgba(0,0,0,.25)}
.native-paper:focus-visible{box-shadow:0 0 0 2px var(--accent)}
.native-paper h1{font-size:2rem;margin:0 0 .4em}.native-paper h2{font-size:1.5rem;margin:1.2em 0 .4em}.native-paper h3{font-size:1.2rem;margin:1em 0 .3em}
.native-paper p{margin:0 0 .7em}
.native-paper code{background:var(--bg);padding:1px 5px;border-radius:4px}
.native-paper pre{background:var(--bg);padding:12px 14px;border-radius:8px;overflow:auto}
.native-paper pre code{padding:0;background:none}
.native-paper blockquote{margin:.8em 0;padding-left:14px;border-left:3px solid var(--accent);color:var(--muted,inherit)}
.native-paper table{border-collapse:collapse;width:100%;margin:.8em 0;table-layout:fixed}
.native-paper td,.native-paper th{border:1px solid var(--border);padding:6px 9px;vertical-align:top;min-width:1em}
.native-paper th{background:var(--bg);text-align:left}
.native-paper .selectedCell{background:var(--accent-soft,rgba(80,160,255,.2))}
.native-paper mark{background:var(--highlight,#ffe066);color:#111;padding:0 2px;border-radius:2px}
.native-paper a{color:var(--accent)}
.native-paper hr{border:0;border-top:1px solid var(--border);margin:1.2em 0}
.native-paper p.is-editor-empty:first-child::before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;color:var(--muted,inherit);opacity:.7}
.collaboration-carets__caret{position:relative;margin-left:-1px;margin-right:-1px;border-left:1px solid;border-right:1px solid;word-break:normal;pointer-events:none}
.collaboration-carets__label{position:absolute;top:-1.4em;left:-1px;font:700 11px/1 system-ui,sans-serif;padding:3px 6px;border-radius:3px 3px 3px 0;color:#fff;white-space:nowrap;user-select:none;pointer-events:none}
.document-content[hidden]{display:none}

.native-toolbar select.native-select{width:auto;min-width:130px}

/* Pop-up pages hide their own page header and breadcrumbs (the dialog already shows the title). */
.record-modal-frame .page-head[hidden],
.record-modal-frame .breadcrumbs[hidden]{display:none !important}

/* Documents: pictures, task lists, restore bar and history screen */
.native-paper img, .document-content img{max-width:100%;height:auto;border-radius:4px}
.native-paper img.ProseMirror-selectednode{outline:2px solid var(--accent, #3b82f6)}
.native-paper ul[data-type="taskList"], .document-content ul[data-type="taskList"]{list-style:none;padding-left:4px;margin-left:0}
.native-paper ul[data-type="taskList"] li, .document-content ul[data-type="taskList"] li{display:flex;gap:8px;align-items:flex-start}
.native-paper ul[data-type="taskList"] li > label, .document-content ul[data-type="taskList"] li > label{flex:0 0 auto;margin-top:3px;user-select:none}
.native-paper ul[data-type="taskList"] li > div, .document-content ul[data-type="taskList"] li > div{flex:1 1 auto}
.native-paper ul[data-type="taskList"] li > div > p, .document-content ul[data-type="taskList"] li > div > p{margin:0}
.native-paper ul[data-type="taskList"] li[data-checked="true"] > div, .document-content ul[data-type="taskList"] li[data-checked="true"] > div{text-decoration:line-through;opacity:.7}
.document-content ul[data-type="taskList"] input[type="checkbox"]{pointer-events:none}
.native-restore-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 12px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--panel-alt, rgba(127,127,127,.08))}
.native-restore-bar[hidden]{display:none}
.native-restore-bar span{flex:1 1 320px}
.document-history-layout{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:16px;align-items:start}
.document-history-items{list-style:none;margin:0;padding:6px;max-height:70vh;overflow:auto}
.document-history-items li a{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:6px;text-decoration:none;color:inherit}
.document-history-items li.is-selected a{background:var(--panel-alt, rgba(127,127,127,.15));font-weight:600}
.document-history-body{padding:16px 20px}
.native-btn-file{position:relative}
@media (max-width:800px){.document-history-layout{grid-template-columns:1fr}}

/* Killian spreadsheet */
.inline-form{display:inline;margin:0}
.sheet-title-input{font:inherit;font-size:1.5rem;font-weight:600;color:var(--text);background:transparent;border:1px solid transparent;border-radius:6px;padding:2px 6px;margin-left:-6px;width:min(640px,90vw)}
.sheet-title-input:hover,.sheet-title-input:focus{border-color:var(--border);background:var(--surface);outline:none}
.sheet-host .native-editor-shell{display:flex;flex-direction:column;background:var(--surface)}
.sheet-toolbar{position:relative}
.sheet-toolbar .native-select{max-width:150px}
.sheet-formulabar{display:flex;align-items:center;gap:6px;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--surface)}
.sheet-namebox{width:84px;height:28px;text-align:center;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px;font:inherit}
.sheet-fx{color:var(--muted);font-style:italic;padding:0 4px}
.sheet-formula{flex:1;height:28px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:0 8px;font:inherit;font-family:ui-monospace,Menlo,Consolas,monospace}
.sheet-formula:focus,.sheet-namebox:focus{border-color:var(--accent);outline:none}
.sheet-grid{position:relative;height:68vh;min-height:360px;background:var(--surface)}
.sheet-scroll{position:absolute;inset:0;overflow:auto;outline:none}
.sheet-sticky{position:sticky;top:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden}
.sheet-canvas{display:block;pointer-events:auto}
.sheet-spacer{position:absolute;top:0;left:0;width:1px;height:1px;pointer-events:none}
.sheet-input{position:absolute;z-index:3;margin:0;padding:2px 4px;border:2px solid var(--accent);background:var(--surface);color:var(--text);font:inherit;resize:none;overflow:hidden;box-sizing:border-box;outline:none}
.sheet-input[hidden]{display:none}
.sheet-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.sheet-loading{padding:24px;color:var(--muted)}
.sheet-tabs{display:flex;gap:2px;align-items:center;padding:4px 8px;border-top:1px solid var(--border);background:var(--bg);overflow-x:auto}
.sheet-tab{background:transparent;color:var(--text);border:1px solid transparent;border-radius:6px 6px 0 0;padding:4px 12px;cursor:pointer;font:inherit;white-space:nowrap}
.sheet-tab:hover{background:var(--surface)}
.sheet-tab.is-active{background:var(--surface);border-color:var(--border);border-bottom-color:var(--surface);font-weight:600}
.sheet-tab-add{font-weight:700}
.sheet-tab-input{font:inherit;padding:3px 6px;border:1px solid var(--accent);border-radius:6px;background:var(--surface);color:var(--text);width:140px}
.sheet-menu{position:fixed;z-index:50;min-width:160px;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 28px rgba(0,0,0,.3);padding:4px}
.sheet-menu-item{display:block;width:100%;text-align:left;background:transparent;color:var(--text);border:0;border-radius:6px;padding:6px 10px;cursor:pointer;font:inherit}
.sheet-menu-item:hover{background:var(--bg)}
.sheet-menu-item.danger{color:#e5484d}
.sheet-static table{border-collapse:collapse;margin:0 0 16px}
.sheet-static td,.sheet-static th{border:1px solid var(--border);padding:3px 8px}
.sheet-static[hidden]{display:none}

/* Killian 1.0.2: edit page (single card) keeps its header on one line, level with the card */
.organization-create-page-head-single{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:12px 16px;
    width:min(100%,680px);
}
.organization-create-page-head-single .organization-create-header-right{
    justify-content:flex-end;
    gap:10px;
    margin-top:0;
}
.organization-create-subtitle-single{
    width:min(100%,680px);
}