/* 9JS Identity - corporate theme on top of Bootstrap 5.3 (light + dark) */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 400; src: url('../vendor/inter/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 500; src: url('../vendor/inter/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 600; src: url('../vendor/inter/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 700; src: url('../vendor/inter/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 400; src: url('../vendor/inter/inter-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 600; src: url('../vendor/inter/inter-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root,
[data-bs-theme=light] {
    --app-blue: #18489f;
    --app-blue-rgb: 24, 72, 159;
    --app-blue-dark: #103576;
    --app-blue-soft: #e8eefa;
    --app-grey: #898888;

    --bs-primary: var(--app-blue);
    --bs-primary-rgb: var(--app-blue-rgb);
    --bs-primary-text-emphasis: #0d2a5f;
    --bs-primary-bg-subtle: #dce5f6;
    --bs-primary-border-subtle: #b3c4e6;
    --bs-link-color: var(--app-blue);
    --bs-link-color-rgb: var(--app-blue-rgb);
    --bs-link-hover-color: var(--app-blue-dark);
    --bs-link-hover-color-rgb: 16, 53, 118;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-bg: #f4f6fa;
    --bs-border-radius: .5rem;
    --bs-border-radius-lg: .75rem;
    --bs-focus-ring-color: rgba(var(--app-blue-rgb), .25);

    --app-surface: #ffffff;
    --app-sidebar-bg: #ffffff;
    --app-sidebar-active: var(--app-blue-soft);
    --app-muted-border: #e3e7ef;
}

[data-bs-theme=dark] {
    --app-blue: #5b8ae0;
    --app-blue-rgb: 91, 138, 224;
    --app-blue-dark: #86a8ea;
    --app-blue-soft: rgba(91, 138, 224, .14);

    --bs-primary: var(--app-blue);
    --bs-primary-rgb: var(--app-blue-rgb);
    --bs-primary-text-emphasis: #a9c1f0;
    --bs-primary-bg-subtle: rgba(91, 138, 224, .16);
    --bs-primary-border-subtle: rgba(91, 138, 224, .4);
    --bs-link-color: #86a8ea;
    --bs-link-color-rgb: 134, 168, 234;
    --bs-link-hover-color: #a9c1f0;
    --bs-body-bg: #0f141c;
    --bs-body-color: #dfe5ee;
    --bs-secondary-bg: #18202c;
    --bs-tertiary-bg: #141b25;
    --bs-border-color: #2a3442;
    --bs-focus-ring-color: rgba(var(--app-blue-rgb), .35);

    --app-surface: #161d28;
    --app-sidebar-bg: #121923;
    --app-sidebar-active: rgba(91, 138, 224, .16);
    --app-muted-border: #232d3b;
}

body {
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}

/* Buttons: brand primary */
.btn-primary {
    --bs-btn-bg: #18489f;
    --bs-btn-border-color: #18489f;
    --bs-btn-hover-bg: #103576;
    --bs-btn-hover-border-color: #103576;
    --bs-btn-active-bg: #0d2a5f;
    --bs-btn-active-border-color: #0d2a5f;
    --bs-btn-disabled-bg: #18489f;
    --bs-btn-disabled-border-color: #18489f;
    --bs-btn-focus-shadow-rgb: 24, 72, 159;
    font-weight: 600;
}
[data-bs-theme=dark] .btn-primary {
    --bs-btn-bg: #2f62c2;
    --bs-btn-border-color: #2f62c2;
    --bs-btn-hover-bg: #3c71d4;
    --bs-btn-hover-border-color: #3c71d4;
    --bs-btn-active-bg: #2853a5;
}
.btn-outline-primary {
    --bs-btn-color: var(--app-blue);
    --bs-btn-border-color: var(--app-blue);
    --bs-btn-hover-bg: var(--app-blue);
    --bs-btn-hover-border-color: var(--app-blue);
    --bs-btn-active-bg: var(--app-blue-dark);
    --bs-btn-active-border-color: var(--app-blue-dark);
}
.form-check-input:checked { background-color: var(--app-blue); border-color: var(--app-blue); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: rgba(var(--app-blue-rgb), .6);
    box-shadow: 0 0 0 .2rem rgba(var(--app-blue-rgb), .2);
}
.form-label { font-weight: 500; font-size: .9rem; }
.form-text { font-size: .8rem; }

/* Logo variant per theme */
.logo { height: 2rem; width: auto; }
.logo-lg { height: 2.6rem; }
.logo-on-dark { display: none; }
[data-bs-theme=dark] .logo-on-light { display: none; }
[data-bs-theme=dark] .logo-on-dark { display: inline-block; }

/* ===================================================================== auth (login) layout */
.auth-shell {
    min-height: 100vh;
    display: flex;
}
.auth-hero {
    position: relative;
    flex: 0 0 46%;
    max-width: 46%;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(16, 53, 118, .92) 0%, rgba(24, 72, 159, .78) 45%, rgba(16, 53, 118, .55) 100%),
        url('../images/mitchell-luo-xREzOtWzDrQ-unsplash.jpg') center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
}
.auth-hero h1 {
    font-weight: 700;
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
    max-width: 22ch;
}
.auth-hero p { color: rgba(255, 255, 255, .82); max-width: 42ch; font-size: 1.05rem; }
.auth-hero-points { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-hero-points li { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; color: rgba(255, 255, 255, .9); }
.auth-hero-points i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}
.auth-hero-foot { font-size: .8rem; color: rgba(255, 255, 255, .6); }

.auth-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: var(--app-surface);
    min-width: 0;
}
.auth-topbar {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 1.5rem;
}
.auth-content {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem 2rem;
}
.auth-card { width: 100%; max-width: 410px; }
.auth-card .logo-wrap { margin-bottom: 2rem; }
.auth-card h2 { font-weight: 700; letter-spacing: -.01em; font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card .lead-muted { color: var(--bs-secondary-color); margin-bottom: 1.75rem; }
.auth-card .form-control { padding: .7rem .9rem; }
.auth-card .btn-lg { padding: .7rem 1rem; font-size: 1rem; }
.auth-footer {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}
.auth-footer i { color: #198754; }

.input-icon { position: relative; }
.input-icon > i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--bs-secondary-color); pointer-events: none;
}
.input-icon > .form-control { padding-left: 2.5rem; }


.qr-box {
    background: #fff;
    border: 1px solid var(--app-muted-border);
    border-radius: var(--bs-border-radius-lg);
    padding: .75rem;
    display: inline-block;
    line-height: 0;
}
.qr-box img, .qr-box canvas { width: 180px; height: 180px; image-rendering: pixelated; }
@media (max-width: 991.98px) {
    .auth-hero { display: none; }
    .auth-main { background: var(--bs-body-bg); }
    .auth-content { align-items: flex-start; padding-top: 2rem; }
    .auth-card {
        background: var(--app-surface);
        padding: 2rem 1.5rem;
        border-radius: var(--bs-border-radius-lg);
        box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
    }
}

/* ===================================================================== app layout */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 60px;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-muted-border);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1rem;
}
.app-topbar .brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.app-topbar .brand-sub {
    color: var(--bs-secondary-color);
    font-weight: 500;
    font-size: .85rem;
    border-left: 1px solid var(--app-muted-border);
    padding-left: .75rem;
}
.app-topbar .user-btn { display: flex; align-items: center; gap: .5rem; }
.avatar {
    width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--app-blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .8rem; flex-shrink: 0;
}
.avatar-lg { width: 3rem; height: 3rem; font-size: 1.1rem; }

.app-shell { display: flex; min-height: calc(100vh - 60px); }
.app-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--app-sidebar-bg);
    border-right: 1px solid var(--app-muted-border);
}
@media (min-width: 992px) {
    .app-sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
}
.app-sidebar .offcanvas-body { padding: 1rem .75rem; display: block; }
.nav-section {
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--bs-secondary-color);
    padding: 1rem .75rem .4rem;
}
.nav-section:first-child { padding-top: .25rem; }
.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--bs-body-color);
    border-radius: .45rem;
    padding: .5rem .75rem;
    font-weight: 500;
    font-size: .92rem;
}
.app-nav .nav-link i { font-size: 1.05rem; color: var(--bs-secondary-color); }
.app-nav .nav-link:hover { background: var(--bs-tertiary-bg); }
.app-nav .nav-link.active { background: var(--app-sidebar-active); color: var(--app-blue); }
.app-nav .nav-link.active i { color: var(--app-blue); }

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 2rem;
}
@media (max-width: 767.98px) { .app-main { padding: 1.25rem 1rem; } }
.app-main-inner { max-width: 1200px; }

.page-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.page-header p { margin: .25rem 0 0; color: var(--bs-secondary-color); }

.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--app-muted-border);
    --bs-card-cap-bg: transparent;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card-header { font-weight: 600; padding: .9rem 1.25rem; }
.card-body { padding: 1.25rem; }
.card-title-sm { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 600; }

.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat-card .stat-label { color: var(--bs-secondary-color); font-size: .85rem; }
.stat-card .stat-icon {
    width: 2.5rem; height: 2.5rem; border-radius: .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--app-blue-soft); color: var(--app-blue); font-size: 1.2rem;
}

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem 1rem; }
.table thead th {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--bs-secondary-color); font-weight: 600; white-space: nowrap;
    border-bottom-color: var(--app-muted-border);
}
.table td { vertical-align: middle; border-color: var(--app-muted-border); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }

.app-tile {
    display: flex; gap: 1rem; align-items: center;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--app-muted-border);
    border-radius: var(--bs-border-radius-lg);
    background: var(--app-surface);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    height: 100%;
}
.app-tile:hover { border-color: rgba(var(--app-blue-rgb), .5); box-shadow: 0 4px 14px rgba(16, 24, 40, .08); transform: translateY(-1px); color: var(--bs-body-color); }
.app-tile .app-icon {
    width: 2.75rem; height: 2.75rem; border-radius: .65rem; flex-shrink: 0;
    background: var(--app-blue); color: #fff; font-weight: 700; font-size: 1.1rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.app-tile .app-name { font-weight: 600; }
.app-tile .app-desc { font-size: .85rem; color: var(--bs-secondary-color); }

.badge-soft { font-weight: 600; font-size: .72rem; padding: .35em .6em; border-radius: 999px; }
.badge-soft.text-bg-success { background: rgba(25, 135, 84, .12) !important; color: #157347 !important; }
.badge-soft.text-bg-danger { background: rgba(220, 53, 69, .12) !important; color: #b02a37 !important; }
.badge-soft.text-bg-warning { background: rgba(255, 193, 7, .18) !important; color: #8a6400 !important; }
.badge-soft.text-bg-primary { background: var(--app-blue-soft) !important; color: var(--app-blue) !important; }
.badge-soft.text-bg-secondary { background: var(--bs-tertiary-bg) !important; color: var(--bs-secondary-color) !important; }
[data-bs-theme=dark] .badge-soft.text-bg-success { color: #75d6a5 !important; }
[data-bs-theme=dark] .badge-soft.text-bg-danger { color: #f0848f !important; }
[data-bs-theme=dark] .badge-soft.text-bg-warning { color: #f3cd5b !important; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.text-break-all { word-break: break-all; }
.dl-grid { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: .5rem 1.5rem; margin: 0; }
.dl-grid dt { font-weight: 500; color: var(--bs-secondary-color); font-size: .9rem; }
.dl-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .dl-grid { grid-template-columns: 1fr; gap: .1rem; } .dl-grid dd { margin-bottom: .6rem; } }

.copy-field { display: flex; gap: .5rem; align-items: stretch; }
.copy-field input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }

.callout {
    border-left: 3px solid var(--app-blue);
    background: var(--app-blue-soft);
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
    padding: .85rem 1rem;
    font-size: .9rem;
}

.log-details { max-width: 420px; overflow-wrap: anywhere; font-size: .85rem; color: var(--bs-secondary-color); }

.theme-toggle .bi { font-size: 1rem; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }

.error-code { font-size: 4.5rem; font-weight: 800; letter-spacing: -.04em; color: var(--app-blue); line-height: 1; }

@media print {
    .auth-hero, .auth-topbar, .auth-footer, .no-print, .app-topbar, .app-sidebar { display: none !important; }
}
.card-narrow { max-width: 560px; }

/* Compact top bar on phones */
@media (max-width: 575.98px) {
    .app-topbar { padding: 0 .5rem; gap: .25rem; }
    .app-topbar .logo { height: 1.5rem; }
    .app-topbar .toolbar-label { display: none; }
    .app-topbar .dropdown-toggle::after { display: none; }
    .app-topbar .btn { padding-left: .35rem; padding-right: .35rem; }
    .auth-topbar { padding: .75rem 1rem; }
}

/* ===================================================================== 9JS Links */
.min-w-0 { min-width: 0; }

.topbar-search { position: relative; flex: 0 1 420px; margin-left: 1rem; align-items: center; }
.topbar-search > i { position: absolute; left: .8rem; color: var(--bs-secondary-color); pointer-events: none; }
.topbar-search .form-control { padding-left: 2.2rem; background: var(--bs-tertiary-bg); border-color: transparent; }
.topbar-search .form-control:focus { background: var(--app-surface); }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--bs-secondary-color); }
.empty-state > i { font-size: 2.6rem; display: block; margin-bottom: .75rem; }
.empty-state h2 { font-size: 1.15rem; font-weight: 600; color: var(--bs-body-color); }

.toast.text-bg-success, .toast.text-bg-dark, .toast.text-bg-danger, .toast.text-bg-warning { font-weight: 500; }
.known-groups { max-height: 180px; overflow-y: auto; }
.card-form { max-width: 720px; }

/* link list */
.link-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; text-decoration: none; }
.link-title { display: block; font-weight: 600; }
.link-target {
    display: block; max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .85rem; color: var(--bs-secondary-color);
}
.link-table td:nth-child(2) { max-width: 1px; width: 50%; }
.link-inactive .link-code { color: var(--bs-secondary-color); text-decoration: line-through; }

/* statistics */
.stat-icon-muted { background: var(--bs-tertiary-bg) !important; color: var(--bs-secondary-color) !important; }
.chart { display: block; width: 100%; height: 180px; }
.chart-bar { fill: var(--app-blue); }
.chart-hit { fill: transparent; }
.chart-col:hover .chart-bar { fill: var(--app-blue-dark); }
.chart-col:hover .chart-hit { fill: var(--bs-tertiary-bg); }
.chart-grid { stroke: var(--app-muted-border); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-axis { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; margin-top: .4rem; color: var(--bs-secondary-color); }

.bd-row + .bd-row { margin-top: .7rem; }
.bd-label { display: flex; justify-content: space-between; gap: .75rem; font-size: .88rem; margin-bottom: .2rem; min-width: 0; }
.bd-num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.pbar { display: block; width: 100%; height: 6px; border-radius: 3px; }
.pbar-bg { fill: var(--app-muted-border); }
.pbar-fg { fill: var(--app-blue); }

.qr-box img { width: 180px; height: 180px; image-rendering: pixelated; }

/* ===================================================================== sharing (as in the password manager) */
/* Directory picker */
.picker { position: relative; }
.picker-results {
    position: absolute; z-index: 1050; left: 0; right: 0; top: calc(100% + 4px);
    background: var(--app-surface);
    border: 1px solid var(--app-muted-border);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 10px 30px rgba(16, 24, 40, .14);
    max-height: 320px; overflow-y: auto;
    display: none;
}
.picker-results.show { display: block; }
.picker-results button {
    display: block; width: 100%; text-align: left; border: 0; background: transparent;
    padding: .55rem .85rem; color: var(--bs-body-color);
}
.picker-results button:hover, .picker-results button:focus { background: var(--bs-tertiary-bg); outline: none; }
.picker-results .sub { display: block; font-size: .78rem; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.picker-results .empty { padding: .6rem .85rem; color: var(--bs-secondary-color); font-size: .9rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .4rem .3rem .7rem; border-radius: 999px;
    background: var(--app-blue-soft); color: var(--app-blue); font-size: .85rem; font-weight: 500;
}
.chip button { border: 0; background: transparent; color: inherit; padding: 0 .25rem; line-height: 1; }

/* sharing badges: private (grey, lock) / individual people (violet) / groups (teal) */
.share-badge {
    display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
    font-size: .75rem; font-weight: 600; padding: .22em .6em; border-radius: 999px;
    max-width: 100%; overflow: hidden; vertical-align: middle;
}
/* only the name is shortened ("…"), icons and R/W letters always stay visible */
.share-badge .share-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 24ch; }
.share-badge > i, .share-badge .perm-letter, .share-plus { flex-shrink: 0; }
.share-badge .perm-letter { margin-left: .1rem; }
.share-plus .perm-letter { margin-left: .3rem; }
.folder-share { display: flex; margin-top: .35rem; min-width: 0; }
.share-private { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border: 1px dashed var(--bs-border-color); }
.share-people { background: rgba(111, 66, 193, .12); color: #5a32a3; }
.share-groups { background: rgba(13, 148, 136, .13); color: #0b7a70; }
[data-bs-theme=dark] .share-people { color: #c4a8f5; background: rgba(111, 66, 193, .25); }
[data-bs-theme=dark] .share-groups { color: #6fd8cc; background: rgba(13, 148, 136, .22); }
.share-plus { display: inline-flex; gap: .15rem; align-items: center; margin-left: .25rem; padding-left: .35rem; border-left: 1px solid currentColor; color: #5a32a3; }
[data-bs-theme=dark] .share-plus { color: #c4a8f5; }
.share-legend .share-badge { font-size: .7rem; }

/* share editor */
.share-row {
    display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem;
    border: 1px solid var(--app-muted-border); border-radius: var(--bs-border-radius); margin-bottom: .4rem; background: var(--app-surface);
}
.share-row > i { color: var(--bs-secondary-color); }
.share-row.inherited { background: var(--bs-tertiary-bg); border-style: dashed; }
.share-row.compact { border: 0; padding: .3rem 0; margin: 0; background: transparent; }
.share-label { flex: 1 1 auto; min-width: 0; font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; }
.share-label .sub { display: block; font-size: .75rem; color: var(--bs-secondary-color); font-weight: 400; }
.share-perm { width: auto; flex: 0 0 auto; }

.group-disabled td:not(:first-child) { opacity: .6; }

/* R / W permission letters in sharing badges */
.perm-letter {
    display: inline-block; margin-left: .35rem; padding: 0 .3rem; border-radius: .25rem;
    font-size: .62rem; font-weight: 700; line-height: 1.35; letter-spacing: .02em;
    background: rgba(0, 0, 0, .08); color: inherit;
}
[data-bs-theme=dark] .perm-letter { background: rgba(255, 255, 255, .14); }
/* W stands out a bit more than R */
.perm-letter.perm-edit { background: rgba(0, 0, 0, .2); }
[data-bs-theme=dark] .perm-letter.perm-edit { background: rgba(255, 255, 255, .26); }
/* tooltips: one name per line */
.tooltip-inner { white-space: pre-line; text-align: left; }

.share-chip {
    display: inline-flex; align-items: center; gap: .3rem; margin: 0 .35rem .3rem 0;
    padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 500;
    background: var(--bs-tertiary-bg); border: 1px solid var(--app-muted-border);
}
.share-chip > i { color: var(--bs-secondary-color); }


/* ===================================================================== sign-in page like idp.9js.de */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bs-body-bg); }
.auth-topbar { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.5rem; }
.auth-content { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 1rem 1rem 2rem; }
.auth-card { width: 100%; max-width: 420px; background: var(--bs-body-bg); padding: 2.5rem 2.25rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); }
