:root {
    --bg: #07101b;
    --panel: #111d2d;
    --panel-2: #172538;
    --line: #263a55;
    --text: #f2f7ff;
    --muted: #a8bad1;
    --accent: #55a8ff;
    --accent-2: #7cd7b0;
    --danger: #ff7c8a;
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(85, 168, 255, .12), transparent 28rem),
        linear-gradient(135deg, #06101a, #0b1522 58%, #08111c);
    color: var(--text);
    font-family: "Aptos", "Segoe UI", sans-serif;
    font-size: 14px;
}

.crm-scrollbar,
.main,
.nav,
.admin-drawer-panel,
.drawer-panel,
.activity-drawer-body,
.party-list-modal-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(118, 155, 200, .28) rgba(8, 18, 31, .16);
}

.crm-scrollbar::-webkit-scrollbar,
.main::-webkit-scrollbar,
.nav::-webkit-scrollbar,
.admin-drawer-panel::-webkit-scrollbar,
.drawer-panel::-webkit-scrollbar,
.activity-drawer-body::-webkit-scrollbar,
.party-list-modal-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.crm-scrollbar::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.nav::-webkit-scrollbar-track,
.admin-drawer-panel::-webkit-scrollbar-track,
.drawer-panel::-webkit-scrollbar-track,
.activity-drawer-body::-webkit-scrollbar-track,
.party-list-modal-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(8, 18, 31, .18);
}

.crm-scrollbar::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.nav::-webkit-scrollbar-thumb,
.admin-drawer-panel::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb,
.activity-drawer-body::-webkit-scrollbar-thumb,
.party-list-modal-list::-webkit-scrollbar-thumb {
    border: 2px solid rgba(6, 15, 25, .92);
    border-radius: 999px;
    background: rgba(118, 155, 200, .38);
}

.crm-scrollbar::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover,
.nav::-webkit-scrollbar-thumb:hover,
.admin-drawer-panel::-webkit-scrollbar-thumb:hover,
.drawer-panel::-webkit-scrollbar-thumb:hover,
.activity-drawer-body::-webkit-scrollbar-thumb:hover,
.party-list-modal-list::-webkit-scrollbar-thumb:hover {
    background: rgba(85, 168, 255, .68);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-body {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
    transition: grid-template-columns .2s ease;
}

.app-body.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar-expanded-preload .app-body.sidebar-collapsed {
    grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar-expanded-preload .sidebar-collapsed .brand {
    justify-content: space-between;
    padding-bottom: 18px;
}

.sidebar-expanded-preload .sidebar-collapsed .brand > div {
    display: grid;
}

.sidebar-expanded-preload .sidebar-collapsed .nav-label {
    display: inline;
}

.sidebar-expanded-preload .sidebar-collapsed .nav-section-title {
    display: block;
}

.sidebar-expanded-preload .sidebar-collapsed .nav a {
    justify-content: flex-start;
    padding-inline: 10px;
}

.sidebar-expanded-preload .sidebar-collapsed .sidebar-logout-button {
    justify-content: flex-start;
    padding-inline: 10px;
}

.sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px 14px;
    border-right: 1px solid var(--line);
    background: rgba(6, 15, 25, .88);
}

.brand {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(151, 177, 211, .14);
    background: rgba(6, 15, 25, .96);
}

.brand > div {
    display: grid;
    gap: 7px;
}

.brand strong {
    font-size: 30px;
    line-height: .96;
    letter-spacing: -.05em;
}

.brand span,
.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(118, 155, 200, .28);
    border-radius: 14px;
    color: #dbeafe;
    background: rgba(18, 29, 45, .72);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    line-height: 1;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    color: #06101a;
    border-color: rgba(105, 190, 255, .36);
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    outline: none;
}

.nav {
    display: grid;
    align-content: start;
    flex: 1 1 auto;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 7px;
    scrollbar-gutter: stable;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 750;
    background: rgba(18, 29, 45, .64);
}

.nav a:hover,
.nav a:focus-visible {
    color: #eaf4ff;
    background: rgba(85, 168, 255, .14);
    border-color: rgba(85, 168, 255, .22);
    outline: none;
}

.nav a.active {
    color: #07101b;
    background: linear-gradient(135deg, #dcecff, #b9dcff);
}

.nav a.active .nav-icon {
    color: #06101a;
    background: rgba(255, 255, 255, .55);
    border-color: rgba(6, 16, 26, .12);
}

.nav-section {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.nav-section-title {
    margin: 8px 10px 2px;
    color: #89a6c7;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 1px solid rgba(118, 155, 200, .28);
    border-radius: 12px;
    background: rgba(8, 18, 31, .34);
    color: currentColor;
    line-height: 1;
}

.ui-icon {
    display: block;
    width: 19px;
    height: 19px;
}

.sidebar-toggle .ui-icon {
    width: 21px;
    height: 21px;
}

.sidebar-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-icon-expand {
    display: none;
}

.sidebar-collapsed .sidebar-toggle-icon-collapse {
    display: none;
}

.sidebar-collapsed .sidebar-toggle-icon-expand {
    display: inline-flex;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer {
    flex: 0 0 auto;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(151, 177, 211, .14);
    background: rgba(6, 15, 25, .96);
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 7px 10px;
    border: 0;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(18, 29, 45, .64);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.sidebar-logout-button:hover,
.sidebar-logout-button:focus-visible {
    color: #fde68a;
    background: rgba(81, 57, 20, .9);
    outline: none;
}

.sidebar-collapsed .sidebar {
    padding-inline: 10px;
}

.sidebar-collapsed .brand {
    justify-content: center;
    padding-bottom: 14px;
}

.sidebar-collapsed .brand > div,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .global-nav-badge {
    display: none;
}

.sidebar-collapsed .nav {
    gap: 13px;
    padding-right: 0;
    scrollbar-width: none;
}

.sidebar-collapsed .nav::-webkit-scrollbar {
    display: none;
}

.sidebar-collapsed .nav-section {
    gap: 13px;
    margin-top: 8px;
}

.sidebar-collapsed .nav a {
    justify-content: center;
    padding-inline: 7px;
}

.sidebar-collapsed .sidebar-footer {
    margin-top: 10px;
    padding-top: 10px;
}

.sidebar-collapsed .sidebar-logout-button {
    justify-content: center;
    padding-inline: 7px;
}

.sidebar-tooltip {
    position: fixed;
    z-index: 300;
    min-width: max-content;
    padding: 8px 10px;
    border: 1px solid rgba(118, 155, 200, .26);
    border-radius: 10px;
    color: #eaf4ff;
    background: rgba(8, 18, 31, .98);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
    font-size: 12px;
    font-weight: 850;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity .15s ease, transform .15s ease;
}

.sidebar-tooltip.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.main {
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px 24px;
    min-width: 0;
    scrollbar-gutter: stable;
}

.topbar,
.card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(18, 31, 48, .94), rgba(14, 25, 39, .94));
    box-shadow: var(--shadow);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    margin-bottom: 14px;
    backdrop-filter: blur(14px);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px 18px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(18, 31, 48, .94), rgba(14, 25, 39, .94));
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.topbar-title {
    display: grid;
    gap: 4px;
    min-width: 180px;
}

.topbar-title strong {
    font-size: 18px;
    letter-spacing: 0;
}

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

.module-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.topbar-party-switcher {
    flex: 1;
    max-width: 720px;
    min-width: min(420px, 100%);
}

.topbar-party-switcher label {
    gap: 7px;
}

.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(124, 215, 176, .18);
    border-radius: 16px;
    color: #bfe9d5;
    background: rgba(124, 215, 176, .09);
    font-weight: 800;
}

.context-badge.warning {
    color: #ffd77a;
    border-color: rgba(255, 199, 92, .24);
    background: rgba(255, 199, 92, .1);
}

.context-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
}

.global-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #bfe9d5;
    background: rgba(124, 215, 176, .13);
    border: 1px solid rgba(124, 215, 176, .18);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 24px;
}

.muted {
    color: var(--muted);
    margin: 3px 0 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.session-pill,
.date-time-pill,
.role-pill,
.count,
.count-pill,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #b9d8ff;
    background: rgba(85, 168, 255, .14);
    border: 1px solid rgba(85, 168, 255, .24);
    font-weight: 800;
}

.date-time-pill {
    color: #d6e8ff;
    background: rgba(216, 234, 255, .08);
    border-color: rgba(151, 177, 211, .22);
    white-space: nowrap;
}

.logout-btn {
    gap: 7px;
}

.logout-btn.icon-only {
    width: 38px;
    min-width: 38px;
    padding-inline: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.role-pill,
.badge {
    color: #7cd7b0;
    background: rgba(124, 215, 176, .14);
    border-color: rgba(124, 215, 176, .18);
    text-transform: capitalize;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(91, 171, 255, 0.46);
    border-radius: 999px;
    color: #d8ecff;
    background: rgba(35, 75, 115, 0.48);
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-pill.success {
    color: #d8ecff;
    border-color: rgba(91, 171, 255, 0.54);
    background: rgba(35, 75, 115, 0.58);
}

.status-pill.muted {
    color: #b9c9df;
    border-color: rgba(151, 177, 211, 0.28);
    background: rgba(26, 42, 63, 0.55);
}

.status-pill.warning {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(80, 56, 18, 0.48);
}

.status-pill.danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(84, 32, 43, 0.48);
}

.alert-card {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 14px;
    background: rgba(8, 22, 36, 0.62);
    color: #dbeafe;
    font-weight: 850;
    line-height: 1.45;
}

.alert-card.success {
    border-color: rgba(69, 211, 166, 0.42);
    background: rgba(18, 104, 82, 0.2);
}

.alert-card.error {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(84, 32, 43, 0.32);
}

.list-count-popover,
.party-count-popover {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.list-count-pill,
.party-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(151, 177, 211, 0.2);
    border-radius: 999px;
    background: rgba(74, 148, 255, 0.12);
    color: #d8e9ff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.list-count-pill:hover,
.party-count-pill:hover {
    border-color: rgba(91, 171, 255, 0.42);
    background: rgba(74, 148, 255, 0.2);
    color: #eef7ff;
}

.list-count-pill.is-empty,
.party-count-pill.is-empty {
    color: #aabbd1;
    border-color: rgba(151, 177, 211, 0.16);
    background: rgba(255, 255, 255, 0.05);
    cursor: default;
}

.info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background: rgba(207, 226, 255, 0.14);
    color: #b9d9ff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.party-list-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 8, 15, 0.72);
    backdrop-filter: blur(8px);
}

.party-list-modal.open {
    display: flex;
}

.party-list-modal-panel {
    width: min(520px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 56px));
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(110, 154, 205, 0.32);
    border-radius: 22px;
    background: #101d2e;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.party-list-modal-panel .section-head {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(110, 154, 205, 0.18);
}

.party-list-modal-panel .section-head h2 {
    font-size: 22px;
    line-height: 1.2;
}

.party-list-modal-panel .icon-btn {
    flex: 0 0 auto;
}

.party-list-modal-panel > .count,
.party-list-modal-panel > .count-pill {
    width: fit-content;
}

.party-list-modal-list {
    display: grid;
    gap: 8px;
    max-height: min(420px, 52vh);
    margin: 0;
    padding: 2px 2px 4px;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 171, 255, 0.45) rgba(15, 27, 42, 0.45);
}

.party-list-modal-list li {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(110, 154, 205, 0.18);
    border-radius: 14px;
    color: #e7f1ff;
    background: rgba(18, 35, 54, 0.72);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.party-list-modal-list li.has-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.party-list-modal-list li.has-action > span {
    min-width: 0;
}

.party-list-modal-list li.has-action .admin-icon-action {
    flex: 0 0 auto;
}

.party-list-modal-list .party-modal-empty {
    color: #aabbd1;
    background: rgba(255, 255, 255, 0.05);
}

.activity-drawer-body {
    min-height: 0;
    margin: 0;
    padding: 18px 16px 22px;
    overflow-y: auto;
    overflow-x: hidden;
}

.activity-drawer-body .drawer-activity-list {
    display: grid;
    gap: 12px;
    padding: 0;
}

.activity-drawer-body .activity-item {
    align-items: flex-start;
    gap: 16px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(110, 154, 205, 0.18);
    border-radius: 16px;
    background: rgba(15, 29, 46, 0.72);
}

.activity-drawer-body .activity-item p {
    margin: 12px 0 0;
}

.activity-drawer-body .activity-item time {
    color: #b8cbe5;
    white-space: nowrap;
}

.activity-drawer-footer {
    position: sticky;
    bottom: -26px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: auto 0 0;
    padding: 14px 16px;
    border-top: 1px solid rgba(110, 154, 205, 0.28);
    background: rgba(9, 21, 35, 0.96);
    backdrop-filter: blur(14px);
}

.activity-drawer-footer .btn {
    min-width: 132px;
}

.account-menu {
    position: relative;
}

.account-menu summary {
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    max-width: 220px;
    padding: 5px 11px 5px 6px;
    border: 1px solid rgba(118, 155, 200, .32);
    border-radius: 999px;
    color: #e7f0ff;
    background: rgba(17, 32, 51, .76);
    cursor: pointer;
    font-weight: 850;
    white-space: nowrap;
}

.account-menu-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .72;
}

.account-menu-static::after {
    display: none;
}

.account-menu[open] .account-menu-trigger,
.account-menu-trigger:hover,
.account-menu-trigger:focus-visible {
    color: #06101a;
    border-color: rgba(105, 190, 255, .36);
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    box-shadow: 0 12px 26px rgba(74, 142, 247, .18);
    outline: none;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #06101a;
    background: #dcecff;
    font-size: 12px;
    font-weight: 950;
}

.account-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 120;
    display: grid;
    gap: 6px;
    min-width: 190px;
    padding: 8px;
    border: 1px solid rgba(118, 155, 200, .28);
    border-radius: 16px;
    background: rgba(10, 22, 36, .98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

.account-menu-panel a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 11px;
    color: #cfe0f5;
    font-weight: 850;
}

.account-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.account-menu-icon .ui-icon,
.btn-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.account-menu-panel a:hover,
.account-menu-panel a:focus-visible,
.account-menu-panel a.active {
    color: #06101a;
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    outline: none;
}

.status-pending,
.status-in_progress {
    color: #ffd77a;
    background: rgba(255, 199, 92, .15);
    border-color: rgba(255, 199, 92, .2);
}

.status-completed,
.submission-approved {
    color: #7cd7b0;
    background: rgba(124, 215, 176, .14);
    border-color: rgba(124, 215, 176, .18);
}

.submission-submitted {
    color: #9dccff;
    background: rgba(85, 168, 255, .14);
    border-color: rgba(85, 168, 255, .24);
}

.submission-returned {
    color: #ffbfca;
    background: rgba(255, 124, 138, .16);
    border-color: rgba(255, 124, 138, .24);
}

.status-under_review {
    color: #d8c3ff;
    background: rgba(166, 122, 255, .14);
    border-color: rgba(166, 122, 255, .22);
}

.status-active {
    color: #7cd7b0;
    background: rgba(124, 215, 176, .14);
    border-color: rgba(124, 215, 176, .18);
}

.status-stopped {
    color: #ffc4ca;
    background: rgba(255, 124, 138, .16);
    border-color: rgba(255, 124, 138, .24);
}

.status-completed {
    color: #9dccff;
    background: rgba(85, 168, 255, .14);
    border-color: rgba(85, 168, 255, .24);
}

.btn {
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 13px 18px;
    color: var(--text);
    background: var(--panel-2);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.btn.primary {
    border-color: transparent;
    color: #06101a;
    background: linear-gradient(135deg, #4386ff, #66c4ff);
}

.btn.ghost {
    background: rgba(18, 31, 48, .8);
}

.btn.danger {
    color: #ffc4ca;
    border-color: rgba(255, 124, 138, .32);
    background: rgba(118, 38, 48, .32);
}

.btn.full {
    width: 100%;
}

.btn.tiny {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 13px;
    font-size: 13px;
}

.btn.compact {
    min-height: 44px;
    padding: 11px 16px;
    align-self: end;
}

.btn:disabled {
    cursor: wait;
    opacity: .72;
}

.grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 14px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    letter-spacing: -.05em;
}

.stat-card small {
    display: block;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.35;
}

.stat-link {
    transition: border-color .18s ease, transform .18s ease;
}

.stat-link:hover {
    border-color: rgba(85, 168, 255, .56);
    transform: translateY(-2px);
}

.card {
    padding: 22px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.card > .section-head:first-child,
.admin-list-card > .section-head:first-child {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(151, 177, 211, .12);
}

.section-head > div {
    min-width: 0;
}

.section-head h2 {
    overflow-wrap: anywhere;
}

.profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 20px;
}

.tab-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(20, 34, 53, .62);
    font-weight: 800;
}

.tab-link.active {
    color: #06101a;
    background: #dcecff;
    border-color: transparent;
}

.filters-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.drawer-form-stack {
    display: grid;
    gap: 14px;
}

.admin-drawer .form-grid,
.admin-drawer .drawer-form-stack {
    padding: 20px 24px 0;
}

.admin-drawer .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.toolbar,
.global-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(118, 155, 200, .2);
    border-radius: 18px;
    background: rgba(8, 18, 31, .42);
}

.toolbar label,
.global-toolbar label {
    flex: 1 1 190px;
    min-width: min(220px, 100%);
}

.toolbar .btn,
.global-toolbar .btn {
    min-height: 44px;
}

.toolbar input,
.toolbar select,
.global-toolbar input,
.global-toolbar select {
    min-height: 44px;
}

.filters-grid .span-2 {
    grid-column: span 2;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.filter-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.compact-filters {
    grid-template-columns: 1fr 160px auto;
    margin-bottom: 18px;
}

.report-filter-control {
    display: grid;
    gap: 10px;
    padding: 18px 24px;
}

.report-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    margin-bottom: 2px;
}

.report-filter-control > .section-head:first-child {
    align-items: start;
    gap: 18px;
    margin-bottom: 2px;
}

.report-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.report-filter-control > .section-head:first-child .section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.active-filter-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 30px;
}

.active-filter-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid rgba(105, 190, 255, 0.22);
    border-radius: 999px;
    color: #d9eaff;
    background: rgba(39, 72, 108, 0.36);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}

.report-filter-summary-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.report-filter-summary-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid rgba(151, 177, 211, 0.16);
    border-radius: 999px;
    color: #cfe2ff;
    background: rgba(12, 24, 39, 0.58);
    font-size: 13px;
    font-weight: 750;
}

.report-filter-summary-strip strong {
    color: #ffffff;
    font-size: 14px;
}

.active-filter-strip.is-empty span {
    color: var(--muted);
    border-color: rgba(151, 177, 211, 0.14);
    background: rgba(15, 27, 42, 0.42);
}

.report-filter-panel {
    margin-top: 2px;
    padding: 16px;
    border: 1px solid rgba(112, 155, 205, 0.22);
    border-radius: 18px;
    background: rgba(10, 22, 36, 0.62);
}

.report-filter-panel[hidden] {
    display: none;
}

.timesheet-report-card {
    padding: 18px 24px 20px;
}

.timesheet-report-card .section-head {
    margin-bottom: 12px;
}

.timesheet-bulk-toolbar {
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 16px;
}

.timesheet-bulk-toolbar .btn,
.timesheet-bulk-toolbar select,
.timesheet-bulk-toolbar .selection-pill {
    min-height: 40px;
}

.timesheet-bulk-toolbar .selection-pill {
    padding: 8px 13px;
}

.timesheet-bulk-toolbar .column-menu summary {
    min-height: 40px;
}

.report-dense-page .main {
    gap: 10px;
}

.report-dense-page .topbar {
    min-height: 0;
    padding: 12px 18px;
    margin-bottom: 10px;
}

.report-dense-page .topbar h1 {
    font-size: 24px;
}

.report-dense-page .topbar .muted {
    margin-top: 3px;
}

.report-dense-page .report-filter-control {
    padding-top: 16px;
    padding-bottom: 14px;
}

.report-dense-page .report-filter-head {
    margin-bottom: 0;
}

.report-dense-page .timesheet-report-card {
    margin-top: 10px;
    padding-top: 16px;
}

.report-dense-page .timesheet-report-card .section-head {
    margin-bottom: 10px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row span {
    color: #cfe2ff;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

.entry-form .card {
    max-width: 1180px;
}

.form-section {
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 22px;
    padding: 20px;
    margin-top: 16px;
    background: rgba(15, 27, 42, .58);
}

.form-section h3 {
    margin: 0 0 16px;
    font-size: 18px;
    letter-spacing: -.03em;
}

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

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.stacked {
    grid-template-columns: 1fr 1fr;
}

.settings-stack {
    display: grid;
    gap: 18px;
}

.sticky-actions {
    position: sticky;
    bottom: 18px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    padding: 14px;
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 20px;
    background: rgba(8, 16, 27, .86);
    backdrop-filter: blur(14px);
}

.hint {
    color: #b9d8ff;
    margin: 12px 0 0;
}

label small {
    float: right;
    color: var(--accent-2);
    letter-spacing: 0;
    text-transform: none;
}

.choice {
    position: relative;
}

label.choice input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
}

.choice-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px;
    background: #0d1827;
    box-shadow: var(--shadow);
}

.choice-list.open {
    display: grid;
    gap: 5px;
}

.choice-list button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
    background: transparent;
    text-align: left;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.choice-list button:hover {
    background: rgba(85, 168, 255, .16);
}

.choice-empty {
    padding: 10px 12px;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(151, 177, 211, .12);
    border-radius: 18px;
    background: rgba(8, 18, 31, .34);
}

.table-wrap table {
    margin: 0;
}

.table-wrap thead th {
    background: rgba(20, 35, 55, .82);
}

.table-wrap tbody tr {
    transition: background .16s ease;
}

.table-wrap tbody tr:hover {
    background: rgba(85, 168, 255, .07);
}

.selection-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
}

.selection-summary strong {
    color: var(--text);
}

.bulk-bar,
.report-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.bulk-bar select,
.report-toolbar select {
    max-width: 320px;
}

.report-toolbar {
    justify-content: space-between;
    padding: 14px;
    border: 1px solid rgba(151, 177, 211, .12);
    border-radius: 22px;
    background: rgba(15, 27, 42, .42);
}

.report-toolbar > select:first-child {
    flex: 1 1 260px;
}

.selection-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(85, 168, 255, .32);
    border-radius: 999px;
    color: #dcecff;
    background: rgba(85, 168, 255, .14);
    font-weight: 850;
}

.rows-label {
    color: var(--muted);
    font-weight: 850;
}

.rows-select {
    width: calc(100% + 52px);
    min-width: 136px;
}

.daily-share-card {
    overflow: hidden;
}

.share-locked {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px dashed rgba(85, 168, 255, .28);
    border-radius: 22px;
    background: rgba(220, 236, 255, .04);
}

.share-locked strong {
    font-size: 18px;
}

.share-locked p {
    max-width: 980px;
    margin: 0;
    color: var(--muted);
}

.share-preview-shell {
    overflow-x: auto;
    padding: 18px;
    border: 1px dashed rgba(85, 168, 255, .26);
    border-radius: 22px;
    background: rgba(220, 236, 255, .05);
}

.share-sheet-preview {
    min-width: 1060px;
    padding: 22px;
    border: 1px solid #d8e4f2;
    border-radius: 24px;
    color: #081827;
    background: #f7fbff;
}

.share-sheet-head {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.share-sheet-head h3 {
    margin: 0;
    color: #081827;
    font-family: Georgia, serif;
    font-size: 28px;
}

.share-sheet-head p {
    margin: 0;
    color: #38526d;
}

.share-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.share-table th,
.share-table td {
    color: #0f172a;
    white-space: normal;
    line-height: 1.35;
    padding: 10px 12px;
}

.share-table th {
    color: #fff;
    background: #111827;
    letter-spacing: 0;
    text-transform: none;
}

.share-table td {
    border-bottom: 1px solid #e5edf6;
}

.share-table th:nth-child(1),
.share-table td:nth-child(1) {
    width: 92px;
}

.share-table th:nth-child(2),
.share-table td:nth-child(2) {
    width: 190px;
}

.share-table th:nth-child(3),
.share-table td:nth-child(3) {
    width: 180px;
}

.share-table th:nth-child(4),
.share-table td:nth-child(4) {
    width: 220px;
}

.share-table th:nth-child(5),
.share-table td:nth-child(5) {
    width: 120px;
}

.share-table th:nth-child(6),
.share-table td:nth-child(6) {
    width: 80px;
}

.share-table th:nth-child(7),
.share-table td:nth-child(7) {
    width: 110px;
}

.inline-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: min(620px, 80vw);
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 18px;
    background: rgba(8, 16, 27, .78);
}

.row-editor summary {
    width: max-content;
    list-style: none;
}

.row-editor summary::-webkit-details-marker {
    display: none;
}

.admin-icon-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(132, 178, 255, 0.2);
    border-radius: 12px;
    background: rgba(25, 40, 60, 0.82);
    color: #dbeafe;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.admin-icon-action:hover {
    border-color: rgba(85, 168, 255, 0.55);
    background: rgba(34, 57, 85, 0.95);
    transform: translateY(-1px);
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.icon-form {
    display: inline-flex;
    margin: 0;
}

.admin-icon-action.warning {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.35);
}

.admin-icon-action.warning:hover {
    background: rgba(81, 57, 20, 0.9);
    border-color: rgba(245, 158, 11, 0.6);
}

.admin-icon-action.success {
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.35);
}

.admin-icon-action.success:hover {
    background: rgba(21, 83, 66, 0.9);
    border-color: rgba(52, 211, 153, 0.6);
}

.admin-icon-action.is-copied {
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(21, 83, 66, 0.78);
}

.admin-icon-action.whatsapp {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.36);
}

.admin-icon-action.whatsapp:hover {
    background: rgba(20, 83, 45, 0.9);
    border-color: rgba(34, 197, 94, 0.68);
}

.admin-icon-action.email {
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.36);
}

.admin-icon-action.email:hover {
    background: rgba(30, 64, 112, 0.88);
    border-color: rgba(96, 165, 250, 0.68);
}

.admin-icon-action.danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
}

.admin-icon-action.danger:hover {
    background: rgba(84, 32, 43, 0.9);
    border-color: rgba(248, 113, 113, 0.6);
}

.admin-icon-action:disabled,
.admin-icon-action.is-processing {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.admin-icon-action:disabled:hover {
    background: rgba(18, 29, 45, 0.68);
    border-color: rgba(151, 177, 211, 0.18);
    transform: none;
}

.admin-icon-action span {
    display: block;
    transform: translateY(-1px);
}

.admin-icon-action svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.master-chip-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 8px;
}

.master-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: 100%;
    padding: 6px 7px 6px 13px;
    border: 1px solid rgba(91, 171, 255, 0.28);
    border-radius: 999px;
    color: #e7f1ff;
    background: rgba(22, 42, 66, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.master-chip.is-muted {
    opacity: 0.62;
}

.master-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.master-chip-form {
    display: inline-flex;
    margin: 0;
}

.master-chip-action {
    width: 26px;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(132, 178, 255, 0.22);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(12, 26, 43, 0.72);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.master-chip-action:hover {
    border-color: rgba(85, 168, 255, 0.55);
    background: rgba(34, 57, 85, 0.95);
    transform: translateY(-1px);
}

.master-chip-action.danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
}

.master-chip-action.danger:hover {
    background: rgba(84, 32, 43, 0.9);
    border-color: rgba(248, 113, 113, 0.6);
}

.master-chip-action:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.master-chip-action:disabled:hover {
    background: rgba(12, 26, 43, 0.72);
    border-color: rgba(248, 113, 113, 0.28);
    transform: none;
}

.workspace-detail-shell {
    gap: 14px;
}

.workspace-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.workspace-profile-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 14px;
    background: rgba(7, 22, 36, 0.48);
}

.workspace-profile-item.wide {
    grid-column: 1 / -1;
}

.workspace-profile-item span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.workspace-profile-item strong {
    min-width: 0;
    overflow: hidden;
    color: #f5f8ff;
    font-size: 14px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-profile-item.wide strong {
    white-space: normal;
}

.workspace-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.workspace-tabbar-shell {
    position: sticky;
    top: 88px;
    z-index: 70;
    min-width: 0;
    margin: -2px 0 14px;
    padding: 10px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 18px;
    background: rgba(7, 18, 31, 0.96);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
}

.workspace-tabbar-shell .workspace-tabs {
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    cursor: grab;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-y;
    user-select: none;
}

.workspace-tabbar-shell .workspace-tabs::-webkit-scrollbar {
    display: none;
}

.workspace-tabbar-shell .workspace-tabs.is-dragging {
    cursor: grabbing;
}

.workspace-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid rgba(91, 171, 255, 0.25);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(22, 42, 66, 0.66);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.workspace-tabbar-shell .workspace-tabs a {
    flex: 0 0 auto;
    min-width: 146px;
    scroll-snap-align: start;
}

.workspace-tabs a:hover {
    border-color: rgba(91, 171, 255, 0.52);
    background: rgba(43, 78, 116, 0.78);
}

.workspace-tabs a.is-active {
    color: #06101a;
    border-color: rgba(130, 196, 255, .65);
    background: linear-gradient(135deg, #dcecff, #b9dcff);
    box-shadow: 0 12px 28px rgba(85, 168, 255, .18);
}

.workspace-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.workspace-detail-wide {
    grid-column: 1 / -1;
}

.workspace-tab-panel {
    display: none;
    scroll-margin-top: 108px;
}

.workspace-detail-grid:not(:has(.workspace-tab-panel.is-active)):not(:has(.workspace-tab-panel:target)) > #workspace-services,
.workspace-tab-panel.is-active,
.workspace-detail-grid:not(:has(.workspace-tab-panel.is-active)) > .workspace-tab-panel:target {
    display: block;
}

.workspace-detail-grid:has(.workspace-tab-panel.is-active) > .workspace-tab-panel:not(.is-active) {
    display: none;
}

.workspace-detail-grid:not(:has(.workspace-tab-panel.is-active)):has(.workspace-tab-panel:target) > .workspace-tab-panel:not(:target) {
    display: none;
}

.workspace-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 16px;
}

.workspace-metric-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 14px;
    background: rgba(7, 22, 36, 0.52);
}

.workspace-metric-card span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.workspace-metric-card strong {
    color: #f5f8ff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
}

.workspace-metric-card small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.storage-master-panels {
    display: block;
}

.storage-master-panel {
    min-width: 0;
}

.storage-master-panel > .section-head {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(92, 143, 205, 0.18);
}

.storage-master-panel .compact-table th:first-child,
.storage-master-panel .compact-table td:first-child {
    min-width: 220px;
}

.storage-metric-grid {
    margin-top: 4px;
}

.storage-audit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.storage-audit-sections {
    display: grid;
    gap: 16px;
}

.storage-audit-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 16px;
    background: rgba(8, 22, 36, 0.45);
}

.storage-audit-card .section-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(92, 143, 205, 0.16);
}

.storage-audit-card h3 {
    margin: 0;
    color: #f5f8ff;
    font-size: 16px;
}

.storage-audit-progress-grid {
    margin-top: 4px;
}

.storage-audit-session-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.storage-audit-review-note {
    display: grid;
    gap: 6px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px dashed rgba(91, 192, 222, 0.35);
    border-radius: 14px;
    background: rgba(23, 72, 92, 0.18);
    color: #dcecff;
}

.storage-audit-review-note strong {
    color: #f5f8ff;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.storage-audit-review-note p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.storage-audit-checklist {
    display: grid;
    gap: 12px;
}

.storage-audit-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 16px;
    background: rgba(8, 22, 36, 0.48);
}

.storage-audit-item-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.storage-audit-item-main > div {
    min-width: 0;
}

.storage-audit-item-note {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px dashed rgba(92, 143, 205, 0.26);
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.storage-audit-item-note p {
    margin: 0;
    color: #dcecff;
    line-height: 1.45;
}

.storage-audit-item-form {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.storage-audit-item-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #dcecff;
    font-size: 12px;
    font-weight: 850;
}

.storage-audit-progress-cell {
    display: grid;
    gap: 7px;
    min-width: 150px;
    color: #dcecff;
    font-size: 12px;
    font-weight: 800;
}

.storage-audit-progress-meter {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(6, 15, 26, 0.85);
    box-shadow: inset 0 0 0 1px rgba(124, 176, 238, 0.16);
}

.storage-audit-progress-meter span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
}

.storage-audit-register-table th:first-child,
.storage-audit-register-table td:first-child {
    min-width: 220px;
}

.document-storage-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(93, 148, 214, 0.25);
    border-radius: 16px;
    background: rgba(8, 22, 36, 0.42);
}

.document-storage-picker.is-disabled {
    opacity: 0.62;
}

.document-storage-picker label {
    min-width: 0;
}

.document-storage-picker select:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.storage-picker-hint {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.storage-qr-body,
.qr-sticker-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(74, 148, 255, 0.14), transparent 28rem),
        #06111f;
    color: #f5f8ff;
}

.storage-qr-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 32px;
}

.storage-qr-hero,
.storage-qr-card {
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 20px;
    background: rgba(12, 27, 44, 0.86);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.storage-qr-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
}

.storage-qr-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(24px, 5vw, 38px);
    line-height: 1.05;
}

.storage-qr-hero p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}

.storage-qr-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.storage-qr-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.storage-qr-flash {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 14px;
    background: rgba(8, 22, 36, 0.72);
    color: #dbeafe;
    font-weight: 850;
}

.storage-qr-flash.success {
    border-color: rgba(69, 211, 166, 0.45);
    background: rgba(18, 104, 82, 0.22);
}

.storage-qr-flash.danger {
    border-color: rgba(255, 126, 126, 0.45);
    background: rgba(119, 38, 48, 0.25);
}

.storage-qr-metrics article {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 16px;
    background: rgba(8, 22, 36, 0.68);
}

.storage-qr-metrics span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.storage-qr-metrics strong {
    color: #f5f8ff;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.storage-qr-card {
    margin-top: 14px;
    padding: 16px;
}

.storage-qr-list,
.storage-qr-timeline {
    display: grid;
    gap: 10px;
}

.storage-qr-list-row,
.storage-qr-timeline article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(92, 143, 205, 0.18);
    border-radius: 14px;
    background: rgba(7, 18, 31, 0.58);
}

.storage-qr-list-row div,
.storage-qr-timeline article div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.storage-qr-list-row span:not(.count-pill),
.storage-qr-timeline article span,
.storage-qr-timeline time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.storage-qr-timeline article {
    align-items: flex-start;
    flex-direction: column;
}

.storage-qr-timeline p {
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.storage-qr-timeline p span {
    display: inline-flex;
    margin: 0 6px;
    color: #8fb1d8;
    text-transform: uppercase;
}

.storage-qr-table td {
    vertical-align: top;
}

.storage-qr-doc-actions {
    justify-content: flex-start;
}

.qr-sticker-shell {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 26px 0;
}

.qr-sticker-batch-shell {
    width: min(980px, calc(100% - 28px));
}

.qr-sticker-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.qr-sticker-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    color: #f5f8ff;
}

.qr-sticker-heading h1 {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.05;
}

.qr-sticker-sheet {
    display: grid;
    gap: 16px;
}

.qr-sticker-card {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px dashed rgba(92, 143, 205, 0.48);
    border-radius: 18px;
    background: #f8fbff;
    color: #0c1726;
}

.qr-sticker-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.qr-sticker-copy h1 {
    margin: 0;
    color: #0c1726;
    font-size: 28px;
    line-height: 1.08;
}

.qr-sticker-copy strong {
    width: max-content;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #b9c9dc;
    border-radius: 999px;
    background: #eef5ff;
    color: #163456;
    font-size: 13px;
    font-weight: 900;
}

.qr-sticker-copy span,
.qr-sticker-url {
    color: #465a73;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.qr-sticker-code {
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px solid #d6e1ef;
    border-radius: 16px;
    background: #fff;
}

.qr-sticker-code svg {
    display: block;
    width: 168px;
    height: 168px;
}

.qr-sticker-url {
    grid-column: 1 / -1;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .workspace-profile-grid,
    .workspace-detail-grid,
    .workspace-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-tabbar-shell {
        top: 0;
    }
}

@media (max-width: 680px) {
    .workspace-profile-grid,
    .workspace-detail-grid,
    .workspace-metric-grid,
    .storage-audit-grid,
    .document-storage-picker {
        grid-template-columns: 1fr;
    }

    .storage-audit-item-main,
    .storage-audit-item-form {
        grid-template-columns: 1fr;
    }

    .storage-audit-item-main {
        display: grid;
    }

    .storage-qr-hero {
        flex-direction: column;
    }

    .storage-qr-actions {
        justify-content: flex-start;
    }

    .storage-qr-metrics,
    .qr-sticker-card {
        grid-template-columns: 1fr;
    }

    .qr-sticker-toolbar {
        justify-content: stretch;
    }

    .qr-sticker-toolbar .btn {
        flex: 1;
    }
}

@media print {
    .qr-sticker-body {
        background: #fff;
    }

    .qr-sticker-shell {
        width: 100%;
        padding: 0;
    }

    .qr-sticker-toolbar {
        display: none;
    }

    .qr-sticker-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .qr-sticker-sheet {
        gap: 8mm;
    }
}

.block {
    display: block;
}

.column-menu {
    position: relative;
}

.column-menu summary {
    list-style: none;
}

.column-menu summary::-webkit-details-marker {
    display: none;
}

.column-panel {
    position: absolute;
    z-index: 40;
    right: 0;
    top: calc(100% + 10px);
    display: grid;
    gap: 8px;
    width: 280px;
    max-height: 360px;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(9, 18, 30, .98);
    box-shadow: var(--shadow);
}

.column-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
}

.column-option input {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--accent);
}

.column-option span {
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

.mini-check {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
    accent-color: var(--accent);
}

.compact-table th,
.compact-table td {
    padding: 13px 12px;
}

.compact-table .action-col,
.compact-table .action-cell {
    min-width: 330px;
    width: 330px;
}

.compact-table .action-cell .admin-row-actions {
    flex-wrap: nowrap;
}

.report-table {
    table-layout: fixed;
}

.report-table .select-col {
    width: 3%;
}

.report-table .date-col {
    width: 8%;
}

.report-table .person-col {
    width: 8%;
}

.report-table .wide-col {
    width: 13%;
}

.report-table .type-col {
    width: 6%;
}

.report-table .status-col {
    width: 8%;
}

.report-table .time-col {
    width: 5%;
}

.report-table .action-col {
    width: 7%;
}

.cell-clip {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-line {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 6px;
}

.date-stack {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #9dccff;
    background: rgba(85, 168, 255, .16);
    border: 1px solid rgba(85, 168, 255, .32);
    font-size: 12px;
    font-weight: 900;
}

.table-action {
    min-height: 38px;
    padding: 9px 14px;
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: var(--muted);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.action-row form {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.detail-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.detail-box,
.detail-note {
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 18px;
    padding: 16px;
    background: rgba(15, 27, 42, .58);
}

.detail-box span,
.detail-note span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 9px;
}

.detail-box strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-note {
    margin-top: 14px;
}

.detail-note p {
    margin: 0;
    color: #cfe2ff;
    line-height: 1.6;
}

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

.stack-form {
    display: grid;
    gap: 16px;
}

.session-inline {
    display: grid;
    grid-template-columns: 1.1fr .7fr 1.4fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 18px;
    background: rgba(15, 27, 42, .58);
}

.dashboard-split {
    margin-bottom: 18px;
}

.activity-list {
    display: grid;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 16px;
    background: rgba(15, 27, 42, .58);
}

.activity-item strong,
.activity-item span,
.activity-item time {
    display: block;
}

.activity-item span,
.activity-item time {
    color: var(--muted);
    margin-top: 5px;
}

.activity-item small {
    display: block;
    color: var(--muted);
    margin-top: 7px;
    line-height: 1.45;
}

.timer-card {
    display: grid;
    gap: 9px;
    padding: 22px;
    margin: 18px 0;
    border: 1px solid rgba(85, 168, 255, .34);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(35, 62, 95, .76), rgba(20, 35, 54, .86));
}

.timer-card span,
.timer-card small {
    color: #cfe2ff;
}

.timer-card strong {
    font-size: clamp(34px, 4vw, 52px);
    letter-spacing: -.05em;
}

.timer-card.compact {
    margin: 0;
    min-height: 100%;
}

.attendance-console {
    margin-bottom: 18px;
}

.attendance-console-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 16px;
    align-items: stretch;
}

.attendance-hero,
.mini-panel-grid,
.warning-card {
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 20px;
    background: rgba(15, 27, 42, .58);
}

.attendance-hero {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.attendance-chip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.mini-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
}

.mini-panel {
    display: grid;
    gap: 8px;
    padding: 18px;
    background: rgba(18, 32, 50, .7);
}

.mini-panel span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mini-panel strong {
    color: var(--text);
    font-size: 20px;
    letter-spacing: -.03em;
}

.warning-card {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-color: rgba(255, 199, 92, .28);
    background: rgba(255, 199, 92, .08);
}

.warning-card strong {
    color: #ffd77a;
}

.warning-card span {
    color: #cfe2ff;
}

.attendance-actions {
    margin-top: 18px;
}

.approval-item {
    align-items: flex-start;
}

.decision-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto auto;
    gap: 8px;
    min-width: min(520px, 100%);
}

.attendance-working,
.attendance-on-break {
    color: #9dccff;
    background: rgba(85, 168, 255, .14);
}

.attendance-punch-out-pending,
.attendance-absent {
    color: #ffc4ca;
    background: rgba(255, 124, 138, .16);
}

.attendance-present,
.attendance-leave {
    color: #7cd7b0;
    background: rgba(124, 215, 176, .14);
}

.attendance-weekly-off {
    color: #d8c3ff;
    background: rgba(166, 122, 255, .14);
}

.attendance-pending {
    color: #ffd77a;
    background: rgba(255, 199, 92, .15);
}

.handover-form {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 18px;
    background: rgba(15, 27, 42, .58);
}

.danger-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(151, 177, 211, .14);
}

.inline-edit {
    position: relative;
}

.inline-edit summary {
    display: inline-flex;
    list-style: none;
}

.inline-edit summary::-webkit-details-marker {
    display: none;
}

.inline-panel {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 8px);
    width: min(620px, 82vw);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #0d1827;
    box-shadow: var(--shadow);
}

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 15px 14px;
    border-bottom: 1px solid rgba(151, 177, 211, .12);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    color: var(--muted);
    background: rgba(22, 36, 55, .78);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    color: var(--muted);
}

.sort-link span {
    color: #7fa9dc;
    font-size: 10px;
    letter-spacing: 0;
}

.sort-link.active {
    color: var(--text);
}

.empty {
    color: var(--muted);
    text-align: center;
}

.alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert.success {
    color: #7cf1b8;
    background: rgba(18, 92, 72, .34);
    border-color: rgba(124, 241, 184, .28);
}

.alert.error {
    color: #ffc4ca;
    background: rgba(118, 38, 48, .32);
    border-color: rgba(255, 124, 138, .32);
}

.notice-stack {
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
}

.notice-banner,
.notice-admin-item,
.notice-page-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid rgba(85, 168, 255, .22);
    border-radius: 18px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(14, 64, 88, .6), rgba(21, 35, 54, .86));
}

.notice-banner {
    width: 100%;
    min-height: 92px;
    align-items: center;
    border-color: rgba(255, 124, 138, .34);
    background:
        radial-gradient(circle at 0 50%, rgba(255, 124, 138, .14), transparent 34%),
        linear-gradient(135deg, rgba(94, 42, 54, .78), rgba(31, 27, 43, .96));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #ffd7dc;
    background: rgba(255, 124, 138, .12);
    border: 1px solid rgba(255, 124, 138, .34);
    font-size: 18px;
    font-weight: 950;
    font-family: Georgia, serif;
}

.notice-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.notice-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notice-title-row strong {
    font-size: 18px;
    letter-spacing: -.03em;
    color: #fff;
}

.notice-copy p,
.notice-admin-item p,
.notice-page-card p {
    margin: 8px 0 0;
    color: #cfe2ff;
    line-height: 1.5;
}

.notice-copy small,
.notice-admin-item small,
.notice-page-card small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    line-height: 1.45;
}

.notice-priority {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #9dccff;
    background: rgba(85, 168, 255, .14);
    border: 1px solid rgba(85, 168, 255, .2);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.notice-priority.must,
.priority-urgent .notice-priority {
    color: #ffc4ca;
    background: rgba(255, 124, 138, .16);
    border-color: rgba(255, 124, 138, .28);
}

.priority-important .notice-priority {
    color: #ffd77a;
    background: rgba(255, 199, 92, .15);
    border-color: rgba(255, 199, 92, .24);
}

.notice-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(151, 177, 211, .18);
    border-radius: 13px;
    color: #cfe2ff;
    background: rgba(18, 31, 48, .78);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
}

.notice-close:hover {
    color: #fff;
    border-color: rgba(255, 124, 138, .36);
    background: rgba(255, 124, 138, .14);
}

.notice-success {
    border-color: rgba(124, 215, 176, .28);
    background: linear-gradient(135deg, rgba(18, 92, 72, .54), rgba(21, 35, 54, .86));
}

.notice-success .notice-icon {
    color: #7cd7b0;
    background: rgba(124, 215, 176, .14);
    border-color: rgba(124, 215, 176, .22);
}

.notice-warning {
    border-color: rgba(255, 199, 92, .28);
    background: linear-gradient(135deg, rgba(103, 78, 22, .48), rgba(21, 35, 54, .86));
}

.notice-warning .notice-icon {
    color: #ffd77a;
    background: rgba(255, 199, 92, .14);
    border-color: rgba(255, 199, 92, .22);
}

.notice-danger {
    border-color: rgba(255, 124, 138, .32);
    background: linear-gradient(135deg, rgba(96, 36, 49, .56), rgba(21, 35, 54, .86));
}

.notice-danger .notice-icon {
    color: #ffc4ca;
    background: rgba(255, 124, 138, .16);
    border-color: rgba(255, 124, 138, .24);
}

.notice-admin-grid {
    align-items: start;
}

.notice-recipient-panel {
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 22px;
    padding: 16px;
    background: rgba(15, 27, 42, .58);
}

.recipient-list {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    margin-top: 12px;
    padding-right: 4px;
}

.recipient-list.mini {
    max-height: 220px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipient-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 16px;
    background: rgba(20, 34, 53, .62);
}

.recipient-card span {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

.recipient-card strong,
.recipient-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-card small {
    color: var(--muted);
    margin-top: 4px;
    font-weight: 600;
}

.notice-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid rgba(151, 177, 211, .14);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 27, 42, .42);
}

.notice-list,
.notice-page-list {
    display: grid;
    gap: 12px;
}

.notice-admin-item {
    justify-content: space-between;
}

.notice-admin-item > div:first-child {
    min-width: 0;
}

.guest-body {
    display: grid;
    place-items: center;
    padding: 28px;
    min-height: 100vh;
}

.guest-main {
    width: min(1180px, 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: 1.1fr 440px;
    gap: 34px;
    align-items: center;
    width: 100%;
}

.login-hero,
.login-copy {
    display: grid;
    align-content: center;
}

.login-hero h1,
.login-copy h1 {
    max-width: 720px;
    margin: 18px 0;
    font-size: clamp(44px, 6vw, 78px);
    line-height: .96;
}

.login-hero p,
.login-copy p {
    max-width: 680px;
    color: #b9d8ff;
    font-size: 20px;
    line-height: 1.55;
}

.feature-row,
.login-points {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.feature-row span,
.login-points span,
.login-badge {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cfe2ff;
    background: rgba(20, 34, 53, .62);
    font-weight: 750;
}

.login-card {
    display: grid;
    gap: 16px;
    width: min(440px, 100%);
    justify-self: end;
}

.signup-shell {
    grid-template-columns: .92fr minmax(460px, 560px);
    align-items: start;
}

.signup-card {
    width: min(560px, 100%);
}

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

.signup-plan-section,
.signup-success-list {
    display: grid;
    gap: 10px;
}

.signup-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #dceaff;
    font-size: 13px;
    font-weight: 900;
}

.signup-section-head small {
    color: var(--muted);
    font-weight: 800;
}

.signup-plan-card {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(10, 24, 39, .72);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.signup-plan-card:hover,
.signup-plan-card.is-selected {
    border-color: rgba(88, 166, 255, .82);
    background: rgba(28, 57, 91, .72);
    box-shadow: 0 18px 44px rgba(5, 16, 31, .28);
}

.signup-plan-card input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.signup-plan-main,
.signup-plan-meta,
.signup-success-list > div,
.signup-next-box {
    display: grid;
    gap: 4px;
}

.signup-plan-main strong,
.signup-success-list strong,
.signup-next-box strong {
    color: #f6fbff;
    font-weight: 900;
}

.signup-plan-main small,
.signup-plan-meta small,
.signup-success-list span,
.signup-next-box span,
.signup-next-box p {
    color: var(--muted);
    font-weight: 800;
}

.signup-plan-meta {
    justify-items: end;
    text-align: right;
}

.signup-plan-meta b {
    color: #bfe0ff;
}

.signup-plan-features {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.signup-plan-features em {
    padding: 5px 8px;
    border: 1px solid rgba(88, 166, 255, .28);
    border-radius: 999px;
    color: #cfe2ff;
    background: rgba(88, 166, 255, .1);
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
}

.signup-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(88, 166, 255, .22);
    border-radius: 14px;
    color: #cfe2ff;
    background: rgba(88, 166, 255, .08);
}

.signup-terms input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.signup-success-card {
    width: min(500px, 100%);
}

.tenant-login-context {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(88, 166, 255, .28);
    border-radius: 14px;
    background: rgba(88, 166, 255, .1);
}

.tenant-login-context span,
.tenant-login-context small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.tenant-login-context strong {
    color: #f6fbff;
    font-weight: 900;
}

.workspace-choice-list {
    display: grid;
    gap: 10px;
}

.workspace-choice-card {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(88, 166, 255, .24);
    border-radius: 16px;
    background: rgba(10, 24, 39, .72);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.workspace-choice-card:hover,
.workspace-choice-card:has(input:checked) {
    border-color: rgba(88, 166, 255, .72);
    background: rgba(28, 57, 91, .72);
    box-shadow: 0 16px 36px rgba(4, 14, 28, .24);
}

.workspace-choice-card input {
    accent-color: var(--accent);
}

.workspace-choice-card span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.workspace-choice-card strong {
    overflow: hidden;
    color: #f6fbff;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-choice-card small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-choice-card em {
    padding: 6px 9px;
    border: 1px solid rgba(88, 166, 255, .28);
    border-radius: 999px;
    color: #cfe2ff;
    background: rgba(88, 166, 255, .1);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.signup-success-list > div,
.signup-next-box {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(10, 24, 39, .72);
}

.signup-next-box {
    border-color: rgba(63, 211, 159, .28);
    background: rgba(63, 211, 159, .08);
}

.login-card-head {
    display: grid;
    gap: 6px;
}

.login-card-head .eyebrow,
.login-card .eyebrow {
    margin: 0;
}

.login-card h2 {
    margin: 0;
}

.auth-panel,
.otp-box,
.tab-form {
    display: grid;
    gap: 14px;
}

.auth-panel.compact,
.otp-box.compact {
    gap: 12px;
}

.otp-status {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(85, 168, 255, .24);
    border-radius: 14px;
    color: #cfe2ff;
    background: rgba(85, 168, 255, .1);
}

.otp-status span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.login-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.login-secondary-actions form {
    margin: 0;
}

.login-alert {
    border-radius: 16px;
}

.link-button {
    padding: 0;
    border: 0;
    color: #9cc9ff;
    background: transparent;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    outline: none;
}

.auth-qr-panel {
    display: grid;
    place-items: center;
    width: min(240px, 100%);
    margin: 0 auto;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .28);
}

.auth-qr-panel svg {
    display: block;
    width: 100%;
    height: auto;
}

.security-center-shell {
    display: grid;
    gap: 18px;
}

.security-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.security-hero-card h2,
.security-method-card h3 {
    margin: 0;
}

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

.security-method-card {
    display: grid;
    align-content: start;
    gap: 16px;
}

.security-method-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-fallback-toggle {
    justify-self: start;
    padding: 0;
    border: 0;
    color: #9cc9ff;
    background: transparent;
    font-weight: 850;
    letter-spacing: 0;
    cursor: pointer;
}

.auth-fallback-toggle:hover {
    color: #ffffff;
    text-decoration: underline;
}

.auth-fallback-panel {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.auth-fallback-panel[hidden] {
    display: none;
}

[data-email-otp-panel] {
    display: grid;
    gap: 16px;
}

[data-email-otp-panel][hidden] {
    display: none;
}

.workspace-body {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
    padding: clamp(12px, 1.8vh, 18px);
    background:
        radial-gradient(circle at 16% 16%, rgba(85, 168, 255, .14), transparent 24rem),
        radial-gradient(circle at 88% 78%, rgba(124, 215, 176, .09), transparent 20rem),
        linear-gradient(135deg, #06101a, #0b1522 58%, #08111c);
}

.workspace-main {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: clamp(10px, 1.4vh, 14px);
    width: min(1280px, calc(100% - 16px));
    height: calc(100svh - clamp(24px, 3.6vh, 36px));
    margin: 0 auto;
    align-content: stretch;
    overflow: hidden;
}

.workspace-gateway-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 74px;
    padding: 12px 18px;
    border: 1px solid rgba(126, 166, 221, .18);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(18, 31, 48, .9), rgba(14, 25, 39, .78)),
        radial-gradient(circle at 88% 0%, rgba(85, 168, 255, .14), transparent 18rem);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
}

.workspace-gateway-header strong {
    display: block;
    margin-top: 4px;
    font-size: 19px;
    letter-spacing: -.04em;
}

.workspace-user-line {
    display: block;
    margin-top: 3px;
    color: #9bb6d7;
    font-size: 12px;
    font-weight: 650;
}

.workspace-gateway-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.workspace-choice-shell {
    display: grid;
    grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr);
    gap: clamp(12px, 1.6vw, 18px);
    align-items: center;
    align-self: center;
    min-height: 0;
}

.workspace-launcher {
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 0;
    padding: clamp(12px, 1.6vh, 16px);
    border: 1px solid rgba(151, 177, 211, .1);
    border-radius: 30px;
    background:
        radial-gradient(circle at 18% 20%, rgba(85, 168, 255, .13), transparent 26rem),
        linear-gradient(135deg, rgba(85, 168, 255, .07), transparent 42%),
        rgba(6, 15, 25, .44);
}

.workspace-intro-panel {
    display: grid;
    align-content: start;
    gap: clamp(9px, 1.2vh, 13px);
    min-height: 0;
    padding: clamp(30px, 5vh, 48px) clamp(16px, 2vw, 24px);
    border: 1px solid rgba(151, 177, 211, .09);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(8, 20, 34, .38), rgba(8, 20, 34, .08)),
        radial-gradient(circle at 12% 100%, rgba(124, 215, 176, .07), transparent 18rem);
}

.workspace-intro-panel h1 {
    max-width: 560px;
    font-size: clamp(36px, 4.1vw, 54px);
    line-height: .95;
    letter-spacing: -.07em;
}

.workspace-intro-copy {
    max-width: 560px;
    margin: 0;
    color: #bdd8ff;
    font-size: clamp(14px, 1.25vw, 16px);
    line-height: 1.45;
}

.workspace-feature-row {
    margin-top: 4px;
}

.workspace-feature-row span {
    padding: 8px 12px;
    font-size: 13px;
}

.workspace-grid {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.workspace-grid--launcher {
    grid-template-rows: repeat(2, minmax(185px, 220px));
    align-content: center;
}

.workspace-card {
    display: grid;
    gap: 10px;
    padding: clamp(15px, 1.8vh, 20px);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.workspace-card--launcher {
    min-height: 0;
    grid-template-rows: auto auto auto;
    align-content: space-between;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(25, 44, 68, .76), rgba(12, 23, 36, .94)),
        radial-gradient(circle at 90% 0%, rgba(85, 168, 255, .12), transparent 18rem);
}

.workspace-card:hover {
    transform: translateY(-2px);
    border-color: rgba(85, 168, 255, .62);
    background: linear-gradient(145deg, rgba(25, 45, 70, .96), rgba(14, 25, 39, .96));
}

.workspace-card .btn {
    margin-top: 0;
    pointer-events: none;
}

.workspace-card-top,
.workspace-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.workspace-card-footer {
    color: #93accb;
    font-size: 13px;
    font-weight: 800;
}

.workspace-action-btn {
    min-height: 38px;
    min-width: 104px;
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.workspace-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid rgba(151, 177, 211, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: #aac4e5;
    font-size: 12px;
    font-weight: 800;
}

.workspace-mini-label {
    color: #9dccff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.workspace-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 15px;
    color: #dcecff;
    background: rgba(85, 168, 255, .18);
    border: 1px solid rgba(85, 168, 255, .3);
    font-weight: 900;
}

.workspace-logout {
    display: flex;
    justify-content: flex-end;
}

@media (max-height: 760px) and (min-width: 981px) {
    .workspace-body {
        padding: 10px 14px;
    }

    .workspace-main {
        height: calc(100svh - 20px);
        gap: 10px;
    }

    .workspace-gateway-header {
        min-height: 64px;
        padding: 10px 16px;
    }

    .workspace-intro-panel {
        gap: 10px;
        padding: 16px;
    }

    .workspace-intro-panel h1 {
        font-size: clamp(32px, 3.7vw, 46px);
    }

    .workspace-grid--launcher {
        grid-template-rows: repeat(2, minmax(165px, 195px));
    }

    .workspace-card {
        gap: 9px;
        padding: 15px 18px;
    }

    .workspace-card h2 {
        font-size: 24px;
    }

    .workspace-card .muted {
        line-height: 1.35;
    }
}

label {
    display: grid;
    gap: 8px;
}

.admin-index-shell {
    display: grid;
    gap: 14px;
}

.admin-list-card {
    width: 100%;
    display: grid;
    gap: 10px;
}

.admin-drawer-bank {
    display: contents;
}

.admin-list-card.is-loading .table-wrap,
.admin-list-card.is-loading .admin-list-controls {
    opacity: 0.58;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.admin-search-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    padding: 8px;
    border: 1px solid rgba(118, 155, 200, 0.2);
    border-radius: 18px;
    background: rgba(8, 18, 31, 0.44);
}

.admin-list-card .toolbar,
.admin-list-card .global-toolbar,
.admin-list-card .admin-search-toolbar {
    margin-top: 0;
}

.admin-search-field {
    position: relative;
    display: block;
    min-width: 0;
}

.admin-search-field input {
    width: 100%;
    min-height: 42px;
    padding-left: 44px;
    border-radius: 15px;
    background: rgba(24, 39, 60, 0.78);
}

.admin-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 1;
    color: #9fb9d8;
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-search-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 92px;
}

.admin-search-actions .btn {
    min-height: 42px;
    padding-inline: 16px;
}

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

.admin-list-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 6px 0 8px;
    flex-wrap: wrap;
}

.admin-list-controls--bottom {
    margin: 10px 0 0;
    align-items: center;
}

.rows-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.rows-select select {
    width: auto;
    min-width: 112px;
    max-width: 140px;
    padding: 12px 16px;
    flex: 0 0 auto;
}

select.rows-select {
    width: auto;
    min-width: 112px;
    max-width: 140px;
    flex: 0 0 auto;
}

.pagination-shell {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.pagination-nav {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.pagination-summary {
    color: #a9bdd6;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pagination-links {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 8px 11px;
    border: 1px solid rgba(118, 155, 200, 0.24);
    border-radius: 11px;
    color: #dbeafe;
    background: rgba(17, 32, 51, 0.72);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.pagination-link:hover {
    color: #f5fbff;
    border-color: rgba(91, 171, 255, 0.54);
    background: rgba(46, 94, 143, 0.36);
}

.pagination-link.active {
    color: #06101a;
    border-color: rgba(105, 190, 255, 0.42);
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
}

.pagination-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-add-trigger {
    border-color: rgba(85, 168, 255, 0.55);
    background: linear-gradient(135deg, #4387ff, #66c5ff);
    color: #03111f;
    box-shadow: 0 12px 30px rgba(67, 135, 255, 0.22);
}

body.drawer-open {
    overflow: hidden;
}

.admin-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    background: rgba(3, 10, 18, 0);
    backdrop-filter: blur(0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background 0.2s ease, backdrop-filter 0.2s ease;
}

.admin-drawer.open {
    background: rgba(3, 10, 18, 0.66);
    backdrop-filter: blur(8px);
    opacity: 1;
    pointer-events: auto;
}

.admin-drawer-panel {
    width: min(540px, calc(100vw - 28px));
    max-width: 540px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: auto;
    border-left: 1px solid rgba(132, 178, 255, 0.22);
    border-radius: 28px 0 0 28px;
    background: linear-gradient(160deg, rgba(22, 37, 56, 0.98), rgba(11, 23, 36, 0.98));
    box-shadow: -28px 0 80px rgba(0, 0, 0, 0.36);
    padding: 26px;
    transform: translateX(110%);
    transition: transform 0.24s ease;
}

.admin-drawer.open .admin-drawer-panel {
    transform: translateX(0);
}

.drawer-head {
    position: sticky;
    top: -26px;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: -26px -26px 0;
    padding: 26px 26px 16px;
    border-bottom: 1px solid rgba(132, 178, 255, 0.16);
    background: linear-gradient(180deg, rgba(22, 37, 56, 0.99), rgba(22, 37, 56, 0.9));
}

.sticky-actions {
    position: sticky;
    bottom: -26px;
    z-index: 2;
    margin: 8px -26px -26px;
    padding: 16px 26px 22px;
    border-top: 1px solid var(--line);
    background: rgba(11, 23, 36, 0.96);
    backdrop-filter: blur(14px);
}

.btn:disabled,
.btn.is-processing {
    cursor: wait;
    opacity: 0.72;
}

@media (max-width: 720px) {
    .admin-search-toolbar {
        grid-template-columns: 1fr;
    }

    .admin-search-actions {
        justify-content: stretch;
    }

    .admin-search-actions .btn {
        flex: 1;
    }

    .admin-list-controls,
    .section-actions {
        align-items: stretch;
        justify-content: flex-start;
    }

    .pagination-shell {
        width: 100%;
    }

    .rows-select {
        width: auto;
    }

    .rows-select select {
        width: auto;
    }

    .pagination-nav,
    .pagination-links {
        justify-content: flex-start;
    }

    .pagination-summary {
        white-space: normal;
    }
}

label span {
    color: #a8c7ef;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .18em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 15px 16px;
    color: var(--text);
    background: #1a2a3f;
    font: inherit;
    outline: none;
}

.admin-list-controls .rows-select {
    width: auto;
    flex: 0 0 auto;
}

.admin-list-controls .rows-select select {
    width: auto;
}

input.mini-check {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(85, 168, 255, .12);
}

@media (max-width: 980px) {
    .app-body {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .main {
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 18px;
    }

    .stats-grid,
    .login-shell,
    .signup-two,
    .workspace-choice-shell,
    .filters-grid,
    .compact-filters,
    .form-grid,
    .form-grid.two,
    .form-grid.three,
    .form-grid.stacked,
    .inline-edit-grid,
    .detail-grid,
    .split-grid,
    .attendance-console-grid,
    .session-inline,
    .handover-form {
        grid-template-columns: 1fr;
    }

    .report-filter-head {
        flex-direction: column;
        align-items: stretch;
    }

    .report-filter-actions {
        justify-content: flex-start;
    }

    .mini-panel-grid {
        grid-template-columns: 1fr;
    }

    .decision-form {
        grid-template-columns: 1fr;
    }

    .filters-grid .span-2 {
        grid-column: span 1;
    }

    .form-grid .span-2 {
        grid-column: span 1;
    }

    .topbar,
    .app-topbar {
        position: relative;
        top: auto;
        z-index: auto;
    }

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

    .workspace-body {
        height: auto;
        max-height: none;
        overflow: auto;
        padding: 16px;
    }

    .workspace-main {
        height: auto;
        min-height: calc(100vh - 32px);
        align-content: start;
        overflow: visible;
    }

    .workspace-launcher {
        height: auto;
    }

    .workspace-grid--launcher {
        grid-template-rows: none;
    }

    .workspace-gateway-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-gateway-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .app-topbar,
    .topbar-left {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-party-switcher {
        max-width: none;
        min-width: 100%;
        width: 100%;
    }

    .workspace-actions {
        justify-content: flex-start;
    }

    .profile-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .inline-panel {
        position: static;
        width: 100%;
        margin-top: 10px;
    }
}
.field-hint {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #8ea5c2;
}

.field-hint.is-checking {
    color: #93c5fd;
}

.field-hint.is-available {
    color: #6ee7b7;
}

.field-hint.is-error {
    color: #fda4af;
}

.field-hint.is-warning {
    color: #fbbf24;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font: inherit;
    color: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.field-label-row > span:first-child {
    font: inherit;
    color: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.field-label-row .field-hint,
.field-hint.inline {
    min-height: 0;
    margin-top: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Shared CRM drawer system. Reuse these classes for all current and future slide-in forms. */
body.drawer-open {
    overflow: hidden;
}

.admin-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
}

.admin-drawer::before {
    position: absolute;
    inset: 0;
    content: "";
    background: rgba(3, 10, 22, 0.68);
    backdrop-filter: blur(7px);
}

.admin-drawer.open {
    pointer-events: auto;
    opacity: 1;
}

.admin-drawer-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100vw);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, rgba(20, 35, 55, 0.98), rgba(11, 25, 40, 0.98));
    border-left: 1px solid rgba(80, 125, 175, 0.38);
    box-shadow: -34px 0 90px rgba(0, 0, 0, 0.42);
    transform: translateX(100%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-drawer.open .admin-drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px 22px;
    border-bottom: 1px solid rgba(80, 125, 175, 0.28);
}

.drawer-header .eyebrow,
.drawer-header .eyebrowline {
    margin-bottom: 12px;
}

.drawer-header h2,
.drawer-header h1 {
    margin: 0 0 8px;
}

.drawer-header p {
    margin: 0;
    color: var(--muted);
}

.drawer-body {
    padding: 26px 28px 32px;
}

.admin-drawer .form-grid {
    display: grid;
    gap: 18px;
}

.admin-drawer .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-drawer .form-grid.grid-80-20 {
    grid-template-columns: minmax(0, 4fr) minmax(130px, 1fr);
}

.admin-drawer .span-2 {
    grid-column: 1 / -1;
}

.drawer-active-footer,
.status-active-block {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(290px, auto);
    align-items: center;
    gap: 18px;
    margin-top: 22px;
}

.drawer-active-footer .choice-row,
.status-active-block .choice-row,
.drawer-active-footer > label,
.status-active-block > label {
    margin: 0;
}

@media (max-width: 760px) {
    .admin-drawer-panel {
        width: 100vw;
    }

    .drawer-header,
    .drawer-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .admin-drawer .form-grid.two,
    .admin-drawer .form-grid.grid-80-20,
    .drawer-active-footer,
    .status-active-block {
        grid-template-columns: 1fr;
    }

}

/* Global server feedback system for success, error, warning, and inline callback messages. */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    border-radius: 14px;
    padding: 13px 15px;
    margin: 0 0 16px;
    border: 1px solid rgba(119, 158, 205, 0.28);
    color: #dceaff;
    background: rgba(18, 32, 50, 0.78);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
}

.alert::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    content: "i";
}

.alert.success {
    color: #c9f7df;
    border-color: rgba(88, 203, 137, 0.34);
    background: rgba(18, 76, 55, 0.62);
}

.alert.success::before {
    color: #062215;
    background: #73e2a5;
    content: "✓";
}

.alert.error {
    color: #ffd7dc;
    border-color: rgba(255, 116, 132, 0.4);
    background: rgba(96, 35, 48, 0.68);
}

.alert.error::before {
    color: #35070d;
    background: #ff8c9a;
    content: "!";
}

.alert.warning {
    color: #ffe8bd;
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(94, 67, 18, 0.62);
}

.alert.warning::before {
    color: #302000;
    background: #fbbf24;
    content: "!";
}

.saas-billing-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 16px;
    color: #ffe8bd;
    background: rgba(82, 58, 16, 0.62);
}

.saas-billing-banner.danger {
    color: #ffd7dc;
    border-color: rgba(255, 116, 132, 0.4);
    background: rgba(96, 35, 48, 0.68);
}

.saas-billing-banner strong,
.saas-billing-banner span {
    display: block;
}

.saas-billing-banner strong {
    margin-bottom: 3px;
    color: inherit;
}

.saas-billing-days {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    background: rgba(8, 22, 36, 0.42);
}

@media (max-width: 720px) {
    .saas-billing-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

.drawer-validation {
    margin: 18px 26px 0;
}

.drawer-validation strong {
    display: block;
    margin-bottom: 6px;
}

.drawer-validation ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    font-weight: 600;
}

.drawer-note {
    padding: 14px 16px;
    border: 1px dashed rgba(96, 165, 250, 0.38);
    border-radius: 14px;
    color: #c9d7e8;
    background: rgba(12, 34, 54, 0.68);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.drawer-note strong {
    color: #f8fbff;
}

.drawer-note.danger-note {
    border-color: rgba(255, 124, 138, 0.42);
    background: rgba(64, 24, 36, 0.58);
}

.field-error {
    display: block;
    margin-top: 7px;
    color: #ffc4ca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.review-submit-panel {
    display: grid;
    gap: 16px;
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid rgba(96, 165, 250, 0.36);
    border-radius: 18px;
    background: rgba(8, 23, 38, 0.78);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.admin-drawer-panel > .review-submit-panel,
.drawer-panel > .review-submit-panel {
    margin: 18px 26px 0;
}

.form-grid.is-reviewing .drawer-form-actions > button,
.form-grid.is-reviewing .drawer-form-actions > .btn,
.form-grid.is-reviewing .drawer-form-actions > .drawer-form-actions-content,
.form-grid.is-reviewing .drawer-form-actions > .drawer-form-primary,
.form-grid.is-reviewing .drawer-form-actions > .drawer-form-secondary {
    display: none;
}

.form-grid.is-reviewing input:disabled,
.form-grid.is-reviewing select:disabled,
.form-grid.is-reviewing textarea:disabled,
.form-grid.is-reviewing button:disabled:not([data-review-confirm]) {
    opacity: 0.68;
    cursor: not-allowed;
}

.form-grid.is-reviewing > :not(.drawer-form-actions) {
    display: none !important;
}

.review-submit-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.review-submit-head h3 {
    margin: 0 0 5px;
    color: #f5f8ff;
    font-size: 17px;
    letter-spacing: 0;
}

.review-submit-list {
    display: grid;
    gap: 8px;
}

.review-submit-item {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid rgba(92, 143, 205, 0.18);
    border-radius: 12px;
    background: rgba(15, 32, 52, 0.58);
}

.review-submit-item span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.review-submit-item strong {
    min-width: 0;
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.review-submit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.field-hint,
.field-hint.inline {
    color: #9fb6d2;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.field-hint.is-checking {
    color: #94c9ff;
}

.field-hint.is-available {
    color: #79e4ae;
}

.field-hint.is-error {
    color: #ff9fac;
}

.field-hint.is-warning {
    color: #f8c86b;
}

.admin-drawer .field-hint.inline {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Global admin UI system. Keep repeated admin drawers, forms, buttons, and toggles consistent. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    gap: 8px;
    border-radius: 14px;
    line-height: 1;
    text-align: center;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(118, 173, 235, 0.5);
}

.btn.primary,
.module-switch,
.admin-add-trigger,
.admin-drawer .drawer-form-actions button[type="submit"]:not(.admin-icon-action),
.admin-drawer .drawer-form-actions .btn:not(.ghost):not(.danger) {
    color: #06101a;
    border-color: rgba(105, 190, 255, 0.26);
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    box-shadow: 0 12px 28px rgba(74, 142, 247, 0.22);
}

.btn.ghost,
.admin-drawer .drawer-form-actions .btn.ghost {
    color: #e7f0ff;
    background: rgba(17, 32, 51, 0.76);
    border-color: rgba(118, 155, 200, 0.32);
    box-shadow: none;
}

.btn.module-switch,
.btn.ghost.module-switch {
    color: #06101a;
    border-color: rgba(105, 190, 255, 0.26);
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    box-shadow: 0 12px 28px rgba(74, 142, 247, 0.22);
}

.module-switch:hover,
.module-switch:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(105, 190, 255, 0.42);
    box-shadow: 0 14px 32px rgba(74, 142, 247, 0.28);
}

.topbar .logout-btn:hover,
.topbar .logout-btn:focus-visible,
.app-topbar .logout-btn:hover,
.app-topbar .logout-btn:focus-visible {
    color: #fde68a;
    background: rgba(81, 57, 20, 0.9);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: none;
}

.btn.tiny {
    min-height: 38px;
    border-radius: 12px;
}

.topbar .btn,
.app-topbar .btn {
    min-height: 36px;
    padding: 9px 14px;
}

.topbar .eyebrow,
.app-topbar .eyebrow {
    margin: 0 0 4px;
}

.topbar-actions form,
.workspace-actions form {
    display: inline-flex;
    margin: 0;
}

.admin-drawer {
    align-items: stretch;
}

.admin-drawer::before {
    background: rgba(2, 8, 15, 0.72);
    backdrop-filter: blur(8px);
}

.admin-drawer-panel {
    --drawer-panel-width: min(600px, 100vw);
    --drawer-pad-x: 26px;
    --drawer-scrollbar-gutter: 12px;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 28px 0 0 28px;
    background: linear-gradient(180deg, rgba(20, 36, 56, 0.99), rgba(9, 23, 38, 0.99));
}

.drawer-head,
.drawer-header {
    position: static;
    top: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex: 0 0 auto;
    margin: 0;
    padding: 24px 26px 20px;
    border-bottom: 1px solid rgba(110, 154, 205, 0.28);
    background: rgba(21, 36, 56, 0.96);
}

.drawer-head h1,
.drawer-head h2,
.drawer-header h1,
.drawer-header h2 {
    margin: 0 0 6px;
    letter-spacing: -0.04em;
}

.drawer-head p,
.drawer-header p {
    max-width: 46ch;
    margin: 0;
}

.admin-drawer-panel > form.form-grid,
.admin-drawer-panel > .drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px var(--drawer-pad-x) 24px;
}

.admin-drawer form.form-grid {
    align-items: start;
    align-content: start !important;
    justify-content: start !important;
    grid-auto-rows: max-content;
    gap: 22px 18px;
    min-height: 0 !important;
    height: auto !important;
}

.admin-drawer .drawer-body form.form-grid {
    overflow: visible;
    padding: 0;
}

.admin-drawer .form-grid.stacked,
.admin-drawer .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-drawer label {
    display: grid;
    gap: 9px;
    align-content: start;
    min-width: 0;
    color: #e8f1ff;
    font-size: 13px;
    font-weight: 650;
}

.admin-drawer .field-label-row {
    min-height: 16px;
    margin: 0;
    align-items: center;
}

.admin-drawer .field-label-row .field-hint,
.admin-drawer .field-hint.inline {
    line-height: 1;
}

.admin-drawer input,
.admin-drawer select,
.admin-drawer textarea {
    min-height: 48px;
    border-radius: 15px;
    padding: 13px 15px;
    background: rgba(28, 46, 70, 0.88);
    border-color: rgba(123, 166, 216, 0.25);
}

.admin-drawer input:focus,
.admin-drawer select:focus,
.admin-drawer textarea:focus {
    border-color: rgba(105, 190, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(85, 168, 255, 0.14);
}

.admin-drawer label.choice {
    grid-template-columns: auto auto;
    align-items: center;
    width: max-content;
    min-height: 36px;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.admin-drawer label.choice input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4c9eff;
}

.admin-drawer label.choice span {
    color: #bcd2ef;
    letter-spacing: 0.16em;
}

/* Global checkbox system: keep existing wrappers visually consistent. */
label.choice,
label.choice-row,
label.check-row,
span.check-row,
label.status-active-block,
label.form-check,
span.form-check {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    margin: 0;
    color: #cfe2ff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}

label.choice input[type="checkbox"],
label.choice-row input[type="checkbox"],
label.check-row input[type="checkbox"],
span.check-row input[type="checkbox"],
label.status-active-block input[type="checkbox"],
label.form-check input[type="checkbox"],
span.form-check input[type="checkbox"],
input[type="checkbox"].mini-check {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    accent-color: #4c9eff;
}

label.choice span,
label.choice-row span,
label.check-row span,
span.check-row span,
label.status-active-block span,
label.form-check span,
span.form-check span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.admin-drawer label.choice,
.admin-drawer label.choice-row,
.admin-drawer label.check-row,
.admin-drawer span.check-row,
.admin-drawer label.status-active-block,
.admin-drawer label.form-check,
.admin-drawer span.form-check,
.drawer label.form-check,
.drawer span.form-check {
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #bcd2ef;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-drawer label.choice input[type="checkbox"],
.admin-drawer label.choice-row input[type="checkbox"],
.admin-drawer label.check-row input[type="checkbox"],
.admin-drawer span.check-row input[type="checkbox"],
.admin-drawer label.status-active-block input[type="checkbox"],
.admin-drawer label.form-check input[type="checkbox"],
.admin-drawer span.form-check input[type="checkbox"],
.drawer label.form-check input[type="checkbox"],
.drawer span.form-check input[type="checkbox"],
.admin-drawer input[type="checkbox"].mini-check {
    min-height: 18px;
    padding: 0;
}

.party-option input[type="checkbox"],
.compact-table input[type="checkbox"],
.table-wrap table input[type="checkbox"].mini-check {
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    accent-color: #4c9eff;
}

.assignment-picker {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(110, 154, 205, 0.24);
    border-radius: 18px;
    background: rgba(9, 21, 35, 0.58);
}

.assignment-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.assignment-picker-head h3 {
    margin: 6px 0 0;
    color: #f4f8ff;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: 0;
}

.assignment-picker-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(91, 171, 255, 0.36);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(46, 94, 143, 0.42);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.assignment-picker-count strong {
    color: #ffffff;
}

.assignment-picker-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}

.assignment-picker-search {
    position: relative;
    display: block;
    min-width: 0;
}

.assignment-picker-search > span {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: #8fb3df;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.assignment-picker-search input {
    min-height: 44px;
    padding: 12px 14px 12px 40px;
    border-radius: 14px;
}

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

.assignment-picker-actions .btn {
    min-height: 38px;
    padding: 9px 13px;
}

.assignment-picker-actions .btn.is-active,
.assignment-picker-actions .btn[aria-pressed="true"] {
    color: #eaf4ff;
    border-color: rgba(91, 171, 255, 0.62);
    background: rgba(74, 148, 255, 0.22);
}

.assignment-picker-list {
    display: grid;
    gap: 8px;
    max-height: min(320px, 38vh);
    overflow-y: auto;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 171, 255, 0.45) rgba(15, 27, 42, 0.45);
}

.assignment-option,
.party-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(110, 154, 205, 0.18);
    border-radius: 14px;
    background: rgba(18, 35, 54, 0.58);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.assignment-option:hover,
.party-option:hover {
    border-color: rgba(91, 171, 255, 0.42);
    background: rgba(25, 48, 74, 0.8);
}

.assignment-option:has(input:checked),
.party-option:has(input:checked) {
    border-color: rgba(91, 171, 255, 0.64);
    background: rgba(46, 94, 143, 0.34);
}

.assignment-option input[type="checkbox"],
.admin-drawer .assignment-option input[type="checkbox"].mini-check {
    margin-top: 2px;
}

.assignment-option-body,
.party-option > span {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
}

.assignment-option-body strong,
.party-option > span strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #f4f8ff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.assignment-option-body em,
.party-option > span em {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #9fb7d8;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.form-section-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(110, 154, 205, 0.22);
    border-radius: 16px;
    background: rgba(9, 21, 35, 0.56);
}

.form-section-card.compact {
    padding: 14px;
    gap: 12px;
}

.form-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.form-section-head h3 {
    margin: 5px 0 0;
    color: #f4f8ff;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: 0;
}

.form-section-toggle {
    flex: 0 0 auto;
}

.form-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.form-section-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section-card textarea {
    min-height: 78px;
    resize: vertical;
}

.drawer-toggle-field {
    display: grid;
    gap: 9px;
    align-content: start;
    min-width: 0;
}

.drawer-toggle-label {
    color: #e8f1ff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
}

.party-service-manage-body {
    display: grid;
    gap: 18px;
    padding: 22px 26px 28px;
}

.party-service-manage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-manage-list {
    display: grid;
    gap: 12px;
}

.service-manage-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.72);
}

.service-manage-main {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.service-manage-main strong {
    color: #f5f8ff;
}

.service-manage-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.credential-value-list {
    display: grid;
    gap: 12px;
}

.document-value-list {
    gap: 10px;
}

.credential-value-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 14px;
    background: rgba(7, 22, 36, 0.54);
}

.credential-value-field {
    min-width: 0;
}

.credential-value-visible {
    align-self: center;
    white-space: nowrap;
}

.record-meta-line {
    display: block;
    max-width: 320px;
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
}

.document-flow-note {
    padding: 12px 14px;
    border: 1px dashed rgba(91, 171, 255, 0.34);
    border-radius: 14px;
    color: #bed3ec;
    background: rgba(17, 35, 56, 0.44);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.attachment-uploader-stack {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.attachment-existing-panel,
.attachment-uploader {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.54);
}

.attachment-uploader-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.attachment-uploader-head h3 {
    margin: 5px 0 0;
    color: #f4f8ff;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: 0;
}

.attachment-dropzone {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    padding: 18px 16px;
    border: 1px dashed rgba(91, 171, 255, 0.42);
    border-radius: 15px;
    background: rgba(17, 35, 56, 0.46);
    color: #dcecff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.attachment-dropzone:hover,
.attachment-dropzone.is-dragover {
    border-color: rgba(91, 171, 255, 0.75);
    background: rgba(31, 67, 106, 0.56);
    transform: translateY(-1px);
}

.attachment-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.attachment-dropzone-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(92, 168, 255, 0.36);
    border-radius: 13px;
    background: rgba(62, 145, 255, 0.14);
    color: #8fd0ff;
    font-size: 20px;
    font-weight: 900;
}

.attachment-dropzone strong {
    color: #f5f8ff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
}

.attachment-dropzone small {
    color: #98b0cf;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.attachment-selected-list,
.attachment-existing-list {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.attachment-file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 13px;
    background: rgba(8, 18, 31, 0.56);
}

.attachment-file-row.is-pending {
    border-style: dashed;
}

.attachment-file-icon {
    width: 42px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 171, 255, 0.34);
    border-radius: 11px;
    background: rgba(39, 91, 143, 0.28);
    color: #cfe5ff;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.attachment-file-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.attachment-file-meta strong {
    min-width: 0;
    overflow: hidden;
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-file-meta span {
    color: #9fb7d4;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.attachment-file-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.attachment-count-popover {
    position: relative;
    display: inline-flex;
    max-width: 100%;
}

.attachment-list-modal {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 8, 16, 0.64);
    backdrop-filter: blur(6px);
}

.attachment-list-modal.open {
    display: flex;
}

.attachment-list-modal-panel {
    width: min(560px, 100%);
    max-height: min(620px, calc(100vh - 40px));
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(92, 143, 205, 0.34);
    border-radius: 18px;
    background: #0c1928;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.54);
}

.attachment-count-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(110, 154, 205, 0.18);
}

.attachment-count-head > div {
    min-width: 0;
}

.attachment-count-head strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #f5f8ff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-count-head .icon-btn {
    flex: 0 0 auto;
}

.attachment-count-head span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.attachment-count-list {
    display: grid;
    gap: 8px;
    max-height: min(420px, calc(100vh - 210px));
    overflow: auto;
}

.attachment-count-file {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 12px;
    background: rgba(9, 21, 35, 0.72);
}

.document-share-drawer {
    display: grid;
    gap: 16px;
}

.share-message-box {
    min-height: 150px;
    color: #dcecff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    white-space: pre-wrap;
}

.document-share-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.document-share-actions form {
    display: inline-flex;
    margin: 0;
}

.secure-link-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(92, 143, 205, 0.22);
    border-radius: 14px;
    background: rgba(12, 28, 46, 0.62);
}

.secure-link-status > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.secure-link-status strong {
    color: #f4f8ff;
    font-size: 13px;
    font-weight: 850;
}

.secure-link-status span {
    color: #9fb7d8;
    font-size: 12px;
    font-weight: 650;
}

.secure-link-list {
    display: grid;
    gap: 8px;
}

.secure-link-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 12px;
    background: rgba(7, 19, 32, 0.7);
}

.secure-link-list a:hover {
    border-color: rgba(85, 168, 255, 0.45);
    background: rgba(18, 42, 68, 0.72);
}

.secure-link-list span {
    min-width: 0;
    overflow: hidden;
    color: #edf6ff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secure-link-list small {
    color: #9fb7d8;
    font-size: 11px;
    font-weight: 800;
}

.public-share-page {
    min-height: 100vh;
}

.public-share-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.public-share-card {
    width: min(560px, 100%);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(92, 143, 205, 0.25);
    border-radius: 20px;
    background: rgba(11, 26, 43, 0.92);
    box-shadow: var(--shadow);
}

.public-share-card h1 {
    margin: 0;
    color: #f5f9ff;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.public-share-meta {
    display: grid;
    gap: 9px;
}

.public-share-meta span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(92, 143, 205, 0.18);
    border-radius: 12px;
    background: rgba(7, 18, 31, 0.66);
    color: #9fb7d8;
    font-weight: 650;
}

.public-share-meta strong {
    color: #f2f7ff;
    text-align: right;
}

.attachment-remove {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 10px;
    background: rgba(84, 32, 43, 0.72);
    color: #fecaca;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.attachment-remove:hover {
    border-color: rgba(248, 113, 113, 0.65);
    background: rgba(98, 38, 49, 0.9);
}

.drawer-readonly-grid {
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drawer-readonly-section {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.drawer-readonly-list {
    display: grid;
    gap: 10px;
}

.drawer-readonly-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(92, 143, 205, 0.2);
    border-radius: 14px;
    background: rgba(7, 22, 36, 0.48);
}

.drawer-readonly-item span {
    color: #9fb7d4;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.drawer-readonly-item strong {
    min-width: 0;
    overflow: hidden;
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-location-list {
    display: grid;
    gap: 14px;
    padding: 0 26px 26px;
}

.document-location-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.62);
}

.document-location-form {
    padding-bottom: 0;
}

.document-location-form .drawer-form-actions {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.document-location-form .drawer-form-actions button[type="submit"] {
    min-width: 150px;
}

.document-location-actions {
    justify-content: flex-end;
}

.movement-timeline {
    position: relative;
    display: grid;
    gap: 14px;
    padding-left: 16px;
}

.movement-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 999px;
    background: rgba(91, 171, 255, 0.24);
}

.movement-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
}

.movement-timeline-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-top: 18px;
    border: 2px solid rgba(91, 171, 255, 0.72);
    border-radius: 999px;
    background: #0b1d31;
    box-shadow: 0 0 0 5px rgba(91, 171, 255, 0.08);
}

.movement-timeline-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.68);
}

.movement-timeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.movement-timeline-head strong {
    color: #f5f8ff;
    font-size: 14px;
}

.movement-timeline-head time {
    flex: 0 0 auto;
    color: #bfd5ef;
    font-size: 12px;
    font-weight: 750;
}

.movement-route {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.movement-route span {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(110, 154, 205, 0.18);
    border-radius: 12px;
    color: #dcecff;
    background: rgba(15, 32, 52, 0.72);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.movement-route b {
    color: #91b8e4;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.movement-timeline-card p {
    margin: 0;
    color: #eaf3ff;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 680px) {
    .party-service-manage-toolbar,
    .service-manage-card,
    .credential-value-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .party-service-manage-toolbar {
        flex-direction: column;
    }

    .attachment-file-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .attachment-file-actions,
    .attachment-remove {
        grid-column: 2;
        justify-self: start;
    }
}

.field-builder,
.credential-field-builder {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.field-builder-head,
.credential-field-builder .section-head.mini {
    align-items: center;
    margin: 0;
}

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

.field-builder-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(91, 171, 255, 0.28);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(46, 94, 143, 0.22);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.credential-field-rows {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.field-builder-add-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px dashed rgba(91, 171, 255, 0.42);
    border-radius: 14px;
    color: #dcecff;
    background: rgba(20, 40, 64, 0.34);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.field-builder-add-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #06101a;
    background: linear-gradient(135deg, #4c8df7, #6bc7ff);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.field-builder-add-row:hover,
.field-builder-add-row:focus-visible {
    color: #f4f9ff;
    border-color: rgba(105, 190, 255, 0.7);
    background: rgba(46, 94, 143, 0.28);
    outline: none;
    transform: translateY(-1px);
}

.field-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(110, 154, 205, 0.2);
    border-radius: 14px;
    background: rgba(9, 21, 35, 0.6);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.field-card:hover {
    border-color: rgba(91, 171, 255, 0.34);
    background: rgba(10, 24, 40, 0.78);
}

.field-card.is-dragging {
    opacity: 0.54;
    border-color: rgba(105, 190, 255, 0.72);
    box-shadow: 0 16px 34px rgba(4, 12, 22, 0.28);
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.field-card-body {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.field-card-main {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.72fr);
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.field-card-main label {
    min-width: 0;
}

.field-type-control select {
    min-width: 0;
}

.field-card-actions {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    width: 32px;
    min-height: 100%;
}

.field-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(91, 171, 255, 0.32);
    border-radius: 10px;
    color: #adcdf5;
    background: rgba(20, 40, 64, 0.62);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.field-card-action:hover,
.field-card-action:focus-visible {
    color: #eef7ff;
    border-color: rgba(105, 190, 255, 0.7);
    background: rgba(46, 94, 143, 0.58);
    outline: none;
}

.field-card-action.remove {
    color: #ffc4ca;
    border-color: rgba(255, 124, 138, 0.4);
    background: rgba(76, 33, 42, 0.58);
    font-size: 16px;
}

.field-card-action.remove:hover,
.field-card-action.remove:focus-visible {
    color: #fff5f6;
    border-color: rgba(255, 124, 138, 0.72);
    background: rgba(114, 42, 54, 0.82);
}

.field-flags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.toggle-pill {
    position: relative;
    display: inline-flex;
    min-width: 0;
    cursor: pointer;
    user-select: none;
}

label.toggle-pill,
.admin-drawer label.toggle-pill,
.drawer label.toggle-pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.toggle-pill input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.toggle-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(118, 155, 200, 0.3);
    border-radius: 999px;
    color: #c8d8ef;
    background: rgba(16, 31, 50, 0.78);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.toggle-pill:hover span {
    border-color: rgba(143, 184, 232, 0.5);
    color: #edf5ff;
}

.toggle-pill input:focus-visible + span {
    outline: 2px solid rgba(105, 190, 255, 0.7);
    outline-offset: 2px;
}

.toggle-pill input:checked + span {
    color: #f7fbff;
    border-color: rgba(91, 171, 255, 0.62);
    background: rgba(74, 148, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(91, 171, 255, 0.18);
}

.toggle-pill.flag-secret input:checked + span {
    border-color: rgba(255, 178, 90, 0.68);
    background: rgba(255, 178, 90, 0.18);
}

.toggle-pill.flag-client input:checked + span {
    border-color: rgba(84, 211, 194, 0.64);
    background: rgba(84, 211, 194, 0.16);
}

.toggle-pill.flag-active input:checked + span {
    border-color: rgba(79, 222, 146, 0.62);
    background: rgba(79, 222, 146, 0.16);
}

.status-stack {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.count-pill.warning {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(80, 56, 18, 0.48);
}

.count-pill.danger {
    color: #fecdd3;
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(79, 26, 39, 0.5);
}

.tenant-view-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 18px;
}

.tenant-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 12px 8px 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 999px;
    color: #c7d8ee;
    background: rgba(11, 28, 46, 0.72);
    text-decoration: none;
    font-weight: 850;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tenant-view-tab strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #f7fbff;
    background: rgba(74, 148, 255, 0.18);
    border: 1px solid rgba(91, 171, 255, 0.28);
    font-size: 12px;
}

.tenant-view-tab:hover,
.tenant-view-tab.is-active {
    color: #f6fbff;
    border-color: rgba(91, 171, 255, 0.48);
    background: rgba(25, 61, 99, 0.44);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.tenant-purge-preview {
    display: grid;
    gap: 14px;
}

.purge-preview-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.purge-preview-summary > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.62);
}

.purge-preview-summary strong {
    color: #f7fbff;
    font-size: 18px;
    line-height: 1.2;
}

.purge-preview-summary small {
    color: var(--muted);
    font-weight: 750;
}

.purge-preview-groups {
    display: grid;
    gap: 12px;
}

.purge-preview-group {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.62);
}

.purge-preview-group-head,
.purge-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.purge-preview-group-head {
    color: #f4f8ff;
}

.purge-preview-group-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.purge-preview-rows {
    display: grid;
    gap: 8px;
}

.purge-preview-row {
    padding: 10px 12px;
    border: 1px solid rgba(118, 155, 200, 0.18);
    border-radius: 13px;
    background: rgba(12, 27, 44, 0.68);
}

.purge-preview-row > div {
    min-width: 0;
}

.purge-preview-row strong {
    color: #f7fbff;
    font-size: 13px;
}

.purge-confirm-form {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 124, 138, 0.24);
    border-radius: 18px;
    background: rgba(56, 21, 32, 0.34);
}

.purge-confirm-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.purge-confirm-head > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.purge-confirm-head strong {
    color: #fff7f8;
    font-size: 17px;
}

.purge-confirm-head small {
    color: var(--muted);
    font-weight: 750;
}

.count-pill.danger {
    color: #ffc4ca;
    border-color: rgba(255, 124, 138, 0.34);
    background: rgba(108, 35, 48, 0.42);
}

.purge-confirm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.purge-confirm-grid label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.purge-confirm-grid label > span,
.purge-confirm-check span {
    color: #e7f1ff;
    font-size: 12px;
    font-weight: 850;
}

.purge-confirm-grid input,
.purge-confirm-grid textarea {
    width: 100%;
    border: 1px solid rgba(112, 159, 214, 0.3);
    border-radius: 14px;
    color: #f7fbff;
    background: rgba(12, 27, 44, 0.82);
    font: inherit;
    font-weight: 750;
    outline: none;
}

.purge-confirm-grid input {
    min-height: 46px;
    padding: 0 14px;
}

.purge-confirm-grid textarea {
    min-height: 82px;
    padding: 13px 14px;
    resize: vertical;
}

.purge-confirm-grid input:focus,
.purge-confirm-grid textarea:focus {
    border-color: rgba(255, 124, 138, 0.62);
    box-shadow: 0 0 0 4px rgba(255, 124, 138, 0.1);
}

.purge-confirm-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 124, 138, 0.22);
    border-radius: 14px;
    background: rgba(12, 27, 44, 0.58);
}

.purge-confirm-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff7c8a;
    flex: 0 0 auto;
}

.purge-confirm-actions {
    display: flex;
    justify-content: flex-end;
}

.package-feature-groups {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.package-feature-group {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.62);
}

.package-feature-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #f4f8ff;
}

.package-feature-group-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.package-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.package-feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(118, 155, 200, 0.22);
    border-radius: 14px;
    background: rgba(12, 27, 44, 0.72);
}

.package-feature-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.package-feature-main strong {
    color: #f7fbff;
    font-size: 13px;
    line-height: 1.25;
}

.package-feature-main span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.package-feature-value {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    color: #dceaff;
    font-size: 12px;
    font-weight: 750;
}

.package-feature-value input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
}

.package-feature-value.is-muted {
    opacity: 0.58;
}

.tenant-feature-list {
    display: grid;
    gap: 10px;
}

.tenant-feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(148px, 180px);
    align-items: start;
    gap: 10px 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(118, 155, 200, 0.22);
    border-radius: 14px;
    background: rgba(12, 27, 44, 0.72);
}

.tenant-feature-card.is-overridden {
    border-color: rgba(91, 171, 255, 0.5);
    background: rgba(25, 61, 99, 0.44);
}

.tenant-feature-main small {
    color: #a9bfd8;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.tenant-feature-mode,
.tenant-feature-value,
.tenant-feature-reason {
    display: grid;
    gap: 7px;
    color: #dceaff;
    font-size: 12px;
    font-weight: 750;
}

.tenant-feature-mode select,
.tenant-feature-value input,
.tenant-feature-reason input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
}

.tenant-feature-value,
.tenant-feature-reason {
    grid-column: 1 / -1;
}

.tenant-feature-value.is-muted,
.tenant-feature-reason.is-muted {
    opacity: 0.58;
}

.tenant-owner-cell {
    min-width: 190px;
}

.tenant-domain-drawer {
    display: grid;
    gap: 14px;
}

.tenant-domain-list {
    display: grid;
    gap: 10px;
}

.tenant-domain-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(118, 155, 200, 0.22);
    border-radius: 14px;
    background: rgba(12, 27, 44, 0.72);
}

.tenant-domain-form {
    display: grid !important;
    grid-template-columns: minmax(180px, 1.35fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr) auto;
    align-items: end;
    gap: 10px;
    min-width: 0;
}

.tenant-domain-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #dceaff;
    font-size: 12px;
    font-weight: 750;
}

.tenant-domain-form input,
.tenant-domain-form select {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
}

.tenant-domain-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: max-content;
}

.tenant-domain-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tenant-domain-card > form[data-confirm] {
    position: absolute;
    top: 10px;
    right: 10px;
}

.platform-settings-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.platform-settings-summary .summary-tile {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(92, 143, 205, 0.24);
    border-radius: 16px;
    background: rgba(7, 22, 36, 0.62);
}

.platform-settings-summary .summary-tile span {
    color: #b8c9df;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.platform-settings-summary .summary-tile strong {
    color: #f6fbff;
    font-size: 25px;
    line-height: 1;
}

.platform-settings-summary .summary-tile small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.platform-settings-resolver h3 {
    margin: 4px 0 5px;
}

.platform-settings-form {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.platform-setting-section {
    background: rgba(7, 22, 36, 0.52);
}

.platform-settings-grid small {
    font-size: 12px;
    font-weight: 650;
}

.platform-settings-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 0;
    background: linear-gradient(180deg, rgba(10, 25, 41, 0), rgba(10, 25, 41, 0.92) 28%);
}

.tenant-settings-summary .summary-tile strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.tenant-setting-field {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(103, 146, 198, 0.24);
    border-radius: 16px;
    background: rgba(8, 23, 38, 0.68);
    transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.tenant-setting-field.is-wide {
    grid-column: 1 / -1;
}

.tenant-setting-field.is-overridden {
    border-color: rgba(91, 171, 255, 0.48);
    background: rgba(22, 55, 91, 0.42);
}

.tenant-setting-field.is-inherited {
    opacity: 0.82;
}

.tenant-setting-field-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.tenant-setting-field-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tenant-setting-field-head label,
.tenant-setting-control label {
    color: #f3f8ff;
    font-size: 13px;
    font-weight: 850;
}

.tenant-setting-field-head small,
.tenant-setting-meta small {
    color: #a9bfd8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.tenant-setting-override {
    flex: 0 0 auto;
}

.tenant-setting-control {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.tenant-setting-control input,
.tenant-setting-control select {
    min-height: 42px;
    border-radius: 13px;
}

.tenant-setting-control input:disabled,
.tenant-setting-control select:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.tenant-setting-control .compact-toggle {
    margin: 0;
    min-height: 42px;
    padding: 10px 12px;
}

.tenant-setting-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.tenant-settings-actions {
    gap: 12px;
}

@media (max-width: 760px) {
    .package-feature-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-feature-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-domain-form {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .tenant-domain-actions {
        justify-content: flex-start;
        min-width: 0;
        flex-wrap: wrap;
    }

    .tenant-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .platform-settings-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-section-grid.two.platform-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.staff-permission-shell .admin-list-card {
    gap: 18px;
}

.staff-permission-layout {
    display: grid;
    grid-template-columns: minmax(380px, 430px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.staff-permission-sidebar,
.staff-permission-detail {
    min-width: 0;
    border: 1px solid rgba(103, 146, 198, 0.22);
    border-radius: 20px;
    background: rgba(8, 20, 34, 0.52);
}

.staff-permission-sidebar {
    display: grid;
    gap: 12px;
    padding: 14px;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.permission-profile-head,
.permission-group-head,
.staff-permission-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.staff-permission-sidebar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
}

.staff-permission-sidebar-head h3,
.permission-profile-head h3,
.permission-group-head h3 {
    margin: 3px 0 0;
    font-size: 18px;
    letter-spacing: 0;
}

.staff-permission-mini-stats,
.permission-profile-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.staff-permission-mini-stats {
    width: 100%;
    justify-content: stretch;
}

.permission-profile-actions {
    justify-content: flex-end;
}

.staff-permission-mini-stats span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid rgba(95, 150, 216, 0.26);
    border-radius: 999px;
    background: rgba(25, 43, 64, 0.72);
    color: #cfe2ff;
    font-size: 12px;
    font-weight: 800;
}

.staff-permission-sidebar .admin-search-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.staff-permission-sidebar .admin-search-actions {
    min-width: 0;
}

.staff-permission-sidebar .admin-search-actions .btn {
    min-width: 72px;
    padding-inline: 12px;
}

.staff-permission-list {
    display: grid;
    align-content: start;
    grid-auto-rows: min-content;
    gap: 8px;
    max-height: min(640px, calc(100vh - 330px));
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    scrollbar-color: rgba(112, 162, 224, 0.6) rgba(8, 19, 32, 0.55);
}

.staff-permission-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 70px;
    padding: 12px;
    border: 1px solid rgba(99, 143, 194, 0.18);
    border-radius: 16px;
    background: rgba(13, 26, 43, 0.76);
    color: #e8f2ff;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.staff-permission-row:hover,
.staff-permission-row.active {
    border-color: rgba(93, 170, 255, 0.58);
    background: rgba(30, 55, 82, 0.84);
}

.staff-permission-row:hover {
    transform: translateY(-1px);
}

.staff-permission-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(99, 162, 235, 0.46);
    border-radius: 14px;
    background: rgba(33, 80, 132, 0.46);
    color: #d9ecff;
    font-weight: 900;
}

.staff-permission-avatar.large {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    font-size: 20px;
}

.staff-permission-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.staff-permission-copy strong,
.permission-toggle-copy strong {
    min-width: 0;
    overflow: hidden;
    color: #f3f8ff;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-permission-copy em,
.staff-permission-copy small,
.permission-toggle-copy em {
    min-width: 0;
    overflow: hidden;
    color: #aac0dc;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 96px;
    overflow: hidden;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(95, 150, 216, 0.26);
    border-radius: 999px;
    color: #cfe2ff;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-permission-detail {
    padding: 18px;
}

.staff-permission-form {
    display: grid;
    gap: 16px;
}

.permission-profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

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

.permission-status-grid article {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(97, 143, 196, 0.2);
    border-radius: 16px;
    background: rgba(10, 24, 39, 0.62);
}

.permission-status-grid span,
.permission-status-grid small {
    color: #aac0dc;
    font-size: 12px;
    font-weight: 800;
}

.permission-status-grid strong {
    color: #f7fbff;
    font-size: 24px;
    line-height: 1.1;
}

.permission-groups-modern {
    display: grid;
    gap: 12px;
}

.permission-group-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(100, 146, 199, 0.22);
    border-radius: 18px;
    background: rgba(7, 19, 32, 0.62);
}

.permission-option-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-toggle-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 82px;
    margin: 0;
    padding: 13px;
    border: 1px solid rgba(97, 143, 196, 0.2);
    border-radius: 16px;
    background: rgba(16, 31, 50, 0.66);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.permission-toggle-row:hover,
.permission-toggle-row.is-on {
    border-color: rgba(83, 166, 255, 0.58);
    background: rgba(23, 48, 76, 0.78);
}

.permission-toggle-row.is-on {
    box-shadow: inset 0 0 0 1px rgba(95, 179, 255, 0.12);
}

.permission-toggle-row.is-locked {
    cursor: not-allowed;
    opacity: 0.78;
}

.permission-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permission-toggle-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.permission-toggle-row,
.permission-toggle-copy,
.permission-toggle-copy strong,
.permission-toggle-copy em {
    letter-spacing: 0;
    text-transform: none;
}

.permission-toggle-copy strong,
.permission-toggle-copy em {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.permission-toggle-copy strong {
    -webkit-line-clamp: 1;
}

.permission-toggle-copy em {
    -webkit-line-clamp: 2;
    line-height: 1.35;
}

.permission-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 46px;
    height: 26px;
    padding: 3px;
    border: 1px solid rgba(130, 166, 207, 0.35);
    border-radius: 999px;
    background: rgba(7, 17, 29, 0.74);
    transition: border-color 0.16s ease, background 0.16s ease;
}

.permission-switch span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8ca4c2;
    transform: translateX(0);
    transition: transform 0.16s ease, background 0.16s ease;
}

.permission-toggle-row.is-on .permission-switch {
    border-color: rgba(78, 209, 170, 0.8);
    background: rgba(25, 123, 103, 0.42);
}

.permission-toggle-row.is-on .permission-switch span {
    background: #dfffee;
    transform: translateX(20px);
}

.staff-permission-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 2px -18px -18px;
    padding: 14px 18px;
    border-top: 1px solid rgba(103, 146, 198, 0.22);
    border-radius: 0 0 20px 20px;
    background: rgba(8, 20, 34, 0.95);
    backdrop-filter: blur(12px);
}

@media (max-width: 1120px) {
    .staff-permission-layout {
        grid-template-columns: 1fr;
    }

    .staff-permission-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .staff-permission-list {
        max-height: 420px;
    }
}

@media (max-width: 720px) {
    .staff-permission-sidebar-head,
    .permission-profile-head,
    .staff-permission-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-profile-actions,
    .permission-profile-actions .btn,
    .staff-permission-footer .btn {
        width: 100%;
    }

    .permission-status-grid {
        grid-template-columns: 1fr;
    }

    .permission-option-list {
        grid-template-columns: 1fr;
    }

    .staff-permission-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .staff-role-pill {
        grid-column: 2;
        width: fit-content;
    }
}

.drawer-form-actions {
    position: static;
    grid-column: 1 / -1 !important;
    align-self: stretch;
    justify-self: stretch !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 10px 0 0;
    padding: 14px;
    border: 1px solid rgba(80, 125, 175, 0.32);
    border-radius: 18px;
    background: rgba(7, 18, 31, 0.74);
}

.admin-drawer form.form-grid > .drawer-form-actions {
    grid-column: 1 / -1 !important;
    width: 100%;
    margin-top: 10px;
}

.admin-drawer-panel > .drawer-form-actions {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(110, 154, 205, 0.28);
    border-radius: 0;
    background: rgba(9, 21, 35, 0.96);
    backdrop-filter: blur(14px);
}

.drawer-form-actions-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0;
}

.admin-drawer-panel > .drawer-form-actions .drawer-form-actions-content {
    padding: 14px calc(var(--drawer-pad-x) + var(--drawer-scrollbar-gutter)) 16px var(--drawer-pad-x);
}

.drawer-form-actions.has-secondary .drawer-form-actions-content {
    justify-content: space-between;
}

.drawer-form-actions.is-reviewing > .drawer-form-actions-content {
    display: none;
}

.drawer-form-actions .btn,
.drawer-form-actions button:not(.admin-icon-action) {
    min-width: 132px;
    min-height: 46px;
}

.drawer-form-primary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    justify-self: end;
    min-width: 0;
    margin-left: auto;
}

.drawer-form-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.drawer-form-secondary .admin-icon-action,
.drawer-form-actions .admin-icon-action,
.admin-drawer .drawer-form-actions .admin-icon-action {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    flex: 0 0 40px;
    color: #dbeafe;
    border-color: rgba(90, 134, 185, 0.38);
    background: rgba(25, 40, 60, 0.82);
    box-shadow: none;
}

.drawer-form-secondary .admin-icon-action.danger,
.drawer-form-actions .admin-icon-action.danger,
.admin-drawer .drawer-form-actions .admin-icon-action.danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(84, 32, 43, 0.58);
    box-shadow: none;
}

.drawer-form-secondary .admin-icon-action.danger:hover,
.drawer-form-actions .admin-icon-action.danger:hover,
.admin-drawer .drawer-form-actions .admin-icon-action.danger:hover {
    border-color: rgba(248, 113, 113, 0.68);
    background: rgba(98, 38, 49, 0.82);
}

.drawer-form-actions .admin-icon-action svg,
.admin-drawer .drawer-form-actions .admin-icon-action svg {
    width: 18px;
    height: 18px;
}

.drawer-form-actions button[type="submit"]:not(.admin-icon-action),
.drawer-form-actions .btn-primary,
.drawer-form-actions .btn.primary {
    min-width: 190px;
}

.admin-drawer .drawer-form-actions .btn.danger,
.drawer-form-actions .btn.danger {
    color: #ffc4ca;
    border-color: rgba(255, 124, 138, 0.36);
    background: rgba(118, 38, 48, 0.38);
    box-shadow: none;
}

.admin-drawer .drawer-form-actions .btn.danger:hover,
.drawer-form-actions .btn.danger:hover {
    border-color: rgba(255, 124, 138, 0.62);
    background: rgba(118, 38, 48, 0.55);
}

.drawer-active-footer,
.status-active-block {
    grid-column: 1 / -1;
    grid-template-columns: minmax(160px, 1fr) minmax(320px, auto);
    margin-top: 8px;
}

@media (max-width: 760px) {
    .admin-drawer-panel {
        --drawer-panel-width: 100vw;
        --drawer-pad-x: 18px;
        --drawer-scrollbar-gutter: 0px;
        width: 100vw;
        max-width: none;
        border-radius: 0;
    }

    .drawer-head,
    .drawer-header,
    .admin-drawer form.form-grid,
    .drawer-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .admin-drawer .form-grid.stacked,
    .admin-drawer .form-grid.two {
        grid-template-columns: 1fr;
    }

    .form-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-section-grid.two {
        grid-template-columns: 1fr;
    }

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

    .field-card-main {
        grid-template-columns: 1fr;
    }

    .field-card {
        grid-template-columns: 1fr;
    }

    .field-card-actions {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        min-height: 0;
    }

    .purge-preview-summary {
        grid-template-columns: 1fr;
    }

    .purge-confirm-head,
    .purge-confirm-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .purge-confirm-grid {
        grid-template-columns: 1fr;
    }

    .field-flags {
        gap: 8px;
    }

    .toggle-pill span {
        min-height: 34px;
    }

    .movement-timeline-head,
    .movement-route {
        grid-template-columns: 1fr;
    }

    .movement-timeline-head {
        display: grid;
    }

    .drawer-readonly-grid,
    .drawer-readonly-item,
    .review-submit-item {
        grid-template-columns: 1fr;
    }

    .review-submit-footer {
        flex-direction: column;
    }

    .review-submit-footer .btn {
        width: 100%;
    }

    .drawer-form-actions {
        display: flex;
        width: 100%;
        max-width: 100%;
        margin: 10px 0 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 14px;
    }

    .admin-drawer-panel > .drawer-form-actions {
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        padding: 0;
    }

    .drawer-form-actions-content,
    .drawer-form-actions.has-secondary .drawer-form-actions-content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 14px 18px 16px;
    }

    .drawer-form-primary {
        width: 100%;
        flex-direction: column;
        margin-left: 0;
    }

    .drawer-form-secondary {
        width: 100%;
        justify-content: flex-start;
    }

    .drawer-form-actions .btn,
    .drawer-form-actions button:not(.admin-icon-action),
    .drawer-form-actions button[type="submit"]:not(.admin-icon-action),
    .drawer-form-actions .btn-primary,
    .drawer-form-actions .btn.primary {
        width: 100%;
        min-width: 0;
    }
}
