:root {
    --bg: #edf3f6;
    --surface: #ffffff;
    --surface-soft: #f6fafb;
    --text: #17262d;
    --muted: #60727d;
    --line: #d7e2e8;
    --accent: #0f766e;
    --accent-dark: #0a5953;
    --accent-soft: #dff5ef;
    --danger: #b42318;
    --warning: #b45309;
    --shadow: 0 22px 52px rgba(16, 36, 42, 0.08);
    --shadow-strong: 0 28px 70px rgba(15, 33, 38, 0.14);
    --radius: 20px;
    --radius-lg: 24px;
    --font-body: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* Activity stream */
.legacy-activity-block {
    display: none !important;
}

.activity-stream-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.activity-stream-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.activity-stream-head h3 {
    margin: 0 0 6px;
}

.activity-stream-head-copy {
    min-width: 0;
    flex: 1 1 420px;
}

.activity-stream-head-copy p {
    margin: 0;
}

.activity-stream-head-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    min-width: 0;
}

.activity-stream-process-label,
.activity-stream-process-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(215, 226, 232, 0.9);
    background: rgba(247, 251, 252, 0.96);
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.activity-stream-process-label {
    color: var(--text);
    font-weight: 600;
}

.activity-stream-toolbar {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
}

.activity-stream-search,
.activity-stream-select {
    display: grid;
    gap: 8px;
}

.activity-stream-search {
    flex: 1 1 320px;
    min-width: min(100%, 320px);
}

.activity-stream-search-label,
.activity-stream-select span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.activity-stream-toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.activity-stream-select select,
.activity-stream-search input {
    min-height: 40px;
}

.activity-stream-toggle.is-active {
    border-color: rgba(15, 118, 110, 0.28);
    background: rgba(223, 245, 239, 0.95);
    color: var(--accent-dark);
}

.activity-stream-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-stream-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(215, 226, 232, 0.9);
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.activity-stream-filter small {
    color: inherit;
    opacity: 0.82;
}

.activity-stream-filter.is-active,
.activity-stream-filter:hover {
    border-color: rgba(15, 118, 110, 0.26);
    background: rgba(223, 245, 239, 0.94);
    color: var(--accent-dark);
}

.activity-stream-feed {
    max-height: min(68vh, 760px);
    overflow: auto;
    padding-right: 4px;
}

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

.activity-stream-empty-card,
.activity-stream-filter-empty {
    margin: 0;
}

.activity-stream-item {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(215, 226, 232, 0.94);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 251, 252, 0.98) 100%);
    box-shadow: 0 14px 30px rgba(16, 36, 42, 0.06);
    overflow-wrap: anywhere;
}

.activity-stream-item-new {
    border-color: rgba(15, 118, 110, 0.26);
    box-shadow: 0 18px 36px rgba(15, 118, 110, 0.12);
}

.activity-stream-item-customer {
    border-left: 4px solid #4f7dd9;
}

.activity-stream-item-user {
    border-left: 4px solid #0f766e;
}

.activity-stream-item-financial {
    border-left: 4px solid #b45309;
}

.activity-stream-item-document {
    border-left: 4px solid #6b7280;
}

.activity-stream-item-system {
    border-left: 4px solid #64748b;
}

.activity-stream-item-level-success {
    background: linear-gradient(180deg, rgba(248, 253, 249, 0.99) 0%, rgba(243, 250, 245, 0.98) 100%);
}

.activity-stream-item-level-warning {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.99) 0%, rgba(255, 248, 238, 0.98) 100%);
}

.activity-stream-item-level-error {
    background: linear-gradient(180deg, rgba(255, 249, 248, 0.99) 0%, rgba(255, 244, 242, 0.98) 100%);
}

.activity-stream-rail {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    padding-top: 2px;
}

.activity-stream-rail::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: -18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(215, 226, 232, 0.95) 0%, rgba(215, 226, 232, 0) 100%);
}

.activity-stream-item:last-child .activity-stream-rail::after {
    display: none;
}

.activity-stream-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.activity-stream-icon-system {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.activity-stream-icon-user {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.activity-stream-icon-customer {
    background: linear-gradient(135deg, #2563eb 0%, #4f7dd9 100%);
}

.activity-stream-icon-financial {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

.activity-stream-icon-document {
    background: linear-gradient(135deg, #52525b 0%, #71717a 100%);
}

.activity-stream-body {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.activity-stream-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.activity-stream-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.activity-stream-actor {
    color: var(--text);
    font-weight: 600;
}

.activity-stream-separator {
    opacity: 0.42;
}

.activity-stream-badges,
.activity-stream-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.activity-stream-badges {
    justify-content: flex-end;
}

.activity-stream-pill,
.activity-stream-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    border: 1px solid rgba(215, 226, 232, 0.9);
    background: rgba(247, 251, 252, 0.98);
    color: var(--muted);
}

.activity-stream-pill-category-customer {
    background: rgba(236, 244, 255, 0.98);
    color: #315fa8;
    border-color: rgba(79, 125, 217, 0.22);
}

.activity-stream-pill-category-user {
    background: rgba(232, 249, 245, 0.98);
    color: #0f5f59;
    border-color: rgba(15, 118, 110, 0.22);
}

.activity-stream-pill-category-financial {
    background: rgba(255, 247, 237, 0.98);
    color: #9b5a10;
    border-color: rgba(180, 83, 9, 0.22);
}

.activity-stream-pill-category-document {
    background: rgba(244, 244, 245, 0.98);
    color: #4b5563;
    border-color: rgba(113, 113, 122, 0.2);
}

.activity-stream-pill-category-system {
    background: rgba(241, 245, 249, 0.98);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.18);
}

.activity-stream-pill-entity {
    color: var(--text);
}

.activity-stream-pill-important {
    background: rgba(255, 248, 235, 0.98);
    color: #9b5a10;
    border-color: rgba(180, 83, 9, 0.2);
}

.activity-stream-pill-new {
    background: rgba(232, 249, 245, 0.98);
    color: #0f5f59;
    border-color: rgba(15, 118, 110, 0.22);
}

.activity-stream-item h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.activity-stream-message {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.activity-stream-changes {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(215, 226, 232, 0.9);
    background: rgba(247, 251, 252, 0.96);
}

.activity-stream-change {
    display: grid;
    gap: 4px;
}

.activity-stream-change strong {
    font-size: 0.78rem;
    color: var(--text);
}

.activity-stream-change span {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.activity-stream-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.activity-stream-link:hover {
    color: var(--accent);
}

.activity-stream-feed::-webkit-scrollbar {
    width: 10px;
}

.activity-stream-feed::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(96, 114, 125, 0.22);
}

@media (max-width: 960px) {
    .activity-stream-head-meta,
    .activity-stream-badges {
        justify-items: start;
        justify-content: flex-start;
    }

    .activity-stream-toolbar {
        align-items: stretch;
    }

    .activity-stream-search,
    .activity-stream-toolbar-actions,
    .activity-stream-select {
        width: 100%;
    }

    .activity-stream-toolbar-actions {
        justify-content: stretch;
    }

    .activity-stream-select,
    .activity-stream-select select,
    .activity-stream-toggle {
        flex: 1 1 100%;
    }

    .activity-stream-feed {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .activity-stream-item {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .activity-stream-rail {
        justify-items: start;
    }

    .activity-stream-rail::after {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    .activity-stream-process-label,
    .activity-stream-process-count,
    .activity-stream-filter,
    .activity-stream-pill,
    .activity-stream-chip {
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.05);
        color: #d8e4ea;
    }

    .activity-stream-filter.is-active,
    .activity-stream-filter:hover,
    .activity-stream-toggle.is-active {
        border-color: rgba(80, 171, 160, 0.3);
        background: rgba(15, 118, 110, 0.16);
        color: #dff6f2;
    }

    .activity-stream-item {
        border-color: rgba(255, 255, 255, 0.08);
        background: linear-gradient(180deg, rgba(23, 33, 40, 0.98) 0%, rgba(20, 29, 35, 0.98) 100%);
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    }

    .activity-stream-item-level-success {
        background: linear-gradient(180deg, rgba(18, 39, 30, 0.98) 0%, rgba(18, 34, 28, 0.98) 100%);
    }

    .activity-stream-item-level-warning {
        background: linear-gradient(180deg, rgba(43, 34, 20, 0.98) 0%, rgba(37, 29, 18, 0.98) 100%);
    }

    .activity-stream-item-level-error {
        background: linear-gradient(180deg, rgba(45, 26, 25, 0.98) 0%, rgba(39, 23, 22, 0.98) 100%);
    }

    .activity-stream-message,
    .activity-stream-topline,
    .activity-stream-change span {
        color: #afc0c9;
    }

    .activity-stream-actor,
    .activity-stream-item h4,
    .activity-stream-change strong,
    .activity-stream-pill-entity {
        color: #eef5f8;
    }

    .activity-stream-changes {
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.04);
    }

    .activity-stream-rail::after {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    }

    .activity-stream-link {
        color: #7ed2c8;
    }

    .activity-stream-feed::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.12);
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(207, 240, 232, 0.9), transparent 28%),
        radial-gradient(circle at top right, rgba(215, 227, 247, 0.7), transparent 24%),
        linear-gradient(180deg, #f5f9fb 0%, #edf3f6 42%, #e6eef2 100%);
    color: var(--text);
    font-family: var(--font-body);
}

body.modal-open {
    overflow: hidden;
}

body.nav-open {
    overflow: hidden;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.app-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 22, 26, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 70;
}

.sidebar {
    padding: 32px 24px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 173, 0.14), transparent 22%),
        linear-gradient(180deg, #163036 0%, #10242a 100%);
    color: #f5fbfc;
    z-index: 80;
}

.sidebar-head {
    display: block;
}

.brand {
    display: grid;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-logo {
    display: block;
    width: min(100%, 176px);
    height: auto;
}

.brand-mark {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy small {
    color: rgba(245, 251, 252, 0.72);
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(245, 251, 252, 0.85);
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav a.is-active,
.nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.nav a.is-active {
    font-weight: 600;
}

.mobile-nav-toggle,
.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(215, 224, 229, 0.9);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border-radius: 14px;
}

.mobile-nav-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    gap: 4px;
    flex-direction: column;
    flex-shrink: 0;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.sidebar-close {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
    line-height: 1;
}

.app-main {
    padding: 26px 34px 48px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    min-width: 0;
    flex-wrap: wrap;
}

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

.topbar-logo {
    display: none;
    width: 138px;
    height: auto;
    flex-shrink: 0;
}

.topbar-copy {
    min-width: 0;
}

.topbar-copy h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.02;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    flex: 1 1 460px;
}

.user-chip {
    display: grid;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(16, 36, 42, 0.05);
    min-width: 0;
    max-width: min(100%, 320px);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.button {
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, #139286 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #0d7d74 100%);
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(15, 118, 110, 0.26);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-danger {
    background: linear-gradient(135deg, #c2410c 0%, #b42318 100%);
    color: #fff8f7;
    border: 1px solid rgba(180, 35, 24, 0.24);
    box-shadow: 0 16px 36px rgba(180, 35, 24, 0.22);
}

.button-danger:hover {
    background: linear-gradient(135deg, #b45309 0%, #9f1239 100%);
    box-shadow: 0 18px 40px rgba(159, 18, 57, 0.24);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid rgba(215, 226, 232, 0.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.overview-grid,
.detail-grid,
.calendar-grid {
    display: grid;
    gap: 18px;
}

.overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.metric-card {
    display: grid;
    gap: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 248, 0.96) 100%);
    border: 1px solid rgba(215, 226, 232, 0.88);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 16px 36px rgba(16, 36, 42, 0.06);
}

.metric-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-card strong {
    font-size: 1.9rem;
}

.toolbar,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.toolbar-end {
    justify-content: flex-end;
}

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

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

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

.compact-form {
    margin-top: 18px;
}

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

.span-3 {
    grid-column: span 3;
}

.table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table tbody tr:hover {
    background: rgba(246, 250, 251, 0.84);
}

.table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.08em;
    background: rgba(246, 250, 251, 0.92);
}

.compact-table th,
.compact-table td {
    padding: 10px 8px;
}

.table-actions {
    white-space: nowrap;
}

.table-actions a {
    margin-right: 12px;
    color: var(--accent-dark);
}

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

.section-head h2,
.section-head h3 {
    margin: 0 0 6px;
}

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

.summary-list div {
    display: grid;
    gap: 2px;
}

.summary-list dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.summary-list dd {
    margin: 0;
}

.mini-list,
.timeline-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.timeline-list li,
.mini-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-list li:last-child,
.mini-list li:last-child {
    border-bottom: none;
}

.muted {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.badge-success {
    background: #ecfdf3;
    color: #166534;
}

.badge-accent {
    background: #ecfdf8;
    color: #0f5e58;
}

.badge-warning {
    background: #fff7ed;
    color: #b45309;
}

.badge-danger {
    background: #fef3f2;
    color: var(--danger);
}

.badge-neutral {
    background: #eef2f6;
    color: #334e68;
}

.flash-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.checkbox-row input {
    width: auto;
}

.line-items {
    display: grid;
    gap: 12px;
}

.line-item-row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1.3fr 1.3fr 0.7fr 0.7fr 0.9fr 0.8fr auto;
    align-items: center;
}

.calendar-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.day-card {
    min-height: 180px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.month-weekdays span {
    padding: 0 8px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

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

.month-day {
    min-height: 210px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
    display: grid;
    gap: 12px;
}

.month-day-muted {
    background: #f4f7f8;
    color: var(--muted);
}

.month-day-today {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.15);
}

.month-day-selected {
    background: linear-gradient(180deg, #f0faf8 0%, #e8f6f3 100%);
}

.month-day-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.month-day-number {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    font-weight: 700;
}

.month-day-count {
    font-size: 0.76rem;
    color: var(--muted);
}

.month-day-events {
    display: grid;
    gap: 8px;
    align-content: start;
}

.calendar-day-tools {
    display: flex;
    justify-content: flex-start;
}

.calendar-day-action {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.calendar-event {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid transparent;
}

.calendar-event strong {
    font-size: 0.92rem;
}

.calendar-event small,
.calendar-event-time,
.calendar-more {
    color: inherit;
    opacity: 0.82;
}

.calendar-event-time {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calendar-event-neutral {
    background: #eef2f6;
    color: #334e68;
}

.calendar-event-accent {
    background: #ecfdf8;
    color: #0f5e58;
    border-color: rgba(15, 118, 110, 0.18);
}

.calendar-event-success {
    background: #ecfdf3;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.14);
}

.calendar-event-warning {
    background: #fff7ed;
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.15);
}

.calendar-event-danger {
    background: #fef3f2;
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.14);
}

.calendar-more {
    font-size: 0.8rem;
    padding: 2px 2px 0;
}

.calendar-detail-grid {
    align-items: start;
}

.calendar-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 252, 0.96) 100%);
}

.calendar-hero h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.98;
}

.calendar-hero p {
    margin: 0;
    color: var(--muted);
    max-width: 68ch;
}

.calendar-hero-actions {
    display: grid;
    gap: 18px;
    align-content: space-between;
}

.calendar-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.calendar-mini-stat {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(215, 226, 232, 0.92);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 28px rgba(16, 36, 42, 0.05);
}

.calendar-mini-stat span,
.calendar-mini-stat small {
    color: var(--muted);
}

.calendar-mini-stat strong {
    font-size: 1.7rem;
    line-height: 1;
}

.calendar-insight {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(223, 245, 239, 0.88) 0%, rgba(239, 249, 246, 0.92) 100%);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.calendar-insight strong {
    font-size: 1.02rem;
}

.calendar-filter-card {
    padding: 18px 20px;
}

.calendar-filter-form {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.calendar-filter-form label {
    display: grid;
    gap: 8px;
}

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

.calendar-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.calendar-month-board {
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.calendar-month-grid {
    gap: 14px;
}

.calendar-day-card {
    min-height: 248px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 250, 251, 0.98) 100%);
    border: 1px solid rgba(215, 226, 232, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.calendar-day-weekend {
    background: linear-gradient(180deg, rgba(249, 252, 253, 0.98) 0%, rgba(242, 247, 250, 0.98) 100%);
}

.calendar-day-conflict {
    border-color: rgba(180, 83, 9, 0.28);
}

.calendar-day-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.calendar-day-select {
    display: inline-grid;
    gap: 8px;
    justify-items: start;
}

.calendar-day-select:hover .month-day-number {
    background: rgba(15, 118, 110, 0.16);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
}

.calendar-day-weekday {
    display: none;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calendar-day-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calendar-day-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(23, 38, 45, 0.06);
    color: var(--muted);
    font-size: 0.74rem;
    white-space: nowrap;
}

.calendar-day-pill-warning {
    background: rgba(180, 83, 9, 0.1);
    color: var(--warning);
}

.calendar-day-event-list {
    align-content: start;
}

.calendar-day-empty {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    color: var(--muted);
}

.calendar-day-empty strong {
    color: var(--text);
}

.calendar-day-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(215, 226, 232, 0.96);
    color: var(--muted);
    font-size: 0.8rem;
}

.calendar-side-stack {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
    position: static;
}

.calendar-focus-card,
.calendar-side-card {
    display: grid;
    gap: 18px;
}

.calendar-day-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.calendar-day-summary-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(215, 226, 232, 0.9);
}

.calendar-day-summary-item span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calendar-day-summary-item strong {
    font-size: 1.25rem;
}

.calendar-focus-actions {
    display: flex;
    gap: 12px;
}

.calendar-focus-list,
.calendar-side-facts {
    display: grid;
    gap: 12px;
}

.calendar-empty-state {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px dashed rgba(15, 118, 110, 0.22);
}

.calendar-empty-state p {
    margin: 0;
    color: var(--muted);
}

.calendar-focus-event {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(215, 226, 232, 0.94);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
    box-shadow: 0 12px 28px rgba(16, 36, 42, 0.05);
}

.calendar-focus-time,
.calendar-focus-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-focus-time span,
.calendar-focus-meta span {
    color: var(--muted);
    font-size: 0.84rem;
}

.calendar-focus-time strong {
    color: var(--accent-dark);
    font-size: 0.88rem;
}

.calendar-focus-main {
    display: grid;
    gap: 4px;
}

.calendar-focus-main p {
    margin: 0;
    color: var(--muted);
}

.calendar-focus-status {
    text-transform: capitalize;
}

.calendar-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.calendar-agenda-list,
.calendar-unplanned-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.calendar-agenda-item,
.calendar-unplanned-item {
    display: grid;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.calendar-agenda-item:last-child,
.calendar-unplanned-item:last-child {
    border-bottom: none;
}

.calendar-agenda-item {
    grid-template-columns: 120px minmax(0, 1fr) minmax(180px, 0.8fr);
}

.calendar-agenda-date {
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.calendar-agenda-main {
    display: grid;
    gap: 4px;
}

.calendar-agenda-main p {
    margin: 0;
    color: var(--muted);
}

.calendar-agenda-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.calendar-unplanned-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.calendar-slot-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(215, 226, 232, 0.92);
}

.calendar-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.calendar-slot-button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.calendar-slot-button:hover {
    border-color: rgba(15, 118, 110, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.08);
}

.planner-summary {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(215, 226, 232, 0.9);
}

.planner-summary p {
    margin: 0;
    color: var(--muted);
}

.planner-hint {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(16, 36, 42, 0.48);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-card {
    width: min(100%, 760px);
    max-height: calc(100vh - 56px);
    overflow: auto;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(215, 224, 229, 0.8);
    box-shadow: 0 30px 80px rgba(16, 36, 42, 0.24);
    padding: 24px;
}

.modal-card-large {
    width: min(100%, 980px);
}

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

.info-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f7fafb;
    border: 1px solid var(--line);
    display: grid;
    gap: 8px;
}

.request-suggestion-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.request-suggestion-card {
    width: 100%;
    display: grid;
    gap: 6px;
    padding: 14px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    background: linear-gradient(180deg, #f7fffd 0%, #eef8f6 100%);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.request-suggestion-card:hover,
.request-suggestion-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: 0 16px 32px rgba(15, 118, 110, 0.12);
}

.request-suggestion-card strong {
    font-size: 0.98rem;
}

.request-suggestion-card span {
    color: var(--muted);
}

.signature-canvas {
    width: 100%;
    display: block;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fff;
    touch-action: none;
}

.signature-preview {
    width: min(100%, 340px);
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.signature-canvas-large {
    min-height: 240px;
}

.flash {
    margin-bottom: 16px;
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid transparent;
    box-shadow: 0 18px 36px rgba(16, 36, 42, 0.06);
    min-width: 0;
    max-width: 100%;
}

.flash-head {
    display: grid;
    gap: 4px;
}

.flash-head strong {
    font-size: 1rem;
}

.flash-head span {
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.flash-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

.flash-list li {
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.flash-success {
    background: #ecfdf3;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.12);
}

.flash-error {
    background: #fef3f2;
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.12);
}

.flash-error .flash-head strong {
    color: #b42318;
}

.empty-state {
    display: grid;
    gap: 10px;
}

.info-chip {
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7fafb;
    border: 1px solid var(--line);
    color: var(--muted);
    line-height: 1.4;
}

.info-chip strong {
    color: var(--text);
}

.member-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.member-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf5f4;
    color: #0f5e58;
}

.member-pill small {
    color: inherit;
    opacity: 0.8;
}

.member-pill-muted {
    background: #eef2f6;
    color: var(--muted);
}

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

.member-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdfd;
}

.member-option input {
    width: auto;
    margin-top: 3px;
}

.member-option div {
    display: grid;
    gap: 4px;
}

.user-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: start;
}

.user-create-card,
.user-rule-card,
.user-list-row {
    border-radius: 24px;
}

.user-creator-grid,
.user-edit-grid,
.onboarding-form-grid {
    align-items: end;
}

.user-creation-note {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    background: linear-gradient(180deg, #f7fffd 0%, #eff7f6 100%);
}

.owner-company-card {
    padding: 24px;
}

.workflow-hero-compact {
    padding: 22px 24px;
}

.workflow-hero-compact .workflow-hero-copy h1 {
    font-size: clamp(1.85rem, 2.5vw, 2.45rem);
}

.workflow-hero-compact .workflow-hero-copy p {
    max-width: 66ch;
}

.owner-company-section {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(215, 224, 229, 0.85);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.owner-section-head {
    display: grid;
    gap: 6px;
}

.owner-section-head h4 {
    margin: 0;
    font-size: 1.08rem;
}

.owner-section-head p {
    margin: 0;
    color: var(--muted);
}

.owner-company-grid,
.owner-user-grid {
    align-items: end;
}

.owner-company-list {
    display: grid;
    gap: 18px;
}

.owner-company-list-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.owner-company-list-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.owner-company-title {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.owner-company-title h3 {
    margin: 0;
    font-size: 1.35rem;
}

.owner-company-title p {
    margin: 0;
    color: var(--muted);
}

.owner-company-head-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.owner-company-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.owner-company-meta-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(215, 224, 229, 0.85);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.owner-company-meta-card span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.owner-company-meta-card strong {
    font-size: 1.04rem;
}

.owner-company-meta-card small {
    color: var(--muted);
    line-height: 1.5;
}

.owner-company-panels {
    display: grid;
    gap: 12px;
}

.owner-company-edit-grid,
.owner-company-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.owner-company-inline-note {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f7fafb;
    color: var(--muted);
    line-height: 1.55;
}

.customer-list {
    display: grid;
    gap: 18px;
}

.customer-list-card {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.customer-list-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.customer-list-title {
    display: grid;
    gap: 6px;
}

.customer-list-title h3 {
    margin: 0;
    font-size: 1.35rem;
}

.customer-list-title p {
    margin: 0;
    color: var(--muted);
}

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

.customer-list-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.customer-meta-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(215, 224, 229, 0.85);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.customer-meta-card span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.customer-meta-card strong {
    font-size: 1.04rem;
}

.customer-meta-card small {
    color: var(--muted);
}

.customer-count-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.customer-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: rgba(15, 118, 110, 0.06);
    color: var(--text);
    font-size: 0.92rem;
}

.customer-count-pill-warning {
    border-color: rgba(180, 83, 9, 0.18);
    background: rgba(251, 191, 36, 0.12);
    color: #92400e;
}

.customer-filter-card {
    display: grid;
    gap: 14px;
}

.customer-filter-toolbar input,
.customer-filter-toolbar select {
    min-width: 220px;
}

.customer-detail-grid {
    align-items: start;
}

.customer-next-steps {
    display: grid;
    gap: 12px;
}

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

.customer-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.customer-related-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.customer-related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.customer-related-item a {
    display: inline-block;
    font-weight: 700;
    margin-bottom: 4px;
}

.customer-related-item small {
    display: block;
    color: var(--muted);
}

.customer-related-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
}

.customer-form-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.customer-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

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

.customer-empty-state {
    padding: 0;
    min-height: 0;
    justify-items: start;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.settings-summary-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(215, 224, 229, 0.85);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.settings-summary-card strong {
    font-size: 1.1rem;
    color: var(--text);
}

.settings-summary-card p {
    margin: 0;
    color: var(--muted);
}

.settings-panel {
    display: grid;
    gap: 20px;
    padding: 24px;
}

.settings-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.settings-panel-head h3 {
    margin: 0;
}

.settings-panel-head p {
    margin: 8px 0 0;
}

.settings-panel-body {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

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

.settings-guide {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(215, 224, 229, 0.85);
    background: linear-gradient(180deg, #fcfefe 0%, #f4f9f8 100%);
}

.settings-guide strong {
    color: var(--text);
}

.settings-guide-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.settings-guide-list-numbered {
    padding-left: 20px;
}

.settings-inline-box {
    margin-top: 0;
    min-width: min(320px, 100%);
}

.settings-tip-box {
    margin-top: 4px;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.owner-company-grid {
    grid-template-columns: minmax(0, 520px);
}

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

.company-switcher-form {
    min-width: 0;
    flex: 1 1 340px;
    max-width: min(100%, 460px);
}

.company-switcher-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.company-switcher-form span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.company-switcher-form select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.topbar-actions > * {
    min-width: 0;
}

.topbar-actions form {
    min-width: 0;
}

.owner-company-actions {
    display: grid;
    gap: 12px;
    min-width: 280px;
}

.owner-company-detail-card {
    display: grid;
    gap: 10px;
}

.owner-company-detail-card summary {
    cursor: pointer;
    list-style: none;
    color: var(--accent-dark);
    font-weight: 700;
}

.owner-company-detail-card summary::-webkit-details-marker {
    display: none;
}

.owner-company-detail-body {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfdfd 0%, #f5faf9 100%);
}

.owner-company-manage-form {
    display: grid;
    gap: 12px;
}

.owner-company-manage-form label {
    display: grid;
    gap: 8px;
}

.owner-default-checkbox {
    align-items: center;
}

.owner-assignment-list {
    display: grid;
    gap: 10px;
}

.owner-assignment-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

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

.owner-assignment-item div {
    display: grid;
    gap: 4px;
}

.owner-assignment-item span {
    color: var(--muted);
    line-height: 1.5;
}

.owner-company-delete-card {
    display: grid;
    gap: 12px;
    min-width: 240px;
}

.owner-company-delete-card summary {
    cursor: pointer;
    list-style: none;
    color: #9f1239;
    font-weight: 700;
}

.owner-company-delete-card summary::-webkit-details-marker {
    display: none;
}

.owner-company-delete-body {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(180, 35, 24, 0.14);
    background: linear-gradient(180deg, #fffaf9 0%, #fff3f2 100%);
}

.owner-company-delete-body p,
.owner-company-delete-note {
    margin: 0;
    color: #7c2d12;
    line-height: 1.5;
}

.owner-company-delete-note {
    display: block;
    margin-top: 8px;
}

.owner-company-delete-form {
    display: grid;
    gap: 12px;
}

.owner-company-delete-form label {
    display: grid;
    gap: 8px;
}

.user-role-rule {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8fbfb;
}

.user-role-rule.is-allowed {
    border-color: rgba(15, 118, 110, 0.18);
    background: #eef9f7;
}

.user-role-rule.is-blocked {
    opacity: 0.76;
}

.user-list {
    display: grid;
    gap: 18px;
}

.user-list-row {
    display: grid;
    gap: 18px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.user-list-main,
.user-list-head,
.user-pill-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.user-list-main {
    justify-content: space-between;
}

.user-list-head {
    min-width: 0;
}

.user-avatar {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f766e 0%, #17454d 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
}

.user-title-stack {
    display: grid;
    gap: 4px;
}

.user-title-stack h3 {
    margin: 0 0 4px;
}

.user-title-stack p {
    margin: 0;
    color: var(--muted);
}

.user-pill-strip {
    justify-content: flex-end;
}

.member-pill-warning {
    background: #fff6e6;
    color: #9a5b00;
}

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

.user-mini-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7fafb;
    border: 1px solid var(--line);
}

.user-mini-card span {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-mini-card strong {
    font-size: 0.98rem;
    line-height: 1.45;
}

.user-edit-card {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fbfdfd;
}

.user-edit-toggle {
    cursor: pointer;
    list-style: none;
    padding: 16px 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-edit-toggle::-webkit-details-marker {
    display: none;
}

.user-edit-toggle::after {
    content: '+';
    color: var(--muted);
    font-size: 1.15rem;
}

.user-edit-card[open] .user-edit-toggle::after {
    content: '-';
}

.user-edit-panel {
    padding: 0 18px 18px;
}

.user-readonly-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f7fafb;
    color: var(--muted);
    border: 1px solid var(--line);
}

.user-delete-panel {
    display: grid;
    gap: 14px;
    margin: 0 18px 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(180, 35, 24, 0.14);
    background: linear-gradient(180deg, #fffaf9 0%, #fff3f2 100%);
}

.user-delete-copy {
    display: grid;
    gap: 6px;
}

.user-delete-copy strong {
    color: #7c2d12;
}

.user-delete-copy span {
    color: #7c2d12;
    line-height: 1.55;
}

.user-delete-form {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.user-delete-form label {
    display: grid;
    gap: 8px;
}

.onboarding-page {
    padding: 24px;
}

.onboarding-card {
    width: min(100%, 1180px);
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.2fr);
}

.onboarding-copy .planner-summary {
    margin-top: 18px;
}

.member-option span,
.member-option small,
.meta-copy {
    color: var(--muted);
}

.meta-copy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.meta-copy span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.workflow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 20px;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f2faf8 52%, #edf5f4 100%);
    border: 1px solid rgba(215, 224, 229, 0.75);
    box-shadow: 0 24px 60px rgba(16, 36, 42, 0.12);
}

.workflow-hero-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.9rem);
    line-height: 0.98;
}

.workflow-hero-copy h1 small {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.05rem, 1.5vw, 1.45rem);
    line-height: 1.3;
    color: var(--text);
}

.workflow-hero-copy p {
    max-width: 720px;
    margin: 14px 0 0;
    color: #415057;
    font-size: 1rem;
    line-height: 1.65;
}

.workflow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: flex-start;
    gap: 12px;
}

.workflow-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.workflow-meta-pill {
    display: grid;
    gap: 6px;
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(215, 224, 229, 0.85);
}

.workflow-meta-pill span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workflow-meta-pill strong {
    font-size: 1rem;
}

.workflow-meta-pill .status-inline {
    min-height: 26px;
}

.work-order-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.execution-strip,
.execution-ops-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.execution-strip {
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
}

.execution-ops-grid {
    grid-template-columns: 1.2fr 1fr;
}

.execution-card,
.execution-ops-card {
    padding: 22px;
}

.execution-card h3,
.execution-ops-card h3 {
    margin: 0;
    font-size: 1.3rem;
}

.execution-card p,
.execution-ops-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.execution-card-strong {
    background: linear-gradient(180deg, #102f35 0%, #15434a 100%);
    color: #f2fbfb;
}

.execution-card-strong .eyebrow,
.execution-card-strong p {
    color: rgba(242, 251, 251, 0.8);
}

.execution-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.execution-card-meta div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.execution-card-meta span {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.execution-link-stack {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.execution-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef7f6;
    color: #0f5e58;
}

.execution-step-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.execution-step-list li {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fafdfd;
}

.execution-step-list li.is-done {
    background: #ecfdf8;
    border-color: rgba(15, 118, 110, 0.2);
}

.execution-step-list span {
    color: var(--muted);
}

.execution-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.execution-quick-actions form {
    margin: 0;
}

.metric-card small {
    color: var(--muted);
    line-height: 1.5;
}

.metric-card-strong {
    background: linear-gradient(180deg, #0f766e 0%, #0e645e 100%);
    color: #f3fffd;
}

.metric-card-strong span,
.metric-card-strong small {
    color: rgba(243, 255, 253, 0.82);
}

.work-order-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.work-order-main,
.work-order-side {
    display: grid;
    gap: 18px;
}

.work-order-side {
    position: sticky;
    top: 26px;
}

.work-order-section {
    padding: 24px;
}

.work-order-side-card {
    position: static;
}

.accordion-card {
    padding: 0;
    overflow: hidden;
}

.accordion-card-wide {
    margin-bottom: 18px;
}

.accordion-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

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

.accordion-summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #eef7f6;
    color: #0f5e58;
    font-size: 1.25rem;
    font-weight: 700;
}

.accordion-card[open] .accordion-summary::after {
    content: "−";
}

.accordion-summary-copy {
    display: grid;
    gap: 4px;
}

.accordion-summary-copy strong {
    font-size: 1.08rem;
}

.accordion-summary-copy p,
.accordion-summary-meta {
    margin: 0;
    color: var(--muted);
}

.accordion-summary-meta {
    font-size: 0.92rem;
    text-align: right;
    line-height: 1.5;
}

.accordion-body {
    padding: 20px 24px 24px;
    border-top: 1px solid rgba(215, 224, 229, 0.8);
}

.work-order-side-stack {
    display: grid;
    gap: 18px;
}

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

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

.workflow-panel-grid-closure {
    grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
}

.work-order-summary-panel,
.workflow-subpanel,
.workflow-documents-stack {
    display: grid;
    gap: 18px;
}

.workflow-note-panel {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f6fafb 0%, #eef6f5 100%);
    border: 1px solid var(--line);
}

.workflow-note-panel p {
    margin: 0;
    line-height: 1.65;
}

.workflow-note-panel-compact {
    padding: 14px;
}

.workflow-spotlight-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, #123339 0%, #173f45 100%);
    color: #effaf9;
}

.workflow-spotlight-card p {
    margin: 0;
    color: rgba(239, 250, 249, 0.84);
    line-height: 1.6;
}

.workflow-spotlight-meta {
    display: grid;
    gap: 12px;
    padding-top: 8px;
}

.workflow-spotlight-meta div,
.work-order-subhead,
.signature-stage-copy {
    display: grid;
    gap: 4px;
}

.workflow-spotlight-meta span {
    color: rgba(239, 250, 249, 0.68);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.work-order-subhead h4,
.signature-record-copy h4,
.signature-stage-copy strong {
    margin: 0;
    font-size: 1.05rem;
}

.work-order-subhead p,
.signature-record-copy p,
.signature-stage-copy span {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.work-order-subhead-tight {
    margin-top: -2px;
}

.work-order-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-order-form-grid > label {
    min-width: 0;
}

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

.work-order-form-grid-schedule,
.work-order-form-grid-signature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signature-record {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f7fbfa 0%, #eef6f5 100%);
    border: 1px solid var(--line);
}

.signature-record-copy {
    display: grid;
    gap: 10px;
}

.signature-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 0.94rem;
}

.signature-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.signature-record-preview {
    display: flex;
    justify-content: flex-start;
}

.signature-capture-panel {
    margin-top: 12px;
}

.signature-stage {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fbfb;
    border: 1px solid var(--line);
}

.work-order-file-list small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.workflow-subpanel-signature .info-box,
.workflow-subpanel-signature .signature-record,
.workflow-subpanel-signature .signature-capture-panel {
    width: 100%;
}

.timeline-list-dense li p {
    margin: 6px 0 4px;
}

.workflow-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 16px;
}

.workflow-timeline li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: flex-start;
}

.workflow-timeline li p {
    margin: 4px 0 0;
    color: var(--muted);
}

.workflow-timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}

.workflow-timeline-empty {
    color: var(--muted);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card {
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    padding: 38px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(22px);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(22, 48, 54, 0.16);
}

.public-card {
    grid-template-columns: 1fr;
}

.login-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 0.96;
}

.login-brand {
    margin-bottom: 18px;
}

.login-brand img {
    display: block;
    width: min(100%, 240px);
    height: auto;
}

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

@media (max-width: 720px) {
    .login-page {
        padding: 16px;
    }

    .app-main {
        padding: 18px 16px 30px;
    }

    .page-header,
    .topbar,
    .toolbar,
    .button-row,
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .button,
    .button-row .button,
    .toolbar .button,
    .toolbar a.button,
    .inline-form > * {
        width: 100%;
    }

    .card,
    .metric-card,
    .login-card {
        padding: 18px;
    }

    .login-card {
        gap: 24px;
    }

    .onboarding-card {
        grid-template-columns: 1fr;
    }

    .calendar-hero,
    .calendar-shell,
    .calendar-lower-grid,
    .calendar-filter-form,
    .calendar-modal-grid,
    .calendar-agenda-item,
    .calendar-unplanned-item,
    .calendar-stat-strip,
    .calendar-day-summary,
    .calendar-slot-grid,
    .request-option-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day-top,
    .calendar-focus-time,
    .calendar-focus-meta,
    .calendar-filter-actions,
    .user-list-main,
    .user-list-head,
    .user-pill-strip,
    .owner-assignment-item {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-day-pills {
        justify-content: flex-start;
    }

    .table {
        min-width: 680px;
    }
}

/* Operational SaaS refinement */
:root {
    --bg: #edf1f3;
    --bg-soft: #f6f8f9;
    --surface: #ffffff;
    --surface-soft: #f7f9fa;
    --surface-muted: #f1f5f6;
    --surface-strong: #fcfdfd;
    --line: rgba(187, 198, 204, 0.84);
    --line-soft: rgba(201, 210, 215, 0.72);
    --shadow: 0 1px 2px rgba(16, 24, 30, 0.04);
    --shadow-strong: 0 8px 20px rgba(16, 24, 30, 0.06);
    --radius: 14px;
    --radius-lg: 18px;
}

body.app-body {
    background: var(--bg);
}

.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    padding: 12px;
}

.app-main {
    padding: 0 0 16px 16px;
}

.sidebar {
    top: 12px;
    height: calc(100vh - 24px);
    gap: 14px;
    padding: 16px 14px 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, #1c2530 0%, #151d27 100%);
    box-shadow: none;
}

.brand {
    gap: 12px;
    padding-bottom: 14px;
}

.nav {
    gap: 10px;
}

.nav a {
    padding: 10px 11px;
    border-radius: 12px;
}

.nav a:hover,
.nav a.is-active {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.07);
}

.nav-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.68rem;
}

.sidebar-context {
    padding: 14px 15px;
    border-radius: 16px;
}

.topbar {
    top: 12px;
    gap: 14px 18px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #f8fafb;
    border: 1px solid #d8e0e5;
    box-shadow: none;
    backdrop-filter: none;
}

.topbar-kicker-row {
    gap: 8px;
}

.topbar-context-pill {
    min-height: 26px;
    padding: 0 9px;
    background: #eef4f7;
}

.topbar-copy h1 {
    font-size: clamp(1.42rem, 1.8vw, 2rem);
}

.topbar-search label,
.company-switcher-form label,
.user-chip {
    border-radius: 12px;
    background: #f5f8f9;
}

.button,
.button-secondary,
.button-danger {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
}

.button {
    background: #234f68;
    border-color: #234f68;
}

.button:hover {
    transform: none;
    background: #1d465b;
    box-shadow: none;
}

.button-secondary:hover,
.button-danger:hover {
    transform: none;
    box-shadow: none;
}

.card,
.workflow-hero,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.execution-card,
.execution-ops-card,
.work-order-section,
.work-order-side-card,
.module-detail-card,
.settings-panel,
.user-create-card,
.user-rule-card,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.accordion-card,
.table-card,
.summary-panel {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

.card {
    padding: 18px 20px;
}

.workflow-hero {
    padding: 0 0 12px;
    border: none;
    border-bottom: 1px solid rgba(187, 198, 204, 0.84);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.workflow-hero-copy {
    gap: 8px;
}

.workflow-hero-copy h1 {
    font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.workflow-hero-copy h1 small {
    margin-top: 6px;
    font-size: 0.88rem;
}

.workflow-hero-copy p {
    max-width: 82ch;
    font-size: 0.95rem;
}

.workflow-hero-actions {
    gap: 8px;
}

.workflow-meta-row {
    gap: 8px;
}

.workflow-meta-pill {
    min-width: 136px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f7f9fa;
}

.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid,
.calendar-stat-strip {
    border-radius: 16px;
    box-shadow: none;
}

.overview-grid > .metric-card,
.settings-summary-grid > .settings-summary-card,
.settings-readiness-grid > .settings-summary-card,
.work-order-kpi-grid > .metric-card,
.calendar-stat-strip > .calendar-mini-stat {
    padding: 14px 16px;
}

.metric-card strong,
.settings-summary-card strong,
.calendar-mini-stat strong {
    font-size: 1.18rem;
}

.dashboard-priority-grid {
    gap: 10px;
}

.dashboard-priority-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #d8e0e5;
    background: #ffffff;
    box-shadow: none;
}

.section-head {
    margin-bottom: 14px;
}

.section-head h3 {
    font-size: 1.06rem;
}

.workspace-board {
    gap: 16px;
    grid-template-columns: minmax(0, 1.55fr) 300px;
}

.summary-panel-head {
    padding: 18px 18px 0;
}

.summary-panel-body {
    padding: 16px 18px 18px;
}

.summary-panel-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}

.summary-tile {
    padding: 12px 13px;
    border-radius: 12px;
    background: #f8fafb;
}

.summary-tile strong {
    font-size: 1.04rem;
}

.focus-panel {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #d8e0e5;
    border-left: 3px solid rgba(39, 93, 121, 0.56);
    background: #fbfcfc;
}

.module-filter-card,
.calendar-filter-card {
    padding: 18px;
}

.settings-panel-head,
.table-card > .section-head {
    padding: 18px 18px 0;
}

.settings-panel-body {
    gap: 18px;
    padding: 18px;
}

.settings-guide {
    padding: 14px 15px;
    border-radius: 14px;
}

.form-grid,
.settings-form-grid,
.customer-form-grid,
.work-order-form-grid,
.module-form-grid,
.compact-form {
    gap: 14px;
}

input,
select,
textarea {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
}

.table th {
    background: #f4f7f8;
}

.table tbody td {
    background: #ffffff;
}

.table tbody tr:hover td {
    background: #f9fbfb;
}

.module-list-card,
.customer-list-card,
.user-list-row,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card {
    padding: 18px;
}

.module-meta-grid,
.customer-meta-grid,
.user-mini-grid,
.mobile-assignment-meta {
    margin-top: 14px;
    border-radius: 14px;
}

.module-meta-card,
.customer-meta-card,
.user-mini-card,
.mobile-meta-card {
    padding: 12px 13px;
}

.customer-count-pill,
.member-pill,
.badge {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.info-box,
.empty-state,
.upload-panel {
    border-radius: 14px;
    background: #f8fafb;
    box-shadow: none;
}

@media (max-width: 960px) {
    .app-shell {
        padding: 0;
    }

    .sidebar {
        top: 12px;
        border-radius: 18px;
    }

    .app-main {
        padding: 12px;
    }

    .topbar {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .workflow-hero {
        padding-bottom: 10px;
    }
}

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

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

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    background: #ffffff;
}

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

@media (max-width: 1380px) {
    .calendar-hero,
    .calendar-shell,
    .calendar-lower-grid {
        grid-template-columns: 1fr;
    }

    .calendar-side-stack {
        grid-template-columns: 1fr;
        position: static;
    }

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

    .work-order-shell,
    .workflow-panel-grid-closure,
    .user-create-layout {
        grid-template-columns: 1fr;
    }

    .work-order-side {
        position: static;
    }

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

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

    .owner-company-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .customer-meta-grid,
    .customer-history-grid,
    .customer-form-layout,
    .owner-company-meta-grid,
    .owner-company-edit-grid,
    .owner-company-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        overflow-y: auto;
        transform: translateX(-104%);
        transition: transform 0.22s ease;
        box-shadow: 0 24px 64px rgba(11, 22, 26, 0.32);
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    body.nav-open .app-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 24px;
    }

    .brand {
        margin-bottom: 0;
    }

    .mobile-nav-toggle,
    .sidebar-close {
        display: inline-flex;
    }

    .topbar-logo {
        display: block;
    }

    .topbar {
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .topbar-brand,
    .topbar-actions,
    .owner-company-list-head,
    .owner-company-head-actions {
        width: 100%;
    }

    .topbar-copy h1 {
        font-size: 1.55rem;
    }

    .user-chip {
        flex: 1 1 220px;
    }

    .topbar-actions form {
        flex: 1 1 100%;
    }

    .calendar-filter-form,
    .calendar-modal-grid,
    .calendar-agenda-item,
    .calendar-unplanned-item {
        grid-template-columns: 1fr;
    }

    .calendar-hero {
        padding: 22px;
    }

    .calendar-stat-strip,
    .calendar-day-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-day-weekday {
        display: block;
    }

    .calendar-focus-time,
    .calendar-focus-meta,
    .calendar-day-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid,
    .line-item-row,
    .execution-strip,
    .execution-ops-grid,
    .work-order-kpi-grid,
    .work-order-shell,
    .workflow-panel-grid,
    .work-order-form-grid,
    .owner-company-grid,
    .owner-user-grid,
    .settings-summary-grid,
    .settings-form-grid,
    .customer-form-grid,
    .user-mini-grid,
    .signature-record,
    .workflow-hero,
    .owner-company-edit-grid,
    .owner-company-access-grid {
        grid-template-columns: 1fr;
    }

    .work-order-form-grid-assignment,
    .work-order-form-grid-schedule,
    .work-order-form-grid-signature,
    .workflow-panel-grid-closure {
        grid-template-columns: 1fr;
    }

    .customer-list-head,
    .customer-related-item,
    .customer-list-actions {
        display: grid;
    }

    .customer-related-meta {
        justify-items: start;
        text-align: left;
    }

    .month-weekdays {
        display: none;
    }

    .month-grid {
        grid-template-columns: 1fr;
    }

    .month-day {
        min-height: auto;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .modal-card,
    .modal-card-large {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .span-2,
    .span-3 {
        grid-column: auto;
    }

    .workflow-hero-actions {
        justify-content: flex-start;
    }

    .execution-card-meta {
        grid-template-columns: 1fr;
    }

    .accordion-summary {
        flex-direction: column;
    }

    .accordion-summary::after {
        align-self: flex-start;
    }

    .accordion-summary-meta {
        text-align: left;
    }

    .work-order-side,
    .work-order-side-card {
        position: static;
    }

    .signature-record-preview {
        justify-content: flex-start;
    }

    .table {
        min-width: 640px;
    }
}

/* Unified module UI */

.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, auto);
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f3faf9 52%, #edf5f4 100%);
    border: 1px solid rgba(215, 224, 229, 0.78);
    box-shadow: 0 24px 56px rgba(16, 36, 42, 0.1);
}

.page-header > div:first-child {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.page-header h2 {
    margin: 0;
    font-size: clamp(1.95rem, 2.8vw, 2.75rem);
    line-height: 1.02;
}

.page-header p,
.page-header .muted {
    margin: 0;
    color: #4f5d64;
    line-height: 1.65;
}

.page-header .toolbar,
.page-header .inline-form {
    justify-content: flex-end;
}

.page-header .inline-form {
    align-items: stretch;
}

.page-header .inline-form input {
    min-width: 220px;
}

.card {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 251, 0.98) 100%);
    border: 1px solid rgba(215, 224, 229, 0.88);
    box-shadow: 0 20px 44px rgba(16, 36, 42, 0.07);
}

.table-card {
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
}

.table-card > .section-head {
    margin: 0;
    padding: 24px 24px 18px;
}

.table-card > .empty-state {
    padding: 0 24px 24px;
}

.table-card > .section-head + .table,
.table-card > .section-head + .responsive-table {
    border-top: 1px solid rgba(215, 224, 229, 0.74);
}

.table-card .table {
    margin: 0;
}

.table th,
.table td {
    padding: 16px 18px;
}

.table th {
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    background: #f6faf9;
}

.table td {
    line-height: 1.55;
}

.table td small {
    color: var(--muted);
}

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

.table-actions a {
    margin-right: 0;
    font-weight: 600;
}

.section-head {
    margin-bottom: 18px;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.summary-list {
    gap: 14px;
}

.summary-list div {
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(215, 224, 229, 0.74);
}

.summary-list div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-list dd,
.summary-list p {
    margin: 0;
    line-height: 1.6;
}

.module-filter-card,
.module-section-card,
.module-form-panel,
.module-list-card,
.module-detail-card {
    display: grid;
    gap: 18px;
}

.module-filter-card,
.module-form-panel,
.module-detail-card {
    padding: 24px;
}

.module-filter-card {
    gap: 16px;
}

.module-filter-card .section-head {
    margin-bottom: 0;
}

.module-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(auto-fit, minmax(180px, 0.7fr));
    gap: 14px;
    align-items: end;
}

.module-filter-toolbar > :first-child {
    min-width: 0;
}

.module-filter-toolbar input,
.module-filter-toolbar select {
    min-width: 0;
}

.module-filter-toolbar .button,
.module-filter-toolbar a.button {
    width: auto;
    min-width: 148px;
    justify-self: start;
}

.module-list {
    display: grid;
    gap: 18px;
}

.module-list-card {
    padding: 24px;
}

.module-list-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.module-list-title {
    display: grid;
    gap: 6px;
}

.module-list-title h3 {
    margin: 0;
    font-size: 1.32rem;
}

.module-list-title p {
    margin: 0;
    color: var(--muted);
}

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

.module-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

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

.module-meta-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(215, 224, 229, 0.82);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.module-meta-card span {
    color: var(--muted);
    font-size: 0.81rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.module-meta-card strong {
    font-size: 1.04rem;
}

.module-meta-card small {
    color: var(--muted);
    line-height: 1.5;
}

.module-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.module-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: rgba(15, 118, 110, 0.06);
    color: var(--text);
    font-size: 0.92rem;
}

.module-pill-warning {
    border-color: rgba(180, 83, 9, 0.18);
    background: rgba(251, 191, 36, 0.12);
    color: #92400e;
}

.module-pill-danger {
    border-color: rgba(190, 24, 93, 0.18);
    background: rgba(251, 207, 232, 0.2);
    color: #9d174d;
}

.module-detail-grid,
.module-history-grid {
    display: grid;
    gap: 18px;
}

.module-detail-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
    align-items: start;
}

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

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

.module-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.module-related-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.module-related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.module-related-item a {
    display: inline-block;
    font-weight: 700;
    margin-bottom: 4px;
}

.module-related-item small {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}

.module-related-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
}

.module-form-shell {
    display: grid;
    gap: 18px;
}

.module-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

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

.module-form-grid > label,
.form-grid > label {
    min-width: 0;
}

.module-note-grid {
    display: grid;
    gap: 12px;
}

.module-note-grid .info-box {
    margin-top: 0;
}

.module-inline-stat {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(215, 224, 229, 0.82);
}

.module-inline-stat strong {
    font-size: 0.96rem;
}

.module-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

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

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

.empty-state {
    gap: 12px;
    text-align: left;
    justify-items: start;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.module-mail-template {
    display: grid;
    gap: 16px;
}

.module-mail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.05fr);
    gap: 18px;
    align-items: start;
}

.module-token-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.module-token-list li {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(215, 224, 229, 0.78);
    background: #f9fcfc;
    line-height: 1.55;
}

.responsive-table td[data-label]::before {
    content: none;
}

@media (max-width: 1180px) {
    .page-header,
    .module-detail-grid,
    .module-history-grid,
    .module-form-layout,
    .module-mail-grid,
    .detail-card-grid,
    .module-meta-grid,
    .module-kpi-grid {
        grid-template-columns: 1fr;
    }

    .page-header .toolbar,
    .page-header .inline-form {
        justify-content: flex-start;
    }
}

@media (max-width: 820px) {
    .page-header {
        padding: 22px;
        border-radius: 24px;
    }

    .page-header h2 {
        font-size: 1.9rem;
    }

    .module-list-head,
    .module-list-actions,
    .module-related-item,
    .module-related-meta,
    .module-form-layout,
    .module-mail-grid {
        display: grid;
    }

    .module-related-meta {
        justify-items: start;
        text-align: left;
    }

    .module-filter-toolbar {
        grid-template-columns: 1fr;
    }

    .module-filter-toolbar .button,
    .module-filter-toolbar a.button {
        width: 100%;
        justify-self: stretch;
    }

    .module-list-actions,
    .toolbar {
        align-items: stretch;
    }

    .toolbar input,
    .toolbar select,
    .toolbar .button,
    .toolbar a.button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .responsive-table {
        min-width: 0;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tbody tr {
        padding: 16px 18px;
        border-bottom: 1px solid var(--line);
    }

    .responsive-table td {
        padding: 0;
        border: none;
    }

    .responsive-table td + td {
        margin-top: 12px;
    }

    .responsive-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .responsive-table .table-actions {
        margin-top: 6px;
    }

    .table-card {
        overflow: hidden;
    }

    .page-header .inline-form {
        width: 100%;
    }

    .page-header .inline-form input {
        min-width: 0;
    }

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

/* Professional polish pass */

.nav {
    gap: 18px;
}

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

.nav-section-title {
    padding: 0 14px 4px;
    color: rgba(245, 251, 252, 0.56);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.nav a {
    display: grid;
    gap: 4px;
}

.nav-item-label {
    font-weight: 700;
}

.nav a small {
    color: rgba(245, 251, 252, 0.62);
    line-height: 1.35;
}

.nav a.is-active small,
.nav a:hover small {
    color: rgba(255, 255, 255, 0.82);
}

.sidebar-context {
    display: grid;
    gap: 6px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-context p {
    margin: 0;
    color: rgba(245, 251, 252, 0.72);
}

.section-head-compact {
    margin-bottom: 14px;
}

.flash {
    padding: 18px 20px;
    border: 1px solid rgba(215, 224, 229, 0.78);
    border-radius: 20px;
    box-shadow: 0 18px 34px rgba(16, 36, 42, 0.06);
}

.flash-success {
    background: linear-gradient(180deg, rgba(236, 253, 243, 0.96) 0%, rgba(248, 255, 251, 0.98) 100%);
    border-color: rgba(22, 101, 52, 0.14);
}

.flash-error {
    background: linear-gradient(180deg, rgba(254, 243, 242, 0.96) 0%, rgba(255, 249, 249, 0.98) 100%);
    border-color: rgba(180, 35, 24, 0.14);
}

.upload-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px dashed rgba(15, 118, 110, 0.22);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(245, 251, 249, 0.96) 0%, rgba(250, 253, 252, 0.98) 100%);
}

.upload-panel-copy {
    display: grid;
    gap: 4px;
}

.upload-panel-copy span {
    color: var(--muted);
}

.upload-panel-fields {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.upload-input {
    display: grid;
    gap: 8px;
    flex: 1 1 280px;
}

.upload-input small {
    color: var(--muted);
}

.public-card-split {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: stretch;
}

.public-card-wide {
    width: min(100%, 1180px);
}

.public-showcase,
.public-form-card {
    display: grid;
    gap: 20px;
}

.public-form-card {
    align-content: start;
    padding: 28px;
    border: 1px solid rgba(215, 224, 229, 0.78);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 251, 0.98) 100%);
}

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

.public-checklist-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(215, 224, 229, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.public-checklist-item span,
.public-form-note span {
    color: var(--muted);
    line-height: 1.55;
}

.public-summary-box {
    background: linear-gradient(180deg, rgba(223, 245, 239, 0.82) 0%, rgba(242, 251, 248, 0.92) 100%);
}

.public-form-note {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(215, 224, 229, 0.74);
}

.public-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.public-summary-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(215, 224, 229, 0.78);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
}

.public-summary-card span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.public-summary-card strong {
    font-size: 1.1rem;
}

.public-line-items {
    display: grid;
    gap: 10px;
}

.public-line-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid rgba(215, 224, 229, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.public-line-item p {
    margin: 6px 0 0;
    color: var(--muted);
}

.decision-grid {
    display: grid;
    gap: 12px;
}

.decision-card {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0%, rgba(255, 255, 255, 0.98) 100%);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(16, 36, 42, 0.05);
}

.decision-card span {
    color: var(--muted);
    line-height: 1.55;
}

.decision-card-secondary {
    border-color: rgba(215, 224, 229, 0.82);
    background: linear-gradient(135deg, rgba(246, 250, 251, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.decision-card-danger {
    border-color: rgba(180, 35, 24, 0.18);
    background: linear-gradient(135deg, rgba(254, 243, 242, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.dashboard-priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-priority-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.dashboard-priority-card h3 {
    margin: 0;
    font-size: 1.32rem;
}

.dashboard-priority-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.calendar-legend-row {
    margin-bottom: 18px;
}

.calendar-legend-card {
    display: grid;
    gap: 16px;
    padding: 20px 24px;
}

.calendar-legend-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-legend-copy {
    color: var(--muted);
    line-height: 1.6;
}

.settings-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 1180px) {
    .public-card-split,
    .public-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .sidebar-context {
        margin-bottom: 22px;
    }
}

@media (max-width: 720px) {
    .public-form-card {
        padding: 22px;
    }

    .upload-panel-fields,
    .public-line-item {
        display: grid;
    }

    .decision-card,
    .upload-panel .button,
    .upload-input {
        width: 100%;
    }
}

.feedback-list {
    gap: 14px;
}

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

.feedback-item p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.feedback-item-unread {
    border-left: 3px solid rgba(199, 122, 33, 0.5);
    padding-left: 14px;
}

.topbar-search {
    min-width: min(360px, 100%);
}

.topbar-search label {
    display: grid;
    gap: 6px;
}

.topbar-search span {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.topbar-search input {
    min-width: 240px;
}

.topbar-shortcut {
    white-space: nowrap;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.checkbox-inline input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.task-list {
    display: grid;
    gap: 16px;
}

.task-card {
    border: 1px solid rgba(13, 43, 49, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(13, 43, 49, 0.06);
}

.task-card[open] {
    border-color: rgba(22, 48, 54, 0.16);
}

.task-card-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
}

.task-card-summary::-webkit-details-marker {
    display: none;
}

.task-card-headline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.task-card-summary small,
.task-card-body p {
    color: var(--muted);
}

.task-card-meta {
    display: grid;
    justify-items: end;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.task-card-body {
    display: grid;
    gap: 16px;
    padding: 0 20px 20px;
}

.attention-chip-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 18px 0 22px;
}

.attention-card {
    padding: 18px 20px;
    display: grid;
    gap: 12px;
}

.attention-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attention-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.activity-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.activity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: start;
}

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

.activity-card {
    display: grid;
    gap: 14px;
    padding: 20px 22px;
}

.activity-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.activity-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.activity-side {
    display: grid;
    gap: 16px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.catalog-inline-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px 18px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(223, 245, 239, 0.85) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.catalog-inline-picker label {
    display: grid;
    gap: 8px;
}

.contact-card-list {
    display: grid;
    gap: 16px;
}

.contact-editor-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 251, 0.92) 100%);
}

.contact-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.mobile-hero {
    margin-bottom: 18px;
}

.mobile-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.mobile-assignment-list {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.mobile-assignment-card {
    display: grid;
    gap: 18px;
}

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

.mobile-assignment-head h3,
.mobile-assignment-head p {
    margin: 0;
}

.mobile-assignment-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.mobile-meta-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(246, 250, 251, 0.92);
    border: 1px solid rgba(215, 226, 232, 0.9);
}

.mobile-meta-card span,
.mobile-meta-card small {
    color: var(--muted);
}

.mobile-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.mobile-inline-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.78);
    border: 1px solid rgba(215, 226, 232, 0.9);
}

.mobile-inline-form label {
    display: grid;
    gap: 8px;
}

.mobile-upload-wrap {
    padding: 16px;
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.72);
    border: 1px dashed rgba(96, 114, 125, 0.35);
}

.mobile-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 1180px) {
    .activity-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .topbar-search {
        min-width: 100%;
    }

    .topbar-search input {
        min-width: 0;
    }

    .task-card-summary,
    .activity-card-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .task-card-meta {
        justify-items: start;
    }

    .catalog-inline-picker,
    .mobile-assignment-head {
        grid-template-columns: 1fr;
        display: grid;
    }
}

@media (max-width: 720px) {
    .activity-filter-row .button,
    .topbar-shortcut {
        width: 100%;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .catalog-inline-picker .button,
    .mobile-link-row .button,
    .mobile-inline-form .button {
        width: 100%;
    }

    .mobile-assignment-meta,
    .mobile-action-grid {
        grid-template-columns: 1fr;
    }
}

/* Product polish layer */
:root {
    --surface-elevated: rgba(255, 255, 255, 0.9);
    --surface-muted: rgba(246, 250, 251, 0.9);
    --line-strong: rgba(198, 213, 221, 0.96);
}

body {
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

.app-main {
    padding-top: 22px;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 40;
    margin-bottom: 28px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(215, 226, 232, 0.86);
    box-shadow: 0 18px 42px rgba(16, 36, 42, 0.08);
    backdrop-filter: blur(16px);
}

.topbar-copy {
    display: grid;
    gap: 6px;
}

.topbar-copy h1 {
    letter-spacing: -0.04em;
}

.topbar-copy p {
    margin: 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 0.96rem;
}

.topbar-search label,
.company-switcher-form label {
    display: grid;
    gap: 6px;
    min-width: min(100%, 300px);
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.82);
    border: 1px solid rgba(215, 226, 232, 0.94);
}

.topbar-search input,
.company-switcher-form select {
    padding: 0;
    min-height: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.topbar-search input:focus,
.company-switcher-form select:focus {
    box-shadow: none;
}

.user-chip {
    gap: 4px;
    padding: 12px 15px;
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.9);
    border-color: rgba(215, 226, 232, 0.92);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-section {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.nav a {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
    border-radius: 18px;
}

.nav a small {
    color: rgba(245, 251, 252, 0.72);
    line-height: 1.45;
}

.nav a.is-active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-context {
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.button,
.button-secondary,
.button-danger {
    min-height: 46px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.button-secondary:hover {
    background: #ffffff;
    border-color: rgba(15, 118, 110, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(16, 36, 42, 0.06);
}

.card {
    padding: 24px;
    border-color: rgba(215, 226, 232, 0.9);
    box-shadow: 0 18px 42px rgba(16, 36, 42, 0.07);
}

.workflow-hero {
    padding: 30px 32px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 251, 252, 0.97) 100%);
    border: 1px solid rgba(215, 226, 232, 0.9);
    box-shadow: 0 22px 50px rgba(16, 36, 42, 0.08);
}

.workflow-meta-pill {
    min-height: 60px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.84);
    border: 1px solid rgba(215, 226, 232, 0.9);
}

.section-head {
    margin-bottom: 18px;
}

.section-head p {
    margin: 0;
    max-width: 66ch;
    color: var(--muted);
}

.summary-list {
    gap: 0;
}

.summary-list div {
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(215, 226, 232, 0.76);
}

.summary-list div:last-child {
    border-bottom: none;
}

.summary-list dd,
.summary-list p {
    line-height: 1.6;
}

.info-box {
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 251, 252, 0.98) 0%, rgba(242, 248, 249, 0.96) 100%);
    border: 1px solid rgba(215, 226, 232, 0.92);
}

.empty-state {
    gap: 12px;
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 251, 252, 0.96) 0%, rgba(243, 248, 249, 0.96) 100%);
    border: 1px dashed rgba(15, 118, 110, 0.24);
}

.empty-state h3,
.empty-state p {
    margin: 0;
}

.table-card {
    overflow: hidden;
}

.table th,
.table td {
    padding: 16px 14px;
}

.table th {
    background: rgba(243, 248, 249, 0.96);
}

.table td {
    border-bottom-color: rgba(215, 226, 232, 0.82);
}

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

.table-actions a {
    margin-right: 0;
}

label > span {
    font-weight: 700;
    color: var(--text);
}

input,
select,
textarea {
    min-height: 48px;
    border-color: rgba(205, 218, 225, 0.96);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

textarea {
    min-height: 132px;
}

.flash {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    border-radius: 22px;
}

.flash-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.flash-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.86;
}

.flash-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.72);
}

.flash-hint {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    opacity: 0.9;
}

.flash-dismiss {
    width: 38px;
    height: 38px;
    min-height: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    color: currentColor;
    box-shadow: none;
}

.flash-list-card {
    margin-top: -6px;
}

.flash-list-card .flash-body {
    gap: 4px;
}

.flash-success .flash-icon {
    color: #166534;
}

.flash-error .flash-icon {
    color: #b42318;
}

.badge {
    gap: 8px;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
}

.badge-success {
    border-color: rgba(22, 101, 52, 0.12);
}

.badge-accent {
    border-color: rgba(15, 94, 88, 0.12);
}

.badge-warning {
    border-color: rgba(180, 83, 9, 0.12);
}

.badge-danger {
    border-color: rgba(180, 35, 24, 0.12);
}

.badge-neutral {
    border-color: rgba(51, 78, 104, 0.1);
}

.upload-panel {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 251, 252, 0.98) 0%, rgba(243, 248, 249, 0.96) 100%);
    border: 1px dashed rgba(96, 114, 125, 0.28);
}

.upload-panel-copy {
    gap: 6px;
}

@media (max-width: 960px) {
    .app-main {
        padding: 16px 16px 34px;
    }

    .topbar {
        top: 12px;
        padding: 16px;
        border-radius: 22px;
    }

    .workflow-hero,
    .card {
        padding: 20px;
    }

    .flash {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .flash-dismiss {
        justify-self: end;
        grid-column: 2;
    }
}

@media (max-width: 720px) {
    .topbar-copy p {
        font-size: 0.92rem;
    }

    .workflow-hero {
        padding: 18px;
        border-radius: 24px;
    }

    .workflow-meta-pill,
    .empty-state,
    .info-box {
        padding: 14px 15px;
    }
}

/* Business software redesign layer */
:root {
    --bg: #e7ecef;
    --bg-soft: #f2f5f7;
    --surface: #ffffff;
    --surface-soft: #f5f7f8;
    --surface-muted: #eef3f5;
    --surface-strong: #fbfcfc;
    --text: #17232d;
    --muted: #5d6c77;
    --muted-strong: #425461;
    --line: rgba(173, 186, 194, 0.78);
    --line-soft: rgba(193, 203, 210, 0.58);
    --accent: #275d79;
    --accent-dark: #1a455a;
    --accent-soft: rgba(39, 93, 121, 0.08);
    --success: #1f6d44;
    --warning: #9c611c;
    --danger: #a33a39;
    --nav-bg: #1a232d;
    --nav-bg-soft: #202b36;
    --nav-line: rgba(255, 255, 255, 0.08);
    --shadow: 0 18px 38px rgba(18, 30, 38, 0.06);
    --shadow-strong: 0 24px 52px rgba(18, 30, 38, 0.1);
    --radius: 18px;
    --radius-lg: 24px;
    --font-body: "IBM Plex Sans", "Manrope", "Segoe UI", sans-serif;
}

body.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(39, 93, 121, 0.08), transparent 24%),
        linear-gradient(180deg, #f1f4f6 0%, #e7ecef 100%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0;
    min-height: 100vh;
    padding: 18px;
}

.app-main {
    min-width: 0;
    padding: 0 0 20px 20px;
}

.workspace-content {
    display: grid;
    gap: 20px;
}

.app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15, 22, 28, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.sidebar {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: calc(100vh - 36px);
    padding: 18px 16px 16px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(121, 195, 222, 0.12), transparent 30%),
        linear-gradient(180deg, var(--nav-bg-soft) 0%, var(--nav-bg) 100%);
    color: #f3f7f9;
    border: 1px solid var(--nav-line);
    box-shadow: 0 30px 60px rgba(13, 20, 26, 0.2);
    overflow-y: auto;
}

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

.brand {
    display: grid;
    gap: 14px;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--nav-line);
}

.brand-logo {
    width: min(100%, 160px);
    max-height: 44px;
    object-fit: contain;
    object-position: left center;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #f7fbfd;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: rgba(243, 247, 249, 0.74);
    line-height: 1.45;
}

.nav {
    display: grid;
    gap: 14px;
}

.nav-section {
    display: grid;
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.nav-section-title {
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 247, 249, 0.48);
}

.nav a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 18px;
    color: rgba(243, 247, 249, 0.9);
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav a:hover,
.nav a.is-active {
    transform: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.nav-item-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.nav-item-label {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav a small {
    color: rgba(243, 247, 249, 0.64);
    line-height: 1.4;
}

.nav a:hover small,
.nav a.is-active small {
    color: rgba(243, 247, 249, 0.82);
}

.nav-item-marker {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.nav a.is-active .nav-item-icon {
    background: rgba(121, 195, 222, 0.18);
    color: #ffffff;
}

.nav a.is-active .nav-item-marker {
    background: #86cbe2;
}

.sidebar-context {
    margin-top: auto;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-context strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.sidebar-context p {
    margin: 0;
    color: rgba(243, 247, 249, 0.74);
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px 22px;
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: 28px;
    background: rgba(251, 252, 252, 0.92);
    border: 1px solid rgba(189, 200, 207, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.topbar-brand {
    flex: 1 1 420px;
    gap: 16px;
}

.topbar-copy {
    display: grid;
    gap: 7px;
}

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

.topbar-context-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
}

.topbar-copy h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.2rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.topbar-copy p {
    margin: 0;
    max-width: 72ch;
    color: var(--muted);
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    flex: 1 1 560px;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.topbar-search label,
.company-switcher-form label {
    min-width: 220px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.82);
}

.topbar-search span,
.company-switcher-form span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.topbar-search input,
.company-switcher-form select {
    color: var(--text);
}

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

.user-chip {
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.78);
    box-shadow: none;
}

.user-chip strong {
    font-size: 0.95rem;
}

.button,
.button-secondary,
.button-danger {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 14px;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: none;
}

.button {
    background: linear-gradient(180deg, #2d6785 0%, #214f66 100%);
    color: #ffffff;
    border: 1px solid rgba(33, 79, 102, 0.9);
}

.button:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #275c77 0%, #1b4459 100%);
    box-shadow: 0 12px 24px rgba(26, 69, 90, 0.16);
}

.button-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(177, 190, 198, 0.84);
}

.button-secondary:hover {
    background: var(--surface-strong);
    border-color: rgba(117, 138, 151, 0.68);
    box-shadow: 0 12px 22px rgba(18, 30, 38, 0.06);
}

.button-danger {
    background: linear-gradient(180deg, #b54844 0%, #942f2d 100%);
    border-color: rgba(148, 47, 45, 0.92);
}

.button-danger:hover {
    box-shadow: 0 12px 24px rgba(148, 47, 45, 0.16);
}

.eyebrow {
    margin-bottom: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.card,
.workflow-hero,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.execution-card,
.execution-ops-card,
.work-order-section,
.work-order-side-card,
.module-detail-card,
.settings-panel,
.user-create-card,
.user-rule-card,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.accordion-card,
.table-card {
    border-radius: 24px;
    border: 1px solid rgba(182, 194, 201, 0.74);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 250, 0.98) 100%);
    box-shadow: var(--shadow);
}

.card {
    padding: 22px 24px;
}

.workflow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 22px 28px;
    padding: 26px 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 248, 0.98) 100%);
}

.workflow-hero-copy {
    display: grid;
    gap: 10px;
}

.workflow-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.2vw, 2.4rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.workflow-hero-copy h1 small {
    display: block;
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
    font-weight: 600;
}

.workflow-hero-copy p {
    margin: 0;
    max-width: 74ch;
    color: var(--muted);
}

.workflow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.workflow-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workflow-meta-pill {
    display: grid;
    gap: 3px;
    min-width: 150px;
    min-height: 0;
    padding: 11px 13px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.74);
}

.workflow-meta-pill span,
.workflow-meta-pill strong {
    margin: 0;
}

.status-inline .badge {
    width: fit-content;
}

.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid,
.calendar-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(182, 194, 201, 0.74);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.overview-grid > .metric-card,
.settings-summary-grid > .settings-summary-card,
.settings-readiness-grid > .settings-summary-card,
.work-order-kpi-grid > .metric-card,
.calendar-stat-strip > .calendar-mini-stat {
    min-height: 0;
    padding: 18px 20px;
    border: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.metric-card,
.settings-summary-card,
.calendar-mini-stat {
    display: grid;
    gap: 4px;
}

.metric-card span,
.settings-summary-card .eyebrow,
.calendar-mini-stat span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.metric-card strong,
.settings-summary-card strong,
.calendar-mini-stat strong {
    font-size: 1.4rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.metric-card small,
.settings-summary-card p,
.calendar-mini-stat small {
    margin: 0;
    color: var(--muted);
}

.dashboard-priority-grid {
    display: grid;
    gap: 12px;
}

.dashboard-priority-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px 24px;
    padding: 20px 22px;
}

.dashboard-priority-card h3,
.dashboard-priority-card p {
    margin: 0;
}

.dashboard-priority-card p {
    color: var(--muted);
}

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

.section-head h3 {
    margin: 4px 0 0;
    font-size: 1.18rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    max-width: 72ch;
    color: var(--muted);
}

.detail-grid,
.module-detail-grid,
.module-history-grid,
.customer-history-grid,
.activity-layout,
.calendar-shell,
.user-create-layout,
.public-card-split {
    display: grid;
    gap: 20px;
    align-items: start;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
}

.workspace-board {
    display: grid;
    gap: 20px;
    align-items: start;
    grid-template-columns: minmax(0, 1.45fr) 320px;
}

.workspace-main,
.workspace-side {
    display: grid;
    gap: 20px;
}

.summary-panel {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(182, 194, 201, 0.74);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 250, 0.98) 100%);
    box-shadow: var(--shadow);
}

.summary-panel-head {
    padding: 20px 22px 0;
}

.summary-panel-head h3 {
    margin: 6px 0 0;
    font-size: 1.08rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.summary-panel-body {
    display: grid;
    gap: 14px;
    padding: 18px 22px 22px;
}

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

.summary-tile {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(193, 203, 210, 0.68);
}

.summary-tile span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-tile strong {
    font-size: 1.16rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.summary-tile small,
.summary-note {
    margin: 0;
    color: var(--muted);
}

.focus-panel {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border-left: 4px solid rgba(39, 93, 121, 0.46);
}

.focus-panel h3,
.focus-panel p {
    margin: 0;
}

.module-list-shell {
    display: grid;
    gap: 18px;
}

.detail-stack,
.activity-list,
.calendar-side-stack {
    display: grid;
    gap: 20px;
}

.module-filter-card,
.calendar-filter-card {
    padding: 20px 22px;
}

.toolbar,
.module-filter-toolbar,
.customer-filter-toolbar,
.calendar-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
}

.toolbar > *,
.module-filter-toolbar > *,
.customer-filter-toolbar > *,
.calendar-filter-form > * {
    flex: 1 1 180px;
}

.toolbar .button,
.module-filter-toolbar .button,
.customer-filter-toolbar .button,
.calendar-filter-form .button,
.toolbar .checkbox-inline {
    flex: 0 0 auto;
}

label > span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted-strong);
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(182, 194, 201, 0.9);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(39, 93, 121, 0.72);
    box-shadow: 0 0 0 4px rgba(39, 93, 121, 0.08);
}

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

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

.checkbox-inline,
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
}

.checkbox-inline input,
.checkbox-row input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.settings-panel,
.table-card {
    padding: 0;
    overflow: hidden;
}

.settings-panel-head,
.table-card > .section-head {
    padding: 22px 24px 0;
    margin-bottom: 0;
}

.settings-panel-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 24px;
    padding: 22px 24px 24px;
}

.settings-guide {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.76);
}

.settings-guide strong {
    display: block;
    margin-bottom: 10px;
}

.settings-guide-list,
.settings-guide-list-numbered {
    display: grid;
    gap: 8px;
    padding-left: 18px;
    margin: 0;
    color: var(--muted);
}

.form-grid,
.settings-form-grid,
.customer-form-grid,
.work-order-form-grid,
.module-form-grid,
.compact-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-grid > label,
.settings-form-grid > label,
.customer-form-grid > label,
.work-order-form-grid > label,
.module-form-grid > label,
.compact-form > label {
    min-width: 0;
}

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

.span-3 {
    grid-column: span 3;
}

.module-form-shell,
.stack-lg,
.stack {
    display: grid;
    gap: 20px;
}

.table-card .table,
.table-card .responsive-table {
    margin-top: 18px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 15px 14px;
    text-align: left;
    vertical-align: top;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f6f7;
    border-top: 1px solid rgba(189, 200, 207, 0.74);
    border-bottom: 1px solid rgba(189, 200, 207, 0.74);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.table tbody td {
    border-bottom: 1px solid rgba(193, 203, 210, 0.68);
    background: rgba(255, 255, 255, 0.72);
}

.table tbody tr:hover td {
    background: rgba(39, 93, 121, 0.04);
}

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

.table-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--accent-dark);
    font-weight: 700;
}

.module-list,
.customer-list,
.user-list,
.task-list,
.mobile-assignment-list {
    display: grid;
    gap: 14px;
}

.module-list-card,
.customer-list-card,
.user-list-row,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card {
    padding: 20px 22px;
}

.module-list-head,
.customer-list-head,
.mobile-assignment-head,
.activity-card-head,
.contact-editor-head,
.task-card-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px 18px;
}

.module-list-title h3,
.customer-list-title h3,
.activity-card-head h3,
.mobile-assignment-head h3,
.contact-editor-head strong {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.module-list-title p,
.customer-list-title p,
.activity-card p,
.mobile-assignment-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.module-list-actions,
.customer-list-actions,
.mobile-link-row,
.customer-title-row,
.module-title-row,
.user-pill-strip,
.member-preview,
.customer-count-row,
.mobile-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-meta-grid,
.customer-meta-grid,
.user-mini-grid,
.mobile-assignment-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    overflow: hidden;
    margin-top: 16px;
    border-radius: 18px;
    border: 1px solid rgba(193, 203, 210, 0.68);
    background: var(--surface-soft);
}

.module-meta-card,
.customer-meta-card,
.user-mini-card,
.mobile-meta-card {
    min-height: 0;
    padding: 14px 15px;
    border-right: 1px solid rgba(193, 203, 210, 0.68);
    border-bottom: 1px solid rgba(193, 203, 210, 0.68);
    background: transparent;
    box-shadow: none;
}

.module-meta-card span,
.customer-meta-card span,
.user-mini-card span,
.mobile-meta-card span {
    display: block;
    margin-bottom: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.module-meta-card strong,
.customer-meta-card strong,
.user-mini-card strong,
.mobile-meta-card strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.module-meta-card small,
.customer-meta-card small,
.user-mini-card small,
.mobile-meta-card small {
    color: var(--muted);
}

.customer-count-pill,
.member-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid rgba(193, 203, 210, 0.72);
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.member-pill small {
    margin-left: 6px;
    color: var(--muted);
}

.member-pill-muted,
.customer-count-pill-warning {
    background: rgba(156, 97, 28, 0.08);
    border-color: rgba(156, 97, 28, 0.2);
    color: var(--warning);
}

.module-related-list,
.customer-related-list {
    display: grid;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid rgba(193, 203, 210, 0.68);
}

.module-related-item,
.customer-related-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(193, 203, 210, 0.68);
}

.module-related-item:last-child,
.customer-related-item:last-child {
    border-bottom: none;
}

.module-related-item p,
.customer-related-item p,
.module-related-item small,
.customer-related-item small {
    margin: 4px 0 0;
    color: var(--muted);
}

.module-related-meta,
.customer-related-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 12px;
    text-align: right;
}

.summary-list {
    display: grid;
    gap: 0;
}

.summary-list div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(193, 203, 210, 0.68);
}

.summary-list div:last-child {
    border-bottom: none;
}

.summary-list dt {
    color: var(--muted);
    font-weight: 700;
}

.summary-list dd,
.summary-list p {
    margin: 0;
}

.info-box,
.empty-state,
.upload-panel {
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.76);
}

.info-box {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
}

.empty-state {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
}

.empty-state h3,
.empty-state p {
    margin: 0;
}

.line-items {
    display: grid;
    gap: 10px;
}

.line-item-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr repeat(4, minmax(0, 0.7fr)) auto;
    gap: 10px;
    align-items: start;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.74);
}

.catalog-inline-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.74);
}

.catalog-inline-picker label {
    flex: 1 1 300px;
}

.flash {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(189, 200, 207, 0.72);
    box-shadow: var(--shadow);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(31, 109, 68, 0.08);
    color: var(--success);
}

.badge-accent {
    background: rgba(39, 93, 121, 0.09);
    color: var(--accent-dark);
}

.badge-warning {
    background: rgba(156, 97, 28, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(163, 58, 57, 0.08);
    color: var(--danger);
}

.badge-neutral {
    background: rgba(66, 84, 97, 0.08);
    color: var(--muted-strong);
}

.activity-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-filter-row .button {
    min-height: 38px;
    padding: 8px 14px;
}

.task-card {
    overflow: hidden;
}

.task-card-summary {
    cursor: pointer;
    padding: 0;
}

.task-card-summary::-webkit-details-marker,
.accordion-summary::-webkit-details-marker,
.user-edit-toggle::-webkit-details-marker {
    display: none;
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    color: var(--muted);
}

.task-card-body {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(193, 203, 210, 0.68);
}

.calendar-hero,
.calendar-filter-card,
.calendar-legend-card,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 250, 0.98) 100%);
}

.calendar-month-grid {
    gap: 10px;
}

.month-day,
.calendar-day-card {
    min-height: 180px;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(189, 200, 207, 0.72);
    box-shadow: none;
}

.month-day-selected {
    border-color: rgba(39, 93, 121, 0.5);
    background: rgba(39, 93, 121, 0.06);
}

.month-day-today {
    box-shadow: inset 0 0 0 1px rgba(39, 93, 121, 0.28);
}

.calendar-event {
    border-radius: 14px;
    border: 1px solid rgba(189, 200, 207, 0.68);
    background: rgba(255, 255, 255, 0.92);
}

.calendar-event-success {
    border-color: rgba(31, 109, 68, 0.26);
}

.calendar-event-accent {
    border-color: rgba(39, 93, 121, 0.26);
}

.calendar-event-warning {
    border-color: rgba(156, 97, 28, 0.28);
}

.calendar-event-danger {
    border-color: rgba(163, 58, 57, 0.24);
}

.public-card,
.login-card,
.onboarding-card,
.public-form-card,
.public-summary-card,
.decision-card {
    border-radius: 24px;
    border: 1px solid rgba(182, 194, 201, 0.74);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 250, 0.98) 100%);
    box-shadow: var(--shadow);
}

@media (max-width: 1240px) {
    .workspace-board,
    .detail-grid,
    .module-detail-grid,
    .module-history-grid,
    .customer-history-grid,
    .activity-layout,
    .calendar-shell,
    .user-create-layout,
    .public-card-split {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 1080px) {
    .form-grid,
    .settings-form-grid,
    .customer-form-grid,
    .work-order-form-grid,
    .module-form-grid,
    .compact-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .line-item-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .app-shell {
        display: block;
        padding: 0;
    }

    .sidebar {
        position: fixed;
        top: 12px;
        left: 12px;
        bottom: 12px;
        width: min(86vw, 340px);
        height: auto;
        max-height: calc(100vh - 24px);
        transform: translateX(-108%);
        transition: transform 0.2s ease;
        z-index: 80;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    body.nav-open .app-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        padding: 14px;
    }

    .topbar {
        top: 12px;
        margin-bottom: 16px;
        padding: 16px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .topbar-search,
    .company-switcher-form,
    .topbar-session {
        flex: 1 1 100%;
    }

    .topbar-session {
        justify-content: space-between;
    }

    .mobile-nav-toggle,
    .sidebar-close {
        display: inline-flex;
    }

    .workflow-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .workflow-hero-actions {
        justify-content: flex-start;
    }

    .section-head,
    .module-list-head,
    .customer-list-head,
    .mobile-assignment-head,
    .task-card-summary,
    .activity-card-head,
    .topbar-session {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 720px) {
    .topbar-copy h1 {
        font-size: 1.45rem;
    }

    .card,
    .workflow-hero,
    .module-list-card,
    .customer-list-card,
    .user-list-row,
    .activity-card,
    .mobile-assignment-card,
    .task-card,
    .contact-editor-card,
    .settings-panel-body,
    .table-card > .section-head,
    .settings-panel-head {
        padding-left: 18px;
        padding-right: 18px;
    }

    .overview-grid,
    .settings-summary-grid,
    .settings-readiness-grid,
    .work-order-kpi-grid,
    .calendar-stat-strip,
    .summary-panel-grid {
        grid-template-columns: 1fr;
    }

    .overview-grid > .metric-card,
    .settings-summary-grid > .settings-summary-card,
    .settings-readiness-grid > .settings-summary-card,
    .work-order-kpi-grid > .metric-card,
    .calendar-stat-strip > .calendar-mini-stat {
        border-right: none;
    }

    .form-grid,
    .settings-form-grid,
    .customer-form-grid,
    .work-order-form-grid,
    .module-form-grid,
    .compact-form,
    .line-item-row {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 {
        grid-column: auto;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        padding: 12px 18px;
        border-bottom: 1px solid rgba(193, 203, 210, 0.68);
    }

    .table td {
        padding: 6px 0;
        border: none;
        background: transparent;
    }

    .table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .table-actions {
        margin-top: 8px;
    }
}

/* Final operational override */
:root {
    --bg: #edf1f3;
    --bg-soft: #f6f8f9;
    --surface-soft: #f7f9fa;
    --surface-muted: #f1f5f6;
    --line: rgba(187, 198, 204, 0.84);
    --line-soft: rgba(201, 210, 215, 0.72);
    --shadow: 0 1px 2px rgba(16, 24, 30, 0.04);
    --shadow-strong: 0 8px 20px rgba(16, 24, 30, 0.06);
    --radius: 14px;
    --radius-lg: 18px;
}

body.app-body {
    background: var(--bg);
}

.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    padding: 12px;
}

.app-main {
    padding: 0 0 16px 16px;
}

.sidebar {
    top: 12px;
    height: calc(100vh - 24px);
    gap: 14px;
    padding: 16px 14px 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, #1c2530 0%, #151d27 100%);
    box-shadow: none;
}

.brand {
    gap: 12px;
    padding-bottom: 14px;
}

.nav {
    gap: 10px;
}

.nav a {
    padding: 10px 11px;
    border-radius: 12px;
}

.nav a:hover,
.nav a.is-active {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.07);
}

.nav-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.68rem;
}

.sidebar-context {
    padding: 14px 15px;
    border-radius: 16px;
}

.topbar {
    top: 12px;
    gap: 14px 18px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #f8fafb;
    border: 1px solid #d8e0e5;
    box-shadow: none;
    backdrop-filter: none;
}

.topbar-copy h1 {
    font-size: clamp(1.42rem, 1.8vw, 2rem);
}

.topbar-context-pill,
.topbar-search label,
.company-switcher-form label,
.user-chip {
    border-radius: 12px;
    background: #f5f8f9;
}

.button,
.button-secondary,
.button-danger {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: none;
}

.button {
    background: #234f68;
    border-color: #234f68;
}

.button:hover,
.button-secondary:hover,
.button-danger:hover {
    transform: none;
    box-shadow: none;
}

.button:hover {
    background: #1d465b;
}

.card,
.summary-panel,
.workflow-hero,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.execution-card,
.execution-ops-card,
.work-order-section,
.work-order-side-card,
.module-detail-card,
.settings-panel,
.user-create-card,
.user-rule-card,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.accordion-card,
.table-card {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

.card {
    padding: 18px 20px;
}

.workflow-hero {
    padding: 0 0 12px;
    border: none;
    border-bottom: 1px solid rgba(187, 198, 204, 0.84);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.workflow-hero-copy {
    gap: 8px;
}

.workflow-hero-copy h1 {
    font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.workflow-hero-copy h1 small {
    margin-top: 6px;
    font-size: 0.88rem;
}

.workflow-meta-pill {
    min-width: 136px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f7f9fa;
}

.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid,
.calendar-stat-strip {
    border-radius: 16px;
    box-shadow: none;
}

.overview-grid > .metric-card,
.settings-summary-grid > .settings-summary-card,
.settings-readiness-grid > .settings-summary-card,
.work-order-kpi-grid > .metric-card,
.calendar-stat-strip > .calendar-mini-stat {
    padding: 14px 16px;
}

.metric-card strong,
.settings-summary-card strong,
.calendar-mini-stat strong {
    font-size: 1.18rem;
}

.dashboard-priority-grid {
    gap: 10px;
}

.dashboard-priority-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #d8e0e5;
    background: #ffffff;
    box-shadow: none;
}

.section-head {
    margin-bottom: 14px;
}

.section-head h3 {
    font-size: 1.06rem;
}

.workspace-board {
    gap: 16px;
    grid-template-columns: minmax(0, 1.55fr) 300px;
}

.summary-panel-head {
    padding: 18px 18px 0;
}

.summary-panel-body {
    padding: 16px 18px 18px;
}

.summary-panel-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}

.summary-tile {
    padding: 12px 13px;
    border-radius: 12px;
    background: #f8fafb;
}

.focus-panel {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #d8e0e5;
    border-left: 3px solid rgba(39, 93, 121, 0.56);
    background: #fbfcfc;
}

.module-filter-card,
.calendar-filter-card {
    padding: 18px;
}

.settings-panel-head,
.table-card > .section-head {
    padding: 18px 18px 0;
}

.settings-panel-body {
    gap: 18px;
    padding: 18px;
}

.settings-guide {
    padding: 14px 15px;
    border-radius: 14px;
}

.form-grid,
.settings-form-grid,
.customer-form-grid,
.work-order-form-grid,
.module-form-grid,
.compact-form {
    gap: 14px;
}

input,
select,
textarea {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
}

.table th {
    background: #f4f7f8;
}

.table tbody td {
    background: #ffffff;
}

.table tbody tr:hover td {
    background: #f9fbfb;
}

.module-list-card,
.customer-list-card,
.user-list-row,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card {
    padding: 18px;
}

.module-meta-grid,
.customer-meta-grid,
.user-mini-grid,
.mobile-assignment-meta {
    margin-top: 14px;
    border-radius: 14px;
}

.module-meta-card,
.customer-meta-card,
.user-mini-card,
.mobile-meta-card {
    padding: 12px 13px;
}

.customer-count-pill,
.member-pill,
.badge {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.info-box,
.empty-state,
.upload-panel {
    border-radius: 14px;
    background: #f8fafb;
    box-shadow: none;
}

@media (max-width: 1240px) {
    .workspace-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .app-main {
        padding: 12px;
    }

    .sidebar {
        border-radius: 18px;
    }

    .topbar {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .workflow-hero {
        grid-template-columns: 1fr;
        padding: 0 0 10px;
    }
}

/* Dense application layout */
.nav a {
    position: relative;
    display: block;
    padding: 8px 10px 8px 14px;
    border-radius: 10px;
}

.nav-item-icon,
.nav a small,
.nav-item-marker {
    display: none !important;
}

.nav a::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 4px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.nav a.is-active::before {
    background: #86cbe2;
}

.nav-item-label {
    display: block;
    font-size: 0.92rem;
    line-height: 1.25;
}

.topbar-copy p,
.workflow-hero-copy p {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
}

.workflow-hero-copy p {
    max-width: 76ch;
}

.workspace-board {
    grid-template-columns: 1fr;
}

.workspace-main {
    order: 2;
}

.workspace-side {
    order: 1;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

.summary-panel {
    border-radius: 14px;
}

.summary-panel-head {
    padding: 14px 14px 0;
}

.summary-panel-body {
    padding: 12px 14px 14px;
}

.summary-panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.table-card,
.module-filter-card,
.focus-panel,
.summary-panel,
.settings-panel,
.module-detail-card,
.work-order-section,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card {
    border-radius: 12px;
}

.table-card > .section-head,
.settings-panel-head {
    padding: 14px 14px 0;
}

.settings-panel-body,
.module-filter-card,
.calendar-filter-card {
    padding: 14px;
}

.table th,
.table td {
    padding: 12px 10px;
}

.table-actions a {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.overview-grid > .metric-card,
.settings-summary-grid > .settings-summary-card,
.settings-readiness-grid > .settings-summary-card,
.work-order-kpi-grid > .metric-card,
.calendar-stat-strip > .calendar-mini-stat,
.summary-tile {
    padding: 10px 12px;
}

.module-list-card,
.customer-list-card,
.user-list-row,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.card {
    border-radius: 12px;
    padding: 14px 16px;
}

.task-card-body {
    margin-top: 12px;
    padding-top: 12px;
}

.module-meta-grid,
.customer-meta-grid,
.user-mini-grid,
.mobile-assignment-meta {
    margin-top: 10px;
}

.dashboard-priority-card {
    display: block;
    padding: 12px 14px;
}

.dashboard-priority-card .button {
    margin-top: 10px;
}

@media (max-width: 960px) {
    .workspace-side {
        grid-template-columns: 1fr;
    }
}

/* Precision business software refinement */
:root {
    --bg: #eef3f5;
    --surface: #ffffff;
    --surface-soft: #f7fafb;
    --text: #18252d;
    --muted: #62717b;
    --line: #d5dfe4;
    --accent: #2d6b87;
    --accent-dark: #1f5068;
    --accent-soft: #e8f1f6;
    --shadow: none;
    --shadow-strong: none;
    --radius: 12px;
    --radius-lg: 16px;
    --font-body: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
    background: linear-gradient(180deg, #f4f7f9 0%, #edf2f5 100%);
}

.app-shell {
    grid-template-columns: 236px 1fr;
}

.sidebar {
    padding: 20px 16px 16px;
    background: #18242c;
    color: #eff5f7;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

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

.brand {
    gap: 8px;
    margin-bottom: 18px;
}

.brand-logo {
    width: min(100%, 148px);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
}

.brand-copy {
    gap: 2px;
}

.brand-copy strong {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.brand-copy small {
    font-size: 0.76rem;
    color: rgba(239, 245, 247, 0.68);
}

.nav {
    gap: 10px;
}

.nav-section {
    display: grid;
    gap: 4px;
}

.nav-section-title {
    margin: 0 10px 2px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(223, 235, 240, 0.45);
}

.nav a {
    padding: 7px 10px 7px 14px;
    border-radius: 8px;
    color: rgba(239, 245, 247, 0.76);
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav a::before {
    top: 6px;
    bottom: 6px;
    left: 5px;
    width: 2px;
    background: transparent;
}

.nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.05);
    transform: none;
    font-weight: 600;
}

.nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
    transform: none;
}

.nav a.is-active::before {
    background: #9ec5d7;
}

.nav-item-label {
    font-size: 0.88rem;
}

.sidebar-context {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-context p {
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(223, 235, 240, 0.7);
}

.app-main {
    padding: 18px 24px 26px;
}

.topbar {
    top: 0;
    gap: 10px 18px;
    margin-bottom: 10px;
    padding: 2px 0 10px;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #dbe4e9;
}

.topbar-brand {
    gap: 12px;
    align-items: center;
}

.topbar-logo {
    max-height: 24px;
    width: auto;
}

.topbar-copy {
    gap: 2px;
}

.topbar-kicker-row {
    gap: 8px;
    margin-bottom: 0;
    align-items: center;
}

.eyebrow,
.topbar-context-pill {
    font-size: 0.69rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-context-pill {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #f5f8fa;
    border: 1px solid #d7e2e7;
    color: #5f707b;
}

.topbar-copy h1 {
    font-size: clamp(1.12rem, 1.4vw, 1.45rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.topbar-copy p {
    margin: 0;
    max-width: 62ch;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #6b7a83;
}

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

.topbar-actions > * {
    flex: 0 0 auto;
}

.topbar-search {
    min-width: min(320px, 100%);
    max-width: 360px;
}

.topbar-search label,
.company-switcher-form label {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.topbar-search span,
.company-switcher-form span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topbar-search input,
.company-switcher-form select {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d4dde3;
    background: #ffffff;
    color: var(--text);
}

.topbar-search input {
    min-width: min(320px, 100%);
}

.company-switcher-form select {
    min-width: 210px;
    max-width: 300px;
}

.topbar-search input::placeholder {
    color: #8a99a2;
}

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

.topbar-shortcut {
    min-width: 0;
}

.topbar-session {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    border-left: 1px solid #dbe4e9;
}

.user-chip {
    gap: 1px;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #d6dfe5;
    background: #ffffff;
}

.user-chip strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.user-chip small {
    font-size: 0.72rem;
    line-height: 1.2;
    color: #6d7d87;
}

.topbar-logout {
    min-width: 0;
}

.button,
.button-secondary,
.button-danger,
button,
input,
select,
textarea {
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.button,
.button-secondary,
.button-danger {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none;
}

.button {
    background: #eaf3f8;
    border: 1px solid #bfd3df;
    color: #18384a;
}

.button:hover {
    background: #dfeef6;
    border-color: #aac6d6;
    color: #142f3f;
}

.button-secondary {
    background: #ffffff;
    border: 1px solid #d4dde3;
    color: #324853;
}

.button-secondary:hover {
    background: #f7fafb;
    border-color: #c1d0d9;
    color: #253944;
}

.button-danger {
    background: #fff5f3;
    border: 1px solid #ebcac3;
    color: #9d301d;
}

.button-danger:hover {
    background: #fdecea;
    border-color: #e2b5ad;
    color: #862818;
}

input,
select,
textarea {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid #d4dde3;
    background: #ffffff;
    color: #1b2931;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #a7c1cf;
    box-shadow: 0 0 0 3px rgba(170, 196, 209, 0.22);
}

textarea {
    min-height: 96px;
}

.workflow-hero {
    align-items: end;
    gap: 10px 16px;
    margin-bottom: 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid #dbe4e9;
}

.workflow-hero-copy {
    gap: 4px;
}

.workflow-hero-copy h1 {
    font-size: clamp(1.18rem, 1.5vw, 1.5rem);
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.workflow-hero-copy h1 small {
    margin-top: 4px;
    font-size: 0.79rem;
    color: #6c7a83;
}

.workflow-hero-copy p {
    max-width: 70ch;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.38;
}

.workflow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.workflow-meta-pill {
    min-width: 0;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid #dbe4e9;
    background: #f7fafb;
}

.card,
.summary-panel,
.table-card,
.module-filter-card,
.focus-panel,
.settings-panel,
.module-detail-card,
.work-order-section,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.execution-card,
.execution-ops-card,
.work-order-side-card,
.user-create-card,
.user-rule-card,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.accordion-card,
.info-box,
.empty-state,
.upload-panel {
    border-radius: 10px;
    border: 1px solid #dde6eb;
    background: #ffffff;
    box-shadow: none;
}

.card {
    padding: 14px 16px;
}

.summary-panel-head,
.table-card > .section-head,
.settings-panel-head {
    padding: 13px 14px 0;
}

.summary-panel-body,
.settings-panel-body,
.module-filter-card,
.calendar-filter-card {
    padding: 12px 14px 14px;
}

.focus-panel {
    padding: 12px 14px;
    border-left: 2px solid #9ebac8;
    background: #fbfcfd;
}

.summary-tile,
.module-meta-card,
.customer-meta-card,
.user-mini-card,
.mobile-meta-card {
    padding: 10px 11px;
    border-radius: 10px;
    background: #f7fafb;
    border: 1px solid #e2eaee;
}

.module-meta-grid,
.customer-meta-grid,
.user-mini-grid,
.mobile-assignment-meta {
    gap: 8px;
    margin-top: 8px;
}

.table th {
    padding: 10px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #60707a;
    background: #f6f8f9;
    border-bottom-color: #dde6eb;
}

.table td {
    padding: 10px 10px;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: #f9fbfc;
}

.table-actions a,
.table-actions button {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.customer-count-pill,
.member-pill,
.badge {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.74rem;
}

.section-head {
    margin-bottom: 10px;
}

.section-head h3 {
    font-size: 0.98rem;
    letter-spacing: -0.01em;
}

.workspace-board {
    gap: 12px;
}

.summary-panel-grid {
    gap: 8px;
}

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

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

    .topbar-search {
        min-width: 240px;
    }
}

@media (max-width: 960px) {
    .app-main {
        padding: 12px 14px 18px;
    }

    .sidebar {
        padding: 18px 14px 14px;
        border-radius: 0 16px 16px 0;
    }

    .mobile-nav-toggle,
    .sidebar-close {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .topbar {
        gap: 10px;
        padding: 0 0 8px;
    }

    .topbar-logo {
        max-height: 20px;
    }

    .topbar-copy h1 {
        font-size: 1.06rem;
    }

    .topbar-copy p {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .topbar-search,
    .topbar-meta-actions,
    .topbar-session,
    .company-switcher-form {
        width: 100%;
    }

    .topbar-meta-actions {
        justify-content: flex-start;
    }

    .topbar-search input,
    .company-switcher-form select,
    .topbar-shortcut,
    .topbar-session .button {
        width: 100%;
    }

    .topbar-session {
        padding-left: 0;
        border-left: 0;
        flex-wrap: wrap;
    }

    .user-chip {
        width: 100%;
    }

    .workflow-hero {
        gap: 8px;
        padding-bottom: 8px;
    }

    .workflow-hero-actions {
        width: 100%;
    }

    .workflow-hero-actions .button,
    .workflow-hero-actions .button-secondary,
    .workflow-hero-actions .button-danger {
        width: 100%;
        justify-content: center;
    }
}

/* Software density refinement */
.app-shell {
    grid-template-columns: 222px 1fr;
}

.app-main {
    padding: 14px 18px 22px;
}

.sidebar {
    padding: 18px 14px 14px;
}

.brand {
    margin-bottom: 14px;
}

.nav {
    gap: 8px;
}

.nav-section {
    gap: 2px;
}

.nav-section-title {
    margin: 0 9px 1px;
    font-size: 0.65rem;
}

.nav a {
    padding: 6px 9px 6px 13px;
}

.nav a::before {
    top: 5px;
    bottom: 5px;
}

.nav-item-label {
    font-size: 0.86rem;
}

.sidebar-context {
    margin-top: 10px;
    padding: 8px 10px;
}

.topbar {
    gap: 8px 14px;
    margin-bottom: 8px;
    padding: 0 0 8px;
}

.topbar-brand {
    gap: 10px;
}

.topbar-copy h1 {
    font-size: clamp(1.06rem, 1.25vw, 1.34rem);
}

.topbar-copy p {
    max-width: 56ch;
    font-size: 0.79rem;
}

.topbar-actions,
.topbar-meta-actions {
    gap: 6px 8px;
}

.topbar-search {
    min-width: min(280px, 100%);
    max-width: 320px;
}

.topbar-search input,
.company-switcher-form select {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 9px;
}

.topbar-session {
    gap: 6px;
    padding-left: 6px;
}

.user-chip {
    min-height: 34px;
    padding: 5px 9px;
}

.user-chip strong {
    font-size: 0.82rem;
}

.user-chip small {
    font-size: 0.7rem;
}

.button,
.button-secondary,
.button-danger {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 0.82rem;
}

input,
select,
textarea {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
}

textarea {
    min-height: 88px;
}

.toolbar,
.button-row,
.inline-form,
.module-filter-toolbar,
.customer-filter-toolbar,
.calendar-filter-form {
    gap: 8px 10px;
}

.workflow-hero {
    gap: 8px 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.workflow-hero-copy {
    gap: 3px;
}

.workflow-hero-copy h1 {
    font-size: clamp(1.12rem, 1.35vw, 1.4rem);
}

.workflow-hero-copy p {
    font-size: 0.81rem;
    line-height: 1.34;
}

.workflow-meta-row {
    gap: 6px;
    margin-top: 8px;
}

.workflow-meta-pill {
    gap: 2px;
    padding: 6px 8px;
    border-radius: 9px;
}

.workflow-meta-pill span {
    font-size: 0.67rem;
    letter-spacing: 0.05em;
}

.workflow-meta-pill strong,
.workflow-meta-pill .status-inline {
    font-size: 0.82rem;
}

.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid,
.calendar-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    background: transparent;
    border: 0;
    overflow: visible;
}

.overview-grid > .metric-card,
.settings-summary-grid > .settings-summary-card,
.settings-readiness-grid > .settings-summary-card,
.work-order-kpi-grid > .metric-card,
.calendar-stat-strip > .calendar-mini-stat {
    padding: 8px 10px;
    border: 1px solid #dde6eb;
    border-radius: 9px;
    background: #fbfcfd;
}

.metric-card,
.settings-summary-card,
.calendar-mini-stat {
    gap: 2px;
    box-shadow: none;
}

.metric-card span,
.settings-summary-card .eyebrow,
.calendar-mini-stat span {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.metric-card strong,
.settings-summary-card strong,
.calendar-mini-stat strong {
    font-size: 1.02rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.metric-card small,
.settings-summary-card p,
.calendar-mini-stat small {
    font-size: 0.75rem;
    line-height: 1.35;
}

.workspace-board {
    gap: 10px;
    grid-template-columns: minmax(0, 1.55fr) 272px;
}

.workspace-main {
    order: initial;
}

.workspace-side {
    order: initial;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.detail-grid,
.module-detail-grid,
.module-history-grid,
.customer-history-grid,
.activity-layout,
.calendar-shell,
.user-create-layout,
.public-card-split,
.work-order-shell {
    gap: 14px;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.82fr);
}

.detail-stack,
.activity-list,
.calendar-side-stack {
    gap: 14px;
}

.card,
.summary-panel,
.table-card,
.module-filter-card,
.focus-panel,
.settings-panel,
.module-detail-card,
.work-order-section,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.execution-card,
.execution-ops-card,
.work-order-side-card,
.user-create-card,
.user-rule-card,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card,
.accordion-card,
.info-box,
.empty-state,
.upload-panel {
    border-radius: 9px;
}

.card {
    padding: 12px 14px;
}

.summary-panel-head,
.table-card > .section-head,
.settings-panel-head {
    padding: 11px 12px 0;
}

.summary-panel-body,
.settings-panel-body,
.module-filter-card,
.calendar-filter-card {
    padding: 10px 12px 12px;
}

.focus-panel {
    padding: 10px 12px;
    border-left-width: 1px;
}

.module-list-card,
.customer-list-card,
.user-list-row,
.activity-card,
.mobile-assignment-card,
.task-card,
.contact-editor-card {
    padding: 12px 14px;
}

.summary-tile,
.module-meta-card,
.customer-meta-card,
.user-mini-card,
.mobile-meta-card {
    padding: 8px 9px;
    border-radius: 9px;
}

.section-head {
    margin-bottom: 8px;
}

.section-head h3 {
    font-size: 0.95rem;
}

.summary-list div {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
}

.summary-list dt {
    font-size: 0.73rem;
    letter-spacing: 0.06em;
}

.summary-list dd,
.summary-list p {
    font-size: 0.88rem;
    line-height: 1.45;
}

.module-related-item,
.customer-related-item {
    gap: 12px;
    padding: 11px 0;
}

.module-related-meta,
.customer-related-meta {
    gap: 6px;
}

.table th {
    padding: 9px;
    font-size: 0.68rem;
}

.table td {
    padding: 8px 9px;
    font-size: 0.88rem;
}

.table td small {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.3;
}

.table-actions a,
.table-actions button {
    min-height: 26px;
    padding: 0 8px;
    font-size: 0.76rem;
}

.info-box,
.empty-state,
.upload-panel {
    padding: 10px 12px;
    background: #f8fbfc;
}

.dashboard-priority-card {
    padding: 10px 12px;
}

@media (max-width: 1240px) {
    .workspace-board,
    .detail-grid,
    .module-detail-grid,
    .module-history-grid,
    .customer-history-grid,
    .activity-layout,
    .calendar-shell,
    .user-create-layout,
    .public-card-split,
    .work-order-shell {
        grid-template-columns: 1fr;
    }

    .workspace-side {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

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

@media (max-width: 960px) {
    .app-main {
        padding: 12px 12px 16px;
    }

    .workspace-side {
        grid-template-columns: 1fr;
    }

    .overview-grid,
    .settings-summary-grid,
    .settings-readiness-grid,
    .work-order-kpi-grid,
    .calendar-stat-strip {
        grid-template-columns: 1fr 1fr;
    }

    .summary-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .module-related-item,
    .customer-related-item {
        flex-direction: column;
        align-items: stretch;
    }

    .module-related-meta,
    .customer-related-meta {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .overview-grid,
    .settings-summary-grid,
    .settings-readiness-grid,
    .work-order-kpi-grid,
    .calendar-stat-strip {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .button-row,
    .inline-form {
        align-items: stretch;
    }
}

/* Control surface refinement */
.topbar {
    gap: 6px 12px;
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom-color: #e3eaee;
}

.topbar-brand {
    gap: 9px;
}

.topbar-logo {
    max-height: 22px;
}

.topbar-kicker-row {
    gap: 6px;
}

.eyebrow,
.topbar-context-pill {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
}

.topbar-context-pill {
    min-height: 20px;
    padding: 0 7px;
    background: rgba(248, 251, 253, 0.96);
    border-color: #e1e8ec;
    color: #70818a;
}

.topbar-copy h1 {
    font-size: clamp(1.02rem, 1.18vw, 1.28rem);
    letter-spacing: -0.018em;
}

.topbar-copy p {
    max-width: 52ch;
    font-size: 0.77rem;
    color: #73838c;
}

.topbar-actions,
.topbar-meta-actions {
    gap: 6px;
}

.topbar-search {
    max-width: 300px;
}

.topbar-search input,
.company-switcher-form select,
.user-chip {
    min-height: 33px;
    border-radius: 8px;
    border: 1px solid #dfe7eb;
    background: #f9fbfc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.topbar-search input,
.company-switcher-form select {
    padding: 0 10px;
    color: #32414a;
}

.topbar-search input::placeholder {
    color: #8f9da5;
}

.topbar-session {
    gap: 6px;
    padding-left: 0;
    border-left: 0;
}

.user-chip {
    padding: 4px 9px;
}

.user-chip strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22323a;
}

.user-chip small {
    font-size: 0.69rem;
    color: #788891;
}

.mobile-nav-toggle,
.sidebar-close {
    border-color: #dde5ea;
    background: #f9fbfc;
    color: #304049;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mobile-nav-toggle span {
    background: #40545f;
}

.button,
.button-secondary,
.button-danger {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.button {
    background: linear-gradient(180deg, #f6fbfd 0%, #edf5f9 100%);
    border-color: #cadbe5;
    color: #2a536b;
}

.button:hover {
    background: linear-gradient(180deg, #fbfdfe 0%, #f2f7fa 100%);
    border-color: #bfd2dd;
    color: #24485d;
}

.button-secondary {
    background: #ffffff;
    border-color: #d7e1e6;
    color: #40545f;
}

.button-secondary:hover {
    background: #fbfcfd;
    border-color: #ccd9df;
    color: #314550;
}

.button-danger {
    background: #fff8f7;
    border-color: #efd8d3;
    color: #9f4030;
}

.button-danger:hover {
    background: #fff2f0;
    border-color: #e7c5be;
    color: #8d3628;
}

input,
select,
textarea {
    border-color: #dce5e9;
    background: #fbfcfd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #bfd1db;
    box-shadow: 0 0 0 3px rgba(197, 215, 224, 0.24);
}

.inline-form input[type="text"],
.inline-form input[type="email"],
.inline-form input[type="search"],
.inline-form input[type="number"],
.inline-form input[type="date"],
.inline-form select {
    min-height: 32px;
    border-radius: 8px;
}

@media (max-width: 960px) {
    .topbar {
        padding-bottom: 6px;
    }

    .topbar-search,
    .topbar-search input,
    .company-switcher-form select,
    .topbar-shortcut,
    .topbar-session .button {
        max-width: none;
    }
}

/* Rebuilt application toolbar */
.app-main {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.app-page {
    display: grid;
    gap: 12px;
    min-width: 0;
}

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

.app-toolbar {
    position: static;
    z-index: auto;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #dbe4e9;
    box-shadow: none;
    overflow: hidden;
    isolation: isolate;
}

.app-toolbar-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 10px 14px;
    min-height: 56px;
    min-width: 0;
}

.app-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-toolbar-context {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-toolbar-logo {
    display: none;
    height: 18px;
    width: auto;
    flex-shrink: 0;
}

.app-toolbar-meta {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.app-toolbar-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #73838c;
}

.app-toolbar-scope {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2d35;
}

.app-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.app-toolbar-search,
.app-toolbar-switcher {
    flex: 0 1 auto;
}

.app-toolbar-search label,
.app-toolbar-switcher label {
    position: relative;
    display: block;
}

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

.app-toolbar-search input,
.app-toolbar-switcher select {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #dbe4e9;
    background: #ffffff;
    color: #30414b;
    box-shadow: none;
}

.app-toolbar-search {
    min-width: 280px;
    max-width: 320px;
}

.app-toolbar-search input {
    width: 100%;
}

.app-toolbar-switcher select {
    min-width: 210px;
    max-width: 280px;
}

.app-toolbar-action,
.app-toolbar-logout {
    min-height: 34px;
}

.app-toolbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid #e3eaee;
}

.app-toolbar-user-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.app-toolbar-user-copy strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    color: #23323a;
}

.app-toolbar-user-copy small {
    font-size: 0.71rem;
    line-height: 1.2;
    color: #76868f;
}

.app-toolbar-logout-form {
    flex: 0 0 auto;
}

@media (max-width: 1240px) {
    .app-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .app-toolbar-left,
    .app-toolbar-right {
        width: 100%;
    }

    .app-toolbar-right {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .app-main {
        gap: 10px;
    }

    .app-toolbar-row {
        padding: 10px 12px;
    }

    .app-toolbar-logo {
        display: block;
    }

    .app-toolbar-right {
        justify-content: flex-start;
    }

    .app-toolbar-search,
    .app-toolbar-switcher,
    .app-toolbar-user {
        width: 100%;
        max-width: none;
    }

    .app-toolbar-switcher select,
    .app-toolbar-search input,
    .app-toolbar-action,
    .app-toolbar-logout {
        width: 100%;
        max-width: none;
    }

    .app-toolbar-user {
        padding-left: 0;
        border-left: 0;
        justify-content: space-between;
    }
}

@media (max-width: 560px) {
    .app-toolbar-context {
        gap: 8px;
    }

    .app-toolbar-user {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Header stability lock */
header.app-toolbar {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    opacity: 1;
    backdrop-filter: none;
    background: #ffffff;
    overflow: visible;
}

.app-toolbar-row,
.app-toolbar-left,
.app-toolbar-right {
    min-width: 0;
}

.app-toolbar-row {
    background: #ffffff;
}

.app-page,
.workspace-content {
    margin-top: 0;
    padding-top: 0;
}

.app-toolbar-search input,
.app-toolbar-switcher select,
.app-toolbar-user,
.mobile-nav-toggle,
.sidebar-close {
    opacity: 1;
    background: #ffffff;
    backdrop-filter: none;
}

.app-toolbar-search input,
.app-toolbar-switcher select {
    max-width: 100%;
}

.app-toolbar-right {
    align-content: center;
}

@media (max-width: 1440px) {
    .app-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .app-toolbar-left,
    .app-toolbar-right {
        width: 100%;
    }

    .app-toolbar-right {
        justify-content: flex-start;
    }
}

/* Unified notifications */
.app-toast-region {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 110;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.app-notice-stack {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.app-notice {
    --notice-surface: #ffffff;
    --notice-border: #dbe4e9;
    --notice-text: #20303a;
    --notice-muted: #63757f;
    --notice-icon-bg: #eef3f6;
    --notice-icon-text: #314752;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--notice-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--notice-surface) 100%);
    color: var(--notice-text);
    box-shadow: 0 10px 30px rgba(16, 36, 42, 0.08);
    overflow-wrap: anywhere;
}

.app-notice-inline {
    width: 100%;
}

.app-notice-toast {
    pointer-events: auto;
    transform: translateY(-6px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.app-notice-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.app-notice.is-closing {
    opacity: 0;
    transform: translateY(-4px);
}

.app-notice-success {
    --notice-surface: #f7fcf9;
    --notice-border: #cfe4d8;
    --notice-icon-bg: #e7f7ee;
    --notice-icon-text: #206944;
}

.app-notice-error {
    --notice-surface: #fff8f7;
    --notice-border: #f0d7d3;
    --notice-icon-bg: #fdeceb;
    --notice-icon-text: #9e4133;
}

.app-notice-warning {
    --notice-surface: #fffaf3;
    --notice-border: #ecd9b6;
    --notice-icon-bg: #fff0d9;
    --notice-icon-text: #9b5a10;
}

.app-notice-info {
    --notice-surface: #f7fbfd;
    --notice-border: #d8e5ec;
    --notice-icon-bg: #ebf4f8;
    --notice-icon-text: #3f6477;
}

.app-notice-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--notice-icon-bg);
    color: var(--notice-icon-text);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.app-notice-content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.app-notice-kicker {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--notice-muted);
}

.app-notice-head {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-notice-head strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.app-notice-head p,
.app-notice-description {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--notice-muted);
}

.app-notice-description {
    margin-top: 2px;
}

.app-notice-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--notice-text);
}

.app-notice-dismiss {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(130, 148, 157, 0.28);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--notice-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.app-notice-dismiss:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--notice-text);
}

.form-error-message {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #a33f30;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: #d88e84;
    background: #fff9f8;
    box-shadow: 0 0 0 3px rgba(216, 142, 132, 0.14);
}

label.is-invalid > span:first-child {
    color: #8f3a2d;
}

@media (max-width: 960px) {
    .app-toast-region {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .app-notice {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .app-notice-dismiss {
        grid-column: 2;
        justify-self: end;
        margin-top: -2px;
    }
}

@media (prefers-color-scheme: dark) {
    .app-notice {
        --notice-surface: #142129;
        --notice-border: #2a3c45;
        --notice-text: #eef5f8;
        --notice-muted: #afc0c9;
        --notice-icon-bg: rgba(255, 255, 255, 0.08);
        --notice-icon-text: #f2f6f8;
        background: linear-gradient(180deg, rgba(19, 31, 38, 0.98) 0%, var(--notice-surface) 100%);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    }

    .app-notice-success {
        --notice-border: #325342;
        --notice-icon-bg: rgba(71, 158, 107, 0.18);
        --notice-icon-text: #a7efc2;
    }

    .app-notice-error {
        --notice-border: #5a3534;
        --notice-icon-bg: rgba(191, 92, 79, 0.18);
        --notice-icon-text: #ffb4aa;
    }

    .app-notice-warning {
        --notice-border: #5a4a2a;
        --notice-icon-bg: rgba(199, 148, 54, 0.2);
        --notice-icon-text: #ffd89a;
    }

    .app-notice-info {
        --notice-border: #314b58;
        --notice-icon-bg: rgba(84, 137, 164, 0.18);
        --notice-icon-text: #b9dcf0;
    }

    .app-notice-dismiss {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
        color: #d8e4ea;
    }

    input[aria-invalid="true"],
    select[aria-invalid="true"],
    textarea[aria-invalid="true"] {
        border-color: #9f675f;
        background: rgba(159, 103, 95, 0.12);
        box-shadow: 0 0 0 3px rgba(159, 103, 95, 0.16);
    }
}
