*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --pmt-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --pmt-accent: #f97316;
    --pmt-accent-strong: #ea580c;
    --pmt-accent-soft: #ffedd5;
    --pmt-accent-glow: rgba(249, 115, 22, 0.18);
    --pmt-sidebar: #09090f;
    --pmt-sidebar-hover: #16161f;
    --pmt-sidebar-border: #27272f;
    --pmt-bg: #f4f4f5;
    --pmt-surface: #ffffff;
    --pmt-border: #e4e4e7;
    --pmt-border-soft: #f4f4f5;
    --pmt-text: #18181b;
    --pmt-text-muted: #71717a;
    --pmt-shadow-sm: 0 1px 2px rgba(9, 9, 15, 0.05), 0 8px 24px rgba(9, 9, 15, 0.04);
    --pmt-shadow-md: 0 10px 40px rgba(9, 9, 15, 0.1);
    --pmt-radius: 12px;
    --pmt-radius-lg: 16px;
}

body {
    margin: 0;
    font-family: var(--pmt-font);
    background: var(--pmt-bg);
    color: var(--pmt-text);
}

.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--pmt-sidebar) 0%, #0f0f17 100%);
    border-right: 1px solid var(--pmt-sidebar-border);
    color: #e4e4e7;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar .brand {
    padding-left: 0;
}

.brand-mark {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-sub {
    font-size: 0.85rem;
    color: #94a3b8;
}

.brand-logo,
.page-header-client-logo {
    background: none;
    display: block;
    height: auto;
    object-fit: contain;
    width: auto;
}

.brand-logo {
    align-self: flex-start;
    max-height: 3rem;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.page-header-client-logo,
.login-brand .brand-logo {
    margin-top: 0;
    max-height: 3rem;
}

.login-brand .brand-logo {
    max-height: 4rem;
    max-width: min(100%, 20rem);
    margin-top: 0.5rem;
}

.page-header-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header-inner h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header-client-logo {
    display: block;
    flex-shrink: 0;
    height: auto;
    max-height: 3rem;
    max-width: min(40vw, 14rem);
    object-fit: contain;
    width: auto;
}

.nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-start;
    gap: 0.125rem;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    line-height: 1.2;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    opacity: 0.88;
}

.nav-link-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.nav-link-label {
    flex: 1;
    min-width: 0;
}

.nav-link:hover {
    background: var(--pmt-sidebar-hover);
    color: #fff;
}

.nav-link.is-active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18) 0%, var(--pmt-sidebar-hover) 100%);
    box-shadow: inset 3px 0 0 var(--pmt-accent);
    color: #fff;
}

.nav-link.is-active .nav-link-icon {
    color: var(--pmt-accent);
}

.nav-link:hover .nav-link-icon,
.nav-link.is-active .nav-link-icon {
    opacity: 1;
}

.nav-section-label {
    margin: 1.25rem 0 0.35rem;
    padding: 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.nav-section-label:first-child {
    margin-top: 0;
}

.nav-section-link {
    margin-top: 0.5rem;
}

.nav-link.nav-section-link + .nav-link.nav-section-link {
    margin-top: 0;
}

.nav-section-link:first-child {
    margin-top: 0;
}

.nav-divider + .nav-link.nav-section-link {
    margin-top: 0;
}

.nav-divider {
    background: #334155;
    flex-shrink: 0;
    height: 1px;
    margin: 0.5rem 0.75rem;
}

.app-version-panel {
    margin-top: 1.5rem;
}

.app-version-body {
    padding: 1.25rem;
}

.app-version-value {
    margin: 0;
    font-size: 1rem;
    color: #334155;
}

.main {
    padding: 2rem;
}

.page-header h1 {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
}

.page-header:has(.page-header-inner) h1 {
    margin-bottom: 0;
}

.page-header:has(.page-header-inner) {
    margin-bottom: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-lg);
    box-shadow: var(--pmt-shadow-sm);
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-card-icon {
    align-items: center;
    background: var(--stat-accent-soft, var(--pmt-accent-soft));
    border-radius: 12px;
    color: var(--stat-accent, var(--pmt-accent-strong));
    display: inline-flex;
    flex-shrink: 0;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.stat-card-icon svg {
    display: block;
    height: 1.5rem;
    width: 1.5rem;
}

.stat-card-body {
    min-width: 0;
}

.stat-card h2 {
    margin: 0 0 0.2rem;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--pmt-text);
    line-height: 1;
}

.stat-card p {
    margin: 0;
    color: var(--pmt-text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.stat-card-events {
    --stat-accent: #ea580c;
    --stat-accent-soft: #ffedd5;
}

.stat-card-clients {
    --stat-accent: #2563eb;
    --stat-accent-soft: #dbeafe;
}

.stat-card-locations {
    --stat-accent: #7c3aed;
    --stat-accent-soft: #ede9fe;
}

.stat-card-venues {
    --stat-accent: #db2777;
    --stat-accent-soft: #fce7f3;
}

.stat-card-staff {
    --stat-accent: #0891b2;
    --stat-accent-soft: #cffafe;
}

.stat-card-equipment {
    --stat-accent: #059669;
    --stat-accent-soft: #d1fae5;
}

.stat-card-contacts {
    --stat-accent: #4f46e5;
    --stat-accent-soft: #e0e7ff;
}

.stat-card-admins {
    --stat-accent: #b45309;
    --stat-accent-soft: #fef3c7;
}

.stat-card-assignments {
    --stat-accent: #0f766e;
    --stat-accent-soft: #ccfbf1;
}

.stat-card-emails {
    --stat-accent: #1d4ed8;
    --stat-accent-soft: #dbeafe;
}

.stat-card-sms {
    --stat-accent: #9333ea;
    --stat-accent-soft: #f3e8ff;
}

.panel {
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-lg);
    box-shadow: var(--pmt-shadow-sm);
    overflow: hidden;
}

.panel-events-list {
    overflow: visible;
}

.panel-events-list .data-table-sticky thead th {
    z-index: 3;
}

.tcv-breakdown-panel {
    overflow: hidden;
}

.tcv-breakdown-dual {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.25rem;
}

.tcv-breakdown-column {
    min-width: 0;
}

.tcv-breakdown-column-title {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
}

.tcv-breakdown-column .tcv-breakdown {
    padding: 0;
}

.panel + .panel {
    margin-top: 1.5rem;
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pmt-border-soft);
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.panel-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-header .panel-subtitle {
    color: var(--pmt-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.5rem 0 0;
    max-width: 52rem;
}

.panel-toolbar {
    display: flex;
    justify-content: flex-start;
    padding: 0.75rem 1.25rem 0;
}

.panel-toolbar-bottom {
    padding: 0.75rem 1.25rem 1.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.data-table tbody tr {
    transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
    background: #fffaf5;
}

.data-table tbody tr:hover td:first-child a:not(.btn):not(.sort-link) {
    color: var(--pmt-accent-strong);
}

.data-table th {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pmt-text-muted);
    background: #fafafa;
    font-weight: 700;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sort-link:hover {
    color: var(--pmt-accent-strong);
}

.sort-link.is-active {
    color: var(--pmt-accent-strong);
    font-weight: 700;
}

.sort-indicator::after {
    content: '↕';
    font-size: 0.7rem;
    opacity: 0.35;
}

.sort-link.is-active.is-asc .sort-indicator::after {
    content: '↑';
    opacity: 1;
}

.sort-link.is-active.is-desc .sort-indicator::after {
    content: '↓';
    opacity: 1;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

.data-table a:hover {
    text-decoration: underline;
}

.data-table .assignment-col {
    max-width: 25ch;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.contact-stack {
    display: flex;
    flex-direction: column;
}

.contact-stack-item {
    padding: 0.35rem 0;
}

.contact-stack-item + .contact-stack-item {
    border-top: 1px solid #eef2f7;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.detail-item {
    min-width: 0;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.detail-item p {
    margin: 0;
    color: #111827;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-text-pre-wrap {
    white-space: pre-wrap;
}

.staff-role-delta,
.staff-role-delta-label,
.staff-role-delta-summary,
.staff-role-delta-list {
    color: #dc2626;
}

.staff-role-delta-label {
    font-weight: 600;
}

.staff-role-delta-summary {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 0.65rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
}

.staff-role-delta-summary-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.staff-role-delta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-role-delta-list li {
    font-weight: 600;
    margin: 0.2rem 0;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-yes,
.status-pill-active {
    background: #dcfce7;
    color: #166534;
}

.badge-no,
.status-pill-inactive {
    background: #f4f4f5;
    color: #52525b;
}

.badge-debug,
.badge-info {
    background: #e0f2fe;
    color: #075985;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error,
.badge-critical {
    background: #fee2e2;
    color: #991b1b;
}

.code-block {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.event-category-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.event-category-color-field {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-category-color-field input[type="color"] {
    width: 3rem;
    height: 2.25rem;
    padding: 0.15rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
}

.event-category-color-field input[type="color"].is-invalid {
    border-color: #dc2626;
}

.event-category-color-preview .event-category-badge {
    min-width: 5rem;
    text-align: center;
}

.empty-state {
    padding: 2rem 1.25rem;
    color: #64748b;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #475569;
    text-decoration: none;
}

.back-link:hover {
    color: #1d4ed8;
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.page-toolbar-start {
    justify-content: flex-start;
}

.page-toolbar-end {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-dropdown {
    display: inline-block;
    position: relative;
}

.toolbar-dropdown-trigger {
    list-style: none;
}

.toolbar-dropdown-trigger::-webkit-details-marker {
    display: none;
}

.toolbar-dropdown-trigger::after {
    content: " ▾";
    font-size: 0.85em;
}

.toolbar-dropdown-menu {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    left: 0;
    min-width: 10rem;
    padding: 0.35rem;
    position: absolute;
    top: calc(100% + 4px);
    z-index: 30;
}

.toolbar-dropdown-item {
    border-radius: 6px;
    color: #111827;
    display: block;
    font-size: 0.875rem;
    padding: 0.45rem 0.65rem;
    text-decoration: none;
}

.toolbar-dropdown-item:hover,
.toolbar-dropdown-item:focus-visible {
    background: #f3f4f6;
    outline: none;
}

.public-page {
    background: #f8fafc;
    color: #111827;
    margin: 0;
    min-height: 100vh;
}

.public-page-main {
    margin: 0 auto;
    max-width: 1400px;
    padding: 1.5rem 1rem 2rem;
}

.ros-share-url-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ros-share-url-input {
    flex: 1 1 16rem;
    min-width: 0;
}

.ros-share-copy-status {
    color: #15803d;
    margin-top: 0.35rem;
}

.list-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 320px;
    max-width: 560px;
}

.list-search input[type="search"] {
    flex: 1;
    min-width: 180px;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.entity-form {
    padding: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.event-form-fields select {
    max-width: 80ch;
    width: min(100%, 80ch);
}

.event-required-roles-fieldset .form-hint {
    margin-bottom: 0.75rem;
}

.event-required-roles-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    grid-column: 1 / -1;
    padding: 1rem 1rem 0.9rem;
}

.event-required-roles-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.event-required-roles-header-copy {
    min-width: 0;
}

.event-required-roles-title {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.event-required-roles-subtitle {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0.15rem 0 0;
}

.event-required-roles-hint {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
}

.event-required-roles-hint[hidden],
.event-required-roles-empty[hidden] {
    display: none !important;
}

.event-required-roles-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0;
}

.event-required-roles-list-has-rows {
    margin-top: 0.15rem;
}

.event-required-role-head,
.event-required-role-row {
    align-items: center;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) 5.5rem 2rem;
}

.event-required-role-head {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0 0.15rem;
    text-transform: uppercase;
}

.event-required-role-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.55rem 0.6rem;
}

.event-required-role-field,
.event-required-role-count {
    margin: 0;
}

.event-required-role-field select,
.event-required-role-count input {
    min-height: 2.35rem;
}

.event-required-role-count input {
    text-align: center;
}

.event-required-role-remove {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    width: 2rem;
}

.event-required-role-remove:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.form-error-inline {
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
}

.event-required-roles-table {
    max-width: 28rem;
}

.event-required-role-pills {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.event-staff-requirements-body {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.5rem;
    padding: 1.25rem;
}

.event-staff-requirements-chart {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 1rem;
}

.event-staff-requirements-donut-wrap {
    cursor: help;
    display: inline-flex;
    position: relative;
}

.event-staff-requirements-donut {
    display: block;
    pointer-events: none;
}

.event-staff-requirements-donut-center {
    fill: var(--pmt-surface);
}

.event-staff-requirements-donut-label {
    fill: var(--pmt-text);
    font-family: var(--pmt-font-sans, Helvetica, Arial, sans-serif);
    font-weight: 800;
    letter-spacing: -0.02em;
    pointer-events: none;
}

.event-staff-requirements-legend {
    color: #475569;
    display: grid;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.45rem;
    line-height: 1.3;
    list-style: none;
    margin: 0;
    padding: 0;
}

.event-staff-requirements-legend li {
    align-items: center;
    display: flex;
    gap: 0.45rem;
}

.event-staff-requirements-swatch {
    border-radius: 999px;
    flex: 0 0 auto;
    height: 0.65rem;
    width: 0.65rem;
}

.event-staff-requirements-swatch-assigned {
    background: #16a34a;
}

.event-staff-requirements-swatch-unassigned {
    background: #dc2626;
}

.event-required-role-pill {
    align-items: center;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.35rem;
    line-height: 1.2;
    padding: 0.28rem 0.55rem 0.28rem 0.7rem;
}

.event-required-role-pill-name {
    color: #475569;
}

.event-required-role-pill-count {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.12rem 0.45rem;
}

.event-required-role-pill-count-is-met {
    background: #16a34a;
    color: #ffffff;
}

.event-required-role-pill-count-is-short {
    background: #dc2626;
    color: #ffffff;
}

@media (max-width: 640px) {
    .event-required-roles-header {
        align-items: stretch;
        flex-direction: column;
    }

    .event-required-role-head {
        display: none;
    }

    .event-required-role-row {
        grid-template-columns: 1fr auto;
    }

    .event-required-role-count {
        grid-column: 1;
    }

    .event-required-role-remove {
        grid-row: span 2;
        justify-self: end;
    }
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.form-field input[type="text"],
.form-field input[type="search"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    line-height: 1.4;
    background: #fff;
    color: #111827;
}

.form-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    cursor: pointer;
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
    border-color: #dc2626;
}

.required {
    color: #dc2626;
}

.form-field-static {
    margin: 0;
    padding: 0.55rem 0;
    color: #111827;
}

.form-fieldset {
    margin: 1.5rem 0 0;
    padding: 1.35rem 1.25rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.form-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 600;
}

.form-fieldset legend + .checkbox-grid,
.form-fieldset legend + .form-hint,
.form-fieldset legend + .staff-certification-assignment {
    margin-top: 0.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(180deg, var(--pmt-accent) 0%, var(--pmt-accent-strong) 100%);
    box-shadow: 0 1px 2px var(--pmt-accent-glow);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #fb923c 0%, var(--pmt-accent) 100%);
}

.btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #f8fafc;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-success {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
}

.btn-warning {
    background: #facc15;
    color: #713f12;
    border-color: #eab308;
}

.btn-warning:hover {
    background: #eab308;
}

.delete-form {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.panel-danger-zone .delete-form {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.panel-danger-zone .form-hint {
    margin-top: 0;
}

.form-errors {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-errors ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.form-hint {
    margin: 1rem 0 0;
    color: #64748b;
}

.panel > .form-hint {
    margin: 1rem 0 0;
    padding: 0 1.25rem;
}

.form-intro {
    margin: 0 0 1rem;
    padding: 0 0.25rem;
    color: #475569;
}

body.staff-portal .panel > .form-intro {
    margin: 0 0 1rem;
    padding: 1.25rem 1.25rem 0;
}

body.staff-portal .panel > .form-errors {
    margin: 0 0 1rem;
    padding: 0 1.25rem;
}

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

.staff-certification-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.staff-certification-item {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.staff-certification-item-with-verification {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto;
    align-items: start;
}

.staff-certification-item input[type="hidden"] {
    display: none;
}

.staff-certification-item .staff-certification-remove {
    justify-self: end;
    align-self: center;
}

.staff-certification-name {
    font-weight: 500;
    align-self: center;
}

.staff-certification-verification-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.staff-certification-upload-label {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #475569;
}

.staff-certification-upload-input {
    max-width: 100%;
    font-size: 0.85rem;
}

.is-hidden {
    display: none !important;
}

.image-view-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.image-view-modal[hidden] {
    display: none !important;
}

body.image-view-modal-open {
    overflow: hidden;
}

.image-view-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.image-view-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 3rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-view-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.image-view-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.image-view-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.image-view-modal-download[hidden] {
    display: none !important;
}

.image-view-modal-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0.15rem 0.35rem;
}

.image-view-modal-body {
    padding: 1rem;
    overflow: auto;
    text-align: center;
    background: #f8fafc;
}

.image-view-modal-body img,
.image-view-modal-body iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.image-view-modal-body img {
    max-height: calc(100vh - 8rem);
    height: auto;
}

.image-view-modal-body iframe {
    width: 100%;
    min-height: calc(100vh - 8rem);
    border: 0;
    background: #fff;
}

.image-view-modal-body img[hidden],
.image-view-modal-body iframe[hidden] {
    display: none !important;
}

.event-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.event-photo-grid-item {
    margin: 0;
}

.event-photo-thumbnail {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.event-photo-thumbnail img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.event-photo-caption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--muted-text, #6b7280);
    line-height: 1.3;
}

.event-photo-caption-time {
    font-variant-numeric: tabular-nums;
}

.staff-event-actions {
    white-space: nowrap;
    width: 1%;
}

.staff-event-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.staff-assignment-tender-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.staff-events-row-pending td {
    background: #fffbeb;
}

.staff-events-mobile-card-pending {
    border-color: #fcd34d;
    background: #fffbeb;
}

.staff-events-mobile-card .staff-assignment-tender-actions {
    margin-bottom: 0.75rem;
}

.staff-certifications-display-actions {
    width: 9rem;
    white-space: nowrap;
}

.staff-certification-add {
    align-items: end;
}

.staff-work-city-add {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

.field-error {
    margin: 0.35rem 0 0;
    color: #b91c1c;
    font-size: 0.9rem;
}

.contact-list-entry {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #eef2f7;
}

.entity-form-inline {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.tcv-breakdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    overflow: visible;
}

.tcv-breakdown-chart {
    flex: 0 1 220px;
    margin: 0;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.tcv-breakdown-svg {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

.tcv-area-pending-exploded,
.tcv-area-pending-exploded circle {
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18));
}

.tcv-donut-center {
    fill: #fff;
}

.tcv-donut-label {
    fill: #64748b;
    font-size: 11px;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.tcv-donut-value {
    fill: #111827;
    font-size: 12px;
    font-weight: 600;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.tcv-axis-line {
    stroke: #cbd5e1;
    stroke-width: 1;
}

.tcv-axis-label,
.tcv-cap-label {
    fill: #64748b;
    font-size: 11px;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.tcv-tcv-cap {
    stroke: #0f172a;
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
}

.tcv-tcv-cap-over {
    stroke: #1d4ed8;
}

.tcv-breakdown-caption {
    margin: 0.75rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 220px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tcv-breakdown-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 0 0 auto;
}

.tcv-breakdown-legend li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.tcv-breakdown-legend li.tcv-legend-total {
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

.tcv-legend-swatch {
    display: inline-block;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.tcv-legend-swatch-staff {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}

.tcv-legend-swatch-staff--pending {
    background: linear-gradient(180deg, #f87171, #dc2626);
}

.tcv-legend-swatch-expense--pending {
    background: linear-gradient(180deg, #f87171, #dc2626);
}

.tcv-legend-swatch-margin {
    background: linear-gradient(180deg, #4ade80, #16a34a);
}

.tcv-legend-over-budget .tcv-legend-label,
.tcv-legend-over-budget .tcv-legend-value {
    color: #b91c1c;
    font-weight: 600;
}

.tcv-legend-subtotal {
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e5e7eb;
}

.tcv-donut-empty-ring {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 36;
}

.tcv-legend-label {
    color: #374151;
    font-weight: 600;
    font-size: 0.92rem;
}

.tcv-legend-pending {
    color: #dc2626;
    font-weight: 600;
}

.tcv-legend-value {
    color: #111827;
    font-size: 0.92rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-bottom: 1rem;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .tcv-breakdown-dual {
        grid-template-columns: 1fr;
    }

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

.sidebar-account {
    border-top: 1px solid #1e293b;
    margin-top: 1rem;
    padding-top: 1rem;
}

.sidebar-account-name {
    font-weight: 600;
}

.sidebar-account-user {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.sidebar-logout {
    color: #cbd5e1;
    display: inline-block;
    font-size: 0.85rem;
    margin-top: 0.65rem;
    text-decoration: none;
}

.sidebar-logout:hover {
    color: #fff;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 42%),
        radial-gradient(circle at bottom right, rgba(9, 9, 15, 0.92), rgba(9, 9, 15, 0.98)),
        #09090f;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.login-page-body {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    width: 100%;
}

.login-panel {
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-lg);
    box-shadow: var(--pmt-shadow-md);
    max-width: 420px;
    padding: 2rem;
    width: 100%;
}

.login-brand-panel .login-brand {
    margin-bottom: 0;
}

.login-form .form-actions {
    margin-top: 1rem;
}

.login-notice {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    font-size: 0.625rem;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 52rem;
    padding: 0 1.5rem 1rem;
    text-align: center;
    width: 100%;
}

.login-notice p {
    margin: 0 0 0.4rem;
}

.login-notice p:last-child {
    margin-bottom: 0;
}

.login-notice-lead {
    color: rgba(255, 255, 255, 0.52);
}

.login-notice-lead strong {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.login-notice-disclaimer {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.6rem;
}

.login-type-fieldset {
    border: none;
    margin: 0 0 1rem;
    padding: 0;
}

.login-type-fieldset legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    padding: 0;
}

.login-type-options {
    display: flex;
    gap: 1rem;
}

.login-type-option {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 0.95rem;
    gap: 0.4rem;
}

.staff-portal-main .page-header {
    margin-bottom: 1rem;
}

.form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #065f46;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.calendar-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.calendar-month-label {
    font-size: 1.1rem;
    min-width: 10rem;
    text-align: center;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.calendar-legend-item {
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.calendar-legend-confirmed {
    background: #dcfce7;
    color: #166534;
}

.calendar-legend-unconfirmed {
    background: #fef3c7;
    color: #92400e;
}

.calendar-legend-hint {
    color: #64748b;
    font-size: 0.8rem;
}

.calendar-panel {
    overflow: hidden;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.65rem 0.5rem;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    min-height: 110px;
    padding: 0.45rem;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day-empty {
    background: #f8fafc;
}

.calendar-day-today {
    background: #eff6ff;
}

.calendar-day-number {
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.calendar-day-today .calendar-day-number {
    color: #1d4ed8;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.calendar-panel-grid .calendar-day {
    min-height: 88px;
}

.calendar-panel-grid .calendar-day-events {
    gap: 0.15rem;
    max-height: 11rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.calendar-panel-grid .calendar-day-events .calendar-event {
    padding: 0.15rem 0.3rem;
    position: relative;
}

.calendar-panel-grid .calendar-day-events .calendar-event-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-panel-grid .calendar-day-events .calendar-event-time {
    font-size: 0.65rem;
    line-height: 1.2;
}

.calendar-panel-grid .calendar-day-events .calendar-event-status,
.calendar-panel-grid .calendar-day-events .calendar-event-links {
    display: none;
}

.calendar-panel-grid .calendar-day-events .calendar-event:hover,
.calendar-panel-grid .calendar-day-events .calendar-event:focus-within {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    z-index: 2;
}

.calendar-panel-grid .calendar-day-events .calendar-event:hover .calendar-event-status,
.calendar-panel-grid .calendar-day-events .calendar-event:focus-within .calendar-event-status {
    display: block;
}

.calendar-panel-grid .calendar-day-events .calendar-event:hover .calendar-event-links,
.calendar-panel-grid .calendar-day-events .calendar-event:focus-within .calendar-event-links {
    display: flex;
}

@media (hover: none) {
    .calendar-panel-grid .calendar-day-events .calendar-event-status {
        display: none;
    }

    .calendar-panel-grid .calendar-day-events .calendar-event:focus-within .calendar-event-status {
        display: block;
    }

    .calendar-panel-grid .calendar-day-events .calendar-event:focus-within .calendar-event-links {
        display: flex;
    }
}

.calendar-event {
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
    padding: 0.2rem 0.35rem;
}

.calendar-event-confirmed {
    background: #dcfce7;
    color: #166534;
}

.calendar-event-unconfirmed {
    background: #fef3c7;
    color: #92400e;
}

.calendar-event-name {
    display: block;
    font-weight: 600;
}

.calendar-event-time {
    display: block;
    opacity: 0.85;
}

.calendar-event-status {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 0.1rem;
    text-transform: uppercase;
}

.calendar-event-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-top: 0.15rem;
}

.calendar-event-link {
    color: inherit;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: underline;
}

.calendar-event-link:hover {
    opacity: 0.85;
}

.role-name-list {
    margin: 0;
    padding-left: 1.25rem;
}

.role-name-list li {
    margin: 0.25rem 0;
}

.staff-roles-display-group + .staff-roles-display-group {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.staff-roles-display-heading {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.admin-avatar-preview img {
    border-radius: 999px;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.staff-photos-fieldset {
    margin-top: 0;
}

.staff-photos-fieldset-intro {
    margin: 0 0 1rem;
}

.staff-photos-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-photos-grid--display {
    grid-template-columns: repeat(2, minmax(0, 12rem));
}

.staff-photo-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 14rem;
    padding: 1rem;
}

.staff-photo-card-title {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.staff-photo-preview-frame {
    align-items: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    height: 96px;
    justify-content: center;
    width: 96px;
}

.staff-photo-thumb {
    display: block;
    flex-shrink: 0;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.staff-photo-thumb--profile {
    border-radius: 999px;
}

.staff-photo-thumb--media-pass {
    border-radius: 8px;
}

.staff-photo-thumb-button {
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    line-height: 0;
    padding: 0;
}

.staff-photo-thumb-button:hover .staff-photo-thumb,
.staff-photo-thumb-button:focus-visible .staff-photo-thumb {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.staff-photo-preview-empty {
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.3;
    max-width: 6.5rem;
    text-align: center;
}

.staff-photo-card-controls {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.staff-photo-file-field {
    margin: 0;
}

.staff-photo-file-label {
    color: #475569;
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.staff-photo-file-field input[type="file"] {
    font-size: 0.88rem;
    max-width: 100%;
}

.staff-photo-remove {
    font-size: 0.88rem;
}

.staff-photos-display-body {
    padding: 1.25rem;
}

.staff-photo-display-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.staff-photo-display-label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .staff-photos-grid--display {
        grid-template-columns: 1fr;
    }

    .staff-photo-card {
        max-width: none;
    }
}

.asset-avatar-preview img {
    border-radius: 8px;
    height: 96px;
    object-fit: cover;
    width: 96px;
}

.asset-avatar-preview-large img {
    height: 180px;
    max-width: 100%;
    width: auto;
}

.permission-group + .permission-group {
    margin-top: 1rem;
}

.permission-group-label {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.permission-list {
    margin: 0;
    padding-left: 1.1rem;
}

.stat-card-link {
    color: inherit;
    text-decoration: none;
}

.stat-card-link:hover {
    border-color: var(--pmt-accent);
    box-shadow: var(--pmt-shadow-md);
    transform: translateY(-2px);
}

.filter-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.audit-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    width: 100%;
}

.audit-filter-form.entity-form {
    padding: 0;
}

.audit-filter-form.entity-form-inline {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.audit-filter-form .form-field {
    margin: 0;
    min-width: 160px;
}

.entity-notes-summary-hint,
.audit-log-summary-hint {
    margin: 1rem 1.25rem 1rem;
}

.entity-notes-panel-content {
    padding: 0 1.25rem 1.25rem;
}

.entity-notes-table {
    table-layout: fixed;
}

.entity-notes-table col.entity-notes-col-note {
    width: 50%;
}

.entity-notes-table .entity-notes-col-note {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel-header-split {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}

.panel-meta {
    color: #64748b;
    font-size: 0.9rem;
}

.pagination {
    align-items: center;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
}

.pagination-summary {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.pagination-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pagination-link,
.pagination-page {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1d4ed8;
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.pagination-link:hover,
.pagination-page:hover {
    background: #f8fafc;
}

.pagination-link.is-disabled,
.pagination-page.is-disabled {
    border-color: #e5e7eb;
    color: #94a3b8;
    cursor: default;
}

.pagination-pages {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination-page.is-current {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.pagination-ellipsis {
    color: #64748b;
    padding: 0 0.25rem;
}

.audit-log-table small {
    color: #64748b;
}

.audit-log-summary-cell {
    max-width: 28rem;
}

.audit-log-changes {
    margin-top: 0.5rem;
}

.audit-log-changes summary {
    color: #1d4ed8;
    cursor: pointer;
    font-size: 0.875rem;
}

.audit-log-changes-table {
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    width: 100%;
}

.audit-log-changes-table th,
.audit-log-changes-table td {
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

.audit-log-changes-table th {
    background: #f8fafc;
    font-weight: 600;
}

.audit-filter-form input[type="date"] {
    min-height: 2.5rem;
}

.table-scroll {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

/* Staff portal responsive layout */
html:has(body.staff-portal) {
    overflow-x: hidden;
}

body.staff-portal {
    overflow-x: clip;
    width: 100%;
}

body.staff-portal .staff-portal-shell {
    min-width: 0;
    width: 100%;
}

body.staff-portal .staff-portal-main,
body.staff-portal .page-content {
    max-width: 100%;
    min-width: 0;
}

/* Mobile-only header — separate from desktop sidebar to avoid min-height/flex stretch */
.staff-mobile-header {
    display: none;
}

body.staff-portal .staff-portal-page-header h1 {
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
}

body.staff-portal .staff-portal-page-header {
    max-width: 100%;
    min-width: 0;
}

body.staff-portal .page-header-inner {
    max-width: 100%;
    min-width: 0;
}

body.staff-portal .panel {
    max-width: 100%;
    min-width: 0;
}

body.staff-portal .page-toolbar .btn {
    flex: 1 1 auto;
    text-align: center;
}

body.staff-portal .calendar-toolbar .btn {
    flex: 0 0 auto;
    width: auto;
}

.calendar-toolbar-nav {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: 100%;
}

.calendar-toolbar-prev {
    justify-self: start;
}

.calendar-toolbar-next {
    justify-self: end;
}

.staff-events-mobile-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-events-mobile-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
}

.staff-events-mobile-card-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.staff-events-mobile-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.staff-events-mobile-meta,
.staff-events-mobile-comment {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    overflow-wrap: anywhere;
}

.staff-events-mobile-details {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.staff-events-mobile-detail {
    display: grid;
    gap: 0.15rem;
}

.staff-events-mobile-detail dt {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-events-mobile-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.staff-events-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.staff-events-mobile-title a {
    color: inherit;
    text-decoration: none;
}

.staff-events-mobile-title a:hover {
    text-decoration: underline;
}

.staff-portal-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.staff-portal-filter-tab {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #334155;
    display: inline-block;
    font-size: 0.875rem;
    padding: 0.4rem 0.85rem;
    text-decoration: none;
}

.staff-portal-filter-tab:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.staff-portal-filter-tab.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.staff-assignment-hub-header {
    margin-bottom: 1rem;
}

body.staff-portal .panel.staff-assignment-hub,
body.staff-portal .panel.staff-assignment-hub-section {
    padding: 1.25rem;
}

.staff-assignment-hub-kicker {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 0.25rem;
    text-transform: uppercase;
}

.staff-assignment-hub-title {
    font-size: 1.35rem;
    margin: 0;
}

.staff-assignment-hub-client {
    color: #475569;
    margin: 0.35rem 0 0;
}

.staff-assignment-hub-workflow {
    margin-bottom: 1rem;
}

.staff-assignment-hub-details {
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.staff-assignment-hub-detail {
    margin: 0;
}

.staff-assignment-hub-detail-wide {
    grid-column: 1 / -1;
}

.staff-assignment-hub-detail dt {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.staff-assignment-hub-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.staff-assignment-hub-section-title {
    font-size: 1rem;
    margin: 0 0 0.85rem;
}

.staff-assignment-hub-map-link {
    display: inline-block;
    margin-bottom: 0.25rem;
}

.staff-assignment-hub-map-hint {
    color: #64748b;
    display: block;
    font-size: 0.8rem;
}

.staff-assignment-hub-contacts {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-assignment-hub-contact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.85rem;
}

.staff-assignment-hub-contact-role {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.staff-assignment-hub-contact-name {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.staff-assignment-hub-contact-phone,
.staff-assignment-hub-contact-email {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.staff-assignment-hub-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.staff-assignment-hub-toolbar {
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .staff-assignment-hub-details {
        grid-template-columns: 1fr;
    }
}

.staff-payments-actions {
    min-width: 12rem;
}

.staff-payment-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.staff-payments-actions .staff-assignment-invoice-panel {
    margin-top: 0.5rem;
}

.staff-payments-mobile-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-payments-mobile-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
}

.staff-payments-mobile-card-header {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.staff-payments-mobile-title {
    font-size: 1.05rem;
    line-height: 1.35;
}

.staff-payments-mobile-title a {
    color: inherit;
    text-decoration: none;
}

.staff-payments-mobile-title a:hover {
    text-decoration: underline;
}

.staff-payments-mobile-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.staff-payments-mobile-details {
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 0.85rem;
}

.staff-payments-mobile-detail {
    margin: 0;
}

.staff-payments-mobile-detail dt {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.staff-payments-mobile-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.staff-payments-mobile-card .staff-assignment-invoice-panel {
    margin-bottom: 0.85rem;
}

.staff-payments-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body.staff-portal.staff-page-calendar .calendar-panel-grid {
    display: none;
}

body.staff-portal.staff-page-calendar .calendar-agenda {
    display: block;
}

.calendar-agenda {
    display: none;
}

.calendar-agenda-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.calendar-agenda-date {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}

.calendar-agenda-date h3 {
    font-size: 0.95rem;
    margin: 0;
}

.calendar-agenda-event {
    border-bottom: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
}

.calendar-agenda-event:last-child {
    border-bottom: none;
}

.calendar-event-role {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
}

@media (max-width: 900px) {
    body.staff-portal .staff-portal-shell {
        display: block;
        grid-template-columns: none;
        min-height: 0;
        overflow-x: clip;
    }

    body.staff-portal .staff-portal-sidebar-desktop {
        display: none;
    }

    body.staff-portal .staff-mobile-header {
        background: #0f172a;
        box-sizing: border-box;
        color: #e2e8f0;
        display: block;
        max-width: 100%;
        overflow-x: clip;
        padding: 0.85rem 0.75rem 0.75rem;
        position: sticky;
        top: 0;
        width: 100%;
        z-index: 100;
    }

    body.staff-portal .staff-mobile-brand {
        align-items: baseline;
        display: flex;
        flex-wrap: wrap;
        gap: 0.15rem 0.5rem;
        margin-bottom: 0.75rem;
        max-width: 100%;
    }

    body.staff-portal .staff-mobile-brand .brand-mark {
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: 0.08em;
    }

    body.staff-portal .staff-mobile-brand .brand-sub {
        color: #94a3b8;
        font-size: 0.8rem;
    }

    body.staff-portal .staff-mobile-nav {
        display: grid;
        gap: 0.35rem;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        overflow-x: visible;
        width: 100%;
    }

    body.staff-portal .staff-mobile-nav .nav-link {
        flex: initial;
        grid-column: span 2;
        justify-content: center;
        line-height: 1.25;
        min-width: 0;
        padding: 0.45rem 0.35rem;
        white-space: nowrap;
    }

    body.staff-portal .staff-mobile-nav .nav-link:nth-child(4),
    body.staff-portal .staff-mobile-nav .nav-link:nth-child(5) {
        grid-column: span 3;
    }

    body.staff-portal .staff-mobile-nav .nav-link-icon {
        display: none;
    }

    body.staff-portal .staff-mobile-nav .nav-link-label {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.staff-portal .staff-mobile-account {
        align-items: center;
        border-top: 1px solid #1e293b;
        box-sizing: border-box;
        display: grid;
        gap: 0.75rem;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        width: 100%;
    }

    body.staff-portal .staff-mobile-account-name {
        font-weight: 600;
        margin: 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.staff-portal .staff-mobile-logout {
        color: #cbd5e1;
        justify-self: end;
        text-decoration: none;
        white-space: nowrap;
    }

    body.staff-portal .staff-mobile-logout:hover {
        color: #fff;
    }

    body.staff-portal .staff-portal-main {
        overflow-x: clip;
        padding: 1rem;
        width: 100%;
    }

    body.staff-portal .staff-portal-page-header {
        margin-bottom: 1rem;
        overflow-x: clip;
    }

    body.staff-portal .page-header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }

    body.staff-portal .page-header-inner h1 {
        flex: 1 1 10rem;
        font-size: 1.4rem;
        min-width: 0;
    }

    body.staff-portal .page-header-client-logo {
        margin-left: auto;
        max-height: 2.25rem;
        max-width: min(36vw, 7.5rem);
    }

    body.staff-portal .staff-portal-page-header h1 {
        font-size: 1.4rem;
    }

    body.staff-portal .calendar-toolbar {
        margin-bottom: 1rem;
    }

    body.staff-portal .calendar-month-label {
        font-size: 1rem;
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: center;
    }

    body.staff-portal .calendar-legend {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-bottom: 1rem;
    }

    body.staff-portal .staff-events-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    body.staff-portal .staff-events-desktop {
        display: none;
    }

    body.staff-portal .staff-payments-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    body.staff-portal .staff-payments-desktop {
        display: none;
    }

    body.staff-portal .staff-payments-mobile-details {
        grid-template-columns: 1fr;
    }

    body.staff-portal .staff-certifications-display-table {
        display: block;
        max-width: 100%;
        width: 100%;
    }

    body.staff-portal .staff-certifications-display-table thead {
        display: none;
    }

    body.staff-portal .staff-certifications-display-table tbody,
    body.staff-portal .staff-certifications-display-table tr,
    body.staff-portal .staff-certifications-display-table td {
        display: block;
        width: 100%;
    }

    body.staff-portal .staff-certifications-display-table tr {
        border-bottom: 1px solid #e5e7eb;
        padding: 0.85rem 1rem;
    }

    body.staff-portal .staff-certifications-display-table tr:last-child {
        border-bottom: none;
    }

    body.staff-portal .staff-certifications-display-table td {
        border-bottom: none;
        display: grid;
        gap: 0.35rem;
        grid-template-columns: minmax(7rem, 34%) 1fr;
        min-width: 0;
        overflow-wrap: anywhere;
        padding: 0.45rem 0;
        text-align: left;
    }

    body.staff-portal .staff-certifications-display-table td::before {
        color: #64748b;
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    body.staff-portal .staff-certifications-display-actions {
        width: auto;
    }

    body.staff-portal .calendar-agenda-event,
    body.staff-portal .calendar-event-name {
        overflow-wrap: anywhere;
    }

    body.staff-portal.staff-page-calendar .staff-portal-page-header,
    body.staff-portal.staff-page-events .staff-portal-page-header,
    body.staff-portal.staff-page-payments .staff-portal-page-header,
    body.staff-portal.staff-page-roles .staff-portal-page-header {
        margin-bottom: 0.75rem;
    }

    body.staff-portal.staff-page-calendar .page-content,
    body.staff-portal.staff-page-events .page-content,
    body.staff-portal.staff-page-payments .page-content,
    body.staff-portal.staff-page-roles .page-content {
        overflow-x: clip;
        width: 100%;
    }
}

@media (min-width: 901px) {
    body.staff-portal.staff-page-calendar .calendar-panel-grid {
        display: block;
    }

    body.staff-portal.staff-page-calendar .calendar-agenda {
        display: none;
    }
}

@media (max-width: 768px) {
    body.staff-portal .detail-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    body.staff-portal .staff-additional-info-panel .staff-additional-info-grid {
        padding: 1rem 1rem 0.25rem;
    }

    body.staff-portal .staff-additional-info-panel .panel-disclosure[open] .panel-disclosure-summary {
        position: static;
    }

    body.staff-portal .staff-additional-info-collapse-wrap {
        justify-content: stretch;
        padding: 0.75rem 1rem 1rem;
    }

    body.staff-portal .staff-additional-info-collapse-wrap .btn {
        width: 100%;
    }

    body.staff-portal .entity-form {
        padding: 1rem;
    }

    body.staff-portal .form-actions {
        flex-direction: column;
    }

    body.staff-portal .form-actions .btn {
        width: 100%;
    }

    body.staff-portal .staff-certification-item-with-verification {
        align-items: stretch;
        flex-direction: column;
    }

    body.staff-portal .staff-certification-verification-controls {
        width: 100%;
    }

    body.staff-portal .event-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    body.staff-portal .image-view-modal {
        padding: 0.75rem;
    }

    body.staff-portal .image-view-modal-dialog {
        max-height: calc(100vh - 1.5rem);
        width: 100%;
    }

    body.staff-portal .image-view-modal-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.staff-portal .image-view-modal-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    body.staff-portal .calendar-legend {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    body.staff-portal .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.staff-portal .page-toolbar .btn {
        width: 100%;
    }

    body.staff-portal .checkbox-grid {
        grid-template-columns: 1fr;
    }

    body.staff-portal .image-view-modal {
        padding: 0;
    }

    body.staff-portal .image-view-modal-dialog {
        border-radius: 0;
        max-height: 100vh;
        min-height: 100vh;
    }

    body.staff-portal .image-view-modal-body img {
        max-height: calc(100vh - 5rem);
    }
}

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

.form-hint-success {
    color: #166534;
}

.facs-profile-panel .panel-header-split h2 {
    font-size: 1.125rem;
}

.facs-profile-save-notice {
    margin: 0;
    white-space: nowrap;
}

.facs-profile-errors {
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
}

.facs-profile-reorder-hint {
    margin: 0;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    color: #64748b;
    border-bottom: 1px solid #eef2f7;
    background: #fbfdff;
}

.facs-profile-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.facs-profile-item-list .facs-profile-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
}

.facs-profile-item-list-readonly .facs-profile-item {
    grid-template-columns: 2rem minmax(0, 1fr);
}

.facs-profile-item-list .facs-profile-item:last-child {
    border-bottom: none;
}

.facs-profile-item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.facs-profile-item-name {
    font-weight: 500;
    min-width: 0;
}

.facs-profile-item-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
}

.facs-profile-move-form {
    display: inline-flex;
}

.facs-profile-move-actions {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
}

.facs-profile-move-actions .btn {
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    border: 0;
    border-radius: 0;
    border-right: 1px solid #cbd5e1;
    line-height: 1.2;
}

.facs-profile-move-actions .btn:last-child {
    border-right: 0;
}

.facs-profile-move-actions .btn:disabled {
    opacity: 0.45;
}

.facs-profile-remove-btn {
    padding: 0.2rem 0.65rem;
}

.facs-profile-add-bar,
.facs-profile-add-form {
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #fbfdff;
}

.facs-profile-add-form.entity-form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-top: 0;
    padding-top: 1rem;
}

.facs-profile-add-form .form-field {
    flex: 1 1 220px;
    margin: 0;
}

.facs-profile-add-form .form-actions {
    margin: 0;
    padding: 0;
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #f8fafc;
    color: #475569;
    font-size: 1rem;
    line-height: 1;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
    background: #eef2ff;
    border-color: #94a3b8;
    color: #1e293b;
    outline: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.facs-profile-item.is-dragging {
    opacity: 0.55;
}

.facs-profile-item.is-drag-over {
    background: #eef2ff;
}

.facs-profile-reorder-form.is-saving {
    opacity: 0.75;
    pointer-events: none;
}

body.facs-profile-is-dragging {
    cursor: grabbing;
    user-select: none;
}

body.facs-profile-is-dragging .drag-handle {
    cursor: grabbing;
}

.ros-table-wrap {
    overflow-x: auto;
}

.ros-table .ros-col-drag {
    width: 2.5rem;
}

.ros-table .ros-col-cue {
    min-width: 4.25rem;
    width: 4.25rem;
}

.ros-table-live .ros-col-drag,
.ros-table-live .ros-col-cue {
    background: #fff;
    position: sticky;
    z-index: 2;
}

.ros-table-live .ros-col-cue {
    left: 0;
}

.ros-table-live .ros-row-part .ros-col-cue {
    background: #eef2ff;
}

.ros-table-live .ros-row-live .ros-col-cue {
    background: #dcfce7 !important;
}

.ros-row-part {
    background: #eef2ff;
}

.ros-row-part td {
    font-weight: 600;
}

.ros-row-live {
    background: #dcfce7 !important;
    box-shadow: inset 4px 0 0 #16a34a;
}

.ros-variance-late {
    color: #b91c1c;
    font-weight: 600;
}

.ros-variance-early {
    color: #15803d;
    font-weight: 600;
}

.ros-live-header .ros-live-current {
    margin-top: 1rem;
}

.ros-live-current-label {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0 0 0.25rem;
}

.ros-live-toolbar {
    margin-top: 1rem;
}

.ros-live-cue-actions,
.ros-live-mode-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.ros-live-cue-actions {
    gap: 0.2rem;
}

.ros-live-header-meta {
    align-items: center;
    display: inline-flex;
    gap: 0.75rem;
}

.ros-director-panel {
    margin-bottom: 0;
}

body:has(.ros-live-page) {
    overflow: hidden;
}

body:has(.ros-live-page) .app-shell {
    height: 100vh;
    overflow: hidden;
}

body:has(.ros-live-page) .main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 0.75rem 1.5rem 1rem;
}

body:has(.ros-live-page) .page-header {
    display: none;
}

body:has(.ros-live-page) .page-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.ros-live-page {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    overflow: hidden;
}

.ros-live-back-link {
    flex-shrink: 0;
    margin: 0;
}

.ros-live-page .form-success,
.ros-live-page .form-errors {
    flex-shrink: 0;
    margin: 0;
}

.ros-live-controls {
    background: #eef2f7;
    flex-shrink: 0;
    z-index: 30;
}

.ros-live-controls .panel {
    margin-bottom: 0.75rem;
}

.ros-live-controls .panel:last-child {
    margin-bottom: 0;
}

.ros-live-rundown {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 0 !important;
    min-height: 0;
    overflow: hidden;
}

.ros-live-rundown.panel {
    display: flex;
    flex-direction: column;
}

.ros-live-rundown .panel-header {
    flex-shrink: 0;
}

.ros-live-rundown .ros-table-wrap {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ros-live-rundown .ros-table-wrap::-webkit-scrollbar {
    display: none;
}

.ros-live-rundown .ros-table-live thead th {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.ros-director-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ros-director-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.ros-director-card-now {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ros-director-label {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ros-director-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0 0 0.35rem;
}

.ros-director-meta,
.ros-director-countdown {
    color: #475569;
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

.ros-director-countdown {
    font-size: 1.125rem;
    font-weight: 600;
}

.ros-director-drift {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.ros-drift-on-time {
    color: #15803d;
}

.ros-drift-late {
    color: #b91c1c;
}

.ros-drift-early {
    color: #15803d;
}

.ros-director-hint {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0.75rem 0 0;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.65rem 1.1rem;
}

.ros-row-nested .ros-part-context {
    color: #64748b;
}

.ros-col-segment-nested {
    padding-left: 1.25rem;
}

.ros-column-view-wrap {
    margin: 1rem 0;
}

.ros-column-view-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.ros-column-view-form label {
    font-weight: 600;
}

.ros-shift-fields {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.ros-shift-fields input[type="number"] {
    max-width: 5rem;
}

.ros-share-rotate-form {
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
    padding-top: 1rem;
}

.ros-share-clear-passcode {
    display: block;
    margin-top: 0.5rem;
}

.ros-share-gate {
    margin: 2rem auto;
    max-width: 28rem;
}

.ros-inline-form {
    display: inline;
}

.ros-row-actions {
    width: 2.75rem;
    min-width: 2.75rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    text-align: center;
    vertical-align: middle;
}

.ros-row-menu {
    position: relative;
    display: inline-block;
}

.ros-row-menu-trigger {
    align-items: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.1rem;
    height: 1.75rem;
    justify-content: center;
    line-height: 1;
    list-style: none;
    user-select: none;
    width: 1.75rem;
}

.ros-row-menu-trigger::-webkit-details-marker {
    display: none;
}

.ros-row-menu[open] .ros-row-menu-trigger,
.ros-row-menu-trigger:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.ros-row-menu-panel {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    min-width: 9.5rem;
    padding: 0.35rem;
    position: fixed;
    z-index: 40;
}

.ros-row-menu-item {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    padding: 0.45rem 0.65rem;
    text-align: left;
    width: 100%;
}

.ros-row-menu-item:hover,
.ros-row-menu-item:focus-visible {
    background: #f3f4f6;
    outline: none;
}

.ros-row-menu-item-danger {
    color: #b91c1c;
}

.ros-row-menu-item-danger:hover,
.ros-row-menu-item-danger:focus-visible {
    background: #fef2f2;
}

.ros-row-menu-form {
    display: block;
    margin: 0;
}

.ros-row-highlight {
    animation: ros-row-highlight 4s ease-out;
}

@keyframes ros-row-highlight {
    0%,
    15% {
        background-color: #fef9c3;
        box-shadow: inset 0 0 0 2px #facc15;
    }

    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

.ros-row-highlight.ros-row-part {
    animation-name: ros-row-highlight-part;
}

@keyframes ros-row-highlight-part {
    0%,
    15% {
        background-color: #e0e7ff;
        box-shadow: inset 0 0 0 2px #6366f1;
    }

    100% {
        background-color: #eef2ff;
        box-shadow: none;
    }
}

.ros-edit-details summary {
    color: #1d4ed8;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.ros-element-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.ros-columns-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

.ros-columns-grid {
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ros-column-config-list {
    display: grid;
    gap: 1rem;
}

.ros-column-row {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.ros-column-row-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ros-column-row-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.ros-column-enable-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.ros-column-enable-options .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.ros-column-row-fields {
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ros-asset-cell {
    min-width: 7rem;
}

.ros-asset-cell-inner {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ros-asset-thumb {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: block;
    height: 56px;
    max-width: 96px;
    object-fit: cover;
    width: auto;
}

.ros-asset-thumb-video {
    background: #0f172a;
}

.ros-asset-empty {
    color: #64748b;
    font-size: 0.8125rem;
}

.ros-asset-size {
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.2;
}

.ros-asset-manage-btn {
    white-space: nowrap;
}

.ros-asset-preview-wrap {
    margin-bottom: 1rem;
}

.ros-asset-preview-media {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: block;
    max-height: 240px;
    max-width: 100%;
}

.ros-form-modal-dialog-compact {
    width: min(520px, 100%);
}

.ros-form-modal-dialog-media {
    width: min(900px, 100%);
}

.ros-asset-thumb-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-block;
    padding: 0;
}

.ros-asset-thumb-btn:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

.ros-asset-view-media {
    margin-bottom: 1rem;
    text-align: center;
}

.ros-asset-view-player {
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    max-height: min(70vh, 640px);
    max-width: 100%;
}

video.ros-asset-view-player {
    background: #0f172a;
    width: min(100%, 820px);
}

.ros-asset-view-actions {
    justify-content: flex-end;
}

.ros-util-grid {
    display: grid;
    gap: 1rem;
}

.btn-compact {
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
}

body.ros-is-dragging .drag-handle {
    cursor: grabbing;
}

.ros-element-row.is-dragging {
    opacity: 0.65;
}

.ros-form-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.ros-form-modal[hidden] {
    display: none !important;
}

.equipment-asset-picker-modal.is-open {
    display: flex !important;
}

.assignment-staff-picker-modal.is-open {
    display: flex !important;
}

body.ros-form-modal-open {
    overflow: hidden;
}

.ros-form-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.ros-form-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: calc(100vh - 3rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ros-form-modal-header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.ros-form-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.ros-form-modal-close {
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.ros-form-modal-body {
    overflow-y: auto;
    padding: 1rem;
}

.ros-form-modal-body .entity-form + .entity-form {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.ros-form-modal-body .form-actions {
    gap: 0.5rem;
}

.ros-modal-cancel-row {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.form-duration-split {
    display: flex;
    gap: 0.75rem;
}

.form-duration-part {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
}

.form-duration-part input[type="text"] {
    border-bottom-right-radius: 0;
    border-right: 0;
    border-top-right-radius: 0;
    flex: 1;
    min-width: 0;
}

.form-duration-unit {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom-right-radius: 8px;
    border-left: 0;
    border-top-right-radius: 8px;
    color: #64748b;
    display: flex;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.65rem;
    white-space: nowrap;
}

/* Staff call sheet (mobile-first HTML view) */
.staff-call-sheet-page {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
}

.staff-call-sheet-sticky-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 0.95rem 1rem 1rem;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 0.35rem);
    z-index: 20;
}

.staff-call-sheet-sticky-top {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.staff-call-sheet-sticky-heading {
    min-width: 0;
}

.staff-call-sheet-status-badge {
    flex-shrink: 0;
    font-size: 0.8125rem;
}

.staff-call-sheet-sticky-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.35rem 0.75rem;
    margin-top: 0.55rem;
}

.staff-call-sheet-quick-actions {
    margin-bottom: 0;
    margin-top: 0.85rem;
}

.staff-call-sheet-section {
    margin-bottom: 0;
}

body.staff-portal .panel.staff-call-sheet-section {
    padding: 1.25rem;
}

.staff-call-sheet-section-title {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
}

.staff-call-sheet-kicker,
.staff-ros-kicker {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 0.25rem;
}

.staff-call-sheet-title,
.staff-ros-event-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0;
}

.staff-call-sheet-details,
.staff-call-sheet-crew-meta,
.staff-ros-mobile-meta {
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.staff-call-sheet-contacts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-call-sheet-contact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.staff-call-sheet-contact-role {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.staff-call-sheet-contact-name {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
}

.staff-call-sheet-contact-company {
    color: #475569;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.staff-call-sheet-detail,
.staff-call-sheet-crew-meta-item,
.staff-ros-mobile-meta-item {
    margin: 0;
}

.staff-call-sheet-detail dt,
.staff-call-sheet-crew-meta-item dt,
.staff-ros-mobile-meta-item dt {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.staff-call-sheet-detail dd,
.staff-call-sheet-crew-meta-item dd,
.staff-ros-mobile-meta-item dd {
    margin: 0;
}

.staff-call-sheet-map-link {
    word-break: break-word;
}

.staff-call-sheet-crew-list,
.staff-ros-mobile-list {
    display: grid;
    gap: 0.85rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-call-sheet-crew-card,
.staff-ros-mobile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.95rem 1rem;
}

.staff-call-sheet-crew-card-header,
.staff-ros-mobile-card-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.staff-call-sheet-crew-name,
.staff-ros-mobile-title {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.staff-call-sheet-crew-comment,
.staff-ros-mobile-description {
    color: #475569;
    margin: 0 0 0.75rem;
}

.staff-call-sheet-detail-wide,
.staff-call-sheet-crew-meta-item-wide,
.staff-ros-mobile-meta-item-wide {
    grid-column: 1 / -1;
}

/* Staff live rundown page */
body.staff-portal.staff-page-ros .staff-portal-page-header,
body.staff-portal.staff-page-call-sheet .staff-portal-page-header,
body.staff-portal.staff-page-assignment .staff-portal-page-header {
    display: none;
}

body.staff-portal.staff-page-ros .staff-portal-main,
body.staff-portal.staff-page-call-sheet .staff-portal-main,
body.staff-portal.staff-page-assignment .staff-portal-main {
    padding-top: 0.35rem;
}

.staff-ros-page {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
}

.staff-ros-sticky-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 0.95rem 1rem 1rem;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 0.35rem);
    z-index: 20;
}

.staff-ros-sticky-top {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.staff-ros-sticky-heading {
    min-width: 0;
}

.staff-ros-live-badge {
    flex-shrink: 0;
    font-size: 0.8125rem;
}

.staff-ros-sticky-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.35rem 0.75rem;
    margin-top: 0.55rem;
}

.staff-ros-on-air {
    background: #f8fafc;
    border-radius: 10px;
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
}

.staff-ros-on-air-title {
    font-size: 1.25rem;
    line-height: 1.25;
    margin: 0.15rem 0 0;
}

.staff-ros-on-air-empty {
    color: #475569;
    font-size: 1rem;
    margin: 0;
}

.staff-ros-countdown {
    color: #0f766e;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.35rem 0 0;
}

.staff-ros-quick-actions {
    margin-top: 0.85rem;
}

.staff-ros-view-wrap {
    margin-top: 0.75rem;
}

.staff-ros-rundown-panel {
    margin-bottom: 0;
}

.staff-ros-mobile-part {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0.35rem 0 0;
    text-transform: uppercase;
}

.staff-ros-mobile-seq {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 700;
}

.staff-ros-mobile-type {
    color: #64748b;
    font-size: 0.8125rem;
    margin-left: auto;
}

.staff-ros-mobile-live-badge {
    background: #dcfce7;
    border-radius: 999px;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
}

.staff-ros-mobile-card-live {
    background: #f0fdf4 !important;
    border-color: #86efac;
    box-shadow: inset 4px 0 0 #16a34a;
}

.staff-ros-mobile-rundown {
    display: none;
}

.staff-ros-desktop-rundown {
    display: block;
}

@media (max-width: 900px) {
    body.staff-portal.staff-page-ros .staff-portal-main,
    body.staff-portal.staff-page-call-sheet .staff-portal-main,
    body.staff-portal.staff-page-assignment .staff-portal-main {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    body.staff-portal.staff-page-ros .staff-mobile-header {
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .staff-ros-sticky-bar,
    .staff-call-sheet-sticky-bar {
        top: calc(env(safe-area-inset-top, 0px) + 0.25rem);
    }

    .staff-call-sheet-details {
        grid-template-columns: 1fr;
    }

    .staff-ros-mobile-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-ros-mobile-rundown {
        display: block;
    }

    .staff-ros-desktop-rundown {
        display: none;
    }

    .staff-call-sheet-quick-actions .btn,
    .staff-ros-quick-actions .btn {
        flex: 1 1 calc(50% - 0.35rem);
        min-height: 44px;
        text-align: center;
    }

    .staff-call-sheet-quick-actions,
    .staff-ros-quick-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .staff-call-sheet-crew-meta {
        grid-template-columns: 1fr;
    }

    .staff-ros-mobile-meta {
        grid-template-columns: 1fr;
    }

    .staff-ros-sticky-top {
        align-items: center;
    }

    .staff-ros-event-title,
    .staff-call-sheet-title {
        font-size: 1.15rem;
    }
}

.assignment-workflow-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.awf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    flex-shrink: 0;
    border: 1px solid transparent;
    position: relative;
}

.awf-icon--has-tooltip {
    cursor: help;
}

.awf-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.45rem);
    transform: translateX(-50%) translateY(-0.15rem);
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.awf-tooltip--multiline {
    max-width: 18rem;
    white-space: normal;
    text-align: left;
}

.staff-assignment-reject-modal-dialog {
    width: min(560px, 100%);
}

.staff-assignment-reject-form .form-actions {
    margin-top: 0;
    border-top: 1px solid #e2e8f0;
}

body.staff-assignment-reject-modal-open {
    overflow: hidden;
}

.staff-rejections-table td:last-child {
    min-width: 14rem;
    white-space: normal;
}

.awf-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #0f172a;
}

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

.awf-icon--has-tooltip:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

.awf-icon-svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.awf-icon--done {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.awf-icon--neutral {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.awf-icon--pending {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

.awf-icon--warning {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

.awf-icon--negative {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.assignment-workflow-fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin: 0;
    padding: 0.85rem 1rem 0.75rem;
}

.assignment-workflow-fieldset legend {
    font-weight: 600;
    padding: 0 0.35rem;
}

.assignment-workflow-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.assignment-workflow-list-item {
    display: grid;
    grid-template-columns: 1.85rem 9.75rem minmax(0, 1fr);
    gap: 0.65rem 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.assignment-workflow-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.assignment-workflow-list-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.92rem;
}

.assignment-workflow-status-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.assignment-workflow-list-action {
    display: flex;
    align-items: center;
    flex: 0 0 11.25rem;
    min-width: 11.25rem;
}

.assignment-workflow-invoice-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.assignment-workflow-invoice-preview {
    line-height: 0;
}

.assignment-workflow-invoice-view {
    display: inline-block;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
}

.assignment-workflow-invoice-view-pdf {
    line-height: normal;
}

.assignment-workflow-invoice-pdf-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.assignment-workflow-invoice-view:hover .assignment-workflow-invoice-pdf-label {
    color: #1d4ed8;
}

.assignment-workflow-invoice-view:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
    border-radius: 6px;
}

.assignment-workflow-invoice-thumb-link {
    display: inline-block;
    line-height: 0;
}

.assignment-workflow-invoice-thumb {
    display: block;
    width: 7.5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    pointer-events: none;
}

.assignment-workflow-invoice-file-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.assignment-workflow-invoice-file-link:hover {
    text-decoration: underline;
}

.assignment-workflow-list-note {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1rem;
    border-left: 1px solid #e2e8f0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #64748b;
}

.assignment-workflow-control {
    margin: 0;
    font-weight: 500;
    color: #475569;
    font-size: 0.88rem;
}

.assignment-workflow-status {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.assignment-workflow-footnote {
    margin: 0.65rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
}

.assignment-workflow-col {
    width: 12rem;
    overflow: visible;
}

.assignment-workflow-status--done {
    color: #166534;
}

.assignment-workflow-status--neutral {
    color: #64748b;
}

.assignment-workflow-status--pending {
    color: #b45309;
}

.assignment-workflow-status--warning {
    color: #c2410c;
}

.assignment-workflow-status--negative {
    color: #b91c1c;
}

@media (max-width: 720px) {
    .assignment-workflow-list-item {
        grid-template-columns: 1.85rem minmax(0, 1fr);
        align-items: start;
    }

    .assignment-workflow-list-label {
        grid-column: 2;
    }

    .assignment-workflow-status-row {
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        padding-left: 2.85rem;
    }

    .assignment-workflow-list-action {
        flex: none;
        min-width: 0;
    }

    .assignment-workflow-list-note {
        padding-left: 0;
        border-left: none;
    }
}

.staff-assignment-invoice-panel {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.staff-assignment-invoice-panel-heading {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.staff-assignment-invoice-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.staff-assignment-invoice-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
}

.staff-assignment-invoice-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #475569;
}

.staff-assignment-invoice-label input[type="text"] {
    min-width: 7rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
}

.staff-assignment-invoice-status {
    margin: 0;
    font-size: 0.85rem;
    color: #334155;
}

.staff-assignment-invoice-locked {
    margin: 0;
}

.staff-assignment-payment-status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.staff-events-mobile-details .staff-assignment-payment-status {
    gap: 0.5rem;
}

.staff-events-mobile-details .staff-assignment-payment-status-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 1rem;
    align-items: center;
}

.staff-events-mobile-details .staff-assignment-payment-status-label {
    font-weight: 600;
    color: #475569;
    font-size: inherit;
    min-width: 0;
}

.staff-assignment-payment-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-assignment-payment-status-label {
    font-size: 0.82rem;
    color: #64748b;
    min-width: 7rem;
}

.staff-events-table th:nth-child(8),
.staff-events-table th:nth-child(9) {
    white-space: nowrap;
}

.staff-invoices-table th:nth-child(6),
.staff-invoices-table th:nth-child(7),
.staff-invoices-table th:nth-child(8) {
    white-space: nowrap;
}

.staff-events-mobile-card .staff-assignment-invoice-panel,
.staff-events-mobile-card .staff-assignment-tender-actions {
    margin-top: 0.5rem;
}

.assignment-workflow-list-item--response .assignment-workflow-list-action {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
}

.assignment-workflow-response-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.assignment-workflow-response-option {
    display: inline-block;
    position: relative;
}

.assignment-workflow-response-option input {
    cursor: pointer;
    height: 100%;
    inset: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.assignment-workflow-response-option span {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: flex;
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.25rem;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0 0.75rem;
    user-select: none;
}

.assignment-workflow-response-option:hover span {
    border-color: #94a3b8;
}

.assignment-workflow-response-option input:focus-visible + span {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.assignment-workflow-response-option input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.assignment-workflow-ratings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.assignment-workflow-rating-field {
    margin: 0;
    min-width: 0;
    padding: 0;
}

.assignment-workflow-rating-label {
    color: #475569;
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
}

.assignment-workflow-rating-field-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.assignment-workflow-rating-field-header .assignment-workflow-rating-label {
    margin-bottom: 0;
}

.assignment-workflow-rating-clear {
    align-items: center;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.35rem;
    user-select: none;
    white-space: nowrap;
}

.assignment-workflow-rating-clear input {
    margin: 0;
}

.assignment-workflow-rating-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.assignment-workflow-rating-option {
    display: inline-block;
    position: relative;
}

.assignment-workflow-rating-option input {
    cursor: pointer;
    height: 100%;
    inset: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.assignment-workflow-rating-option span {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: flex;
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.25rem;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0 0.35rem;
    user-select: none;
}

.assignment-workflow-rating-option:hover span {
    border-color: #94a3b8;
}

.assignment-workflow-rating-option input:focus-visible + span {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.assignment-workflow-rating-option input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.assignment-workflow-rating-field.is-invalid .assignment-workflow-rating-option span {
    border-color: #fca5a5;
}

.assignment-workflow-rating-field.is-invalid .assignment-workflow-rating-option input:checked + span {
    background: #dc2626;
    border-color: #dc2626;
}

.assignment-workflow-list-item--assessment .assignment-workflow-list-action {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

@media (max-width: 720px) {
    .assignment-workflow-rating-scale {
        gap: 0.3rem;
    }

    .assignment-workflow-rating-option span {
        font-size: 0.8125rem;
        height: 2rem;
        min-width: 2rem;
    }
}

.staff-ratings-panel {
    overflow: hidden;
}

.staff-ratings-role-filter {
    align-items: flex-end;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
}

.staff-ratings-role-filter .form-field {
    margin: 0;
    min-width: min(100%, 16rem);
}

.staff-ratings-panel > .staff-ratings-overview {
    margin-bottom: 0;
    padding: 1.25rem 1.25rem 2rem;
}

.staff-ratings-panel > .staff-rating-charts {
    padding: 1.5rem 1.25rem 1.25rem;
}

.staff-ratings-panel > .empty-state {
    padding: 1.25rem;
}

.staff-ratings-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

.staff-rating-dimension-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 1.1rem 1.15rem;
}

.staff-rating-dimension-card h3 {
    margin: 0 0 0.9rem;
    color: #0f172a;
    font-size: 1rem;
}

.staff-rating-average-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.staff-rating-average-row {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
}

.staff-rating-average-label {
    color: #64748b;
    flex: 0 0 6.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.staff-rating-stars {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    min-width: 0;
}

.staff-rating-stars-row {
    align-items: center;
    display: inline-flex;
    gap: 0.15rem;
    line-height: 1;
}

.staff-rating-star-icon {
    display: block;
    flex-shrink: 0;
    height: 1.125rem;
    width: 1.125rem;
}

.staff-rating-stars-value {
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.staff-rating-stars--empty {
    color: #94a3b8;
    font-size: 0.875rem;
}

.staff-rating-charts {
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 1rem;
    padding-top: 1.5rem;
}

.staff-rating-charts-title {
    color: #0f172a;
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.staff-rating-chart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 1rem 1rem 0.75rem;
}

.staff-rating-chart-header {
    margin-bottom: 0.75rem;
}

.staff-rating-chart-header h3 {
    color: #0f172a;
    font-size: 0.95rem;
    margin: 0;
}

.staff-rating-chart-subtitle {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0.2rem 0 0;
}

.staff-rating-chart-wrap {
    height: 260px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

.staff-rating-chart-svg {
    display: block;
    height: 260px;
    max-width: none;
}

.staff-rating-chart-marker {
    cursor: default;
}

.staff-event-action-buttons .staff-assignment-invoice-panel {
    min-width: 14rem;
}

.settings-mail-panel .mail-auth-field[hidden] {
    display: none;
}

.settings-section-toolbar {
    margin-bottom: 1rem;
}

.settings-section-form .form-field {
    margin-bottom: 0;
    min-width: min(100%, 22rem);
}

.settings-sms-panel .form-actions,
.settings-mail-panel .form-actions,
.settings-site-panel .form-actions {
    margin-top: 1rem;
}

.settings-site-panel + .settings-site-panel {
    margin-top: 1.25rem;
}

.settings-site-panel-body {
    padding: 1.25rem;
}

.settings-site-form-grid {
    max-width: 40rem;
}

.settings-site-form-actions {
    margin: 1.25rem 0 0;
    padding-left: 1.25rem;
}

.settings-site-invite-message {
    font-family: inherit;
    line-height: 1.45;
    max-width: 48rem;
    min-height: 14rem;
    resize: vertical;
    width: 100%;
}

.settings-site-form .form-field .form-hint {
    margin-top: 0.5rem;
}

.settings-site-form #site_public_hostname {
    max-width: 28rem;
}

.staff-list-portal-pills {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.staff-list-portal-pill {
    align-items: center;
    border-radius: 999px;
    cursor: help;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 800;
    height: 1.125rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.125rem;
    padding: 0 0.25rem;
    position: relative;
}

.staff-list-portal-pill-label {
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.staff-list-portal-pill-tooltip {
    background: #0f172a;
    border-radius: 6px;
    bottom: calc(100% + 0.45rem);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 500;
    left: 50%;
    line-height: 1.35;
    max-width: 16rem;
    opacity: 0;
    padding: 0.35rem 0.55rem;
    pointer-events: none;
    position: absolute;
    text-align: center;
    transform: translateX(-50%) translateY(0.15rem);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    visibility: hidden;
    white-space: normal;
    width: max-content;
    z-index: 30;
}

.staff-list-portal-pill-tooltip::after {
    border: 5px solid transparent;
    border-top-color: #0f172a;
    content: "";
    left: 50%;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
}

.staff-list-portal-pill:hover .staff-list-portal-pill-tooltip,
.staff-list-portal-pill:focus-visible .staff-list-portal-pill-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.staff-list-portal-pill:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

.staff-list-portal-pill--portal {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.staff-list-portal-pill--invite {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.panel-staff-list .data-table td:first-child {
    overflow: visible;
}

.staff-portal-invite-action {
    margin-top: 0;
}

.staff-portal-invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.staff-portal-access-panel .staff-portal-access-body {
    padding: 0 1.25rem 1.25rem;
}

.staff-portal-access-panel .form-hint {
    margin-top: 0.75rem;
}

.staff-portal-access-status {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.staff-portal-access-status-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-portal-access-status-value {
    color: #111827;
    font-weight: 600;
    margin: 0;
}

.settings-sms-panel .sms-sender-phone-field[hidden],
.settings-sms-panel .sms-sender-service-field[hidden] {
    display: none;
}

.settings-messaging-panel .form-actions {
    margin-top: 1rem;
}

.settings-section-grid {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.settings-messaging-panel {
    flex: 0 1 22rem;
    max-width: 22rem;
}

.settings-general-panel .form-actions {
    margin-top: 1rem;
}

.general-settings-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.general-settings-field {
    flex: 0 0 auto;
    margin: 0;
}

.general-settings-field select {
    max-width: 6ch;
    min-width: 6ch;
    width: 6ch;
}

.general-settings-hint {
    flex: 1 1 16rem;
    margin: 0;
}

.settings-import-panel .import-type-grid {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-import-body {
    padding: 0 1.25rem 1.25rem;
}

.settings-import-form.entity-form {
    padding: 0;
}

.settings-import-panel .form-actions {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.settings-import-form:not(.settings-import-commit-form) .form-actions {
    border-top: 1px solid #eef2f7;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.settings-import-commit-form .form-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.import-step + .import-step {
    border-top: 1px solid #eef2f7;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.import-step-title {
    color: #334155;
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.import-type-row {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 22rem;
}

.import-type-field {
    margin: 0;
    width: 100%;
}

.settings-import-panel .import-template-action {
    margin: 0;
}

.import-order-notes {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.45;
    list-style: disc;
    margin: 0.75rem 0 0 1.1rem;
    padding: 0;
}

.import-errors {
    margin-bottom: 1rem;
}

.import-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.import-preview-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.import-preview-type {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.import-type-badge {
    background: #eef2ff;
    border-radius: 999px;
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
}

.import-preview-mode {
    color: #64748b;
    font-size: 0.88rem;
}

.import-stat-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.import-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    text-align: center;
}

.import-stat-value {
    color: #0f172a;
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.import-stat-label {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

.import-stat-insert .import-stat-value {
    color: #15803d;
}

.import-stat-update .import-stat-value {
    color: #1d4ed8;
}

.import-stat-skip .import-stat-value {
    color: #64748b;
}

.import-stat-error .import-stat-value {
    color: #dc2626;
}

.import-preview-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-height: 24rem;
    overflow: auto;
}

.import-preview-table {
    margin: 0;
}

.import-preview-table th,
.import-preview-table td {
    vertical-align: top;
}

.import-col-row {
    width: 4rem;
    white-space: nowrap;
}

.import-col-action {
    width: 6.5rem;
    white-space: nowrap;
}

.import-col-details {
    color: #64748b;
    max-width: 24rem;
    overflow-wrap: anywhere;
}

.import-action-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    text-transform: uppercase;
}

.import-action-badge-insert {
    background: #dcfce7;
    color: #166534;
}

.import-action-badge-update {
    background: #dbeafe;
    color: #1e40af;
}

.import-action-badge-skip {
    background: #f1f5f9;
    color: #475569;
}

.import-action-badge-error {
    background: #fee2e2;
    color: #b91c1c;
}

.import-commit-hint {
    margin: 0;
    width: 100%;
}

.import-result-summary {
    margin-bottom: 1rem;
}

@media (max-width: 720px) {
    .import-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.settings-import-panel .form-field input[type="file"] {
    max-width: 100%;
}

.venue-services-section + .venue-services-section {
    margin-top: 1.25rem;
}

.venue-services-section h3 {
    font-size: 1.05rem;
    margin: 0;
}

.venue-services-table .table-actions-col {
    white-space: nowrap;
    width: 1%;
}

.venue-services-table .inline-form {
    display: inline;
    margin-left: 0.35rem;
}

.venue-network-service-row-yellow td {
    background: #fef3c7 !important;
}

.venue-network-service-row-green td {
    background: #dcfce7 !important;
}

.venue-network-service-row-red td {
    background: #fecaca !important;
}

.venue-services-table tr.venue-network-service-row-yellow td:first-child,
.venue-services-table tr.venue-network-service-row-green td:first-child,
.venue-services-table tr.venue-network-service-row-red td:first-child {
    box-shadow: inset 4px 0 0 0 currentColor;
}

.venue-services-table tr.venue-network-service-row-yellow td:first-child {
    color: #d97706;
}

.venue-services-table tr.venue-network-service-row-green td:first-child {
    color: #16a34a;
}

.venue-services-table tr.venue-network-service-row-red td:first-child {
    color: #dc2626;
}

.venue-services-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 1.25rem 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.venue-services-status-key {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
}

.venue-services-status-key.venue-network-service-row-yellow {
    background: #fef3c7;
    color: #92400e;
}

.venue-services-status-key.venue-network-service-row-green {
    background: #dcfce7;
    color: #166534;
}

.venue-services-status-key.venue-network-service-row-red {
    background: #fecaca;
    color: #991b1b;
}

.reports-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.reports-hub-stacked {
    display: flex;
    flex-direction: column;
}

.reports-hub-stacked .report-card {
    width: 100%;
}

.documentation-hub {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.documentation-hub .report-card {
    width: 100%;
}

.documentation-pdf-panel {
    overflow: hidden;
}

.documentation-pdf-panel-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.documentation-pdf-panel-header h2 {
    margin: 0;
}

.documentation-pdf-frame {
    border: 0;
    display: block;
    height: calc(100vh - 12rem);
    min-height: 32rem;
    width: 100%;
}

.documentation-schema-panel {
    overflow: hidden;
}

.documentation-schema-panel-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.documentation-schema-panel-header h2 {
    margin: 0;
}

.documentation-schema-panel-header .panel-subtitle {
    margin-top: 0.35rem;
}

.documentation-schema-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.documentation-schema-viewer {
    background: #f8fafc;
    border-top: 1px solid var(--pmt-border-soft);
    overflow: auto;
    padding: 1rem 1.25rem 1.25rem;
}

.documentation-schema-image {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: none;
    width: auto;
}

.documentation-schema-viewer-compact {
    text-align: center;
}

.documentation-schema-viewer-compact .documentation-schema-image {
    max-width: 100%;
    width: min(100%, 72rem);
}

.documentation-schema-viewer-overview {
    max-height: calc(100vh - 14rem);
    text-align: center;
}

.documentation-schema-viewer-overview .documentation-schema-image {
    height: auto;
    max-width: 100%;
    width: auto;
}

.documentation-schema-viewer-hint {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0 0 0.85rem;
}

.report-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-card-icon {
    align-items: center;
    background: var(--pmt-accent-soft);
    border-radius: 12px;
    color: var(--pmt-accent-strong);
    display: inline-flex;
    flex-shrink: 0;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.hub-card-icon svg {
    display: block;
    height: 1.35rem;
    width: 1.35rem;
}

.hub-card-body {
    min-width: 0;
}

.report-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.report-card:hover .hub-card-icon {
    background: #fed7aa;
    color: var(--pmt-accent-strong);
}

.report-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.report-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
}

.config-hub {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.config-hub-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.config-hub-row-single {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-logo-guidance {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
}

.client-logo-guidance h3 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
}

.client-logo-guidance-list {
    color: #475569;
    line-height: 1.5;
    margin: 0;
    padding-left: 1.15rem;
}

.client-logo-guidance-list li + li {
    margin-top: 0.35rem;
}

.client-logo-preview {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.client-logo-preview img {
    display: block;
    max-height: 5rem;
    max-width: min(100%, 20rem);
    object-fit: contain;
}

.client-logo-remove {
    display: inline-block;
    margin-top: 0.75rem;
}

@media (max-width: 720px) {
    .config-hub-row,
    .config-hub-row-single {
        grid-template-columns: 1fr;
    }
}

.venue-services-status-legend-report {
    margin-top: 1.25rem;
}

.network-services-report-filter-form {
    width: 100%;
}

.events-filter-form {
    flex: 1 1 48rem;
}

.venue-service-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem 1.25rem;
}

.venue-service-form .form-field label {
    margin-bottom: 0.4rem;
}

.venue-service-form .form-field textarea {
    min-height: auto;
    resize: vertical;
}

.venue-service-form .form-field-group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.venue-service-form .form-radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.venue-service-form .form-radio-options .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 400;
}

.venue-services-panel .panel-subtitle {
    margin-top: 0.35rem;
}

.venue-services-panel .detail-grid {
    padding: 1.25rem;
}


.messaging-settings-group h3 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.messaging-settings-table {
    width: auto;
}

.messaging-settings-table th,
.messaging-settings-table td {
    vertical-align: middle;
}

.messaging-settings-channel {
    width: 1%;
    white-space: nowrap;
}

.messaging-settings-checkbox {
    display: inline-flex;
    margin: 0;
}

.event-contact-notifications {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.event-contact-notifications-hint {
    margin: 0 0 1rem;
    max-width: 42rem;
}

.event-contact-notifications-table-wrap {
    overflow-x: auto;
}

.event-contact-notifications-table {
    width: 100%;
    max-width: 40rem;
}

.event-contact-notifications-table th,
.event-contact-notifications-table td {
    vertical-align: middle;
}

.event-contact-notifications-table tbody th[scope='row'] {
    font-weight: 500;
    white-space: nowrap;
}

.event-contact-notifications-role-col {
    text-align: center;
    width: 7rem;
}

.event-contact-notifications-checkbox {
    display: inline-flex;
    justify-content: center;
    margin: 0;
}

.upload-progress-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1.5rem;
    position: fixed;
    z-index: 10000;
}

.upload-progress-overlay[hidden] {
    display: none;
}

body.upload-progress-active {
    overflow: hidden;
}

.upload-progress-panel {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    max-width: 22rem;
    padding: 1.5rem 1.75rem 1.35rem;
    text-align: center;
    width: 100%;
}

.upload-progress-circle {
    height: 6.5rem;
    margin: 0 auto 0.85rem;
    position: relative;
    width: 6.5rem;
}

.upload-progress-ring {
    display: block;
    height: 100%;
    transform: rotate(-90deg);
    width: 100%;
}

.upload-progress-ring-bg,
.upload-progress-ring-fill {
    fill: none;
    stroke-width: 3;
}

.upload-progress-ring-bg {
    stroke: #e2e8f0;
}

.upload-progress-ring-fill {
    stroke: #2563eb;
    stroke-dasharray: 100, 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.15s ease;
}

.upload-progress-ring-fill.is-indeterminate {
    animation: upload-progress-spin 1.1s linear infinite;
    stroke-dasharray: 25, 100;
    stroke-dashoffset: 0;
}

.upload-progress-ring-fill.is-error {
    stroke: #dc2626;
}

.upload-progress-percent {
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 700;
    inset: 0;
    line-height: 6.5rem;
    position: absolute;
}

.upload-progress-label {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.85rem;
}

.upload-progress-bar {
    background: #e2e8f0;
    border-radius: 999px;
    height: 0.45rem;
    margin: 0 auto;
    max-width: 16rem;
    overflow: hidden;
    width: 100%;
}

.upload-progress-bar-fill {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: inherit;
    height: 100%;
    transition: width 0.15s ease;
    width: 0;
}

.upload-progress-bar-fill.is-indeterminate {
    animation: upload-progress-slide 1.2s ease-in-out infinite;
    width: 35%;
}

.upload-progress-bar-fill.is-error {
    animation: none;
    background: #dc2626;
}

.upload-progress-size {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0.65rem 0 0;
}

@keyframes upload-progress-spin {
    to {
        transform: rotate(270deg);
    }
}

@keyframes upload-progress-slide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
}

.radio-group .radio-label {
    align-items: center;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 400;
    gap: 0.4rem;
}

.form-field-label {
    color: #374151;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-readonly-value {
    color: #0f172a;
    margin: 0;
}

.data-table-compact th,
.data-table-compact td {
    padding: 0.45rem 0.65rem;
}

.entity-form-secondary {
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* PMT visual refresh — bold event-industry polish */

.hub-stack,
.documentation-hub,
.reports-hub-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.25rem;
}

.hub-stack .report-card,
.documentation-hub .report-card,
.reports-hub-stacked .report-card {
    width: 100%;
}

.report-card {
    border-radius: var(--pmt-radius);
    box-shadow: var(--pmt-shadow-sm);
}

.report-card:hover {
    border-color: #fdba74;
    box-shadow: var(--pmt-shadow-md);
    transform: translateY(-1px);
}

.stat-card-link {
    color: inherit;
    text-decoration: none;
}

.list-page-intro {
    margin-bottom: 1rem;
}

.list-page-intro-lead {
    color: var(--pmt-text-muted);
    font-size: 0.98rem;
    font-weight: 500;
    margin: 0;
}

.list-page-intro-lead strong {
    color: var(--pmt-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.list-page-intro-separator {
    margin: 0 0.35rem;
}

.list-page-intro-accent {
    color: var(--pmt-accent-strong);
    font-weight: 700;
}

.event-name-link {
    color: var(--pmt-text);
    font-weight: 700;
    text-decoration: none;
}

.event-name-link:hover {
    color: var(--pmt-accent-strong);
}

.event-date-stack {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.event-date-day {
    align-items: center;
    background: var(--pmt-accent-soft);
    border-radius: 10px;
    color: var(--pmt-accent-strong);
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    height: 2.5rem;
    justify-content: center;
    min-width: 2.5rem;
}

.event-date-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.event-date-month {
    color: var(--pmt-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.event-date-time {
    color: var(--pmt-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.event-tcv-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.event-assignment-status-col {
    width: 6.75rem;
}

.event-assignment-status-cell {
    overflow: visible;
    padding-inline: 0.35rem;
    text-align: center;
    vertical-align: middle;
}

.event-assignment-status-donuts {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
}

.event-staff-requirements-chart--list {
    gap: 0;
}

.event-assignment-status-wrap {
    cursor: help;
    display: inline-flex;
    position: relative;
    vertical-align: middle;
}

.event-assignment-status-donut {
    display: block;
    pointer-events: none;
}

.event-assignment-status-donut-center {
    fill: var(--pmt-surface);
}

.event-assignment-status-donut-total {
    fill: var(--pmt-text);
    font-family: var(--pmt-font-sans, Helvetica, Arial, sans-serif);
    font-weight: 800;
    pointer-events: none;
}

.event-assignment-status-donut-total--hero {
    font-weight: 900;
    letter-spacing: -0.03em;
}

.event-assignment-status-donut-total--list {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.event-assignment-status-tooltip {
    background: #0f172a;
    border-radius: 6px;
    bottom: calc(100% + 0.45rem);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 500;
    left: 50%;
    line-height: 1.35;
    opacity: 0;
    padding: 0.35rem 0.55rem;
    pointer-events: none;
    position: absolute;
    text-align: left;
    transform: translateX(-50%) translateY(0.15rem);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    visibility: hidden;
    white-space: nowrap;
    z-index: 30;
}

.event-assignment-status-tooltip::after {
    border: 5px solid transparent;
    border-top-color: #0f172a;
    content: "";
    left: 50%;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
}

.event-assignment-status-wrap:hover .event-assignment-status-tooltip,
.event-assignment-status-wrap:focus-visible .event-assignment-status-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.event-assignment-status-wrap:focus-visible {
    border-radius: 999px;
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

.event-assignment-status-wrap--hero {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--pmt-border);
    border-radius: 999px;
    box-shadow: var(--pmt-shadow-sm);
    padding: 0.2rem;
}

.event-assignment-status-tooltip--below {
    bottom: auto;
    top: calc(100% + 0.45rem);
    transform: translateX(-50%) translateY(-0.15rem);
}

.event-assignment-status-tooltip--below::after {
    border-bottom-color: #0f172a;
    border-top-color: transparent;
    bottom: 100%;
    top: auto;
}

.event-assignment-status-wrap--hero:hover .event-assignment-status-tooltip--below,
.event-assignment-status-wrap--hero:focus-visible .event-assignment-status-tooltip--below {
    transform: translateX(-50%) translateY(0);
}

.event-assignment-status-empty--hero {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--pmt-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.1rem;
    height: 6.25rem;
    justify-content: center;
    width: 6.25rem;
}

.event-assignment-status-donut-placeholder {
    display: inline-flex;
    flex: 0 0 auto;
    vertical-align: middle;
}

.event-assignment-status-empty {
    color: var(--pmt-text-muted);
    display: inline-block;
    text-align: center;
    width: 100%;
}

.status-pill {
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.event-category-badge {
    font-weight: 700;
    letter-spacing: 0.02em;
}

a {
    color: var(--pmt-accent-strong);
}

.data-table a:not(.event-name-link):not(.sort-link) {
    color: var(--pmt-accent-strong);
    font-weight: 600;
}

.nav-section-link.is-active {
    box-shadow: inset 3px 0 0 var(--pmt-accent);
}

body.staff-portal {
    background: var(--pmt-bg);
    font-family: var(--pmt-font);
}

body.staff-portal .btn-primary {
    background: linear-gradient(180deg, var(--pmt-accent) 0%, var(--pmt-accent-strong) 100%);
}

body.staff-portal .panel {
    border-radius: var(--pmt-radius-lg);
    box-shadow: var(--pmt-shadow-sm);
}

.equipment-hub .stat-card {
    align-items: center;
}

.panel > .event-equipment-workflow-legend {
    margin: 0;
    padding: 1.25rem 1.25rem 0;
}

.event-equipment-status-pill {
    white-space: nowrap;
}

.event-equipment-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.event-equipment-quick-action {
    margin: 0;
}

.event-equipment-bulk-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0 1.25rem;
}

.equipment-operations-filter-tabs {
    margin-bottom: 1rem;
}

.equipment-operations-days-form {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.equipment-operations-days-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.equipment-operations-days-form input[type="number"] {
    max-width: 5rem;
}

.equipment-operations-table td .event-equipment-status-pill {
    vertical-align: middle;
}

.equipment-asset-picker-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.equipment-asset-picker-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 2.5rem;
    padding: 0.65rem 0.75rem;
}

.equipment-asset-picker-summary.is-empty {
    color: #64748b;
}

.equipment-asset-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.equipment-asset-picker-dialog {
    max-width: 36rem;
    width: calc(100% - 2rem);
}

.equipment-asset-picker-search {
    margin-bottom: 0.35rem;
    width: 100%;
}

.equipment-asset-picker-hint {
    margin-top: 0;
}

.equipment-asset-picker-status {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0.35rem 0 0.75rem;
}

.equipment-asset-picker-results {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    max-height: 22rem;
    overflow-y: auto;
    padding: 0;
}

.equipment-asset-picker-result {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem;
    text-align: left;
    width: 100%;
}

.equipment-asset-picker-result:hover,
.equipment-asset-picker-result:focus-visible {
    background: #f8fafc;
    border-color: #94a3b8;
    outline: none;
}

.equipment-asset-picker-result-name {
    color: #0f172a;
    font-weight: 600;
}

.equipment-asset-picker-result-meta {
    color: #64748b;
    font-size: 0.85rem;
}

.assignment-staff-picker-city-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
    width: 100%;
}

.assignment-staff-picker-city-pill {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #3730a3;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.2rem 0.55rem;
}

.staff-work-cities-groups {
    align-items: start;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
}

.staff-work-cities-group {
    display: contents;
}

.staff-work-cities-province {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.5;
    padding-top: 0.15rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.staff-work-cities-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.staff-work-city-pill {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #3730a3;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.25rem 0.65rem;
}

.staff-certifications-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
}

.staff-certification-pill-item {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    max-width: 100%;
}

.staff-certification-pill {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #3730a3;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.25rem 0.65rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.staff-certification-pill:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #312e81;
}

a.staff-certification-pill:focus-visible {
    outline: 2px solid var(--pmt-accent);
    outline-offset: 2px;
}

.staff-certification-pill-static {
    cursor: default;
}

.staff-certification-pill-verification {
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #4338ca;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.staff-certification-pill-verification:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #312e81;
}

@media (max-width: 640px) {
    .staff-work-cities-groups {
        grid-template-columns: 1fr;
        row-gap: 0.35rem;
    }

    .staff-work-cities-province {
        padding-top: 0;
    }

    .staff-work-cities-pills {
        margin-bottom: 0.4rem;
    }

    .staff-certifications-pills {
        gap: 0.65rem;
    }

    .staff-certification-pill-item {
        align-items: stretch;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
    }

    .staff-certification-pill,
    .staff-certification-pill-static {
        text-align: center;
        width: 100%;
    }

    .staff-certification-pill-verification {
        width: 100%;
    }

    .staff-additional-info-panel .staff-additional-info-grid {
        padding-top: 0.65rem;
    }
}

.equipment-asset-picker-empty {
    color: #64748b;
    font-style: italic;
    margin: 0.75rem 0 0;
}

/* Empty states with actions */
.empty-state-actionable {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.empty-state-title {
    color: var(--pmt-text);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.empty-state-message {
    color: var(--pmt-text-muted);
    margin: 0;
    max-width: 28rem;
}

.empty-state-actions {
    margin-top: 0.75rem;
}

/* Event detail hero + command center */
.event-hero {
    align-items: center;
    background: linear-gradient(135deg, var(--pmt-surface) 0%, var(--pmt-accent-soft) 100%);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-lg);
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
}

.event-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

.event-hero-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.event-hero-crew-status {
    align-items: center;
    align-self: center;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.45rem;
    justify-content: center;
}

.event-hero-status-group {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 1.25rem;
}

.event-staff-requirements-chart--hero {
    gap: 0;
}

.event-hero-crew-status-label {
    color: var(--pmt-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
}

.event-hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.event-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
}

.event-meta-item {
    align-items: baseline;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 0.92rem;
    font-weight: 600;
    gap: 0.35rem;
}

.event-meta-item a {
    color: var(--pmt-accent-strong);
    font-weight: 600;
    text-decoration: none;
}

.event-meta-item a:hover {
    text-decoration: underline;
}

.event-meta-label {
    color: var(--pmt-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.command-center {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .command-center {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.command-center-group {
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-lg);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
}

.command-center-label {
    color: var(--pmt-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.command-center-actions .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

/* Sticky table headers */
.data-table-sticky thead th {
    background: var(--pmt-surface);
    box-shadow: 0 1px 0 var(--pmt-border);
    position: sticky;
    top: 0;
    z-index: 2;
}

body.staff-portal .data-table-sticky thead th {
    background: #fff;
}

.stat-card-facs {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}

/* Login split layout */
.login-shell {
    display: grid;
    gap: 1.5rem;
    max-width: 960px;
    width: 100%;
}

@media (min-width: 840px) {
    .login-shell {
        align-items: stretch;
        gap: 0;
        grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    }

    .login-brand-panel {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 2.5rem 2rem 2.5rem 0;
    }

    .login-panel {
        max-width: none;
    }
}

.login-brand-tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 1rem 0 0;
    max-width: 22rem;
}

.login-brand-panel .brand-mark,
.login-brand-panel .brand-sub {
    color: #fff;
}

.login-brand-panel .brand-sub {
    opacity: 0.75;
}

body.staff-portal .list-page-intro-lead {
    font-size: 0.95rem;
}

body.staff-portal .staff-events-panel {
    margin-top: 0;
}

.event-schedule-gantt-panel {
    overflow: hidden;
}

.panel-disclosure {
    display: block;
}

.panel-disclosure-summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.55rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    list-style: none;
    padding: 1rem 1.25rem;
    transition: background-color 0.15s ease;
}

.panel-disclosure-summary::-webkit-details-marker {
    display: none;
}

.panel-disclosure-summary:hover {
    background: rgba(249, 115, 22, 0.04);
}

.panel-disclosure-summary:focus-visible {
    outline: 2px solid var(--pmt-accent);
    outline-offset: -2px;
}

.panel-disclosure-main {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    grid-column: 1 / -1;
    min-width: 0;
}

.panel-disclosure-title {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.panel-disclosure-chevron {
    border-right: 2px solid var(--pmt-text-muted);
    border-top: 2px solid var(--pmt-text-muted);
    flex-shrink: 0;
    height: 0.45rem;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    width: 0.45rem;
}

.panel-disclosure[open] .panel-disclosure-chevron {
    transform: rotate(135deg);
}

.panel-disclosure-heading {
    color: var(--pmt-text);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.panel-summary-strip,
.event-gantt-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-left: 1rem;
}

.panel-summary-chip,
.event-gantt-summary-chip {
    align-items: center;
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: 999px;
    color: var(--pmt-text-muted);
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 700;
    gap: 0.35rem;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.62rem;
    white-space: nowrap;
}

.panel-summary-chip::before,
.event-gantt-summary-chip::before {
    border-radius: 50%;
    content: "";
    flex-shrink: 0;
    height: 0.42rem;
    width: 0.42rem;
}

.panel-summary-chip-tcv::before {
    background: var(--pmt-accent);
}

.panel-summary-chip-final::before {
    background: #16a34a;
}

.panel-summary-chip-budget::before {
    background: #2563eb;
}

.panel-disclosure-meta {
    color: var(--pmt-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    justify-self: end;
    white-space: nowrap;
}

.panel-disclosure-hint {
    color: var(--pmt-accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    justify-self: end;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.panel-disclosure[open] .panel-disclosure-hint {
    visibility: hidden;
}

.panel-disclosure-body {
    border-top: 1px solid var(--pmt-border-soft);
    padding-top: 0.15rem;
}

.staff-additional-info-panel .panel-disclosure-body {
    padding: 0 0 0.25rem;
}

.staff-additional-info-panel .staff-additional-info-grid {
    padding-top: 0.85rem;
}

.staff-additional-info-panel .panel-disclosure-hint-label-collapse {
    display: none;
}

.staff-additional-info-panel .panel-disclosure[open] .panel-disclosure-hint-label-expand {
    display: none;
}

.staff-additional-info-panel .panel-disclosure[open] .panel-disclosure-hint-label-collapse {
    display: inline;
}

.staff-additional-info-panel .panel-disclosure[open] .panel-disclosure-hint {
    visibility: visible;
}

.staff-additional-info-panel .panel-disclosure[open] .panel-disclosure-summary {
    background: var(--pmt-surface);
    border-bottom: 1px solid var(--pmt-border-soft);
    position: sticky;
    top: 0;
    z-index: 2;
}

.staff-additional-info-collapse-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem 1.25rem;
}

.event-gantt-summary-chip-start::before {
    background: #16a34a;
}

.event-gantt-summary-chip-facs::before {
    background: #7c3aed;
}

.event-gantt-summary-chip-end::before {
    background: #dc2626;
}

.event-gantt-summary-chip-crew::before {
    background: #2563eb;
}

.event-schedule-gantt-panel .panel-header-split h2 {
    letter-spacing: -0.02em;
}

.event-schedule-gantt-panel .form-hint {
    margin: 1rem 1.25rem;
    padding: 0;
}

.event-documents-upload-panel .event-documents-upload-intro {
    line-height: 1.5;
    margin: 0;
    max-width: 36rem;
    text-align: right;
}

.event-documents-table .table-actions-col {
    white-space: nowrap;
    width: 1%;
}

.event-documents-table td {
    vertical-align: middle;
}

.event-documents-table .event-documents-col-title {
    min-width: 14rem;
    width: 22%;
}

.event-document-name-display {
    color: #0f172a;
    font-weight: 600;
}

.event-document-name-input {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #111827;
    font: inherit;
    line-height: 1.4;
    min-height: 2.25rem;
    padding: 0.5rem 0.65rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.event-document-name-input::placeholder {
    color: #94a3b8;
}

.event-document-name-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    outline: none;
}

.event-document-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.event-document-action-muted {
    color: #94a3b8;
}

.event-documents-table .inline-form {
    display: inline-flex;
    margin: 0;
}

.dashboard-upload-storage-wrap {
    margin-bottom: 2rem;
    max-width: min(100%, 20rem);
}

.dashboard-upload-storage-panel {
    --donut-upload-color: var(--pmt-accent);
    --donut-rest-color: var(--pmt-border-soft);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dashboard-upload-storage-panel.is-warning {
    --donut-upload-color: #f59e0b;
}

.dashboard-upload-storage-panel.is-danger {
    --donut-upload-color: #ef4444;
}

.dashboard-upload-storage-panel .panel-header-split {
    align-items: baseline;
    flex-shrink: 0;
}

.dashboard-upload-storage-body {
    align-items: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.85rem;
    justify-content: center;
    padding: 1rem 1.15rem 1.15rem;
    text-align: center;
}

.dashboard-storage-donut {
    --upload-percent: 0;
    align-items: center;
    background: conic-gradient(
        var(--donut-upload-color) 0deg calc(var(--upload-percent) * 3.6deg),
        var(--donut-rest-color) calc(var(--upload-percent) * 3.6deg) 360deg
    );
    border-radius: 50%;
    display: grid;
    flex: 0 0 auto;
    height: 7.5rem;
    place-items: center;
    position: relative;
    width: 7.5rem;
}

.dashboard-storage-donut::before {
    background: var(--pmt-surface);
    border-radius: 50%;
    content: "";
    height: 65%;
    width: 65%;
}

.dashboard-storage-donut-value {
    color: var(--pmt-text);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    position: absolute;
    z-index: 1;
}

.dashboard-storage-donut-legend {
    color: var(--pmt-text-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.65rem 1rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-storage-donut-legend li {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.dashboard-storage-donut-swatch {
    border-radius: 999px;
    flex: 0 0 auto;
    height: 0.65rem;
    width: 0.65rem;
}

.dashboard-storage-donut-swatch-uploads {
    background: var(--donut-upload-color, var(--pmt-accent));
}

.dashboard-storage-donut-swatch-other {
    background: var(--pmt-border-soft);
}

.dashboard-storage-meter-label {
    color: var(--pmt-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.dashboard-storage-meter-label strong {
    color: var(--pmt-text);
}

.dashboard-upload-storage-hint {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.55;
    margin: 0.75rem 0 0;
    max-width: 20rem;
}

.tcv-event-report-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 0 1rem;
}

.tcv-event-report-title {
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    margin: 0;
}

.tcv-event-report-subtitle {
    color: var(--pmt-text-muted);
    margin: 0.35rem 0 0;
}

.tcv-event-filter-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.tcv-event-filter-grid {
    align-items: end;
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.tcv-event-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tcv-event-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    margin-bottom: 1rem;
}

.tcv-event-summary-card {
    min-width: 0;
}

.tcv-event-summary-card h2 {
    font-size: clamp(1.35rem, 1rem + 1vw, 2rem);
    overflow-wrap: anywhere;
}

.tcv-event-chart-panel {
    overflow: hidden;
}

.tcv-event-chart-panel .panel-header-split {
    align-items: baseline;
}

.tcv-event-chart {
    padding: 1.1rem 1.25rem 1.25rem;
}

.tcv-event-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    margin-bottom: 1rem;
}

.tcv-event-chart-legend-item {
    align-items: center;
    color: var(--pmt-text-muted);
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.5rem;
}

.tcv-event-chart-legend-swatch {
    border-radius: 999px;
    height: 0.75rem;
    width: 0.75rem;
}

.tcv-event-chart-legend-item-events .tcv-event-chart-legend-swatch {
    background: linear-gradient(180deg, #e8edf5 0%, #d4dce8 100%);
    border: 1px solid #c7d2e0;
}

.tcv-event-chart-legend-item-tcv .tcv-event-chart-legend-swatch {
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
}

.tcv-event-chart-legend-item-budget-margin .tcv-event-chart-legend-swatch {
    background: #10b981;
}

.tcv-event-chart-legend-item-final-margin .tcv-event-chart-legend-swatch {
    background: #f59e0b;
}

.tcv-event-chart-wrap {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.04), transparent 42%),
        radial-gradient(circle at top left, rgba(148, 163, 184, 0.05), transparent 38%),
        linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
    border: 1px solid var(--pmt-border-soft);
    border-radius: 1rem;
    overflow-x: auto;
    padding: 0.75rem 0.5rem 0.25rem;
}

.tcv-event-chart-wrap-dense {
    padding-bottom: 0.5rem;
}

.tcv-event-chart-svg {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: none;
    min-width: 720px;
    width: 100%;
}

.tcv-event-chart-svg-dense {
    min-width: 100%;
}

.tcv-event-chart-x-label-vertical {
    font-size: 9px;
}

.tcv-event-chart-grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.tcv-event-chart-axis-label {
    fill: #64748b;
    font-family: var(--pmt-font-sans, Helvetica, Arial, sans-serif);
    font-size: 11px;
    font-weight: 600;
}

.tcv-event-chart-axis-label-left {
    fill: #64748b;
}

.tcv-event-chart-axis-label-right {
    fill: #0369a1;
}

.tcv-event-chart-axis-title {
    fill: #94a3b8;
    font-family: var(--pmt-font-sans, Helvetica, Arial, sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tcv-event-chart-x-label {
    fill: #64748b;
    font-family: var(--pmt-font-sans, Helvetica, Arial, sans-serif);
    font-size: 10px;
    font-weight: 600;
}

.tcv-event-chart-point {
    cursor: help;
}

.event-gantt-date-only {
    margin-bottom: 0.75rem;
}

.event-gantt-staff-list {
    list-style: none;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
}

.event-gantt-staff-list li {
    border-top: 1px solid var(--pmt-border-soft);
    padding: 0.65rem 0;
}

.event-gantt-staff-list-time {
    color: var(--pmt-text-muted);
    display: block;
    font-size: 0.88rem;
    margin-top: 0.15rem;
}

.event-gantt-shell {
    margin: 0 1.25rem 1.25rem;
}

.panel-disclosure-body .event-gantt-shell {
    margin-top: 0.85rem;
}

.event-gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.event-gantt-legend-chip {
    align-items: center;
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: 999px;
    color: var(--pmt-text-muted);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.4rem;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.65rem 0.3rem 0.5rem;
    text-transform: uppercase;
}

.event-gantt-legend-chip::before {
    border-radius: 50%;
    content: "";
    flex-shrink: 0;
    height: 0.5rem;
    width: 0.5rem;
}

.event-gantt-legend-chip-start::before {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

.event-gantt-legend-chip-facs::before {
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    box-shadow: 0 0 8px rgba(192, 132, 252, 0.55);
}

.event-gantt-legend-chip-end::before {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
}

.event-gantt-legend-chip-staff-confirmed::before {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

.event-gantt-legend-chip-staff-unconfirmed::before {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.55);
}

.event-gantt-legend-chip-staff-tendered::before {
    background: linear-gradient(135deg, #fde047, #eab308);
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.55);
}

.event-gantt-legend-chip-staff-accepted::before {
    background: linear-gradient(135deg, #c084fc, #a855f7);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.55);
}

.event-gantt-legend-chip-staff-rejected::before {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
}

.event-gantt {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(249, 115, 22, 0.14) 0%, transparent 55%),
        radial-gradient(90% 70% at 0% 100%, rgba(37, 99, 235, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #12121a 0%, #0a0a10 48%, #08080d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pmt-radius-lg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 48px rgba(9, 9, 15, 0.28);
    overflow-x: auto;
    padding: 1rem 1rem 1.15rem;
    position: relative;
}

.event-gantt-body {
    min-width: 38rem;
    position: relative;
}

.event-gantt-header,
.event-gantt-row,
.event-gantt-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(9.5rem, 12.5rem) minmax(18rem, 1fr);
}

.event-gantt-header {
    margin-bottom: 0.5rem;
    min-width: 38rem;
    z-index: 3;
}

.event-gantt-grid {
    inset: 0;
    min-width: 38rem;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.event-gantt-grid .event-gantt-track-col {
    position: relative;
}

.event-gantt-grid-line {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%);
    bottom: 0;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 1px;
}

.event-gantt-label-col {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    justify-content: center;
    min-width: 0;
    padding-right: 0.25rem;
}

.event-gantt-row-badge {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 800;
    height: 1.35rem;
    justify-content: center;
    letter-spacing: 0.08em;
    line-height: 1;
    min-width: 1.35rem;
    padding: 0 0.35rem;
    text-transform: uppercase;
}

.event-gantt-row-badge-event {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(234, 88, 12, 0.15));
    border: 1px solid rgba(249, 115, 22, 0.45);
    color: #fdba74;
}

.event-gantt-row-badge-staff {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
}

.event-gantt-row-title {
    color: #f4f4f5;
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.event-gantt-row-subtitle {
    color: rgba(161, 161, 170, 0.95);
    display: block;
    font-size: 0.76rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-gantt-track-col {
    min-width: 0;
}

.event-gantt-axis {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 1.85rem;
    position: relative;
}

.event-gantt-axis-tick {
    color: rgba(161, 161, 170, 0.95);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    position: absolute;
    text-transform: uppercase;
    top: 0.1rem;
    transform: translateX(-50%);
    white-space: nowrap;
}

.event-gantt-track {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    height: 2.5rem;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.event-gantt-track-milestones {
    height: 4.25rem;
}

.event-gantt-bar {
    align-items: center;
    border-radius: 8px;
    display: flex;
    height: calc(100% - 0.55rem);
    overflow: hidden;
    padding: 0 0.45rem;
    position: absolute;
    top: 0.28rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    z-index: 2;
}

.event-gantt-bar-shine {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 55%);
    border-radius: 8px 8px 0 0;
    height: 45%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
}

.event-gantt-bar-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 1;
}

.event-gantt-bar-event {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.55) 0%, rgba(234, 88, 12, 0.75) 100%);
    border: 1px solid rgba(251, 146, 60, 0.65);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.15),
        0 8px 20px rgba(249, 115, 22, 0.28);
}

.event-gantt-bar-event .event-gantt-bar-label {
    color: #fff7ed;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.event-gantt-bar-staff-unconfirmed {
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 55%, #1d4ed8 100%);
    border: 1px solid rgba(125, 211, 252, 0.45);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.2),
        0 6px 16px rgba(37, 99, 235, 0.35);
    cursor: default;
}

.event-gantt-bar-staff-confirmed {
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
    border: 1px solid rgba(134, 239, 172, 0.45);
    box-shadow:
        0 0 0 1px rgba(22, 163, 74, 0.2),
        0 6px 16px rgba(22, 163, 74, 0.35);
    cursor: default;
}

.event-gantt-bar-staff-tendered {
    background: linear-gradient(90deg, #fde047 0%, #eab308 55%, #ca8a04 100%);
    border: 1px solid rgba(253, 224, 71, 0.55);
    box-shadow:
        0 0 0 1px rgba(234, 179, 8, 0.25),
        0 6px 16px rgba(234, 179, 8, 0.35);
    cursor: default;
}

.event-gantt-bar-staff-tendered .event-gantt-bar-label {
    color: #422006;
    text-shadow: none;
}

.event-gantt-bar-staff-accepted {
    background: linear-gradient(90deg, #d8b4fe 0%, #a855f7 55%, #7c3aed 100%);
    border: 1px solid rgba(216, 180, 254, 0.65);
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.25),
        0 6px 16px rgba(168, 85, 247, 0.35);
    cursor: default;
}

.event-gantt-bar-staff-accepted .event-gantt-bar-label {
    color: #faf5ff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.event-gantt-bar-staff-rejected {
    background: linear-gradient(90deg, #f87171 0%, #dc2626 55%, #b91c1c 100%);
    border: 1px solid rgba(248, 113, 113, 0.55);
    box-shadow:
        0 0 0 1px rgba(220, 38, 38, 0.25),
        0 6px 16px rgba(220, 38, 38, 0.35);
    cursor: default;
}

.event-gantt-row-staff:hover .event-gantt-bar-staff-unconfirmed {
    box-shadow:
        0 0 0 1px rgba(125, 211, 252, 0.55),
        0 10px 24px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.event-gantt-row-staff:hover .event-gantt-bar-staff-confirmed {
    box-shadow:
        0 0 0 1px rgba(134, 239, 172, 0.55),
        0 10px 24px rgba(22, 163, 74, 0.45);
    transform: translateY(-1px);
}

.event-gantt-row-staff:hover .event-gantt-bar-staff-tendered {
    box-shadow:
        0 0 0 1px rgba(253, 224, 71, 0.65),
        0 10px 24px rgba(234, 179, 8, 0.45);
    transform: translateY(-1px);
}

.event-gantt-row-staff:hover .event-gantt-bar-staff-accepted {
    box-shadow:
        0 0 0 1px rgba(216, 180, 254, 0.65),
        0 10px 24px rgba(168, 85, 247, 0.45);
    transform: translateY(-1px);
}

.event-gantt-row-staff:hover .event-gantt-bar-staff-rejected {
    box-shadow:
        0 0 0 1px rgba(248, 113, 113, 0.65),
        0 10px 24px rgba(220, 38, 38, 0.45);
    transform: translateY(-1px);
}

.event-gantt-pin {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    z-index: 4;
}

.event-gantt-pin-stem {
    background: currentColor;
    border-radius: 999px;
    box-shadow: 0 0 10px currentColor;
    display: block;
    height: 2.15rem;
    margin: 0 auto;
    opacity: 0.85;
    width: 2px;
}

.event-gantt-pin-card {
    backdrop-filter: blur(8px);
    background: rgba(9, 9, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    display: block;
    margin-top: 0.2rem;
    min-width: 3.5rem;
    padding: 0.28rem 0.45rem;
    text-align: center;
}

.event-gantt-pin-label {
    color: currentColor;
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.event-gantt-pin-time {
    color: #f4f4f5;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.25;
    margin-top: 0.05rem;
    text-transform: none;
}

.event-gantt-pin-start {
    color: #4ade80;
}

.event-gantt-pin-facs {
    color: #c084fc;
}

.event-gantt-pin-end {
    color: #f87171;
}

.event-gantt-row-milestones {
    margin-bottom: 0.5rem;
}

.event-gantt-row {
    animation: event-gantt-row-in 0.45s ease both;
    animation-delay: calc(var(--gantt-row-index, 0) * 45ms);
    min-width: 38rem;
    position: relative;
}

.event-gantt-row-milestones {
    animation: none;
}

@keyframes event-gantt-row-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-gantt-row + .event-gantt-row {
    margin-top: 0.5rem;
}

.event-gantt-no-time {
    color: rgba(161, 161, 170, 0.85);
    font-size: 0.78rem;
    font-style: italic;
    left: 0.65rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.event-gantt-empty-staff {
    color: rgba(161, 161, 170, 0.9);
    font-size: 0.85rem;
    margin: 0.75rem 0 0;
    padding: 0;
    text-align: center;
}

@media (max-width: 720px) {
    .panel-disclosure-summary {
        grid-template-columns: 1fr;
        padding: 0.9rem 1rem;
    }

    .panel-disclosure-meta,
    .panel-disclosure-hint {
        justify-self: start;
    }

    .panel-summary-strip,
    .event-gantt-summary-strip {
        padding-left: 0;
    }

    .event-gantt-shell {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .event-gantt {
        padding: 0.85rem 0.75rem 1rem;
    }

    .event-gantt-header,
    .event-gantt-row,
    .event-gantt-grid {
        gap: 0.65rem;
        grid-template-columns: minmax(7.5rem, 9rem) minmax(15rem, 1fr);
        min-width: 30rem;
    }

    .event-gantt-body {
        min-width: 30rem;
    }

    .event-gantt-grid {
        min-width: 30rem;
    }

    .event-gantt-pin-card {
        min-width: 3rem;
        padding: 0.22rem 0.35rem;
    }

    .event-gantt-pin-time {
        font-size: 0.66rem;
    }
}

.executive-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 0 1rem;
}

.executive-title {
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    margin: 0;
}

.executive-subtitle {
    color: var(--pmt-text-muted);
    margin: 0.35rem 0 0;
}

.executive-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.executive-filter-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.executive-filter-grid {
    align-items: end;
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.executive-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.executive-kpi-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.executive-kpi-grid {
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    margin-bottom: 0;
}

.executive-kpi-panel .executive-kpi-card {
    min-width: 0;
    padding: 0.9rem 1rem;
}

.executive-kpi-panel .executive-kpi-card .stat-card-body {
    min-width: 0;
    width: 100%;
}

.executive-kpi-panel .executive-kpi-card.stat-card-link {
    cursor: pointer;
}

.executive-kpi-panel .executive-kpi-card.stat-card-link:focus-visible {
    outline: 2px solid var(--pmt-accent);
    outline-offset: 2px;
}

#executive-events,
#executive-exceptions,
#executive-financials,
.executive-exception-group {
    scroll-margin-top: 1.5rem;
}

.executive-kpi-panel .executive-kpi-card h2 {
    font-size: 1.55rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.executive-kpi-panel .executive-kpi-card p {
    font-size: 0.78rem;
    line-height: 1.3;
}

.executive-kpi-panel .executive-kpi-money h2 {
    font-size: clamp(0.88rem, 0.8rem + 0.4vw, 1.15rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card-danger {
    border-left: 4px solid #dc2626;
}

.stat-card-accent {
    border-left: 4px solid var(--pmt-accent);
}

.executive-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
}

.executive-main,
.executive-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.executive-events-table td,
.executive-events-table th {
    white-space: nowrap;
}

.executive-events-table td:first-child {
    white-space: normal;
}

.executive-pagination {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.executive-exception-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.25rem 1.25rem;
}

.executive-exception-group h3 {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.executive-exception-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.executive-exception-list li {
    border-top: 1px solid var(--pmt-border-soft);
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem 0;
}

.executive-exception-meta,
.executive-exception-message {
    color: var(--pmt-text-muted);
    font-size: 0.82rem;
}

.executive-crew-panel {
    padding-bottom: 1.25rem;
}

.executive-crew-stats {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1.25rem;
}

.executive-crew-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
}

.executive-crew-stat-label {
    color: var(--pmt-text-muted);
    font-size: 0.78rem;
}

.executive-progress {
    background: var(--pmt-border-soft);
    border-radius: 999px;
    height: 0.55rem;
    margin: 0.85rem 1.25rem 0.35rem;
    overflow: hidden;
}

.executive-progress-bar {
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    display: block;
    height: 100%;
}

.executive-progress-label,
.executive-subheading {
    color: var(--pmt-text-muted);
    font-size: 0.82rem;
    margin: 0 1.25rem 0.75rem;
}

.executive-mini-list {
    list-style: none;
    margin: 0;
    padding: 0 1.25rem 1rem;
}

.executive-mini-list li {
    align-items: baseline;
    border-top: 1px solid var(--pmt-border-soft);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.45rem 0;
}

.executive-conflicts-panel .executive-conflict-section {
    padding: 0 1.25rem 1rem;
}

.executive-conflicts-panel h3 {
    font-size: 0.88rem;
    margin: 0 0 0.35rem;
}

.executive-conflict-item {
    flex-direction: column;
    align-items: flex-start !important;
}

.executive-conflict-events {
    color: var(--pmt-text-muted);
    font-size: 0.82rem;
}

.executive-financials-panel .tcv-breakdown-dual,
.executive-breakdown-tabs,
.executive-margin-leaders {
    padding: 0 1.25rem 1.25rem;
}

.executive-breakdown-block + .executive-breakdown-block {
    margin-top: 1rem;
}

.executive-breakdown-block h3,
.executive-margin-leaders h3 {
    font-size: 0.92rem;
    margin: 0 0 0.5rem;
}

.executive-margin-leaders {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.executive-timeline-shell {
    margin-top: 0.85rem;
}

.executive-timeline-gantt {
    max-height: 32rem;
    overflow: auto;
}

.executive-timeline-row {
    border-left: 3px solid var(--executive-accent, var(--pmt-accent));
}

.executive-timeline-row-at_risk {
    border-left-color: #dc2626;
}

.executive-timeline-event-link {
    color: inherit;
    text-decoration: none;
}

.executive-timeline-event-link:hover .event-gantt-row-title {
    color: var(--pmt-accent-strong);
}

.executive-timeline-cap {
    margin: 0 1.25rem 0.75rem;
}

@media (max-width: 960px) {
    .executive-layout,
    .executive-margin-leaders {
        grid-template-columns: 1fr;
    }

    .executive-header {
        flex-direction: column;
    }
}
